Message: Re: RE: fWorldBoundary Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

More Re: RE: fWorldBoundary 

Forum: Event and Track Management
Re: Question fWorldBoundary (Aram Teymurazyan)
Re: None RE: fWorldBoundary (Makoto Asai)
Date: 10 May, 2011
From: Gumplinger Peter <Gumplinger Peter>


I have just come to the same conclusion. Although G4SteppingManager2 at one point attempts to set:

       if(kp == MAXofAlongStepLoops-1) {
           if (fTrack->GetNextVolume() != 0)
               fStepStatus = fGeomBoundary;
               fStepStatus = fWorldBoundary;

at this time in the code exectution the condition fTrack->GetNextVolume() is still always != 0 and hence it might as well just read:

       if (kp == MAXofAlongStepLoops-1) fStepStatus = fGeomBoundary;

That's why the fStepStatus is never set to fWorldBoundary.

To fix this, maybe the cleanest place to add the code:

if (fTrack->GetNextVolume() == 0) fStepStatus = fWorldBoundary;

is near the end of G4SteppingManager::Stepping()

in the // Finale block but before the UserSteppingAction is called.

I also noticed that in we have:

     // Invoke AlongStepDoIt

but we already have fStep->UpdateTrack() near the end of the InvokeAlongStepDoItProcs method!?!

Adam, you can also use:

if ( fTrack->GetNextVolume() == 0 )

to identify that the track has arrived at the edge or the world.


 Add Message Add Message
to: "Re: RE: fWorldBoundary"

 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 ]