Possible to increase precision of decay times (GlobalTime)?

I am looking at time-of-flight PET and need sub-nanosecond timing for the interactions of the gammas within the detectors. Using short-lived isotopes (Ga-68 and F-18) modeled using G4ParticleDefinition* ion = G4IonTable::GetIonTable()->GetIon(Z, A, excitEnergy), I have been able to use the GetGlobalTime() command to subtract the decay time from the interactions in order to get time of flight with sub-ns accuracy. Unfortunately when I use a Na-22 source (2.6 years halflife), the precision of the stored global time does store enough digits (for example, here the positron creation time is: 206181057557627744 ns = 2.06e17 = 6.5 years. The G4double seems to max out at 18 digits, not giving any more digits.

So, my primary question: is there a way to increase the precision (or number of digits) of the output from fStep->GetPreStepPoint()->GetGlobalTime()?

I have considered other options, but not really sure how or want to implement them if the above is not possible. First option is reset the global time back to zero after the decay, but the the SetGlobalTime() doesn’t seem to do anything. Second option is to not simulate the full radioactive decay of the isotope, but just the resulting positrons, but this is not ideal because requires more work and each isotope would need to be individually simulated (plus wouldn’t get the 1.27 MeV gamma from Na-22).

Thanks for your thoughts and suggestions, Steve

Hi @steve-peterson ,

Wondering if you were able to resolve this? In my case also, the time at each interaction step is so short compared to the half-life that it is impossible to recover the exact interaction/step time relative to the start of the event.

GetLocalTime is good but is relative to the start of its track, which isn’t useful when comparing different interaction times of different tracks. Any suggestions?
Thanks

Hello,

Here is how I solved this issue in my simulation:
For cases when the at the first Step (TrackID==1) I have a radioactive nucleus (basically a radioactive source, but be careful to exclude neutrons from this reasoning, neutron is also radioactive particle thus you risk killing your neutrons as primary source), you can put in memory the moment of decay for further use in case you will be interested in this kind of information, and after that you cycle on all secondaries produced in the radioactive decay process and reset GlobalTime of all secondaries:

void TrackingAction::PostUserTrackingAction(const G4Track* track)
{
ID = track->GetTrackID();
if ((particle != G4Neutron::Neutron()) && (ID == 1))
{
if(meanLife > 0.) initialTime = track->GetGlobalTime();
else initialTime = 0.;
TrackInformation* trackInformation = (TrackInformation*)track->GetUserInformation();
trackInformation->SetInitialTime(initialTime);
// G4cout<<"initialTime = "<<G4BestUnit(initialTime,“Time”);
if(meanLife > 0.)
{
const std::vector<const G4Track*>* secondaries = track->GetStep()->GetSecondaryInCurrentStep();
size_t nbtrk = (secondaries).size();
if (nbtrk)
{
for (size_t itr=0; itr<nbtrk; itr++)
{
const G4Track
trk = (secondaries)[itr];
G4Track
trTreset = (G4Track*) trk;
trTreset->SetGlobalTime(0.);
}
}
}
}
…

1 Like

Dear Dan, thank you for the response. I have not looked at this in a while, but your solution looks good. I should have time to give it a try over the next month or so. Thanks again, Steve

Thanks, I did something similar to this and it works!