SHiP Data Model
Event data model for the SHiP experiment: C++ data classes with ROOT dictionary support.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SHiP::MCParticle Struct Reference

Monte Carlo particle — input to simulation. More...

#include <MCParticle.hpp>

Public Member Functions

bool operator== (MCParticle const &) const =default
 

Public Attributes

std::int32_t pdg_code {0}
 
std::array< double, 3 > vertex {0, 0, 0}
 Production vertex [mm].
 
std::array< double, 3 > momentum {0, 0, 0}
 Momentum (px, py, pz) [GeV/c].
 
double energy {0}
 Total energy [GeV].
 
double time {0}
 Production time [ns].
 
std::int32_t mother_id {-1}
 First mother (-1 = none)
 
std::vector< std::int32_t > mothers {}
 All mothers (see above)
 
std::int32_t status {1}
 HepMC status (see above)
 

Detailed Description

Monte Carlo particle — input to simulation.

Mother indices refer to the same collection (this event's vector of MCParticle), not to the generator's own record: a producer that filters the record must remap them. -1 means "no mother".

An entry can have several mothers — a hadron from string fragmentation, the products of a hard 2 -> n process, two partons joined into one. mothers is the complete, resolved list: Pythia8's Particle::motherList() provides exactly it, derived from the raw mother1/mother2 pair and the native status, which is what distinguishes an inclusive range of mothers from two distinct ones. mother_id is its first element, or -1 when the entry has no mother.

An empty mothers means either that the entry has no mothers or that it was written before v0.5.0, when the field did not exist. mother_id stays the portable single-mother accessor across all versions.

Taken together, for every entry i of a collection of N particles:

status follows the HepMC convention — the codes Pythia8's statusHepMC() produces, the same set EDM4hep uses for generatorStatus:

Member Function Documentation

◆ operator==()

bool SHiP::MCParticle::operator== ( MCParticle const &  ) const
default

Member Data Documentation

◆ energy

double SHiP::MCParticle::energy {0}

Total energy [GeV].

◆ momentum

std::array<double, 3> SHiP::MCParticle::momentum {0, 0, 0}

Momentum (px, py, pz) [GeV/c].

◆ mother_id

std::int32_t SHiP::MCParticle::mother_id {-1}

First mother (-1 = none)

◆ mothers

std::vector<std::int32_t> SHiP::MCParticle::mothers {}

All mothers (see above)

◆ pdg_code

std::int32_t SHiP::MCParticle::pdg_code {0}

◆ status

std::int32_t SHiP::MCParticle::status {1}

HepMC status (see above)

◆ time

double SHiP::MCParticle::time {0}

Production time [ns].

◆ vertex

std::array<double, 3> SHiP::MCParticle::vertex {0, 0, 0}

Production vertex [mm].


The documentation for this struct was generated from the following file: