Message: How to transport and stack secondaries first before transporting the primaries again Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None How to transport and stack secondaries first before transporting the primaries again  

Forum: Event and Track Management
Date: Mar 19, 07:35
From: Brent van der Heyden <Brent van der Heyden>

Hey everyone


In my Geant4 application I track interaction information of each particle after every G4step. Now I have a question about the stacking of the secondary tracks in a (for me) correct order. Currently the tracks of the secondary particles are calculated after the primary track calculation finished, which I don't prefer in my application.


To explain this better I attached a simplistic scheme of a bremsstrahlung process in a high atomic number material (e.g. tungsten). I need to track an event so that I first have the step information of the incident electrons (red in the scheme), then step information of the secondaries, and finally with the track of the 'msc' electron beam again (green in the scheme).


In my MyUserStackingAction I have following code, although this doesn't seem to work;


//Invoked every time a new track is pushed to G4StackManager.

G4ClassificationOfNewTrack MyUserStackingAction::ClassifyNewTrack(const G4Track * aTrack) {
    G4int x = aTrack->GetCreatorModelID();
    if (G4PhysicsModelCatalog::GetIndex("phot_fluo")==x || G4PhysicsModelCatalog::GetIndex("gammaPIXE")==x ||  G4PhysicsModelCatalog::GetIndex("eBrem")==x){
      return fUrgent;
    } else {
      return fWaiting;
    }
}



I would really appreciate your help in order to solve my problem!


Best regards


Brent

 [ MIME part of type text/html without a name stripped ]

   Attachment:
     http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2019/03/19/07.35-43675-icOverviewInteraction.png

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

1 None: Re: How to transport and stack secondaries first before transporting the primaries again   (Makoto Asai - Apr 24, 06:17)
(_ Note: Re: How to transport and stack secondaries first before transporting the primaries again   (Brent van der Heyden - May 01, 04:06) new
 Add Message Add Message
to: "How to transport and stack secondaries first before transporting the primaries again "

 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 ]