ROOT Tree in Delphes

I am posting this doubt here since I did not receive a reply from DELPHES even after 2 months. How do I extract px, py, pz and E of the jets produced in the root tree?


I am using Delphes too. By the way, Just check the Example folder in Delphes. There is a tutorial macro there on how to extract the following variables. For instance the example1.c is invariant mass and i think also the momentum.


besides @marlon.brade’s excellent suggestion, please see this post for a list of interfaces that you can use to read ROOT data – things should work the same for Delphes TTrees as for other TTrees.

You can also search the forum for other posts about Delphes.

If you share the code you have so far and what errors you are encountering we might be able to help further.


I did go through the examples. And I saw that after they define jet as a pointer they use

    jet -> PT()     //for transverse momentum of the jet.

so the command I gave is

    jet -> Px() 
    jet -> Py() 
    jet -> Pz() 

which gave me an error.

In example 1, what I understood is we can extract the TLorentzvector as ‘P4’ and give this as input to calculate invariant mass. But this is done for particles. Do you think the same can be done for jets? If I wish to find the invariant mass of 2 jets, then isn’t it wrong to calculate it by adding their invariant masses? Wouldn’t the right logic be to sum the corresponding energies and momentas of the 2 jets. ?