Message: Re: Setting Track Info for secondaries Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Setting Track Info for secondaries  

Forum: Event and Track Management
Re: Question Setting Track Info for secondaries (Nigel Hawkes)
Re: Feedback Re: Setting Track Info for secondaries (Gumplinger Peter)
Re: None Re: Setting Track Info for secondaries (Hisaya Kurashige)
Re: Ok Re: Setting Track Info for secondaries (Nigel Hawkes)
Date: 27 Nov, 2013
From: Gumplinger Peter <Gumplinger Peter>

Hi Nigel,

> It looks like ClassifyNewTrack in StackingAction is the proper way to do
> it. I'll check that the information I need about the parent is available
> from there. This info can potentially change from one step of the parent
> track to the next, so I need to be careful about when my
> ClassifyNewTrack will be called.

It is (unfortunately for you) only called at the end of the producing primary's track.

> For an immediate but less elegant solution, using const_cast in
> conjunction with GetSecondaryInCurrentStep looks good. Hopefully just
> changing the fpUserInformation member of the track to point to a User
> Information object will not be harmful. (I'd also be relying on the
> track staying put in memory, as I suspect that if a track is copied the
> fpUserInformation does not carry over.)

You are right! See G4Track & G4Track::operator=(const G4Track &right)

http://www-geant4.kek.jp/lxr/source/track/src/G4Track.cc#L187

However, in G4Track::G4Track(const G4Track& right) and G4Track::CopyTrackInfo(const G4Track& right)

it is copied. Strange... Hisaya?

Peter

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

1 Feedback: Re: Setting Track Info for secondaries   (Nigel Hawkes - 28 Nov, 2013)
 Add Message Add Message
to: "Re: Setting Track Info for secondaries "

 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 ]