ATLAS Offline Software
Functions
HepMC::BarcodeBased Namespace Reference

Functions

template<class T >
bool is_truth_suppressed_pileup (const T &p)
 Method to establish if a particle (or barcode) corresponds to truth-suppressed pile-up. More...
 
template<class T >
bool no_truth_link (const T &p)
 Method to establish if a if the object is linked to something which was never saved to the HepMC Truth - for example particle was too low energy to be recorded. More...
 
template<class T >
bool ignoreTruthLink (const T &p, bool vetoPileUp)
 Helper function for SDO creation in PileUpTools. More...
 
template<class T >
bool is_simulation_particle (const T &p)
 Method to establish if a particle (or barcode) was created during the simulation (only to be used in legacy TP converters) More...
 
template<class T >
bool is_sim_secondary (const T &p)
 Method to establish if a particle (or barcode) is a new seondary created during the simulation (only to be used in legacy TP converters) More...
 
template<class T >
int generations (const T &p)
 Method to return how many interactions a particle has undergone during simulation (only to be used in legacy TP converters). More...
 
template<class T >
bool is_simulation_vertex (const T &v)
 Method to establish if the vertex was created during simulation (only to be used in legacy TP converters) More...
 
template<class T1 , class T2 >
bool is_same_generator_particle (const T1 &p1, const T2 &p2)
 Method to establish if two particles in the GenEvent actually represent the same generated particle. More...
 
template<class T1 , class T2 >
bool is_sim_descendant (const T1 &p1, const T2 &p2)
 Method to check if the first particle is a descendant of the second in the simulation, i.e. particle p1 was produced simulations particle p2. More...
 

Function Documentation

◆ generations()

template<class T >
int HepMC::BarcodeBased::generations ( const T &  p)
inline

Method to return how many interactions a particle has undergone during simulation (only to be used in legacy TP converters).

Definition at line 204 of file MagicNumbers.h.

◆ ignoreTruthLink()

template<class T >
bool HepMC::BarcodeBased::ignoreTruthLink ( const T &  p,
bool  vetoPileUp 
)
inline

Helper function for SDO creation in PileUpTools.

Definition at line 195 of file MagicNumbers.h.

195 { const int b = barcode(p); return no_truth_link(b) || (vetoPileUp && is_truth_suppressed_pileup(b)); }

◆ is_same_generator_particle()

template<class T1 , class T2 >
bool HepMC::BarcodeBased::is_same_generator_particle ( const T1 &  p1,
const T2 &  p2 
)
inline

Method to establish if two particles in the GenEvent actually represent the same generated particle.

Definition at line 211 of file MagicNumbers.h.

211 { int b1 = barcode(p1); int b2 = barcode(p2); return b1% SIM_REGENERATION_INCREMENT == b2 % SIM_REGENERATION_INCREMENT; }

◆ is_sim_descendant()

template<class T1 , class T2 >
bool HepMC::BarcodeBased::is_sim_descendant ( const T1 &  p1,
const T2 &  p2 
)
inline

Method to check if the first particle is a descendant of the second in the simulation, i.e. particle p1 was produced simulations particle p2.

Definition at line 215 of file MagicNumbers.h.

215 { int b1 = barcode(p1); int b2 = barcode(p2); return b1 % SIM_REGENERATION_INCREMENT == b2;}

◆ is_sim_secondary()

template<class T >
bool HepMC::BarcodeBased::is_sim_secondary ( const T &  p)
inline

Method to establish if a particle (or barcode) is a new seondary created during the simulation (only to be used in legacy TP converters)

Definition at line 201 of file MagicNumbers.h.

◆ is_simulation_particle()

template<class T >
bool HepMC::BarcodeBased::is_simulation_particle ( const T &  p)
inline

Method to establish if a particle (or barcode) was created during the simulation (only to be used in legacy TP converters)

Definition at line 198 of file MagicNumbers.h.

198 { return (barcode(p)>SIM_BARCODE_THRESHOLD);}

◆ is_simulation_vertex()

template<class T >
bool HepMC::BarcodeBased::is_simulation_vertex ( const T &  v)
inline

Method to establish if the vertex was created during simulation (only to be used in legacy TP converters)

Definition at line 207 of file MagicNumbers.h.

207 { return (barcode(v)<-SIM_BARCODE_THRESHOLD);}

◆ is_truth_suppressed_pileup()

template<class T >
bool HepMC::BarcodeBased::is_truth_suppressed_pileup ( const T &  p)
inline

Method to establish if a particle (or barcode) corresponds to truth-suppressed pile-up.

Definition at line 189 of file MagicNumbers.h.

189 { return (barcode(p) == SUPPRESSED_PILEUP_BARCODE);}

◆ no_truth_link()

template<class T >
bool HepMC::BarcodeBased::no_truth_link ( const T &  p)
inline

Method to establish if a if the object is linked to something which was never saved to the HepMC Truth - for example particle was too low energy to be recorded.

Definition at line 192 of file MagicNumbers.h.

192 { return (barcode(p) == 0);}
HepMC::SIM_BARCODE_THRESHOLD
constexpr int SIM_BARCODE_THRESHOLD
Constant defining the barcode threshold for simulated particles, eg. can be used to separate generato...
Definition: MagicNumbers.h:29
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
HepMC::SUPPRESSED_PILEUP_BARCODE
constexpr int SUPPRESSED_PILEUP_BARCODE(std::numeric_limits< int32_t >::max())
This barcode is used by objects matched to particles from pile-up interactions in standard MC Product...
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
HepMC::SIM_REGENERATION_INCREMENT
constexpr int SIM_REGENERATION_INCREMENT
Constant defining the barcode threshold for regenerated particles, i.e. particles surviving an intera...
Definition: MagicNumbers.h:32
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.PyAthena.v
v
Definition: PyAthena.py:157
HepMC::is_truth_suppressed_pileup
bool is_truth_suppressed_pileup(const T &p)
Method to establish if a particle (or barcode) corresponds to truth-suppressed pile-up (TODO update t...
Definition: MagicNumbers.h:290
HepMC::no_truth_link
bool no_truth_link(const T &p)
Method to establish if a if the object is linked to something which was never saved to the HepMC Trut...
Definition: MagicNumbers.h:293