ATLAS Offline Software
OverlapDecorationHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ASSOCIATIONUTILS_OVERLAPDECORATIONHELPER_H
6 #define ASSOCIATIONUTILS_OVERLAPDECORATIONHELPER_H
7 
8 // EDM includes
10 
11 // Local includes
13 
14 namespace ORUtils
15 {
16 
27  {
28 
29  public:
30 
38  OverlapDecorationHelper(const std::string& inputLabel,
39  const std::string& outputLabel,
40  bool outputPassValue = false);
41 
43  bool isInputObject(const xAOD::IParticle& obj) const;
44 
46  bool isRejectedObject(const xAOD::IParticle& obj) const;
47 
49  bool isSurvivingObject(const xAOD::IParticle& obj) const;
50 
52  char getObjectPriority(const xAOD::IParticle& obj) const;
53 
55  void setOverlapDecoration(const xAOD::IParticle& obj, bool result) const;
56 
58  void setObjectPass(const xAOD::IParticle& obj) const;
59 
61  void setObjectFail(const xAOD::IParticle& obj) const;
62 
66  bool isDecorated(const xAOD::IParticleContainer& container) const;
67 
70  void initializeDecorations(const xAOD::IParticleContainer& container) const;
71 
73  void resetDecorations(const xAOD::IParticleContainer& container) const;
74 
75  private:
76 
79 
84 
87 
88  }; // class OverlapDecorationHelper
89 
90 } // namespace ORUtils
91 
92 #endif
ORUtils::OverlapDecorationHelper::setObjectPass
void setObjectPass(const xAOD::IParticle &obj) const
Shorthand way to set an object as passing overlap removal.
Definition: OverlapDecorationHelper.cxx:75
ORUtils::OverlapDecorationHelper::isSurvivingObject
bool isSurvivingObject(const xAOD::IParticle &obj) const
Check if object is surviving OR thus far.
Definition: OverlapDecorationHelper.cxx:51
get_generator_info.result
result
Definition: get_generator_info.py:21
ORUtils::OverlapDecorationHelper::m_useInputLabel
bool m_useInputLabel
Toggle usage of input label.
Definition: OverlapDecorationHelper.h:78
ORUtils::OverlapDecorationHelper
Encapsulates the code needed to access and set overlap-related decorations.
Definition: OverlapDecorationHelper.h:27
inputLabel
const std::string inputLabel
Definition: OverlapRemovalTester.cxx:68
outputLabel
const std::string outputLabel
Definition: OverlapRemovalTester.cxx:69
ORUtils::OverlapDecorationHelper::setObjectFail
void setObjectFail(const xAOD::IParticle &obj) const
Shorthand way to set an object as failing overlap removal.
Definition: OverlapDecorationHelper.cxx:80
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
ORUtils
Definition: AltMuJetOverlapTool.h:20
ORUtils::OverlapDecorationHelper::getObjectPriority
char getObjectPriority(const xAOD::IParticle &obj) const
Get the user priority score, which is currently the input decoration.
Definition: OverlapDecorationHelper.cxx:60
ORUtils::OverlapDecorationHelper::m_outputDecorator
ort::outputDecorator_t m_outputDecorator
Output decorator.
Definition: OverlapDecorationHelper.h:83
ORUtils::OverlapDecorationHelper::OverlapDecorationHelper
OverlapDecorationHelper(const std::string &inputLabel, const std::string &outputLabel, bool outputPassValue=false)
Constructor.
Definition: OverlapDecorationHelper.cxx:15
ORUtils::OverlapDecorationHelper::resetDecorations
void resetDecorations(const xAOD::IParticleContainer &container) const
Helper method for setting all objects as passing.
Definition: OverlapDecorationHelper.cxx:109
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
IParticleContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ORUtils::OverlapDecorationHelper::isInputObject
bool isInputObject(const xAOD::IParticle &obj) const
Check if object is flagged as input for OR.
Definition: OverlapDecorationHelper.cxx:31
ORUtils::OverlapDecorationHelper::m_outputPassValue
bool m_outputPassValue
Output decoration logic.
Definition: OverlapDecorationHelper.h:86
ORUtils::OverlapDecorationHelper::isRejectedObject
bool isRejectedObject(const xAOD::IParticle &obj) const
Check if an object has been rejected by decoration.
Definition: OverlapDecorationHelper.cxx:42
ORUtils::OverlapDecorationHelper::m_inputAccessor
ort::inputAccessor_t m_inputAccessor
Input label accessor.
Definition: OverlapDecorationHelper.h:81
ORUtils::OverlapDecorationHelper::isDecorated
bool isDecorated(const xAOD::IParticleContainer &container) const
Check if output decoration has been applied to a container.
Definition: OverlapDecorationHelper.cxx:89
OverlapRemovalDefs.h
ORUtils::OverlapDecorationHelper::initializeDecorations
void initializeDecorations(const xAOD::IParticleContainer &container) const
Initialize decorations for a container to "pass".
Definition: OverlapDecorationHelper.cxx:99
outputPassValue
const bool outputPassValue
Definition: OverlapRemovalTester.cxx:67
python.PyAthena.obj
obj
Definition: PyAthena.py:135
ORUtils::OverlapDecorationHelper::setOverlapDecoration
void setOverlapDecoration(const xAOD::IParticle &obj, bool result) const
Set output decoration on object, pass or fail.
Definition: OverlapDecorationHelper.cxx:70