|
SHiP Data Model
Event data model for the SHiP experiment: C++ data classes with ROOT dictionary support.
|
Canonical ShipSoft unit vocabulary. More...
Namespaces | |
| namespace | units |
| namespace | view |
| Quantity views over the persisted data classes. | |
Classes | |
| struct | CaloHit |
| Hit reconstructed by the calorimeter. More... | |
| struct | EventHeader |
| Per-event metadata — one record per event. More... | |
| struct | MCParticle |
| Monte Carlo particle — input to simulation. More... | |
| struct | RecHit |
| Reconstructed hit. More... | |
| struct | RecParticle |
| Reconstructed particle. More... | |
| struct | SBTHit |
| Hit reconstructed by the SBT (Surround Background Tagger) More... | |
| struct | SimHit |
| Simulation hit from Geant4 sensitive detectors. More... | |
| struct | SimParticle |
| Tracked particle from simulation. More... | |
| struct | SimResult |
| Bundled result from one Geant4 event. More... | |
| struct | StrawTubesHit |
| Hit reconstructed by a layer of the straw tubes spectrometer. More... | |
| struct | TimeDetHit |
| Hit reconstructed by the timing detector. More... | |
| struct | TrackFitResult |
| Track fit result. More... | |
| struct | UBTHit |
| Hit reconstructed by the UBT (Upstream Background Tagger) More... | |
Typedefs | |
| using | Length = mp_units::quantity< units::mm, double > |
| Canonical quantity types: double representation, storage unit baked in. | |
| using | Time = mp_units::quantity< units::ns, double > |
| using | Energy = mp_units::quantity< units::GeV, double > |
| using | Momentum = mp_units::quantity< units::GeV_per_c, double > |
| using | Mass = mp_units::quantity< units::GeV_per_c2, double > |
| using | Angle = mp_units::quantity< units::rad, double > |
| using | MagneticField = mp_units::quantity< units::tesla, double > |
| template<typename Q > | |
| using | Vec3 = std::array< Q, 3 > |
Enumerations | |
| enum class | detector_id : std::int32_t { UpstreamTagger = 0 , SurroundTagger = 1 , StrawTubes = 2 , Calorimeter = 3 , TimingDetector = 4 } |
Functions | |
| bool | mothers_are_consistent (std::vector< MCParticle > const &particles) |
| True when the mother indices of a whole collection are self-consistent, i.e. | |
| bool | mothers_are_populated (std::vector< MCParticle > const &particles) |
True when, on top of mothers_are_consistent(), every entry that has a mother carries the full list — mother_id >= 0 implies a non-empty mothers. | |
| RecHit | from_sim_hit (SimHit const &sp) |
| RecParticle | from_sim_particle (SimParticle const &sp) |
| template<typename Q > | |
| constexpr Q | quantity_of (double v) |
| Wrap a raw scalar, interpreting it in Q's canonical unit (bitwise). | |
| template<typename Q > | |
| constexpr double | raw (Q q) |
| Unwrap a scalar quantity to a raw double in Q's canonical unit (bitwise). | |
| template<typename Q > | |
| constexpr Vec3< Q > | vec_of (std::array< double, 3 > const &v) |
| Wrap a raw 3-vector, interpreting it in Q's canonical unit (bitwise). | |
| template<typename Q > | |
| constexpr std::array< double, 3 > | raw (Vec3< Q > const &v) |
| Unwrap a quantity 3-vector to raw doubles in Q's canonical unit (bitwise). | |
Canonical ShipSoft unit vocabulary.
Storage convention (matches the data-class doxygen contracts and Key4hep): positions and lengths [mm], momenta [GeV/c], energies [GeV], times [ns]. Persisted classes keep plain doubles in these units; computation code works with the quantity types below and converts at the boundaries (see SHiP/QuantityView.hpp).
NEVER using namespace SHiP::units in a translation unit that includes CLHEP or Geant4 headers: G4SystemOfUnits.hh injects global mm, GeV, tesla, ... that collide with these names. Always qualify.
| using SHiP::Angle = typedef mp_units::quantity<units::rad, double> |
| using SHiP::Energy = typedef mp_units::quantity<units::GeV, double> |
| using SHiP::Length = typedef mp_units::quantity<units::mm, double> |
Canonical quantity types: double representation, storage unit baked in.
| using SHiP::MagneticField = typedef mp_units::quantity<units::tesla, double> |
| using SHiP::Mass = typedef mp_units::quantity<units::GeV_per_c2, double> |
| using SHiP::Momentum = typedef mp_units::quantity<units::GeV_per_c, double> |
| using SHiP::Time = typedef mp_units::quantity<units::ns, double> |
| using SHiP::Vec3 = typedef std::array<Q, 3> |
|
strong |
|
inline |
|
inline |
True when the mother indices of a whole collection are self-consistent, i.e.
satisfy the four invariants documented above.
An empty mothers is always accepted: it means either that the entry has no mothers, or that the data was written before v0.5.0, when the field did not exist. Use mothers_are_populated() to additionally require the list on current-schema data.
|
inline |
True when, on top of mothers_are_consistent(), every entry that has a mother carries the full list — mother_id >= 0 implies a non-empty mothers.
Only current-schema data can satisfy this: files written before v0.5.0 have no mothers field at all, so they read back with an empty list next to a perfectly valid mother_id.
|
constexpr |
Wrap a raw scalar, interpreting it in Q's canonical unit (bitwise).
|
constexpr |
Unwrap a scalar quantity to a raw double in Q's canonical unit (bitwise).
|
constexpr |
Unwrap a quantity 3-vector to raw doubles in Q's canonical unit (bitwise).
|
constexpr |
Wrap a raw 3-vector, interpreting it in Q's canonical unit (bitwise).