Message: Re: Processing order Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Processing order 

Forum: Event and Track Management
Re: Question Processing order (C Mos)
Re: Feedback Re: Processing order (Gumplinger Peter)
Re: Question Re: Processing order (C Mos)
Date: 05 Nov, 2012
From: Gumplinger Peter <Gumplinger Peter>

Hi Chris,

> Thank you for your explanation. There is something I don't have clear,
> something I do not have the right feeling for yet. For example, either
> to check if the particle was killed by leaving the the universe or by an
> inelastic process, I can do it in the UsrSteppingAction.

Yes.

> If I want to
> transfer information from this particle before it gets killed to the
> secondaries, Could I do this in the PostUserTrackingAction()?

Yes, see:

http://www-geant4.kek.jp/lxr/source/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthTrackingAction.cc#L64

BUT, be careful, the secodaries you get with fpTrackingManager->GimmeSecondaries() will return to you ALL secondaries that were generated during the stepping of that track, and not just the once that come from decay or the last step!

// NOTE: Secondary bucket of the Step contains 208 // all secondaries during tracking the current track 209 // (i.e. NOT secondaries produced in the current step)

I would not use PostUserTrackingAction. I would write the logic in SteppingAction, but you have to do quite some massaging to extract only the secondaries from the last step, see:

http://www-geant4.kek.jp/lxr/source//tracking/src/G4SteppingVerbose.cc#L538

Peter

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

1 Agree: Re: Processing order   (C Mos - 05 Nov, 2012)
2 None: Re: Processing order   (Michael H. Kelsey - 06 Nov, 2012)
 Add Message Add Message
to: "Re: Processing order"

 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 ]