Fork me on GitHub

Opened 10 years ago

Last modified 10 years ago

#276 new How to

GenParticle Information

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

Description

Dear Expert,

I am using SUSY full model samples generated by Delphes and what I need is to distinguish events according to the sparticle decay modes. So I need to know pdgID of the particle's mother. For the GenParticle collection, there are two parameters which are called M1 and M2.
To understand them for few events, print them out, put some of them here:
M1:1363 M2:-1
M1:1364 M2:-1
M1:1739 M2:-1
M1:1736 M2:-1
M1:1742 M2:-1

It seems to me that they are not the index of particle's mother in each event. In fact I want to reconstruct the decay chain for some particles.
Could you please let me know how can I get pdgId of particle's mother from these parameter M1,M2.

Change History (1)

comment:1 by Pavel Demin, 10 years ago

The particle indices start from 0. When M2 is set to -1 it means that the particle has only one mother and the index of this mother particle is given by M1.

I'd say that the following code could be used to get pdgId of particle's mother:

TClonesArray *branchParticle = treeReader->UseBranch("Particle");

GenParticle *particle, *mother;
Int_t index, motherPID;

/* skipped */

particle = (GenParticle *) branchParticle->At(index);
mother = (GenParticle *) branchParticle->At(particle->M1);
motherPID = mother->PID;
Note: See TracTickets for help on using tickets.