5#ifndef MUONPRDTEST_PARTICLEVARIABLES_H
6#define MUONPRDTEST_PARTICLEVARIABLES_H
18 const std::string& containerKey,
19 const std::string& outName,
22 bool fill(
const EventContext& ctx)
override final;
30 bool addVariable(
const std::string& variable,
const bool declareDep =
false) {
34 return m_branch->addVariable<T>(variable);
42 bool addVariable(
const std::string& variable,
const std::string& accName,
43 const bool declareDep =
false) {
47 return m_branch->addVariable<T>(variable, accName);
56 bool addVariableGeV(
const std::string& variable,
const bool declareDep =
false) {
60 return m_branch->addVariableGeV<T>(variable);
70 const bool declareDep =
false) {
74 return m_branch->addVariableGeV<T>(variable, accName);
77 bool addVariable(std::shared_ptr<IParticleDecorationBranch> branch);
88 std::shared_ptr<IParticleFourMomBranch>
m_branch{};
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 ...
std::shared_ptr< IParticleFourMomBranch > m_branch
SG::ReadHandleKey< xAOD::IParticleContainer > m_key
void declare_decorator(const std::string &decorName)
Declares the dependency on a decorator.
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_decorKeys
size_t push_back(const xAOD::IParticle *p)
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 ...
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 ...
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...
SG::ReadDecorHandleKey< xAOD::IParticleContainer > DecorKey_t
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 ...
ParticleVariables(MuonTesterTree &tree, const std::string &containerKey, const std::string &outName, MSG::Level msglvl)
bool declare_keys() override final
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
TTree * tree() override final
Returns the underlying TTree object.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Class providing the definition of the 4-vector interface.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray