Message: Re: Behaivor of tracks with fWaiting_N classification Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Behaivor of tracks with fWaiting_N classification 

Forum: Event and Track Management
Re: Question Behaivor of tracks with fWaiting_N classification (Michinari Sakai)
Date: 26 May, 2015
From: Makoto Asai <Makoto Asai>

>
> I am using some extra waiting track stacks such as those that correspond
> to fWaiting_1 and fWaiting_2 track classifications. These are created by
> for example doing runManager->SetNumberOfAdditionalWaitingStacks(1); in
> my Stacking Action constructor. I see that there is an already
> pre-existing default waiting stack in Geant4 corresponding to the
> fWaiting classification but I need some extra waiting stacks in addition
> to the default one. By executing the application, I see that even if the
> fUrgent stack is empty, the simulation will continue by grabbing tracks
> from the fWaiting stack, putting them into the fUrgent stack, and
> simulating the new tracks brought into the fUrgent stack.
> 
> My problem is this. When the fUrgent and the fWaiting stack are both
> empty, the simulation terminates. This happens even if there are tracks
> in the fWaiting_1 or fWaiting_2 stacks.
> 
> My two questions are: Is this intended to happen? Where can I find
> examples using track stacks with fWaiting_N and N > 0?
> 

Hello,

When Urgent stack becomes empty, tracks in Waiting stack are transferred to Urgent stack. Also, if you have extra waiting stacks, tracks in extra waiting stack #1 are transferred to Waiting stack, tracks in extra waiting stack #2 are transferred to extra waiting Stack #1, and so forth. After these transfers, G4StackManager examines number of tracks in Urgent and Waiting stacks, and if both are empty, an event is over. This is the feature we implemented. Thus, it is true that if Waiting stack and extra waiting stack #1 are both empty when the Urgent stack becomes empty, the even is over even if there are tracks in yet another extra waiting stacks.

But prior to the termination of the event, G4UserStackingAction::NewStage() is invoked. This is your code. Here, you may re-classify all the tracks in the extra waiting stacks and re-distribute them to Urgent and/or ordinary Waiting stacks to avoid the termination of the event.

Please note that, when NewStage() method is invoked, transferring tracks from extra Waiting stack #N to extra Waiting stack #(N-1) has alreadt taken place.

Hope this helps, Makoto

 Add Message Add Message
to: "Re: Behaivor of tracks with fWaiting_N classification"

 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 ]