ATLAS Offline Software
Loading...
Searching...
No Matches
TestIsolationCloseByCorrAlg.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_TESTISOLATIONCLOSEBYCORRATHENAALG_H
6#define ISOLATIONSELECTION_TESTISOLATIONCLOSEBYCORRATHENAALG_H
7
8// Gaudi/Athena include(s):
11#include "GaudiKernel/SystemOfUnits.h"
15
16// Local include(s):
20
30
39
40namespace CP {
42 public:
43 TestIsolationCloseByCorrAlg(const std::string& name, ISvcLocator* svcLoc);
44 virtual ~TestIsolationCloseByCorrAlg() = default;
45 StatusCode initialize() override;
46 StatusCode execute() override;
47 StatusCode finalize() override;
48
49 unsigned int cardinality() const override { return 1; }
50
51 private:
52 template <class TARGET_TYPE, class CONT_TYPE, class COPY_TYPE>
53 StatusCode loadContainer(const EventContext& ctx, const SG::ReadHandleKey<CONT_TYPE>& key,
54 std::pair<std::unique_ptr<COPY_TYPE>,
55 std::unique_ptr<xAOD::ShallowAuxContainer>>& cont) const;
56
57 bool passSelection(const EventContext& ctx, const xAOD::Muon* muon) const;
58 bool passSelection(const EventContext& ctx, const xAOD::Egamma* egamm) const;
59
66
67 Gaudi::Property<std::string> m_selDecoration{this, "SelectionDecorator", "",
68 "Optional char decorator flag that the leptons have to pass in order to be selected"};
69
70 Gaudi::Property<std::string> m_isoDecoration{this, "IsolationDecorator", "", "Decoration of the first isolation selection pass."};
71 Gaudi::Property<std::string> m_updatedIsoDeco{this, "UpdatedIsoDecorator", "", "Decoration of the first isolation selection pass."};
72 Gaudi::Property<std::string> m_backup_prefix{
73 this, "BackupPrefix", "", "Prefix in front of the isolation variables, if the original cone values need to be backuped"};
74
77
79 ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", ""};
80 ToolHandle<IAsgElectronLikelihoodTool> m_elecSelTool{this, "ElectronSelectionTool", ""};
81 ToolHandle<IAsgPhotonIsEMSelector> m_photSelTool{this, "PhotonSelectionTool", ""};
82
83 const CP::IsolationCloseByCorrectionTool* correction_tool() const;
84
85 ToolHandle<CP::IIsolationCloseByCorrectionTool> m_isoCloseByCorrTool{this, "IsoCloseByCorrTool", ""};
86 ToolHandle<CP::IIsolationSelectionTool> m_isoSelectorTool{this, "IsolationSelectionTool", ""};
87
88 MuonVal::MuonTesterTree m_tree{"IsoCorrTest", "/ISOCORRECTION"};
89 std::shared_ptr<IsoCorrectionTestHelper> m_ele_helper{nullptr};
90 std::shared_ptr<IsoCorrectionTestHelper> m_muo_helper{nullptr};
91 std::shared_ptr<IsoCorrectionTestHelper> m_pho_helper{nullptr};
92
93 Gaudi::Property<float> m_mu_min_pt{this, "MuonPt", 5 * Gaudi::Units::GeV};
94 Gaudi::Property<float> m_mu_max_eta{this, "MuonEta", 2.7};
95 Gaudi::Property<float> m_el_min_pt{this, "ElectronPt", 7. * Gaudi::Units::GeV};
96 Gaudi::Property<float> m_el_max_eta{this, "ElectronEta", 2.47};
97 Gaudi::Property<float> m_ph_min_pt{this, "PhotonPt", 25. * Gaudi::Units::GeV};
98 Gaudi::Property<float> m_ph_max_eta{this, "PhotonEta", 2.35};
99
100 Gaudi::Property<bool> m_isMC{this, "isMC", false};
101 };
102
103} // namespace CP
104#endif
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.
Define macros for attributes used to control the static checker.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Input containers.
TestIsolationCloseByCorrAlg(const std::string &name, ISvcLocator *svcLoc)
Gaudi::Property< std::string > m_updatedIsoDeco
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_isoCloseByCorrTool
Gaudi::Property< std::string > m_backup_prefix
unsigned int cardinality() const override
Gaudi::Property< std::string > m_selDecoration
std::shared_ptr< IsoCorrectionTestHelper > m_ele_helper
Gaudi::Property< std::string > m_isoDecoration
std::shared_ptr< IsoCorrectionTestHelper > m_pho_helper
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_polTrkKey
Optionally the algorithm can test the behaviour of the tracks selected by the IsoCloseByCorrectionTrk...
virtual ~TestIsolationCloseByCorrAlg()=default
SG::ReadHandleKey< xAOD::EgammaContainer > m_photKey
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Optionally the user can also parse the elec / muon / photon selection tools.
ToolHandle< CP::IIsolationSelectionTool > m_isoSelectorTool
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
std::shared_ptr< IsoCorrectionTestHelper > m_muo_helper
SG::ReadHandleKey< xAOD::EgammaContainer > m_elecKey
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
Property holding a SG store/key/clid from which a ReadHandle is made.
Select isolated Photons, Electrons and Muons.
void ErrorHandler ATLAS_NOT_THREAD_SAFE(Int_t level, Bool_t abort, const char *location, const char *message)
Function filtering the warnings coming from ROOT.
Definition Init.cxx:105
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
Muon_v1 Muon
Reference the current persistent version:
void initialize()