Message: Retrieving source track info in UserStackingAction::NewStage() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Retrieving source track info in UserStackingAction::NewStage() 

Forum: Event and Track Management
Date: 03 Feb, 2010
From: <>

Dear G4 experts,

I am following the extended example RE01 to find the energy deposited in my sensitive detector per track and associate the hits with the source tracks (tracks that enter the detector volume and originate outside the detector). Everything is working correctly, except I do not seem to be able to retrieve the information for the source track in NewStage() method of my userStackingAction. This should be possible by using the userTrackInformation that stores the source track information by: trackInfo->SetSourceTrackInformation() at ClassifyNewTrack() when the source track is suspended and transferred to the waiting stack!

However, for some reason (*THC)[i]->GetTrackInformation()->Print() causes my code to crash with a segmentation fault. Also (*THC)[i]->GetTrackInformation() returns the initial values of the source track information and not the values set in the ClassifyNewTrack. For example (*THC)[i]->GetTrackInformation()->GetSourceTrackID() returns -1 or (*THC)[i]->GetTrackInformation()->GetSource Energy() returns 0.

I have followed the RE01CalorimeterHit.hh in defining the TrackInformation for hits. The only thing missing is I do not have a userTrajectory class and just using the G4Trajectory. I assume that would not make a difference.

I appreciate any thoughts and guidance on this matter.

Thanks in advance, Maryam

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

1 Ok: Re: Retrieving source track info in UserStackingAction::NewStage()   ( - 04 Feb, 2010)
 Add Message Add Message
to: "Retrieving source track info in UserStackingAction::NewStage()"

 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 ]