Range Cuts (also called Production Cuts) do not affect active tracks. They affect whether or not the EM processes create new secondaries, or whether they take the energy of those secondaries and add it into the “TotalEnergyDeposit” for a step.
No. If you have a track, it will be followed with all of its interactions, all the way until it stops (zero energy).
Approximately. There is a mean interaction length which is energy dependent. You can use that interaction length, and how it changes with energy, to estimate the “range” of a particle in the material, and that’s the relationship you see.
In Geant4, you specify a Production Cut (for gammas, electrons, positrons, and hadrons) in units of length. The code can then use that “universal” value and translate it into an appropriate minimum energy for each material of each volume in your simulation.
Basically, I compared a few range-values for electrons in boron and lead corresponding to energy threshold. I checked if theoretical/predicted range matches with Geant4. They came in agreement, which is awesome! The theoretical predictions were from:
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : em0077
issued by : G4EmCalculator::GetCSDARange
G4EmCalculator::GetCSDARange: CSDA table is not built; use UI command: /process/eLoss/CSDARange true
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
****RANGE IN Boron*****0 fm
What am I missing here? 0 fm seems to be wrong as well, it is not able to workout the GetCSDARange Any suggestions
The zero is just the return value when there is an error. since you got an error, you should ignore the returned value (in real code, you could test for zero and take some appropriate error action).
As for why the error, you put this into your DetectorConstruction class, which gets invoked first, before the physics. G4EmCalculator needs to have all of the cross-section and dE/dx tables loaded for all the materials, before it can do its job. That happens after the geometry is built. You might try putting this into your event action.