Message: Re: Calculating time between scintillated events Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Calculating time between scintillated events 

Forum: Processes Involving Optical Photons
Re: Question Calculating time between scintillated events (Cejo George)
Date: 11 Oct, 2012
From: Gumplinger Peter <Gumplinger Peter>

Dear Cejo,

Well, every 'event' in Geant4 is independent from every other event, both in time and in the physics response to the initial event that is being simulated. Every primary track in an event starts at time = 0 unless you specifically offset the primary track's start time in that event by, for example:

particleGun->SetParticleTime(time);

http://www-geant4.kek.jp/lxr/source/examples/extended/optical/wls/src/WLSPrimaryGeneratorAction.cc#L218

Of course, you can use the above method to off-set times of subsequent events relative to each other, with the first event by default starting at zero but that requires some logic using the event number.

That said, Geant4 does keep track of time within an event. So, for example, scintillation does happen with a time offset from zero, and at the time a scintillating track makes it to the scintillator. So, optical photons are put on the tracking stack of G4 at a time-of-flight offset when they have been created (within that event). You can get that time from G4Track with GetGlobalTime(), for example, in StackingAction or PreUserTrackingAction, as in:

http://www-geant4.kek.jp/lxr/source/examples/extended/runAndEvent/RE01/src/RE01TrackInformation.cc#L61

Best regards, Peter

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

1 Question: Re: Calculating time between scintillated events   (Ashwath Rao - 11 Oct, 2012)
(_ Feedback: Re: Calculating time between scintillated events   (Gumplinger Peter - 11 Oct, 2012)
(_ Agree: Re: Calculating time between scintillated events   (Ashwath Rao - 11 Oct, 2012)
(_ Question: Re: Calculating time between scintillated events   (Cejo George - 12 Oct, 2012)
 Add Message Add Message
to: "Re: Calculating time between scintillated events"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews