I’m using ASCII file to construct the detector.
After a successful
BeamOn(), I modify the ASCII file to change the geometry, and call:
Then I call
BeamOn() again and the program is aborted with a exception saying
Rotation matrix repeated… R00
Where R00 is a parameter I defined in the ASCII file to build the geometry.
I think this is indicating that when
runManager calls the
Construct() again in the second
G4tgbVolumeMgr reads the ASCII again and tries to register the same parameter R00, causing the repeated parameter abort.
If I don’t call
ReinitializeGeometry(true); and just
instead, the abort will not happen, however, nor will the geometry modification.
I’ve browsed some
G4tgbVolumeMgr source code to find ways delete these parameters and tried deleting
G4tgbVolumeMgr pointer at the beginning of
Construct(). Unfortunately, these attempts failed.
Therefore, I am asking here for help. Did I make any mistake when changing the geometry? It’s there anything I can do to avoid this repeated parameter abort?
PS: My goal is to implement detector geometry modification without recompiling or even restarting the executable.