Ma5 : how to use MT2?

Asked by Abhaya Kumar Swain

Hi Ma5 team,

I am trying to calculate MT2 in Madanalysis 5 with the expert mode for an event file in root format. The Ma5 version I am using is "1.6.18" which has MT2 defined in it. I am calling MT2 inside the code as follows,

double Mt2 = PHYSICS->Transverse->MT2(SignalJets, SignalElectrons, event.rec()->MET().momentum(), NuMass);

with "SignalJets" and "SignalElectrons" are defined as "vector<const RecJetFormat*>" and "vector<const RecLeptonFormat*> " formats respectively.

When I run the code it gives error:
error: no matching function for call to ‘MA5::TransverseVariables::MT2(std::vector<const MA5::RecJetFormat*>&, std::vector<const MA5::RecLeptonFormat*>&, const MA5::MALorentzVector&, double&)’

Any help in solving this error would very much appreciated. In case you need more information please let me know.

Thanks in advance
Abhaya

Question information

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

Hi Abhaya,

The MT2 variable is defined here:
  tools/SampleAnalyzer/Commons/Service/TransverseVariables.h

There are two ways to provide the arguments to the method:
 - MT2(const MALorentzVector* , const MALorentzVector* , const MALorentzVector&, const double &);
 - MT2(const ParticleBaseFormat*, const ParticleBaseFormat*, const ParticleBaseFormat&, const double &);

None of them corresponds to what you coded, which is why compilation failed.

Regards,

Benjamin

Revision history for this message
Abhaya Kumar Swain (abhaya.swain) said :
#2

Thanks Benjamin Fuks, it is working now.
Thanks a lot.

Revision history for this message
Abhaya Kumar Swain (abhaya.swain) said :
#3

Thanks Benjamin Fuks, that solved my question.