Message: Re: Is there a simple way to get parent name of a track? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Is there a simple way to get parent name of a track? 

Forum: Event and Track Management
Re: None Is there a simple way to get parent name of a track? (Fada Guan)
Date: 11 Sep, 2011
From: Neil Fazel <Neil Fazel>

On Sun, 11 Sep 2011 05:19:49 GMT, Fada Guan wrote:
> Dear experts:
> 
> We can use GetParentID to obtain the parentID of a track?
> 
> Is there a simple way to obtain the parent Name of a track?
> 
> Is there a G4TrackVector object containing all tracks with IDs and
> names.
> 
> Do I have to use the trajectory or userTrackInformation?
> 
> Thanks a lot.
> 
> Best regards.
> 
> Fada
> 

Yes, aStep->GetTrack()->GetParentID() gives you the parent ID of a track.

If by name you mean the name of the parent particle, you can get that using

aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetParticleName()

(There may be a more direct way, but this is what I use.)

Neil

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

1 None: Re: Is there a simple way to get parent name of a track?   (Fada Guan - 11 Sep, 2011)
(_ Feedback: Re: Is there a simple way to get parent name of a track?   (Neil Fazel - 11 Sep, 2011)
(_ None: Re: Is there a simple way to get parent name of a track?   (Fada Guan - 11 Sep, 2011)
(_ Feedback: Re: Is there a simple way to get parent name of a track?   (Neil Fazel - 11 Sep, 2011)
 Add Message Add Message
to: "Re: Is there a simple way to get parent name of a track?"

 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 ]