How to add simple variable in MA5

Asked by Olivier Mattelaer

Hi,

I would like to define simple new variable in MA5
(like WEIGHTS, X1, X2, E/PZ, ...)

It would be great if you can write an FAQ explaining how it is possible to implement those.

Cheers,

Olivier

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Olivier,

This is pretty easy in modifying the code by hand.
 1) Edit the madanalysis/observable/observable_list.py file and inspire yourself from any existing observable to define yours.
 2) If you need to modify the c++, you may want to add your observable in tools/SampleAnalyzer/Commons/Service. You have there four files, Physics.* and TransverseVariables.* where this can be added. Note that any new method defined in there can be reused for the observable list modifications.

That's it. In the case the c++ is modified, don't forget to recompile SampleAnalyzer.

Cheers,

Benj

Can you help with this problem?

Provide an answer of your own, or ask Olivier Mattelaer for more information if necessary.

To post a message you must log in.