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
Operating System: Windows
Compiler/Version:
CMake Version:
I am using Messenger to modify the properties of geometries, such as material, size, translation, and rotation.
However, I am unsure about how to place (placement) or remove (remove or deregister) geometries via Messenger.
Is there a method or an example to achieve this?
Hi @Evan-de
You can modify materials/geometry using custom messenger, but remember always to reinitialize the physics and/or geometry afterwards.
The step-by-step procedure is explained during the second half of the beginners course, the recordings are available in each corresponding time slot of the indico:
Best,
Alvaro
Thank you for reply.
However, I do know how to modify materials or geometry.
My question is “how to REMOVE or REGISTER a physical volume by messenger”.
I found the answer.
To remove, G4PhysicalVolumeStore::GetInstance()->DeRegister() is working.
Thanks for help.
1 Like