Skip to Content.
Sympa Menu

sphenix-software-l - Re: [Sphenix-software-l] Where (if anywhere) is truth particle id stored in PH4Ghits?

sphenix-software-l AT lists.bnl.gov

Subject: sPHENIX discussion of software

List archive

Chronological Thread  
  • From: Christof E Roland <cer AT mit.edu>
  • To: David Stewart <0ds.johnny AT gmail.com>
  • Cc: "sphenix-software-l AT lists.bnl.gov" <sphenix-software-l AT lists.bnl.gov>
  • Subject: Re: [Sphenix-software-l] Where (if anywhere) is truth particle id stored in PH4Ghits?
  • Date: Tue, 12 Apr 2022 15:54:54 +0000

Hi, 

its correct. the G4Hit do not store a pointer back to the particle they originate from. 
Usually you first have to to a loop over all g4particles and get their assiciated hits and build a lookup table 
so you can do the navigation back from g4hits to g4particles. 

You can find examples how this is done usually in the SvtxEvaluator code. 

Cheers

   Christof 

On 12. Apr 2022, at 17:00, David Stewart via sPHENIX-software-l <sphenix-software-l AT lists.bnl.gov> wrote:

Hi all,
I looking and grepping through code (mostly /coresoftware/simulation/g4simulation/g4tpc and ../g4intt) and through sPHENIX Doxygen. I wish to map PH4Hit‘s to the associated truth PHG4Particle’s. However, the input is the PH4HitContainer on the node tree, which is iterated through in various ::process_event() files, but I cannot seem to find, either (a) the method to pull a Geant4 particle id from the PHG4HitDefs or PHG4Hit* (the iterated pairs of the PHG4HitContainer) or (b) the location which fills the PHG4HitContainer in the first place.
Any pointers would be greatly appreciated,
Thanks,
Dave

_______________________________________________
sPHENIX-software-l mailing list
sPHENIX-software-l AT lists.bnl.gov
https://lists.bnl.gov/mailman/listinfo/sphenix-software-l

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.24.

Top of Page