Message: Re: gps/number VS run/beamOn Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: gps/number VS run/beamOn 

Forum: Particles
Re: Question gps/number VS run/beamOn (benny)
Re: Feedback Re: gps/number VS run/beamOn (Gumplinger Peter)
Re: None Re: gps/number VS run/beamOn (benny)
Re: None Re: gps/number VS run/beamOn (Fada Guan)
Date: 28 Mar, 2011
From: Gumplinger Peter <Gumplinger Peter>

If you have more than one primary particle in the event, you need to be careful. Their trackIDs won't be 1, 2, 3 etc. although the very first one being tracked will have [G4Track* track = aStep->GetTrack()]:

track->GetTrackID() == 1

However, they will all have:

track->GetParentID()==0

The 2nd primary will have the track number that falls to it after all of the secondaries (the complete shower) from the first primary have been tracked, and so on. In your SteppingAction logic you'll need to fish out the track numbers being used for your primaries since they will in most cases change from event to event. This is not difficult to do because all steps of a track are consecutive. (except for optical photons where a user can request SetTrackSecondariesFirst)

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

1 None: Re: gps/number VS run/beamOn   (Fada Guan - 31 Mar, 2011)
(_ Warning: Re: gps/number VS run/beamOn   (Gumplinger Peter - 01 Apr, 2011)
(_ None: Re: gps/number VS run/beamOn   (Fada Guan - 01 Apr, 2011)
 Add Message Add Message
to: "Re: gps/number VS run/beamOn"

 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 ]