ATLAS Offline Software
Loading...
Searching...
No Matches
SkimmingToolHIGG1.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SkimmingToolHIGG1.h, (c) ATLAS Detector software
8
9#ifndef DERIVATIONFRAMEWORK_SKIMMINGTOOLHSG1_H
10#define DERIVATIONFRAMEWORK_SKIMMINGTOOLHSG1_H
11
12#include <array>
13#include <optional>
14#include <string>
15#include <vector>
16#include <algorithm>
17
18// Gaudi & Athena basics
20
21// DerivationFramework includes
23
24// xAOD header files
30
31
33
35
36namespace DerivationFramework {
37
42
43
44
45
46 class SkimmingToolHIGG1 : public extends<AthAlgTool, ISkimmingTool> {
47
48
49
50 public:
52 SkimmingToolHIGG1( const std::string& t, const std::string& n, const IInterface* p );
53
56
57 // Athena algtool's Hooks
58 virtual StatusCode initialize() override;
59 virtual StatusCode finalize() override;
60
62 virtual bool eventPassesFilter() const override;
63
64 private:
65
68
69 ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool;
70
71
72
73 // CUTS TO APPLY OR NOT
91
92
93 // CUT VALUES/SETTINGS
94
95 std::string m_goodRunList;
96
97 std::string m_defaultTrigger;
98 std::vector<std::string> m_triggers;
99 std::vector<std::string> m_mergedtriggers;
100
103 double m_maxEta;
104
108
111
116
117
120
121 // Cuts
122 bool SubcutOneMergedElectron() const;
123 bool SubcutGoodRunList() const;
124 bool SubcutLArError(const xAOD::EventInfo& eventInfo) const;
125 bool SubcutTrigger() const;
127 using LeadingPhotons_t = std::array<const xAOD::Photon*, 2>;
128 std::optional<LeadingPhotons_t> SubcutPreselect() const;
129 bool SubcutOnePhotonOneElectron() const;
130 bool SubcutTwoElectrons() const;
131 bool SubcutOnePhotonOneMuon() const;
132 bool SubcutOnePhotonTwoElectrons() const;
133 bool SubcutOnePhotonTwoMuons() const;
134 bool SubcutOnePhotonMergedElectrons(const xAOD::EventInfo& eventInfo) const;
136
137 bool SubcutKinematic(const LeadingPhotons_t& leadingPhotons, double invariantMass) const;
138 bool SubcutQuality(const LeadingPhotons_t& leadingPhotons) const;
139 bool SubcutIsolation() const;
140 bool SubcutInvariantMass(double invariantMass) const;
141
142 // Calculators
143 bool PhotonPreselect(const xAOD::Photon *ph) const;
144 bool ElectronPreselect(const xAOD::Electron *el) const;
145 bool MergedElectronPreselect(const xAOD::Electron *el) const;
146 bool MuonPreselect(const xAOD::Muon *mu) const;
147 double CalculateInvariantMass(const LeadingPhotons_t& leadingPhotons) const;
148 double GetDiphotonVertex() const;
149 static double CorrectedEnergy(const xAOD::Photon *ph) ;
150 double CorrectedEta(const xAOD::Photon *ph) const;
151 static double ReturnRZ_1stSampling_cscopt2(double eta1) ;
152
153
156
157 mutable std::atomic<unsigned int> m_n_tot{0};
158 mutable std::atomic<unsigned int> m_n_passGRL{0};
159 mutable std::atomic<unsigned int> m_n_passLArError{0};
160 mutable std::atomic<unsigned int> m_n_passTrigger{0};
161 mutable std::atomic<unsigned int> m_n_passPreselect{0};
162 mutable std::atomic<unsigned int> m_n_passSingleElectronPreselect{0};
163 mutable std::atomic<unsigned int> m_n_passDoubleElectronPreselect{0};
164 mutable std::atomic<unsigned int> m_n_passSingleMuonPreselect{0};
165 mutable std::atomic<unsigned int> m_n_passSinglePhotonDoubleMuonPreselect{0};
166 mutable std::atomic<unsigned int> m_n_passSinglePhotonDoubleElectronPreselect{0};
167 mutable std::atomic<unsigned int> m_n_passSinglePhotonMergedElectronPreselect{0};
168 mutable std::atomic<unsigned int> m_n_passHighPtPhotonMergedElectronPreselect{0};
169 mutable std::atomic<unsigned int> m_n_passSingleMergedElectronPreselect{0};
170 mutable std::atomic<unsigned int> m_n_passKinematic{0};
171 mutable std::atomic<unsigned int> m_n_passQuality{0};
172 mutable std::atomic<unsigned int> m_n_passIsolation{0};
173 mutable std::atomic<unsigned int> m_n_passInvariantMass{0};
174 mutable std::atomic<unsigned int> m_n_pass{0};
175
176
179
180 static const double s_MZ;
181
184
185 ToolHandle<IAsgElectronIsEMSelector> m_mergedCutTools;
186
188 m_eventInfoKey { this, "EventInfoKey", "EventInfo", "" };
189
191 m_photonKey { this, "PhotonKey", "Photons", "" };
192
194 m_electronKey { this, "ElectronKey", "Electrons", "" };
195
197 m_muonKey { this, "MuonKey", "Muons", "" };
198
199 };
200
201}
202
203#endif // DERIVATIONFRAMEWORK_SKIMMINGTOOLEXAMPLE_H
std::atomic< unsigned int > m_n_passTrigger
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonKey
std::atomic< unsigned int > m_n_passSingleElectronPreselect
bool MuonPreselect(const xAOD::Muon *mu) const
bool SubcutInvariantMass(double invariantMass) const
double CalculateInvariantMass(const LeadingPhotons_t &leadingPhotons) const
virtual StatusCode initialize() override
bool SubcutQuality(const LeadingPhotons_t &leadingPhotons) const
static double ReturnRZ_1stSampling_cscopt2(double eta1)
virtual StatusCode finalize() override
std::vector< std::string > m_triggers
std::atomic< unsigned int > m_n_passInvariantMass
std::atomic< unsigned int > m_n_passSinglePhotonMergedElectronPreselect
std::atomic< unsigned int > m_n_passDoubleElectronPreselect
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
std::atomic< unsigned int > m_n_passHighPtPhotonMergedElectronPreselect
std::optional< LeadingPhotons_t > SubcutPreselect() const
virtual bool eventPassesFilter() const override
Check that the current event passes this filter.
std::atomic< unsigned int > m_n_passSingleMergedElectronPreselect
static double CorrectedEnergy(const xAOD::Photon *ph)
SkimmingToolHIGG1(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
std::atomic< unsigned int > m_n_passSinglePhotonDoubleMuonPreselect
std::vector< std::string > m_mergedtriggers
std::atomic< unsigned int > m_n_passSingleMuonPreselect
std::atomic< unsigned int > m_n_passSinglePhotonDoubleElectronPreselect
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
std::array< const xAOD::Photon *, 2 > LeadingPhotons_t
Leading and sub-leading photon (in that order)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
bool SubcutKinematic(const LeadingPhotons_t &leadingPhotons, double invariantMass) const
bool ElectronPreselect(const xAOD::Electron *el) const
bool SubcutLArError(const xAOD::EventInfo &eventInfo) const
std::atomic< unsigned int > m_n_passKinematic
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronKey
std::atomic< unsigned int > m_n_passGRL
std::atomic< unsigned int > m_n_passPreselect
bool PhotonPreselect(const xAOD::Photon *ph) const
bool MergedElectronPreselect(const xAOD::Electron *el) const
std::atomic< unsigned int > m_n_passQuality
std::atomic< unsigned int > m_n_passLArError
double CorrectedEta(const xAOD::Photon *ph) const
std::atomic< unsigned int > m_n_passIsolation
ToolHandle< IAsgElectronIsEMSelector > m_mergedCutTools
bool SubcutOnePhotonMergedElectrons(const xAOD::EventInfo &eventInfo) const
Interface to tool to select electrons.
Property holding a SG store/key/clid from which a ReadHandle is made.
THE reconstruction tool.
EventInfo_v1 EventInfo
Definition of the latest event info version.
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".