Segmentation Fault When Running GDML

Hi everyone,

I am trying to import the CAD model to Geant4 using GDML (through CADMesh). I have converted the CAD model to the GDML file that has identified sensitive detectors using the auxiliary information and Geant4 has successfully read in the GDML file. Everything seems to be working but when I try to run an event (i.e., /run/beamOn), I run into a segmentation fault error. The error occurs under two scenarios:

  1. when initiating my own SensitiveDetector class
    Specifically, it occurs when I am trying to ‘insert(new Hits)’ on the HitsCollection. I can get around this by moving the ‘insert(new Hits)’ to the ProcessHit. By doing so, everything will run fine until the EndofEventAction function.

  2. In the
    The error occurs specifically when it tries to GetEdep from HitsCollections.

Any guidance/advice on how to tackle this issue are greatly appreciated!

Thank you!