Tracking Time in Geant4

I’m working with a student who is doing his first Geant4 monte carlo simulating a detector system I’ve setup in my lab. We are stuck on trying to get the event time. There is the GetGobalTime() member function but it seems to return very odd numbers. Is there some kind of time initialization one needs to execute or event initialization code which resets the time to 0? or some time which would determine an event rate? There is very little documentation on recording the time when an event occurred beyond just calling the GetGlobalTime() and GetLocalTime() member functions of the tracking system.

In our application, we’d like to simulate a source of an isotope at different activity levels. So do I have to write the code which determines the start time of the event or decay? (A decay being “the event” as opposed to when to protons collide). Or is there a mechanism built into Geant4 which does this for me in which I input the number of atoms and the halflife of the isotope?

If there is any tutorial on this subject, I would greatly appreciate the reference.
Thanks!

To get familiarity with G4RadioactiveDecay, I would suggest to look into examples/extended/radioactivedecay :

  • rdecay01 to understand what G4RadioactiveDecay is.
  • rdecay02 and basic/B3 to see how to use it in realistic situations.
  • Activation: an example of beam activation.