I have a problem using the GetDeltaEnergy function for a sensitive detector. I’m trying to detect photons in the visible energy (~1.7 eV<E<~3.5 eV), but still there is no energy cut implemented.
I was told that I have to stop and kill the particle once it hit the detector using this instruction “aStep->GetTrack()->SetTrackStatus(fStopAndKill);” and then get the energy “G4double edep = aStep->GetDeltaEnergy();”
The problem is that when the simulation is running, it show hits but all of them with energy of “0 eV”.
Can someone tell me how to fix this?
Thanks in advance.