Message: Passing info to tracks Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Passing info to tracks 

Forum: Event and Track Management
Date: 12 Sep, 2009
From: Jean-Pascal Laedermann <Jean-Pascal Laedermann>

Hello,

For each event, I have a bunch of inital particles I need to mark individually for the tracking.

As M. Asai suggested (26 may 2006), I made a PrimaryParticleInfo attached to each primary vertex, but I don't know how to transfer this info to track. M. Asai said that G4Track has a pointer to PrimaryParticle if it is a primary track, but this pointer doesn't appear in the G4Track class.

So I modified the ParticleDefinition class in adding an index before passing it to the ParticleGun.

Another problem appears : in PreUserTrackingAction, the track is stated as const, so it is not straightforward to add the info. The only ways I found is to use the G4TrackingManager::GetTrack () to retrieve the track as non const, or to uncast the track with const_cast<G4Track*> (which is a bit heretic ...)

Has somebody a more elegant solution ?

Regards.

Jean-Pascal

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

1 None: Re: Passing info to tracks   (Tom Roberts - 12 Sep, 2009)
 Add Message Add Message
to: "Passing info to tracks"

 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 ]