Hello, I am creating a scoring system for Geant 4, and have used the code from these links as references.
I have only slightly modified the code, and barely made any changes to the code at all. But I am not getting any hits generated, and my process hits function does not run at all. Additionally, I try to call step->GetEnergyDesposited(), and I am obtaining zero energy. I even commented out the part that returns the function early if the energy deposited is zero, but nothing seemed to change.
I also try to obtain the time and kinetic energy of the particle, and am getting 0 on both.
I have also received these exceptions in the code:
if ( (!hHC1) || (!hHC2) )
msg << “Some of hits collections of this event not found.\n”;
G4Exception(“EventAction::EndOfEventAction()”,“Code001”, JustWarning, msg);
This is despite creating the hit collection in the initialize function.
if ( nEvets < 1 )
msg << “Run consists of 0 events”;
G4Exception(“RunAction::EndOfRunAction()”,“Code001”, JustWarning, msg);
The number of events I am getting is 0, even though I use the command run/beamOn 10 and the terminal seems to list the number of events by order. I checked myPrimaryGerneratorAction, and I am generating the primary vertexes.
If someone could figure out a solution to this issue, thank you very much. I have seemingly tried every solution to no avail.