ATLAS Offline Software
Loading...
Searching...
No Matches
TestMacroHelpers.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef ISOLATIONSELECTION_TESTMARCOHELPERS_H
6#define ISOLATIONSELECTION_TESTMARCOHELPERS_H
7
8#ifndef XAOD_STANDALONE
15namespace CP {
16
17 class IsolationWP;
19 public:
20 IsoCorrectionTestHelper(MuonVal::MuonTesterTree& outTree, const std::string& ContainerName, const std::vector<std::unique_ptr<IsolationWP>>& WP);
21 StatusCode Fill(const xAOD::IParticleContainer* Particles);
22
24 void SetSelectionDecorator(const std::string& acc);
26 void SetIsolationDecorator(const std::string& acc);
28 void SetUpdatedIsoDecorator(const std::string& acc);
29
31 void SetBackupPreFix(const std::string& prefix);
32
37 void SetClusters(const ClusterSet& clusters);
38 void SetFlowElements(const PflowSet& flows);
39
40 bool init() override final;
41 bool fill(const EventContext& ctx) override final;
42
43 private:
44 float Charge(const xAOD::IParticle* P) const;
47
48 std::string m_cont_name{};
49
55
58
60
64
77 std::vector<IsolationBranches> m_iso_branches;
78
79 std::optional<CharAccessor> m_acc_used_for_corr{std::nullopt};
80 std::optional<CharAccessor> m_acc_passDefault{std::nullopt};
81 std::optional<CharAccessor> m_acc_passCorrected{std::nullopt};
82
85
86 };
87} // namespace CP
88#endif
89#endif
static Double_t P(Double_t *tt, Double_t *par)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
MuonVal::VectorBranch< float > & m_assoc_track_pt
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
MuonVal::VectorBranch< bool > & m_orig_passIso
IsoCorrectionTestHelper(MuonVal::MuonTesterTree &outTree, const std::string &ContainerName, const std::vector< std::unique_ptr< IsolationWP > > &WP)
MuonVal::VectorBranch< float > & m_assoc_pflow_phi
MuonVal::VectorBranch< float > & m_assoc_cluster_phi
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...
MuonVal::VectorBranch< float > & m_e
void SetIsolationDecorator(const std::string &acc)
Pipe the name of te decorator encoding whether the object already passed the vanilla isolation.
void SetClusters(const ClusterSet &clusters)
set the list of all clusters from the Cluster container matched by the IsolationCloseByCorrectionTool...
MuonVal::VectorBranch< float > & m_assoc_pflow_eta
MuonVal::VectorBranch< int > & m_Q
MuonVal::VectorBranch< float > & m_assoc_cluster_eta
MuonVal::VectorBranch< float > & m_pt
std::optional< CharAccessor > m_acc_used_for_corr
void SetFlowElements(const PflowSet &flows)
MuonVal::VectorBranch< bool > & m_corr_passIso
MuonVal::VectorBranch< float > & m_phi
StatusCode FillIsolationBranches(const xAOD::IParticle *P, const IsoHelperPtr &Acc, MuonVal::VectorBranch< float > &Original, MuonVal::VectorBranch< float > &Corrected)
StatusCode Fill(const xAOD::IParticleContainer *Particles)
MuonVal::VectorBranch< float > & m_assoc_cluster_et
void SetUpdatedIsoDecorator(const std::string &acc)
Pipe the name of te decorator encoding whether the object already passed the corrected isolation.
std::optional< CharAccessor > m_acc_passCorrected
MuonVal::VectorBranch< float > & m_eta
std::optional< CharAccessor > m_acc_passDefault
void SetSelectionDecorator(const std::string &acc)
Pipe the name of the decorator selecting the objects dumped to the TTree.
float Charge(const xAOD::IParticle *P) const
std::vector< IsolationBranches > m_iso_branches
MuonVal::VectorBranch< float > & m_assoc_pflow_et
void SetBackupPreFix(const std::string &prefix)
Specify whether the vanilla isolation variable is backuped to another set of decorators.
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
std::string name() const override final
Returns the name of the branch.
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
std::unique_ptr< IsoVariableHelper > IsoHelperPtr
STL namespace.
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
MuonVal::VectorBranch< float > & corrected_cones
IsolationBranches(IsoCorrectionTestHelper &parent, IsoType T, const std::string &prefix)
MuonVal::VectorBranch< float > & original_cones