Message: Re: Setting TrackID Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Setting TrackID 

Forum: Event and Track Management
Re: None Setting TrackID (Tom Roberts)
Date: 11 Mar, 2009
From: Makoto Asai <Makoto Asai>


Please note that what you get with the method
is a pointer to G4PrimaryParticle, and this is NOT G4Track. 
TrackID in G4Track object is automatically assigned by G4EventManager, 
and this is NOT supposed to be modified by a user. For your purpose, 
please use 

You may assign any kinds of information to your own class derived 
from G4VUserPrimaryParticleInformation and set it to G4PrimaryParticle 
object. The information could be your own event/track ID or any other 
information you think beneficial. This should be done in your
PrimaryGeneratorAction. Then, G4Track of primary particle has a link 
to its original G4PrimaryParticle, so that you have a connection to your 
G4VUserPrimaryParticleInformation. You may copy this information to your 
own class derived from G4VUserTrackInformation and set it to the 
corresponding G4Track object, and also you may copy it to the secondary 
tracks, if you want. G4VUserTrackInformation should be dealt in your
UserTrackingAction. For an example of the use of G4VUserTrackInformation,
please refer to examples/extended/runAndEvent/RE01.

Please note that G4Track is a transient object. Thus, you may need to 
have your own trajectory class to store your information which are 
assigned to your G4VUserPrimaryParticleInformation and/or 
G4VUserTrackInformation class objects.


 Add Message Add Message
to: "Re: Setting TrackID"

 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 ]