In our simulation, we want to have our detector apparatus at (0,0,0) in the world, to make alignments, primary generators, etc. more convenient. But the detector is placed in a “laboratory hall” which may not be centered. To achieve this, I defined the world volume as a box, using a G4DisplacedSolid
to shift the origin of coordinates to where we want it to be.
This works exactly as intended in visualization, and when we create G4Touchable
objects “manually” using our own G4Navigator
.
But when we run events, we have found that the world volume seems to “lose” it’s coordinate offset, resulting in “stuck track” and “position shifted” errors during tracking. With visualization, we see the world-volume outline jump to be centered on the origin, rather than the displaced solid. Once the run finishes, the visualization goes back to what we intended.
Does the world volume have to be a simple solid, like a box or a sphere? Or can it be a more complex object?