Fork me on GitHub

Opened 8 years ago

Last modified 8 years ago

#1042 new How to

Trouble retrieving the decay channel in Delphes — at Version 2

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 (2)

comment:1 by Aimane, 8 years ago

Type: BugHow to

comment:2 by Pavel Demin, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.