ATLAS Offline Software
ParticleVariables.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONPRDTEST_PARTICLEVARIABLES_H
6 #define MUONPRDTEST_PARTICLEVARIABLES_H
7 
9 
11 
12 namespace MuonPRDTest{
15  public:
17  const std::string& containerKey,
18  const std::string& outName,
19  MSG::Level msglvl);
20 
21  bool fill(const EventContext& ctx) override final;
22  bool declare_keys() override final;
23 
24 
25  template <typename T>
26  bool addVariable(const std::string& variable, const std::string& accName ="" ) {
27  return m_branch->addVariable<T>(variable, accName);
28  }
29  template <typename T>
30  bool addVariable(T defaultValue, const std::string& variable, const std::string& accName = ""){
31  return m_branch->addVariable<T>(defaultValue, variable, accName);
32  }
33 
34  template <typename T>
35  bool addVariableGeV(const std::string& variable, const std::string& accName = "") {
36  return m_branch->addVariableGeV<T>(variable, accName);
37  }
38  template <typename T>
39  bool addVariableGeV(T defaultValue, const std::string& variable, const std::string& accName = "") {
40  return m_branch->addVariableGeV<T>(defaultValue, variable, accName);
41  }
42 
43  private:
45  std::shared_ptr<IParticleFourMomBranch> m_branch{};
46  };
47 }
48 #endif
MuonPRDTest::ParticleVariables
module to blindly dump a particle container to the Tree
Definition: ParticleVariables.h:14
MuonPRDTest::ParticleVariables::addVariableGeV
bool addVariableGeV(T defaultValue, const std::string &variable, const std::string &accName="")
Definition: ParticleVariables.h:39
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:44
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
MuonPRDTest::ParticleVariables::addVariableGeV
bool addVariableGeV(const std::string &variable, const std::string &accName="")
Definition: ParticleVariables.h:35
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:29
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:18
MuonPRDTest::ParticleVariables::m_branch
std::shared_ptr< IParticleFourMomBranch > m_branch
Definition: ParticleVariables.h:45
MuonPRDTest::ParticleVariables::addVariable
bool addVariable(const std::string &variable, const std::string &accName="")
Definition: ParticleVariables.h:26
MuonPRDTest
Definition: CSCDigitVariables.h:10
MuonPRDTest::ParticleVariables::addVariable
bool addVariable(T defaultValue, const std::string &variable, const std::string &accName="")
Definition: ParticleVariables.h:30