![]() |
ATLAS Offline Software
|
Struct to manage and apply decorators to the EventInfo object. More...
#include <DecoratorHelpers.h>
Public Member Functions | |
| void | setPrefix (const std::string &prefix) |
| Set the prefix prepended to all decorator names. | |
| void | setEventInfo (const xAOD::EventInfo *eventInfo) |
| Set the EventInfo object to decorate for the current event. | |
| void | initializeFloatDecorator (const std::string &name) |
| Initialize a float decorator by bare name. | |
| void | initializeVectorFloatDecorator (const std::string &name) |
| Initialize a vector-of-float decorator by bare name. | |
| void | initializeFloatDecorator (const std::vector< std::string > &names) |
| Initialize multiple float decorators by a list of bare names. | |
| void | initializePtEtaPhiMDecorator (const std::string &prefix) |
| Initialize pt, eta, phi, m float decorators for a bare prefix. | |
| void | initializeVectorPtEtaPhiMDecorator (const std::string &prefix) |
| Initialize vector pt, eta, phi, m float decorators for a bare prefix. | |
| void | initializeIntDecorator (const std::string &name) |
| Initialize an integer decorator by bare name. | |
| void | initializeVectorIntDecorator (const std::string &name) |
| Initialize a vector-of-int decorator by bare name. | |
| void | initializeIntDecorator (const std::vector< std::string > &names) |
| Initialize multiple integer decorators by a list of bare names. | |
| SG::Decorator< int > * | getIntDecorator (const std::string &name) const |
| Retrieve a pointer to an integer decorator by bare name. | |
| SG::Decorator< std::vector< int > > * | getVectorIntDecorator (const std::string &name) const |
| Retrieve a pointer to a vector-of-int decorator by bare name. | |
| SG::Decorator< float > * | getFloatDecorator (const std::string &name) const |
| Retrieve a pointer to a float decorator by bare name. | |
| SG::Decorator< std::vector< float > > * | getVectorFloatDecorator (const std::string &name) const |
| Retrieve a pointer to a vector-of-float decorator by bare name. | |
| void | decorateDefault (const std::string &prefix) |
| Decorate with default particle kinematics (bare prefix). | |
| void | decorateVectorDefault (const std::string &prefix) |
| Decorate with default vector particle kinematics (bare prefix). | |
| void | decorateDefaultNoPdgId (const std::string &prefix) |
| Decorate with default particle kinematics, no PDG ID (bare prefix). | |
| void | decorateCustom (const std::string &name, float value) |
| Decorate with a custom float value (bare name). | |
| void | decorateCustom (const std::string &name, int value) |
| Decorate with a custom integer value (bare name). | |
| void | decorateParticle (const std::string &prefix, const ROOT::Math::PtEtaPhiMVector &p) |
| Decorate with particle kinematics, no PDG ID (bare prefix). | |
| void | decorateParticle (const std::string &prefix, const ROOT::Math::PtEtaPhiMVector &p, int pdgId) |
| Decorate with particle kinematics and PDG ID (bare prefix). | |
| void | decorateVectorParticle (const std::string &prefix, const std::vector< ROOT::Math::PtEtaPhiMVector > &vec_p, const std::vector< int > &vec_pdgId) |
| Decorate with a vector of particle kinematics and PDG IDs (bare prefix). | |
Public Attributes | |
| std::map< std::string, std::unique_ptr< SG::Decorator< float > > > | floatDecorators |
| std::map< std::string, std::unique_ptr< SG::Decorator< std::vector< float > > > > | vectorfloatDecorators |
| std::map< std::string, std::unique_ptr< SG::Decorator< int > > > | intDecorators |
| std::map< std::string, std::unique_ptr< SG::Decorator< std::vector< int > > > > | vectorintDecorators |
Private Member Functions | |
| std::string | fullName (const std::string &name) const |
| Returns the full (prefixed) decorator key for internal use. | |
Private Attributes | |
| std::string | m_prefix |
| Prefix prepended to all decorator names. | |
| const xAOD::EventInfo * | m_eventInfo |
| Target object; set once per event via setEventInfo(). | |
Struct to manage and apply decorators to the EventInfo object.
PartonDecorator centralises all decoration of the xAOD::EventInfo for a single parton history instance. Two pieces of per-instance state are set once and reused:
All decorate* methods therefore take only the branch name and the value(s) to write — no object pointer argument is needed at call sites.
Definition at line 221 of file DecoratorHelpers.h.
|
inline |
Decorate with a custom float value (bare name).
Definition at line 402 of file DecoratorHelpers.h.
|
inline |
Decorate with a custom integer value (bare name).
Definition at line 407 of file DecoratorHelpers.h.
|
inline |
Decorate with default particle kinematics (bare prefix).
Writes sentinel values: pt=-1, eta=-999, phi=-999, m=-1, pdgId=0.
Definition at line 374 of file DecoratorHelpers.h.
|
inline |
Decorate with default particle kinematics, no PDG ID (bare prefix).
Definition at line 394 of file DecoratorHelpers.h.
|
inline |
Decorate with particle kinematics, no PDG ID (bare prefix).
| prefix | Bare decorator prefix. |
| p | The particle four-vector. |
Definition at line 417 of file DecoratorHelpers.h.
|
inline |
Decorate with particle kinematics and PDG ID (bare prefix).
| prefix | Bare decorator prefix. |
| p | The particle four-vector. |
| pdgId | The PDG ID of the particle. |
Definition at line 432 of file DecoratorHelpers.h.
|
inline |
Decorate with default vector particle kinematics (bare prefix).
Definition at line 382 of file DecoratorHelpers.h.
|
inline |
Decorate with a vector of particle kinematics and PDG IDs (bare prefix).
| prefix | Bare decorator prefix. |
| vec_p | Vector of particle four-vectors. |
| vec_pdgId | Vector of PDG IDs. |
Definition at line 448 of file DecoratorHelpers.h.
|
inlineprivate |
Returns the full (prefixed) decorator key for internal use.
Definition at line 470 of file DecoratorHelpers.h.
|
inline |
Retrieve a pointer to a float decorator by bare name.
| std::runtime_error | if the decorator is not found. |
Definition at line 345 of file DecoratorHelpers.h.
|
inline |
Retrieve a pointer to an integer decorator by bare name.
| std::runtime_error | if the decorator is not found. |
Definition at line 320 of file DecoratorHelpers.h.
|
inline |
Retrieve a pointer to a vector-of-float decorator by bare name.
| std::runtime_error | if the decorator is not found. |
Definition at line 357 of file DecoratorHelpers.h.
|
inline |
Retrieve a pointer to a vector-of-int decorator by bare name.
| std::runtime_error | if the decorator is not found. |
Definition at line 332 of file DecoratorHelpers.h.
|
inline |
Initialize a float decorator by bare name.
Definition at line 254 of file DecoratorHelpers.h.
|
inline |
Initialize multiple float decorators by a list of bare names.
Definition at line 267 of file DecoratorHelpers.h.
|
inline |
Initialize an integer decorator by bare name.
Definition at line 296 of file DecoratorHelpers.h.
|
inline |
Initialize multiple integer decorators by a list of bare names.
Definition at line 309 of file DecoratorHelpers.h.
|
inline |
Initialize pt, eta, phi, m float decorators for a bare prefix.
| prefix | Bare prefix (e.g. "MC_Z_beforeFSR"); "_pt" etc. are appended. |
Definition at line 277 of file DecoratorHelpers.h.
|
inline |
Initialize a vector-of-float decorator by bare name.
Definition at line 260 of file DecoratorHelpers.h.
|
inline |
Initialize a vector-of-int decorator by bare name.
Definition at line 302 of file DecoratorHelpers.h.
|
inline |
Initialize vector pt, eta, phi, m float decorators for a bare prefix.
Definition at line 288 of file DecoratorHelpers.h.
|
inline |
Set the EventInfo object to decorate for the current event.
Must be called once per event before any decorate*() calls. The pointer is not owned and must remain valid for the duration of event processing.
| eventInfo | Pointer to the current xAOD::EventInfo. |
Definition at line 247 of file DecoratorHelpers.h.
|
inline |
Set the prefix prepended to all decorator names.
Must be called before any initialize*() calls. All public methods accept bare names (e.g. "MC_Z_beforeFSR") and the prefix is applied internally.
| prefix | The prefix string (e.g. "Tzq"). May be empty. |
Definition at line 237 of file DecoratorHelpers.h.
| std::map<std::string, std::unique_ptr<SG::Decorator<float> > > PartonDecorator::floatDecorators |
Definition at line 222 of file DecoratorHelpers.h.
| std::map<std::string, std::unique_ptr<SG::Decorator<int> > > PartonDecorator::intDecorators |
Definition at line 225 of file DecoratorHelpers.h.
|
private |
Target object; set once per event via setEventInfo().
Definition at line 464 of file DecoratorHelpers.h.
|
private |
Prefix prepended to all decorator names.
Definition at line 463 of file DecoratorHelpers.h.
| std::map<std::string, std::unique_ptr<SG::Decorator<std::vector<float> > > > PartonDecorator::vectorfloatDecorators |
Definition at line 224 of file DecoratorHelpers.h.
| std::map<std::string, std::unique_ptr<SG::Decorator<std::vector<int> > > > PartonDecorator::vectorintDecorators |
Definition at line 227 of file DecoratorHelpers.h.