I have written a code for simulation of an HPGe (High purity Germanium) semiconductor detector. It compiles make file successfully. When I try to create an executable using make -j4
, it creates successfully with some warnings like this…
$ make
Scanning dependencies of target hpge
[ 12%] Building CXX object CMakeFiles/hpge.dir/hpge_main.cc.o
[ 25%] Building CXX object CMakeFiles/hpge.dir/src/hpgeActionInitialization.cc.o
[ 37%] Building CXX object CMakeFiles/hpge.dir/src/hpgeDetectorConstruction.cc.o
In file included from /home/subhrod/G4_project/Examples_G4/zzHPGe_design/src/hpgeDetectorConstruction.cc:1:
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/include/hpgeDetectorConstruction.hh: In constructor ‘hpgeDetectorConstruction::hpgeDetectorConstruction()’:
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/include/hpgeDetectorConstruction.hh:56:22: warning: ‘hpgeDetectorConstruction::taperULog’ will be initialized after [-Wreorder]
56 | G4LogicalVolume* taperULog;
| ^~~~~~~~~
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/include/hpgeDetectorConstruction.hh:55:15: warning: ‘G4Sphere* hpgeDetectorConstruction::taperL’ [-Wreorder]
55 | G4Sphere* taperL;
| ^~~~~~
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/src/hpgeDetectorConstruction.cc:25:1: warning: when initialized here [-Wreorder]
25 | hpgeDetectorConstruction::hpgeDetectorConstruction() : G4VUserDetectorConstruction(), //specifying the variables..
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/src/hpgeDetectorConstruction.cc: In member function ‘virtual G4VPhysicalVolume* hpgeDetectorConstruction::Construct()’:
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/src/hpgeDetectorConstruction.cc:84:24: warning: declaration of ‘physiWorld’ shadows a member of ‘hpgeDetectorConstruction’ [-Wshadow]
84 | G4VPhysicalVolume *physiWorld = new G4PVPlacement(0, //rotation
| ^~~~~~~~~~
In file included from /home/subhrod/G4_project/Examples_G4/zzHPGe_design/src/hpgeDetectorConstruction.cc:1:
/home/subhrod/G4_project/Examples_G4/zzHPGe_design/include/hpgeDetectorConstruction.hh:33:24: note: shadowed declaration is here
33 | G4VPhysicalVolume* physiWorld;
| ^~~~~~~~~~
[ 50%] Building CXX object CMakeFiles/hpge.dir/src/hpgeEventAction.cc.o
[ 62%] Building CXX object CMakeFiles/hpge.dir/src/hpgePrimaryGeneratorAction.cc.o
[ 75%] Building CXX object CMakeFiles/hpge.dir/src/hpgeRunAction.cc.o
[ 87%] Building CXX object CMakeFiles/hpge.dir/src/hpgeStackingAction.cc.o
[100%] Linking CXX executable hpge
[100%] Built target hpge
But after running the executable ./hpge
I am getting the output which is executable.txt (52.1 KB)
consisting Segmentation fault (core dumped)
Is it only the visualization problem or running problem that I can not figure out. By running the executable ./hpge
I think it is taking the materials and the detector geometry successfully in the simulation. Though I am not sure, you can check it in the executable.txt file.
I will be very thankful if someone helps me to figure out the problem and the way to fix it.