Closed plexoos closed 2 months ago
@ggalgoczi Have you seen this error in Geant4?
What physics list should one be using for our optical photon simulation? I am currently using a generic one:
Let me check. For some reason when I try to run the code I get, do you know why?: NP::load Failed to load from path out/photons.npy
I ran from /esi/esi-g4ox
./build/src/simg4ox -g geom/raindrop.gdml
I did run opticks-full-prepare
And got
<<< Geant4 Physics List simulation engine: G4GenericPhysicsList
G4GDML: Reading 'geom/raindrop.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading setup...
G4GDML: Reading 'geom/raindrop.gdml' done!
Stripping off GDML names of materials, solids and volumes ...
read photons
NP::load Failed to load from path out/photons.npy
root@npps0:~/esi-g4ox# pwd
/esi/esi-g4ox
Just run ./build/src/simtox
before the simg4ox
command
Thanks for checking!
simtox
creates a npy file with initial random photons (opticks/sysrap/sphotons.h) coming from a torch (opticks/sysrap/storch.h)
simg4ox
reads those photons in and tries to start a Geant4 simulation
You were right, that the physics needed to be changed. I did that.
However also G4VUserActionInitialization needed to be defined since the G4VUserPrimaryGeneratorAction can only be assigned to G4VUserActionInitialization not UserInitialization.
(Also primgen should be a PrimaryGenerator type not G4VUserPrimaryGeneratorAction)
Here is the revised code, it runs for me without errors. Let me know if you need any further help with this! https://drive.google.com/file/d/1anGIMSIvFYuJQcoO7ywS1aIlGA6LuqO7/view?usp=drive_link
While running
simg4ox
asthe following exception is raised: