Implements the detector geometry and magnetic field setup for the PALLAS simulation.
More...
Implements the detector geometry and magnetic field setup for the PALLAS simulation.
- Author
- Arnaud HUBER huber.nosp@m.@lp2.nosp@m.ib.in.nosp@m.2p3..nosp@m.fr
- Date
- 2025
- Copyright
- PALLAS Project - GEANT4 Collaboration
This file contains the method definitions for the PlasmaMLPALLASGeometryConstruction
class declared in PlasmaMLPALLASGeometryConstruction.hh
. It manages:
- Construction of the full and simplified detector geometry
- Loading of GDML models for realistic component shapes
- Definition of visualization attributes for logical volumes
- Creation of world and holder volumes
- Construction of quadrupoles, collimators, laser-induced fluorescence (LIF) parts, and other experimental sections
- Assignment of materials to all volumes
- Configuration of the magnetic field and field manager
- Optional multithread-safe handling of magnetic field instances
The geometry construction workflow:
- Construct():
- Cleans any existing geometry to prevent duplication
- Defines rotation matrices for volume placement
- Calls
CreateWorldAndHolder()
to create the world and main holder volume
- Constructs quadrupole containers via
ConstructQuadrupolesVolume()
- Builds either the full PALLAS geometry (
ConstructFullPALLASGeometry()
) or a simplified version (ConstructSimplifiedPALLASGeometry()
)
- Optionally adds collimators and realistic quadrupoles if display flags are enabled
- ConstructFullPALLASGeometry():
- Calls construction routines for all experimental sections (Cellule, LIF, Section1-4, Section4Dump)
- ConstructSimplifiedPALLASGeometry():
- Constructs only Section4 to avoid track-stopping issues from CAD-based GDML files
- ConstructSDandField():
- Initializes and configures the magnetic field
- Sets dipole and quadrupole components, lengths, and drift distances
- Creates and attaches a
G4FieldManager
with a Runge–Kutta stepper
Thread safety is ensured via:
G4Mutex fieldManagerMutex
for synchronized access to the magnetic field manager
G4ThreadLocal
instances of PlasmaMLPALLASMagneticField
and G4FieldManager
Visualization colors for logical volumes:
- "invis", "black", "white", "gray", "red", "orange", "yellow", "green", "cyan", "blue", "magenta"
Notes:
- Full PALLAS geometry is mostly used for visualization purposes.
- Simplified geometry is recommended for production runs to avoid issues with CAD-based GDML files.
- Magnetic field configuration directly impacts particle tracking and beam optics.