Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 10.2.2
Operating System: Red Hat Enterprise Linux 8.9 on cluster
Compiler/Version: gcc (GCC) 9.3.0
CMake Version: cmake version 3.26.5
Hello there,
I tried to apply a per-region production cut on electrons produced in water or lead via compton scattering or photoelectric effect. I was able to get it to work following some slides and examples online using the G4Regions, SetCuts, SetProductionCuts etc in a large Geant4 sim code from some other guy in my collaboration. ( also I have to turn on /process/em/applyCuts true in the mac file, otherwise it seems to not apply the cuts I define); I saw in the tracking verbose=1 output that those electrons are indeed removed with my production cuts per region. So far so good
However, when I checked the CPU time of the same random seed simulation with and without the cuts, I saw the CPU runtime sometimes is worse than the sim without the cuts. I was running this on a computing cluster and get consistent and reproducible CPU time with same sim run.
So my question or what I don’t understand is why the production cut isn’t always reducing CPU time of the sim run fed with the same random seed(I double checked that the tracks were exactly the same, at least for the first 10 tracks, if I used the same random seed)
Any insight is appreciated and can provide more details if needed.