I use geant4 to simulate the decay of Am-241 and detect the scintillation light via SiPM. Two questions need to help.
(1) the arriving time (global time) of scintillation light is very large, in 1E18 ns scale. I think it’s due to the Am-241 particle not decay at time zero, insteads, it decay at a large time. How can I record the arriving time of scintillation time from the decay time of the Am-241 decay?
(2) Besides, the 59.5keV gamma, it records many particle with other energy, some energy is larger than 100keV, some between 60-100keV, it’s coming from the decay of its daughter particle (Np-237). If I use command “/process/had/rdm/nucleusLimits 241 241 95 95” to forbid the decay of its daughter particle, particles with other energy will disappear. Should I forbid the decay of Np-237, or the simulation also need to consider its decay to compare real spectrum measurement?
For realistic gamma spectrum of Am-241, the command is sufficient. The half life of Np-237 is very large and its decay radiation does not appear in the spectrum.
If you want your time reference to be relative to the first (parent) decay, that is relatively straightforward in the tracking action:
void TrackingAction::PostUserTrackingAction(const G4Track* track)
{
// Reset global time on first decay (to avoid waiting for half life of first decay)
if (track->GetParentID() == 0) { // This track belongs to a primary vertex
// ============Setting secondary tracks to zero global time==============
G4TrackVector* secondaries = fpTrackingManager->GimmeSecondaries();
size_t nSeco = secondaries->size();
if (nSeco > 0){
for(size_t i=0; i < nSeco; i++) {
(*secondaries)[i]->SetGlobalTime(0.);
}
}
}
This will “reset” the global time of all secondaries relative to that initial decay offset.
(2) Given the relative half lives of Am241 and Np237, you will be dominated by Am241 x-rays as @Deepak_Akar suggests.
I use these codes to force the Am-241 decay at t=0.0,
then I can record the arriving time of scintillation light as usual.
G4ParticleDefinition* Am241 = G4IonTable::GetIonTable()->GetIon(95, 241, 0.0);
// Force its lifetime to zero (or very small value like 1e-20*s)
if (Am241) {
Am241->SetPDGLifeTime(0.0 * ns);
}
The spectrum of Am-241 can be found here. The measured spectrum of Am-241 is clear gamma ray of primary decay, so the decay of its long-lifetime daughter particle can be forbided.
Sure, that also works and accomplishes the same thing. The only advantage to my method is that it is agnostic to the actual primary. But if Am241 is your only isotope of interest, it doesn’t matter.
Thnaks for your help. I haven’t use the function void TrackingAction::PostUserTrackingAction(const G4Track* track). Can I put your codes inside the function G4bool MySensitiveDetector::ProcessHits(G4Step *step, G4TouchableHistory *ROhist). In the ProcessHitsfunction, I can obtain track through G4Track *track = step->GetTrack();
The RunAndEvent examples have a few uses of tracking action, the clearest to understand is RE01. In the main, ActionInitialization is called which then initializes the TrackingAction defined here. The TrackingAction is an instance of G4UserTrackingAction which has two methods you can provide: PreUserTrackingAction and PostUserTrackingAction. These are called when the track (particle) is first created and when the track (particle) is finally destroyed. So exactly once and only once. This is probably the cleanest way to do it.
You could also just grab the track instead in your sensitive detector but you would also need to check that the primary is just entering your volume for the first time. Otherwise in every step in your detector it will constantly be resetting the global time.