Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ParticleVariables.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONPRDTEST_PARTICLEVARIABLES_H
6 #define MUONPRDTEST_PARTICLEVARIABLES_H
7 
9 
12 
13 namespace MuonPRDTest{
16  public:
18  const std::string& containerKey,
19  const std::string& outName,
20  MSG::Level msglvl);
21 
22  bool fill(const EventContext& ctx) override final;
23  bool declare_keys() override final;
29  template <typename T>
30  bool addVariable(const std::string& variable, const bool declareDep = false) {
31  if (declareDep) {
33  }
34  return m_branch->addVariable<T>(variable);
35  }
41  template <typename T>
42  bool addVariable(const std::string& variable, const std::string& accName,
43  const bool declareDep = false) {
44  if (declareDep){
46  }
47  return m_branch->addVariable<T>(variable, accName);
48  }
55  template <typename T>
56  bool addVariableGeV(const std::string& variable, const bool declareDep = false) {
57  if (declareDep) {
59  }
60  return m_branch->addVariableGeV<T>(variable);
61  }
68  template <typename T>
69  bool addVariableGeV(const std::string& variable, const std::string& accName,
70  const bool declareDep = false) {
71  if (declareDep){
73  }
74  return m_branch->addVariableGeV<T>(variable, accName);
75  }
77  bool addVariable(std::shared_ptr<IParticleDecorationBranch> branch);
78  size_t push_back(const xAOD::IParticle* p);
79 
82  void declare_decorator(const std::string& decorName);
83 
84  private:
88  std::shared_ptr<IParticleFourMomBranch> m_branch{};
89  };
90 }
91 #endif
MuonPRDTest::ParticleVariables::addVariable
bool addVariable(const std::string &variable, const bool declareDep=false)
Adds a variable of the primitive data type that can be directly read-off from the xAOD::IParticle as ...
Definition: ParticleVariables.h:30
MuonPRDTest::ParticleVariables::addVariableGeV
bool addVariableGeV(const std::string &variable, const std::string &accName, const bool declareDep=false)
Adds a variable of the primitive data type that can be directly read-off from the xAOD::IParticle as ...
Definition: ParticleVariables.h:69
MuonPRDTest::ParticleVariables
module to blindly dump a particle container to the Tree
Definition: ParticleVariables.h:15
MuonPRDTest::ParticleVariables::addVariableGeV
bool addVariableGeV(const std::string &variable, const bool declareDep=false)
Adds a variable of the primitive data type that can be directly read-off from the xAOD::IParticle as ...
Definition: ParticleVariables.h:56
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
MuonPRDTest::ParticleVariables::m_key
SG::ReadHandleKey< xAOD::IParticleContainer > m_key
Definition: ParticleVariables.h:85
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
MuonPRDTest::ParticleVariables::declare_decorator
void declare_decorator(const std::string &decorName)
Declares the dependency on a decorator.
Definition: ParticleVariables.cxx:35
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
IParticleContainer.h
MuonPRDTest::ParticleVariables::declare_keys
bool declare_keys() override final
Definition: ParticleVariables.cxx:28
MuonPRDTest::ParticleVariables::push_back
size_t push_back(const xAOD::IParticle *p)
Definition: ParticleVariables.cxx:46
MuonPRDTest::ParticleVariables::ParticleVariables
ParticleVariables(MuonTesterTree &tree, const std::string &containerKey, const std::string &outName, MSG::Level msglvl)
Definition: ParticleVariables.cxx:9
MuonPRDTest::PrdTesterModule
Definition: PrdTesterModule.h:15
python.selection.variable
variable
Definition: selection.py:33
PrdTesterModule.h
TestSUSYToolsAlg.outName
string outName
Definition: TestSUSYToolsAlg.py:173
MuonPRDTest::ParticleVariables::fill
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
Definition: ParticleVariables.cxx:17
MuonPRDTest::ParticleVariables::m_branch
std::shared_ptr< IParticleFourMomBranch > m_branch
Definition: ParticleVariables.h:88
RTTAlgmain.branch
branch
Definition: RTTAlgmain.py:61
MuonPRDTest
Definition: MuonHitTesterAlg.h:15
MuonPRDTest::ParticleVariables::m_decorKeys
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_decorKeys
Definition: ParticleVariables.h:87
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ReadDecorHandleKeyArray.h
MuonPRDTest::ParticleVariables::addVariable
bool addVariable(const std::string &variable, const std::string &accName, const bool declareDep=false)
Adds a variable of the primitive data type that can be directly read-off from the xAOD::IParticle as ...
Definition: ParticleVariables.h:42