MadAnalysis / madanalysis5

A package for event file analysis and recasting of LHC results
http://madanalysis.irmp.ucl.ac.be
GNU General Public License v3.0
22 stars 18 forks source link

Invariant Mass #231

Closed Qazi-Murad closed 9 months ago

Qazi-Murad commented 11 months ago

Question

Dear All, I am working in mass reconstruction for new physics particle. For hadronically decaying leg, I already got some good histograms using MA5. Now for leptonically decaying leg, I made some calculation and plug it into MA5. I am trying to produce histograms for the invariant mass of one lepton plus 2 b-jet plus neutrino. First I calculated the z component related to neutrino as follow; double mW = 80; then some variable related to z-component (I am putting ..... for simplicity as it represent some values present in the code ) double A = ..... double F = ...... double G = ....... then define z-component as double missing_pz = F+sqrt(pow(F,2),G); then also define the E component double missing_E = ....... then I define : MALorentzVector Neutrino(pTmiss.Px(), pTmiss.Py(), missing_pz, missing_E); and then : double mdq = (SignalMuons[0]->momentum() + SignalBJets[0]->momentum() + SIgnalBJets[1]->momentum() + Neutrino->momentum()).M(); Where mdq represent the invariant mas. After compiling it gives an error related to the Neutrino part in the above line. The error: base operand of ‘->’ has non-pointer type ‘MA5::MALorentzVector’. I belive I am missing some step but I don't know where. Any advise or suggestion, what should I do? or what type of changes should I make? So that Neutrino vector also works like other and I get the invariant mass.

jackaraz commented 11 months ago

Hi @Qazi-Murad, I feel like you haven't defined your neutrino as a pointer, so Neutrino.momentum() might work.

Qazi-Murad commented 11 months ago

Hi @jackaraz, Following your suggestion I get the error: ‘class MA5::MALorentzVector’ has no member named ‘momentum’. I attached the two files .cpp and header. Can you just look at where I have made a mistake? The code we are discussing starts from line 199 in the .cpp file. Other stuff is not related to the leptonically decaying leg, so comment on it. Files.zip

jackaraz commented 11 months ago

Ah, I see the issue. It's a Lorentz vector, not a particle; hence, it does not have momentum. Momentum itself is a Lorentz vector.

Qazi-Murad commented 11 months ago

So should I define it as a particle, like I define SignalJets or Signal Muons? But how since it is a neutrino? If possible, Can you make changes to the files?

jackaraz commented 11 months ago

You are dealing with four-momentum of particles. The only difference between a particle and a four-momentum is the particle's charge and identity. Since you don't need those, I don't see the reason why you would need to write it as a particle.

Qazi-Murad commented 11 months ago

So what should I do? I need to produce invariant mass from neutrino plus muon plus 2b-jet.

jackaraz commented 11 months ago

you are adding up Lorentz vectors, and your neutrino object is a Lorentz vector.