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_same_object (const T1 &p1, const T2 &p2)
 Method to establish if two particles/vertices 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 212 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 203 of file MagicNumbers.h.

203 { 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 218 of file MagicNumbers.h.

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

◆ is_same_object()

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

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

Definition at line 221 of file MagicNumbers.h.

221 { int b1 = barcode(p1); int b2 = barcode(p2); return b1 == b2; }

◆ 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 224 of file MagicNumbers.h.

224 { 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 209 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 206 of file MagicNumbers.h.

206 { 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 215 of file MagicNumbers.h.

215 { 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 197 of file MagicNumbers.h.

197 { 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 200 of file MagicNumbers.h.

200 { return (barcode(p) == UNDEFINED_ID);}
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:37
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
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...
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
HepMC::UNDEFINED_ID
constexpr int UNDEFINED_ID
Definition: MagicNumbers.h:56
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:40
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.PyAthena.v
v
Definition: PyAthena.py:154
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:332
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:342