Fork me on GitHub

Opened 8 years ago

Last modified 8 years ago

#1042 new How to

Trouble retrieving the decay channel in Delphes

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

Description (last modified by Pavel Demin)

Hello,

I am having trouble accessing the decay channel from the delphes output. For example, to reconstruct a pair of jets given 4 or 6 jets, I need to compare the kinematics of the original pair at the generation level with the other possible combinations and define a cut. So basically, I need to get all the decay channel (mothers especially) to be able to do that.

I tried using the GenParticle class with access to the mother of each particle as in what follows :

// after detecting jet1 as a jet
GenParticle *jet = (GenParticle*) (jet1);
cout << "Mother index   " << jet->M1 << endl;
GenParticle *mother = (GenParticle*) (branchParticle->At(jet->M1)); 
// branchParticle = treeReader->UseBranch("Particle")

But I get indices that are far beyond any imaginable size of my branches (something like 841663897 while branchParticle has only 691 entries) and I can't access to any element of the decay channel. Is "Particle" the right branch to use ?

I also tried testing this and it gives some results :

for(int i=0; i<50; i++)
{
  particle = (GenParticle *)(branchParticle->At(i));
  cout << "Mother index   " << particle->M1 << endl ;
  if((particle->M1 >-1) && (particle->M1 < branchParticle->GetSize()))
  {
    mother = (GenParticle *)(branchParticle->At(particle->M1));
    histMother->Fill(mother->E); // a histogram just to test if there's an output
    cout << " done " <<  endl;
  }
}

But I couldn't access the jets through this branch. I don't know if it's possible to do that actually.

Could you please tell me what's wrong with what I did ? Are these the right methods to use or is there some other way that I'm missing ?

Thanks,
Aimane

Change History (6)

comment:1 by Aimane, 8 years ago

Type: BugHow to

comment:2 by Pavel Demin, 8 years ago

Description: modified (diff)

comment:3 by Pavel Demin, 8 years ago

What Delphes version and what card are you using?

comment:4 by Pavel Demin, 8 years ago

If jet1 points to an object from the Jets branch, then accessing it via a GenParticle pointer is not a good idea.

I'd suggest to start with the gen jets (branch GenJet) and try to access the jet's constituents as it's done in Example3.C:
https://cp3.irmp.ucl.ac.be/projects/delphes/browser/git/examples/Example3.C

Version 2, edited 8 years ago by Pavel Demin (previous) (next) (diff)

comment:5 by Aimane, 8 years ago

I am using Delphes 3.3.2 and ILD card.

I will try this, thank you very much!

comment:6 by Aimane, 8 years ago

Dear Pavel,

Excuse me but I am not sure I got it alright. When I use GenJet it should provide the jets at the generation level, right ? If so, what is the use of the GenParticle constituents and how can I qssociate it with reconstructed jets?

Otherwise, should I get the generation level through the GenParticle elements in the jet constituents ? And how can I do so ?

What I need actually is associate reconstructed jets to generated jets in order to compare all possible combinations after individual detection, either directly or through the leading particle.

Thanks again,

Aimane

Note: See TracTickets for help on using tickets.