Message: Re: Laboratory hit times Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Laboratory hit times 

Forum: Event and Track Management
Re: Question Laboratory hit times (Chibueze Zimuzo)
Date: 01 Jun, 2010
From: Gumplinger Peter <Gumplinger Peter>

Dear Chibueze,

What you need to to is:

particleGun->SetParticleTime(time);

Two optical photon examples show you how this is incorporated into your PrimaryGeneratorAction:

http://www-geant4.kek.jp/lxr/source/examples/novice/N06/src/ExN06PrimaryGeneratorAction.cc#L59
http://www-geant4.kek.jp/lxr/source//examples/extended/optical/wls/src/WLSPrimaryGeneratorAction.cc#L214

As in WLSPrimaryGeneratorAction, where the emission of a wavelenght shifted photon is sampled from an exponential, you also have to sample the initial time of your G4 initial event (this sets all intital set of tracks) yourself.

You are right, the default time for all initial tracks is 0ns in Geant4.

Hope this helps, Peter

 Add Message Add Message
to: "Re: Laboratory hit times"

 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 ]