Message: Re: Getting parent particle Name Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Getting parent particle Name 

Keywords: Retrieve the parent particle Name
Forum: Event and Track Management
Re: None Getting parent particle Name (ZIAD)
Date: 10 Apr, 2004
From: Jeremy McCormick <Jeremy McCormick>

Determining a parent particle requires some additional overhead. You will most likely need to customize the G4VUserTrackInformation and/or G4VTrajectory. This allows you to store transient information from your tracks which, as you know, is lost as each track is destroyed. This can include parent particles, originating processes, etc.

Propagation to child particles takes place in the EndOfTrackingAction within TrackingAction. You can use the GimmeSecondaries method to get a track's child tracks before they are actually tracked. This allows you to set their G4VUserTrackInformation according to a) the parent's track info or b) a new track info in the case of the track's id = 0.

To store this info in your hits, you would either retrieve it from a trajectory container during EndOfEventAction or get your G4VUserTrackInformation object in ProcessHits and cast to the correct child class.

These SLAC event tips should be enough to get you started:

http://geant4.slac.stanford.edu/Tips/event/3.html http://geant4.slac.stanford.edu/Tips/event/1.html

BTW, you can retrieve the id of a track's parent, but the actual track is usually unaccessible (i.e. transient) unless you've taken special actions such as keeping it on the stack using StackingAction.

Hope that helps.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: Getting parent particle Name"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]