Message: Re: Relation between physical particles and G4Tracks Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Relation between physical particles and G4Tracks 

Forum: Event and Track Management
Re: None Relation between physical particles and G4Tracks (Erik Dietz-Laursonn)
Re: Feedback Re: Relation between physical particles and G4Tracks (Gumplinger Peter)
Date: 04 Jul, 2012
From: Erik Dietz-Laursonn <Erik Dietz-Laursonn>

Dear Peter,
thank you very much for your explanations.

Just one thing, as I perhaps expressed it mistakable:  
>> So my question is: Is it correct, that a particle also creates a new
>> G4Track for itself when creating new particles (e.g. a muon creating
>> photons by scintillation seems to create the photons' G4Tracks as well
>> as a new muon G4Track, having the same trackID, parentID,... as the
>> original muon G4Track)?
>
> I am surprised that you are saying that the trackID has not also changed, or 
> the parentID? That should not be the case. You should be able to trace (if 
> you have saved G4Trajectories) the history of tracks from trackID to 
> parentId, and so on.

In my simulation, I have one muon going through a scintillator. I added "cout"s
in my TrackingAction::PreUserTrackingAction(const G4Track* aTrack) (-> G4cout
<< "TrackID " << aTrack->GetTrackID() << G4endl;G4cout << "ParentID " <<
aTrack->GetParentID() << G4endl;) and in my
SteppingAction::UserSteppingAction(const G4Step* theStep) (-> cout <<
"StepNumber " << theTrack->GetCurrentStepNumber() << G4endl;). That should give
me a list with the trackID of each G4Track followed by the stepnumbers of all
G4Steps belonging to a G4Track. Is that correct? And I get something like this:

TrackID 1     -> my muon
ParentID 0
StepNumber 1
StepNumber 2
StepNumber 3
TrackID 73    -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 72    -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 71    -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
.
.
.
TrackID 2     -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 1     -> my muon again
ParentID 0
StepNumber 4
TrackID 256   -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 255   -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 254   -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
.
.
.
TrackID 74    -> one of the scintillation photons
ParentID 1
StepNumber 1
StepNumber 2
TrackID 1     -> my muon again
ParentID 0
StepNumber 4
.
.
.

This brings me to the conclusion, that the muon has several G4Tracks, which
have all the same TrackID and ParentID (and therefore can be assigned to the
muon) but different StepNumbers (so that the full trajectory of the muon has
continuous StepNumbers). Is do you agree? Because I need to know if my
conclusion is correct, as my logic for assigning the G4Tracks ti the particles
is based on the fact, that the TrackIDs/ParentIDs repeat.

Best regards,
Erik

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

1 None: Re: Relation between physical particles and G4Tracks   (Marc Verderi - 04 Jul, 2012)
(_ Agree: Re: Relation between physical particles and G4Tracks   (Gumplinger Peter - 04 Jul, 2012)
(_ None: Re: Relation between physical particles and G4Tracks   (Erik Dietz-Laursonn - 05 Jul, 2012)
(_ Feedback: Re: Relation between physical particles and G4Tracks   (Gumplinger Peter - 05 Jul, 2012)
 Add Message Add Message
to: "Re: Relation between physical particles and G4Tracks"

 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 ]