Hi everyone,
In my simulation I collect energy deposition data using a cylindrical scorer.
I want to run a simulation in which I can change the scorer position between runs using macro commands.
Unfortunately, while the scorer position changes correcly on the GUI, the energy deposition inside the scorer is not the expected one. Instead, the energy is deposited as the scorer never changed its position.
I attach a sample macro file to reproduce the behaviour.
/run/initialize
/score/create/cylinderMesh Mesh
/score/mesh/cylinderSize 8. 20. cm
/score/mesh/nBin 10 10 10
/score/quantity/energyDeposit eDep
/gps/particle e-
/gps/energy 100 MeV
/gps/pos/type Beam
/gps/pos/shape Square
/gps/pos/centre 0 0 50 cm
/gps/direction 0 0 -1
/run/beamOn 5
/score/drawProjection Mesh eDep
/vis/viewer/rebuild
/score/drawProjection Mesh eDep
/score/dumpQuantityToFile Mesh eDep test1.csv
/score/mesh/rotate/rotateY 90
/score/mesh/translate/xyz -40 0 0 cm
# /run/geometryModified
# /run/reinitializeGeometry
/run/beamOn 5
/score/drawProjection Mesh eDep
/vis/viewer/rebuild
/score/drawProjection Mesh eDep
/score/dumpQuantityToFile Mesh eDep test2.csv
I also tried using
/run/geometryModified
, or
/run/reinitializeGeometry
but nothing changes.
The behaviour is the same in Geant4-10.7.0 and Geant4-11.1.1
I’m running in multi-threaded mode.
Thank you in advance!
Cheers,
Lorenzo