ATLAS Offline Software
Loading...
Searching...
No Matches
DecoratorHelpers.h File Reference
#include <Math/Vector4D.h>
#include <TMath.h>
#include <xAODEventInfo/EventInfo.h>
Include dependency graph for DecoratorHelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PartonDecorator
 Struct to manage and apply decorators to the EventInfo object. More...

Functions

template<typename T, typename U, typename V>
void FillParticleInfo (const SG::Decorator< T > &dec, const U &value, const V *object)
 Template function to fill particle information into a given object.
template<typename T, typename U, typename V>
void FillVectorParticleInfo (const SG::Decorator< std::vector< T > > &dec, const U &value, const V *object)
 Template function to fill vector particle information into a given object.
template<typename T, typename U>
void FillParticleInfo (const SG::Decorator< T > &dec_pt, const SG::Decorator< T > &dec_eta, const SG::Decorator< T > &dec_phi, const SG::Decorator< T > &dec_m, const ROOT::Math::PtEtaPhiMVector &particle, U *object)
 Template function to fill basic particle kinematics (pt, eta, phi, m) into an object.
template<typename T, typename U>
void FillVectorParticleInfo (const SG::Decorator< std::vector< T > > &dec_pt, const SG::Decorator< std::vector< T > > &dec_eta, const SG::Decorator< std::vector< T > > &dec_phi, const SG::Decorator< std::vector< T > > &dec_m, const ROOT::Math::PtEtaPhiMVector &particle, U *object)
 Template function to fill basic vector particle kinematics into an object.
template<typename T, typename U>
void FillParticleInfo (const SG::Decorator< T > &dec_pt, const SG::Decorator< T > &dec_eta, const SG::Decorator< T > &dec_phi, const SG::Decorator< T > &dec_m, const SG::Decorator< int > &dec_pdgId, const ROOT::Math::PtEtaPhiMVector &particle, int pdgId, U *object)
 Template function to fill particle kinematics and PDG ID into an object.
template<typename T, typename U>
void FillVectorParticleInfo (const SG::Decorator< std::vector< T > > &dec_pt, const SG::Decorator< std::vector< T > > &dec_eta, const SG::Decorator< std::vector< T > > &dec_phi, const SG::Decorator< std::vector< T > > &dec_m, const SG::Decorator< std::vector< int > > &dec_pdgId, const ROOT::Math::PtEtaPhiMVector &particle, int pdgId, U *object)
 Template function to fill vector particle kinematics and PDG ID into an object.
template<typename T, typename U>
void FillDefaultParticleInfo (const SG::Decorator< T > &dec_pt, const SG::Decorator< T > &dec_eta, const SG::Decorator< T > &dec_phi, const SG::Decorator< T > &dec_m, U *object)
 Template function to fill default (placeholder) particle kinematics into an object.
template<typename T, typename U>
void FillDefaultVectorParticleInfo (const SG::Decorator< std::vector< T > > &dec_pt, const SG::Decorator< std::vector< T > > &dec_eta, const SG::Decorator< std::vector< T > > &dec_phi, const SG::Decorator< std::vector< T > > &dec_m, U *object)
 Template function to fill default (placeholder) vector particle kinematics into an object.
template<typename T, typename U>
void FillDefaultParticleInfo (const SG::Decorator< T > &dec_pt, const SG::Decorator< T > &dec_eta, const SG::Decorator< T > &dec_phi, const SG::Decorator< T > &dec_m, const SG::Decorator< int > &dec_pdgId, U *object)
 Template function to fill default (placeholder) particle kinematics and PDG ID into an object.
template<typename T, typename U>
void FillDefaultVectorParticleInfo (const SG::Decorator< std::vector< T > > &dec_pt, const SG::Decorator< std::vector< T > > &dec_eta, const SG::Decorator< std::vector< T > > &dec_phi, const SG::Decorator< std::vector< T > > &dec_m, const SG::Decorator< std::vector< int > > &dec_pdgId, U *object)
 Template function to fill default (placeholder) vector particle kinematics and PDG ID into an object.

Function Documentation

◆ FillDefaultParticleInfo() [1/2]

template<typename T, typename U>
void FillDefaultParticleInfo ( const SG::Decorator< T > & dec_pt,
const SG::Decorator< T > & dec_eta,
const SG::Decorator< T > & dec_phi,
const SG::Decorator< T > & dec_m,
const SG::Decorator< int > & dec_pdgId,
U * object )

Template function to fill default (placeholder) particle kinematics and PDG ID into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 179 of file DecoratorHelpers.h.

183 {
184 FillParticleInfo(dec_pdgId, 0, object);
185 FillDefaultParticleInfo(dec_pt, dec_eta, dec_phi, dec_m, object);
186}
void FillDefaultParticleInfo(const SG::Decorator< T > &dec_pt, const SG::Decorator< T > &dec_eta, const SG::Decorator< T > &dec_phi, const SG::Decorator< T > &dec_m, U *object)
Template function to fill default (placeholder) particle kinematics into an object.
void FillParticleInfo(const SG::Decorator< T > &dec, const U &value, const V *object)
Template function to fill particle information into a given object.

◆ FillDefaultParticleInfo() [2/2]

template<typename T, typename U>
void FillDefaultParticleInfo ( const SG::Decorator< T > & dec_pt,
const SG::Decorator< T > & dec_eta,
const SG::Decorator< T > & dec_phi,
const SG::Decorator< T > & dec_m,
U * object )

Template function to fill default (placeholder) particle kinematics into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 142 of file DecoratorHelpers.h.

145 {
146 FillParticleInfo(dec_pt, -1, object);
147 FillParticleInfo(dec_eta, -999, object);
148 FillParticleInfo(dec_phi, -999, object);
149 FillParticleInfo(dec_m, -1, object);
150}

◆ FillDefaultVectorParticleInfo() [1/2]

template<typename T, typename U>
void FillDefaultVectorParticleInfo ( const SG::Decorator< std::vector< T > > & dec_pt,
const SG::Decorator< std::vector< T > > & dec_eta,
const SG::Decorator< std::vector< T > > & dec_phi,
const SG::Decorator< std::vector< T > > & dec_m,
const SG::Decorator< std::vector< int > > & dec_pdgId,
U * object )

Template function to fill default (placeholder) vector particle kinematics and PDG ID into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 196 of file DecoratorHelpers.h.

201 {
202 dec_pdgId(*object) = {};
203 FillDefaultVectorParticleInfo(dec_pt, dec_eta, dec_phi, dec_m, object);
204}
void FillDefaultVectorParticleInfo(const SG::Decorator< std::vector< T > > &dec_pt, const SG::Decorator< std::vector< T > > &dec_eta, const SG::Decorator< std::vector< T > > &dec_phi, const SG::Decorator< std::vector< T > > &dec_m, U *object)
Template function to fill default (placeholder) vector particle kinematics into an object.

◆ FillDefaultVectorParticleInfo() [2/2]

template<typename T, typename U>
void FillDefaultVectorParticleInfo ( const SG::Decorator< std::vector< T > > & dec_pt,
const SG::Decorator< std::vector< T > > & dec_eta,
const SG::Decorator< std::vector< T > > & dec_phi,
const SG::Decorator< std::vector< T > > & dec_m,
U * object )

Template function to fill default (placeholder) vector particle kinematics into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 160 of file DecoratorHelpers.h.

164 {
165 dec_pt(*object) = {};
166 dec_eta(*object) = {};
167 dec_phi(*object) = {};
168 dec_m(*object) = {};
169}

◆ FillParticleInfo() [1/3]

template<typename T, typename U, typename V>
void FillParticleInfo ( const SG::Decorator< T > & dec,
const U & value,
const V * object )

Template function to fill particle information into a given object.

Author
Baptiste Ravina bapti.nosp@m.ste..nosp@m.ravin.nosp@m.a@ce.nosp@m.rn.ch
Steffen Korn steff.nosp@m.en.k.nosp@m.orn@c.nosp@m.ern..nosp@m.ch

This template function assigns a value to a decorator associated with an object.

Template Parameters
TType of the value being decorated (e.g., float, int).
UType of the value to be assigned.
VType of the object that will be decorated.
Parameters
decThe decorator that will hold the value.
valueThe value to be assigned to the decorator.
objectPointer to the object that will be decorated.

Definition at line 29 of file DecoratorHelpers.h.

30 {
31 dec(*object) = value;
32}

◆ FillParticleInfo() [2/3]

template<typename T, typename U>
void FillParticleInfo ( const SG::Decorator< T > & dec_pt,
const SG::Decorator< T > & dec_eta,
const SG::Decorator< T > & dec_phi,
const SG::Decorator< T > & dec_m,
const ROOT::Math::PtEtaPhiMVector & particle,
U * object )

Template function to fill basic particle kinematics (pt, eta, phi, m) into an object.

Template Parameters
TType of the value being decorated (e.g., float).
UType of the object that will be decorated.
Parameters
dec_ptDecorator for transverse momentum.
dec_etaDecorator for pseudorapidity.
dec_phiDecorator for azimuthal angle.
dec_mDecorator for mass.
particleThe particle four-vector.
objectPointer to the object that will be decorated.

Definition at line 65 of file DecoratorHelpers.h.

69 {
70 FillParticleInfo(dec_pt, particle.Pt(), object);
71 FillParticleInfo(dec_eta, particle.Eta(), object);
72 FillParticleInfo(dec_phi, particle.Phi(), object);
73 FillParticleInfo(dec_m, particle.M(), object);
74}
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ FillParticleInfo() [3/3]

template<typename T, typename U>
void FillParticleInfo ( const SG::Decorator< T > & dec_pt,
const SG::Decorator< T > & dec_eta,
const SG::Decorator< T > & dec_phi,
const SG::Decorator< T > & dec_m,
const SG::Decorator< int > & dec_pdgId,
const ROOT::Math::PtEtaPhiMVector & particle,
int pdgId,
U * object )

Template function to fill particle kinematics and PDG ID into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 104 of file DecoratorHelpers.h.

110 {
111 FillParticleInfo(dec_pdgId, pdgId, object);
112 FillParticleInfo(dec_pt, dec_eta, dec_phi, dec_m, particle, object);
113}

◆ FillVectorParticleInfo() [1/3]

template<typename T, typename U, typename V>
void FillVectorParticleInfo ( const SG::Decorator< std::vector< T > > & dec,
const U & value,
const V * object )

Template function to fill vector particle information into a given object.

Template Parameters
TType of the value being decorated.
UType of the value to be assigned.
VType of the object that will be decorated.
Parameters
decThe vector decorator.
valueThe value to push back.
objectPointer to the object that will be decorated.

Definition at line 46 of file DecoratorHelpers.h.

47 {
48 dec(*object).push_back(value);
49}

◆ FillVectorParticleInfo() [2/3]

template<typename T, typename U>
void FillVectorParticleInfo ( const SG::Decorator< std::vector< T > > & dec_pt,
const SG::Decorator< std::vector< T > > & dec_eta,
const SG::Decorator< std::vector< T > > & dec_phi,
const SG::Decorator< std::vector< T > > & dec_m,
const ROOT::Math::PtEtaPhiMVector & particle,
U * object )

Template function to fill basic vector particle kinematics into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 84 of file DecoratorHelpers.h.

89 {
90 FillVectorParticleInfo(dec_pt, particle.Pt(), object);
91 FillVectorParticleInfo(dec_eta, particle.Eta(), object);
92 FillVectorParticleInfo(dec_phi, particle.Phi(), object);
93 FillVectorParticleInfo(dec_m, particle.M(), object);
94}
void FillVectorParticleInfo(const SG::Decorator< std::vector< T > > &dec, const U &value, const V *object)
Template function to fill vector particle information into a given object.

◆ FillVectorParticleInfo() [3/3]

template<typename T, typename U>
void FillVectorParticleInfo ( const SG::Decorator< std::vector< T > > & dec_pt,
const SG::Decorator< std::vector< T > > & dec_eta,
const SG::Decorator< std::vector< T > > & dec_phi,
const SG::Decorator< std::vector< T > > & dec_m,
const SG::Decorator< std::vector< int > > & dec_pdgId,
const ROOT::Math::PtEtaPhiMVector & particle,
int pdgId,
U * object )

Template function to fill vector particle kinematics and PDG ID into an object.

Template Parameters
TType of the value being decorated.
UType of the object that will be decorated.

Definition at line 123 of file DecoratorHelpers.h.

129 {
130 FillVectorParticleInfo(dec_pdgId, pdgId, object);
131 FillVectorParticleInfo(dec_pt, dec_eta, dec_phi, dec_m, particle, object);
132}