Fork me on GitHub

Opened 10 years ago

Last modified 10 years ago

#283 new How to

Different Branch name

Reported by: Daniele Owned by:
Priority: major Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Hi,
I am generating events for a process, say p p -> e+ e~, up to detector simulation level through MadGraph+pythia+delphes chain, and I found something different in the root output of delphes, which I would like to analyse,with respect of what I had a couple month ago.

If I open the root file I don't have anymore the Trees Analysis, Gen e Trigger, but just a Delphes tree, but this is not a problem.
What I don't find however are all the branches like Electron.Px, Electron.Py,Electron.E, Muon.Px etc etc, which I would like to use, while I just can find the electron Pt, Eta and Phi for example.
Is this due to some delphes update, which I was not aware of, or am I missing something else?

Thanks

Daniele

Change History (4)

comment:1 by Michele Selvaggi, 10 years ago

Hi Daniele,

you have probably been using a very old Delphes version (<=2).
We have indeed removed the Trigger branch, and the Gen branch is now under Delphes/Particle.

If you want to access Px, Py, Pz you can use the TLorentzVector class from ROOT (http://root.cern.ch/root/html/TLorentzVector.html):

TLorentzVector V_ele;
V_ele.SetPtEtaPhiM(ele->PT, ele->Eta, ele->Phi, mass_ele);

cout<<V_ele.Px()<<","<<V_ele.Py();

Cheers,
Michele

in reply to:  1 comment:2 by Daniele, 10 years ago

Replying to mselvaggi:

Hi Daniele,

you have probably been using a very old Delphes version (<=2).
We have indeed removed the Trigger branch, and the Gen branch is now under Delphes/Particle.

If you want to access Px, Py, Pz you can use the TLorentzVector class from ROOT (http://root.cern.ch/root/html/TLorentzVector.html):

TLorentzVector V_ele;
V_ele.SetPtEtaPhiM(ele->PT, ele->Eta, ele->Phi, mass_ele);

cout<<V_ele.Px()<<","<<V_ele.Py();

Cheers,
Michele

Hi Thank you for the clarification.
Actually I needed that variables to plot an invariant mass, but maybe there is a built in function to do this in the page you have linked me.

Daniele

comment:3 by Michele Selvaggi, 10 years ago

Yes there is, and you can actually have a look at Example*.C in the examples directory in your Delphes installation.

Michele

in reply to:  3 comment:4 by Daniele, 10 years ago

Replying to mselvaggi:

Yes there is, and you can actually have a look at Example*.C in the examples directory in your Delphes installation.

Michele

Thanks

Daniele

Note: See TracTickets for help on using tickets.