|
SHiP Geometry
SHiP experiment geometry implementation using GeoModel.
|
Configurable sampling calorimeter (ECAL + HCAL).
The Calorimeter subsystem builds a layered ECAL + HCAL stack from a configuration file. Each calorimeter module is a tile in an nx × ny grid; each tile is built from a sequence of layer codes that interleave absorber plates, scintillator bars and HPL fibre layers.
The geometry is fully data-driven: changing the layer sequence or the module pitch in calo.toml reshapes the calorimeter without recompiling.
Position in world: z = 96970 mm (configurable via detector_offset_z_mm).
Used in the layers (ECAL) and layers2 (HCAL) arrays in calo.toml:
| Code | Layer type |
|---|---|
| 1 | WidePVT bar layer, bars along X (H orientation) |
| 2 | WidePVT bar layer, bars along Y (V orientation) |
| 3 | ThinPS bar layer, bars along X (H orientation) |
| 4 | ThinPS bar layer, bars along Y (V orientation) |
| 5 | HPL fibre layer, fibres along Y |
| 6 | HPL fibre layer, fibres along X |
| 7 | Absorber plate (Lead in ECAL section, Iron in HCAL) |
| 8 | Air gap (no volume placed, just advances Z cursor) |
Geometry parameters live in calo.toml. The factory loads the file at build time. Path resolution order:
CalorimeterFactory(materials, configPath) (defaults to "calo.toml").CALO_TOML_DEFAULT_PATH — absolute path baked at compile time pointing at the source-tree copy.CALO_TOML_INSTALL_PATH — absolute path baked at compile time pointing at the installed data directory.The first existing path wins. This means tests, in-tree builds, and installed deployments all find a calo.toml without explicit path arguments.
Unknown top-level keys are reported on stderr at parse time so typos or stale fields are surfaced rather than silently ignored.
The layers / layers2 arrays accept both TOML native arrays ([1, 2, 3]) and the legacy comma-separated string form ("1,2,3") for compatibility with previously-deployed configs.
| Material | Density | Composition | Notes |
|---|---|---|---|
| Air | 1.29 mg/cm³ | already in catalog | container & layer envelopes |
| Lead | 11.34 g/cm³ | Pb | ECAL absorber plates |
| Iron | 7.87 g/cm³ | Fe | HCAL absorber plates |
| PVT | 1.032 g/cm³ | C₉H₁₀, mass-fraction-normalised | bar scintillator |
| Polystyrene | 1.05 g/cm³ | C₈H₈, mass-fraction-normalised | HPL fibre core |
Lead, PVT and Polystyrene are added by this subsystem; Air and Iron were already present in the central SHiPMaterials catalog.
At factory entry the configuration is validated against the fixed container envelope:
module_nx and module_ny must be strictly positive.layers + gap_ecal_hcal_mm + layers2 must fit inside the container's Z half-extent.(module_nx, module_ny) × pitch, with pitch = module_pitch_x_mm if set, otherwise plate_xy_mm) must fit inside the container's X/Y half-extents.fiber_core_diameter_mm, when set, cannot exceed fiber_diameter_mm.Any violation throws std::runtime_error with a descriptive message identifying the offending dimension.
test_calorimeter.cpp exercises:
CalorimeterBuilds — the factory returns a non-null GeoPhysVol of the expected envelope size.CalorimeterHasChildren — the container has at least the expected number of children (module_nx × module_ny × non-air-gap layers).TotalStackZPositive — CalorimeterFactory::totalStackZ() agrees with the layer-by-layer sum for a representative configuration.CaloBarLayer)CaloFibreHPLayer)layers / layers2 should be unified into a single sequence with an explicit ECAL/HCAL marker, once the HCAL detector choice (own design vs. LHCb HCAL) is finalised.