Message: Re: User TrackingInformation gets reinitilized ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: User TrackingInformation gets reinitilized ? 

Forum: Event and Track Management
Re: Question User TrackingInformation gets reinitilized ? (Aly Elayeb)
Date: 23 Sep, 2015
From: Gumplinger Peter <Gumplinger Peter>

Hello Aly,

>So the method "PreUserTrackAction" from my TrackingAction gets called,
>and the neutrons get tracked again except that all my data in the
>UserTrackingInformation associated to the neutron are reset.

Please, send me a copy of your code in G4UserTrackingAction.

I suspect that you reset the UserTrackInformation in PreUserTrackAction yourself. To avoid doing this, perhaps you need to code:

MyUserTrackInformation* trackInformation
 = (MyUserTrackInformation*)aTrack->GetUserInformation();

if (!trackInformation) {
   trackInformation = new MyUserTrackInformation();
   fpTrackingManager->SetUserTrackInformation(trackInformation);
}

Peter

 Add Message Add Message
to: "Re: User TrackingInformation gets reinitilized ?"

 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 ]