I’m working on B4 inspired model of a single particle gun (CaloGAN/generation/src/SteppingAction.cc at two_layer · hep-lbdl/CaloGAN · GitHub). In SteppingAction.cc I’m trying to write to a text file, which I can do successfully but I need to differentiate one event from the next one. I tried to use:
G4int evtNo = G4RunManager::GetRunManager()->GetCurrentEvent()->GetEventID();
but it always returns 0
for all events. How can I retrieve the correct event number?