Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 11.2.2
Operating System: Ubuntu 24.04.4 LTS
Compiler/Version: GCC 13.3.0
CMake Version: 3.28.3
Title: How should I model a rotating phantom with inserts using G4RotationMatrix?
I have a PMMA cylindrical phantom that is placed in the world. Inside the phantom I have an aluminium cylinder and an iron cylinder acting as inserts.
Currently, I simulate phantom rotation by keeping the PMMA phantom fixed and manually changing the positions of the Al and Fe cylinders. For each projection angle, I calculate their coordinates as
x = x_center + r*cos(theta);
y = y_center + r*sin(theta);
This approach produces the desired geometry, but I am wondering whether this is the recommended way to model a rotating phantom in Geant4.
I have also experimented with G4RotationMatrix, but I am confused about how rotations are defined. My phantom has already been rotated (e.g. by 90° to make its cylindrical axis vertical), so its local coordinate system is no longer aligned with the world coordinate system.
My questions are:
-
Are the position and rotation supplied to
G4PVPlacementalways interpreted in the mother volume’s local coordinate system, or are rotations defined with respect to the world axes? -
If I want the Al and Fe cylinders to rotate around the centre of the PMMA phantom while remaining daughters of the phantom, should I update both their positions and their rotation matrices?
-
Instead of moving the inserts manually, is it possible (and preferable) to rotate the entire PMMA phantom using a
G4RotationMatrixso that all daughter volumes rotate automatically withconstruction.cc (13.2 KB)
it?
-
What is the recommended Geant4 approach for modelling a rotating phantom with internal inserts for projection simulations?
I would appreciate any guidance on the best practice for this type of geometry.