ATLAS Offline Software
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
MagicNumbers.h File Reference
#include <limits>
#include <cstdint>
#include <memory>
#include <deque>
#include <type_traits>
#include "AtlasHepMC/GenEvent.h"
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
Include dependency graph for MagicNumbers.h:

Go to the source code of this file.

Classes

struct  HepMC::is_smart_ptr< T >
 
struct  HepMC::is_smart_ptr< std::shared_ptr< T > >
 
struct  HepMC::is_smart_ptr< std::unique_ptr< T > >
 
struct  HepMC::is_smart_ptr< std::weak_ptr< T > >
 
struct  HepMC::remove_smart_pointer< T >
 
struct  HepMC::remove_smart_pointer< std::shared_ptr< T > >
 
struct  HepMC::remove_smart_pointer< std::unique_ptr< T > >
 
struct  HepMC::remove_smart_pointer< std::weak_ptr< T > >
 

Namespaces

 xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
 
 HepMC
 
 HepMC::BarcodeBased
 
 HepMC::StatusBased
 

Typedefs

template<class T >
using HepMC::remove_smart_pointer_t = typename remove_smart_pointer< T >::type
 

Enumerations

enum  EBC_SUPPRESSED_TRUTH : unsigned char { EBC_UNSUPPRESSED = 0, EBC_PU_SUPPRESSED, EBC_NSUPP }
 

Functions

constexpr int HepMC::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 Production. More...
 
template<typename T >
int HepMC::uniqueID (const T &p)
 
template<typename T >
int HepMC::status (const T &p)
 
template<>
int HepMC::status (const ConstGenVertexPtr &v1)
 
template<>
int HepMC::status (const GenVertexPtr &v1)
 
template<class T >
void HepMC::get_particle_history (const T &p, std::deque< int > &out, const int direction=0)
 Function to calculate all the descendants(direction=1)/ancestors(direction=-1) of the particle. More...
 
template<class T >
std::deque< int > HepMC::simulation_history (const T &p, const int direction)
 Function to calculate all the descendants(direction=1)/ancestors(direction=-1) of the particle. More...
 
template<class T >
bool HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::ignoreTruthLink (const T &p, bool vetoPileUp)
 Helper function for SDO creation in PileUpTools. More...
 
template<class T >
bool HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::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 HepMC::BarcodeBased::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...
 
template<class T >
bool HepMC::StatusBased::is_truth_suppressed_pileup (const T &p)
 Method to establish if a particle corresponds to truth-suppressed pile-up. More...
 
template<class T >
bool HepMC::StatusBased::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 HepMC::StatusBased::ignoreTruthLink (const T &p, bool vetoPileUp)
 Helper function for SDO creation in PileUpTools. More...
 
template<class T >
bool HepMC::StatusBased::is_simulation_particle (const T &p)
 Method to establish if a particle was created during the simulation based on the status value. More...
 
template<class T >
bool HepMC::StatusBased::is_sim_secondary (const T &p)
 Method to establish if a particle is a new seondary created during the simulation based on the status value. More...
 
template<class T >
int HepMC::StatusBased::generations (const T &p)
 Method to return how many interactions a particle has undergone during simulation based on the status value. More...
 
template<class T >
bool HepMC::StatusBased::is_simulation_vertex (const T &v)
 Method to establish if the vertex was created during simulation from the status. More...
 
template<class T1 , class T2 >
bool HepMC::StatusBased::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 HepMC::StatusBased::is_same_object (const T1 &p1, const T2 &p2)
 Method to establish if two particles/vertices in the GenEvent actually represent the same particle. More...
 
template<class T1 , class T2 >
bool HepMC::StatusBased::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...
 
template<class T >
bool HepMC::is_truth_suppressed_pileup (const T &p)
 Method to establish if a particle (or barcode) corresponds to truth-suppressed pile-up (TODO update to be status based) More...
 
template<class T >
bool HepMC::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 HepMC::ignoreTruthLink (const T &p, bool vetoPileUp)
 Helper function for SDO creation in PileUpTools. More...
 
template<class T >
bool HepMC::is_simulation_particle (const T &p)
 Method to establish if a particle (or barcode) was created during the simulation (TODO update to be status based) More...
 
template<class T >
int HepMC::generations (const T &p)
 Method to return how many interactions a particle has undergone during simulation (TODO migrate to be based on status). More...
 
template<class T >
bool HepMC::is_simulation_vertex (const T &v)
 Method to establish if the vertex was created during simulation (TODO migrate to be based on status). More...
 
template<class T1 , class T2 >
bool HepMC::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 HepMC::is_same_particle (const T1 &p1, const T2 &p2)
 Method to establish if two particles in the GenEvent actually represent the same particle. More...
 
template<class T1 , class T2 >
bool HepMC::is_same_vertex (const T1 &p1, const T2 &p2)
 Method to establish if two particles in the GenEvent actually represent the same vertex. More...
 
template<class T1 , class T2 >
bool HepMC::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...
 
template<class T >
void HepMC::old_to_new_simulation_scheme (T &evt)
 Function that converts the old scheme of labeling the simulation particles (barcodes) into the new scheme (statuses). More...
 
int HepMC::new_particle_status_from_old (const int oldStatus, const int barcode)
 Get particle status in the new scheme from the barcode and status in the old scheme. More...
 
int HepMC::old_particle_status_from_new (const int newStatus)
 Get particle status in the old scheme from the status in the new scheme. More...
 
int HepMC::new_vertex_status_from_old (const int oldStatus, const int barcode)
 Get vertex status in the new scheme from the barcode and status in the old scheme. More...
 
int HepMC::old_vertex_status_from_new (const int newStatus)
 Get vertex status in the old scheme from the status in the new scheme. More...
 
int HepMC::maxGeneratedParticleBarcode (const HepMC::GenEvent *genEvent)
 Get the maximal value of barcode of particle present in the event. More...
 
int HepMC::maxGeneratedVertexBarcode (const HepMC::GenEvent *genEvent)
 Get the maximal absolute value of barcode of vertex present in the event. Returns a negative number. More...
 

Variables

constexpr int HepMC::SIM_BARCODE_THRESHOLD = 200000
 Constant defining the barcode threshold for simulated particles, eg. can be used to separate generator event record entries from simulated particles. More...
 
constexpr int HepMC::SIM_REGENERATION_INCREMENT = 1000000
 Constant defining the barcode threshold for regenerated particles, i.e. particles surviving an interaction. More...
 
constexpr int HepMC::SIM_STATUS_INCREMENT = 100000
 Constant defining the barcode threshold for regenerated particles, i.e. particles surviving an interaction. More...
 
constexpr int HepMC::SIM_STATUS_THRESHOLD = 20000
 Constant definiting the status threshold for simulated particles, eg. can be used to separate generator event record entries from simulated particles. More...
 
constexpr int HepMC::FORWARD_TRANSPORT_MODEL_PROCESS = 212
 Special Forward transport Geant process for vertices. More...
 
constexpr int HepMC::INVALID_PARTICLE_BARCODE = -1
 
constexpr int HepMC::UNDEFINED_ID = 0
 
constexpr int HepMC::INVALID_PARTICLE_ID = -1
 
constexpr int HepMC::INVALID_VERTEX_ID = 1
 
template<class T >
constexpr bool HepMC::is_smart_ptr_v = is_smart_ptr<T>::value
 

Enumeration Type Documentation

◆ EBC_SUPPRESSED_TRUTH

enum EBC_SUPPRESSED_TRUTH : unsigned char
Enumerator
EBC_UNSUPPRESSED 
EBC_PU_SUPPRESSED 
EBC_NSUPP 

Definition at line 28 of file MagicNumbers.h.

28  : unsigned char {
29  EBC_UNSUPPRESSED = 0, // Truth particle expected to be found in McEventCollection
30  EBC_PU_SUPPRESSED, // Link points to a suppressed pile-up truth particle do not attempt to resolve it.
31  EBC_NSUPP
32 };
EBC_NSUPP
@ EBC_NSUPP
Definition: MagicNumbers.h:31
EBC_PU_SUPPRESSED
@ EBC_PU_SUPPRESSED
Definition: MagicNumbers.h:30
EBC_UNSUPPRESSED
@ EBC_UNSUPPRESSED
Definition: MagicNumbers.h:29