Hello, I am constructing the HandsOn4 example from the SLAC tutorial. Upon implementing the user-defined run class at each new run, rather than using default G4Run (in RunAction::GenerateRun()), I get a segfault. By introducing a few flags, I find that it occurs in Run::RecordEvent, while getting the hit collection of the EM calorimeter. // in Run::RecordEvent() ... ** flag 1 ** const EmCalorimeterHitsCollection* emHC = static_cast<const EmCalorimeterHitsCollection*>(hce->GetHC(ECHCID)); ** flag 2 ** segfault occurs somewhere between flag 1 and 2. The error does not occur when I do not implement the user-defined run class. Another probably unrelated issue I am running into with this example is that I am unable to run macros that include commands from the /tutorial/ ui command directory. For example, when I run run1.mac, I get the following error for the first command: ***** COMMAND NOT FOUND </tutorial/generator/randomizePrimary FALSE> ***** However, I can run the same command without error from the gui command line. Please let me know if you can help. Jeff
Hello, The Geant4 bug report system should be used to report problems found in the Geant4 toolkit or the examples provided with it. The examples of SLAC tutorial are not part of the toolkit and so your problem should be solved rather with the organizers of the tutorial. I have passed your problem to Andrea Dotti (adotti@slac.stanford.edu) who will investigate it offline this thread. Best regards,