![]() |
FairShip
|
Files | |
| CaloScoringPlane.cxx | |
| CaloScoringPlane.h | |
| CaloScoringPlaneHit.cxx | |
| CaloScoringPlaneHit.h | |
| CaloScoringPlanePID.cxx | |
| CaloScoringPlanePID.h | |
| CaloScoringPlanePoint.cxx | |
| CaloScoringPlanePoint.h | |
| LinkDef.h | |
An ideal detector plane that replaces the former SplitCal calorimeter. It is meant for studies that need the particles arriving at the calorimeter position (MC truth), optionally with a parametrised particle identification.
A 1 mm thick vacuum box, 4 m × 6 m, whose upstream face is the ECAL front face, downstream of the timing detector (z = 97.17 m, integration layout 2026-0.1) (ship_geo.CaloScoringPlane in python/geometry_config.py; node CaloScoringPlane_1). There is no energy-deposit requirement: every track that enters the box produces one CaloScoringPlanePoint with the MC-truth position, momentum, time and PDG code at the exit face, neutral particles included. A track crossing the plane twice gives two points (the sign of pz tells the direction). Tracks with a point are kept in MCTrack. Branch: CaloScoringPlanePoint in the cbmsim tree.
python/detectors/CaloScoringPlaneDetector.py (run by ShipReco.py) makes one CaloScoringPlaneHit per point, skipping neutrinos (IgnoredPdg) and, by default, backward-going crossings (ForwardOnly). The hit holds the x/y position and time, optionally smeared (PositionResolution, TimeResolution), the MC-truth momentum, and the identified species (GetPid(), IsElectron(), IsHadron(), IsMuon(), IsIdentified()).
Branches in the reconstruction output:
| Branch | Content |
|---|---|
| Digi_CaloScoringPlaneHits | std::vector<CaloScoringPlaneHit> |
| digiCaloScoringPlane2MC | per hit, the MC track index (-2 if that track was not stored) |
The species is drawn by CaloScoringPlanePID from energy-dependent confusion matrices given with
Without --caloScoringPlanePID the identification is perfect.
| PDG code | Species |
|---|---|
| ±11 | electron |
| ±13 | muon |
| mesons and baryons (incl. n, K⁰L) | hadron |
| anything else (γ, ν, nuclei, BSM codes) | unknown, never identified |
pdg_overrides in the configuration changes this per |PDG code|.
The energy is the total energy at the plane, from the point momentum and the PDG mass. Between two points each matrix element is interpolated; below the first or above the last point that point's matrix is used. The file is read in Python with PyYAML (python/caloScoringPlanePID.py) and the matrices are passed to CaloScoringPlanePID::Set(). Mistakes in the file (unknown key or species, a row not summing to 1, energies not increasing, a .nan, ...) raise a PIDConfigError that names the file and the entry. geometry/caloScoringPlane_pid_provided.yaml is the configuration used for the maximal_opt_CHEAP5_fixed setup.
From Python, with a PID file:
From C++ (link against the CaloScoringPlane library), the matrices are given directly, nine values per energy in the order electron, hadron, muon for both rows (true) and columns (identified):
Identify() draws from the generator it is given, and only when the outcome can vary: an unknown species, or a matrix row with a single non-zero entry (as with perfect identification), uses no random number. The digitiser gives the scoring plane its own TRandom3, so adding it does not change what the other detectors draw.
Set() checks the model (finite, non-negative entries, rows summing to 1, increasing energies) and throws std::invalid_argument otherwise, keeping the previous model.
examples/calo_scoring_plane_pid_example.py applies it to all points of a simulation file and prints the resulting true → identified table.