ATLAS Offline Software
Loading...
Searching...
No Matches
SkimmingToolHIGG2.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// SkimmingToolHIGG2.h, (c) ATLAS Detector software
8
9#ifndef DERIVATIONFRAMEWORK_SKIMMINGTOOLHSG2_H
10#define DERIVATIONFRAMEWORK_SKIMMINGTOOLHSG2_H 1
11
12#include<string>
13#include<vector>
14#include<map>
15
16// Gaudi & Athena basics
18
19// DerivationFramework includes
21
22// xAOD header files
27
29
30namespace DerivationFramework {
31
35 class SkimmingToolHIGG2 : public extends<AthAlgTool, ISkimmingTool> {
36
37 public:
39 SkimmingToolHIGG2( const std::string& t, const std::string& n, const IInterface* p );
40
43
44 // Athena algtool's Hooks
45 virtual StatusCode initialize() override;
46 virtual StatusCode finalize() override;
47
49 virtual bool eventPassesFilter() const override;
50
51 private:
52 enum {
54 };
55
56 ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool;
57
58 mutable std::atomic<unsigned int> m_ntot;
59 mutable std::atomic<unsigned int> m_npass;
60
62
63 struct Candidates {
64 std::vector<const xAOD::Electron*> goodElectrons;
65 std::vector<const xAOD::Muon*> goodMuons;
66 std::vector<const xAOD::Jet*> goodJets;
67 std::vector<const xAOD::Jet*> goodMergedJets[NUMBER_OF_MERGED_JET_TYPES];
68 std::vector<const xAOD::Photon*> goodPhotons;
69 std::vector<const xAOD::TrackParticle*> goodTracks;
70 };
71
72 std::string m_filterType;
73
74 std::string m_electronSGKey;
75 std::string m_muonSGKey;
76 std::string m_jetSGKey;
78 std::string m_photonSGKey;
79 std::string m_trackSGKey;
80
81 unsigned int m_nLeptons;
82 unsigned int m_nElectrons;
83 unsigned int m_nMuons;
84 unsigned int m_nJets;
86 unsigned int m_nPhotons;
87 unsigned int m_nTracks;
88
89 std::string m_electronQual;
90 std::string m_muonQual;
91 std::string m_tightMuonQual;
93 std::string m_jetQual;
95 std::string m_photonQual;
96
98
99 std::vector<std::string> m_trigger2L;
100 std::vector<std::string> m_triggerTP;
101 std::vector<std::string> m_trigger2L2Q;
102 std::vector<std::string> m_triggerJPSI;
103 std::vector<std::string> m_triggerPHI;
104
113
120
128
131
133
136
137 // bool m_DFCommonElectronFourMomentum;
138 // mutable std::map<const xAOD::Electron*, unsigned int> m_mapElectrons;
139 // mutable const std::vector<float> *m_DFCommonElectrons_pt;
140 // mutable const std::vector<float> *m_DFCommonElectrons_eta;
141 // mutable const std::vector<float> *m_DFCommonElectrons_phi;
142
144
146
147 bool checkElectronQuality(const xAOD::Electron *el, const bool isTight=false) const;
148 bool checkMuonQuality(const xAOD::Muon *mu, const bool isTight=false) const;
149 bool checkJetQuality(const xAOD::Jet *jet) const;
150 bool checkMergedJetQuality(const xAOD::Jet *jet, const unsigned int type) const;
151 bool checkPhotonQuality(const xAOD::Photon *ph) const;
152 bool checkTrackQuality(const xAOD::TrackParticle *trk) const;
153
154 bool check2L(const Candidates& evt) const;
155 bool check4L(const Candidates& evt) const;
156 bool checkTP(const Candidates& evt) const;
157 bool check2L2Q(const Candidates& evt) const;
158 bool checkJPSI(const Candidates& evt) const;
159 bool checkPHI(const Candidates& evt) const;
160
161 TLorentzVector electronFourMomentum(const xAOD::Electron *el) const;
162 static TLorentzVector muonFourMomentum(const xAOD::Muon *mu) ;
163 TLorentzVector jetFourMomentum(const xAOD::Jet *jet) const;
164
165 static double getDeltaR(const double eta1, const double phi1, const double eta2, const double phi2) ;
166
167 static const double s_MZ;
168 static const double s_MKplus;
169 };
170
171}
172
173#endif // DERIVATIONFRAMEWORK_SKIMMINGTOOLEXAMPLE_H
std::vector< std::string > m_triggerJPSI
std::string m_mergedJetQual[NUMBER_OF_MERGED_JET_TYPES]
static double getDeltaR(const double eta1, const double phi1, const double eta2, const double phi2)
bool checkMuonQuality(const xAOD::Muon *mu, const bool isTight=false) const
TLorentzVector electronFourMomentum(const xAOD::Electron *el) const
bool check2L(const Candidates &evt) const
static TLorentzVector muonFourMomentum(const xAOD::Muon *mu)
bool checkJPSI(const Candidates &evt) const
bool checkPhotonQuality(const xAOD::Photon *ph) const
bool check2L2Q(const Candidates &evt) const
std::vector< std::string > m_trigger2L
virtual StatusCode finalize() override
virtual StatusCode initialize() override
double m_mergedJetEtaCut[NUMBER_OF_MERGED_JET_TYPES]
SkimmingToolHIGG2(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
unsigned int m_nMergedJets[NUMBER_OF_MERGED_JET_TYPES]
bool checkPHI(const Candidates &evt) const
std::string m_mergedJetSGKey[NUMBER_OF_MERGED_JET_TYPES]
bool checkJetQuality(const xAOD::Jet *jet) const
bool checkElectronQuality(const xAOD::Electron *el, const bool isTight=false) const
TLorentzVector jetFourMomentum(const xAOD::Jet *jet) const
virtual bool eventPassesFilter() const override
Check that the current event passes this filter.
std::atomic< unsigned int > m_npass
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
bool checkMergedJetQuality(const xAOD::Jet *jet, const unsigned int type) const
std::vector< std::string > m_triggerPHI
std::vector< std::string > m_trigger2L2Q
bool checkTrackQuality(const xAOD::TrackParticle *trk) const
bool check4L(const Candidates &evt) const
double m_mergedJetPtCut[NUMBER_OF_MERGED_JET_TYPES]
THE reconstruction tool.
Jet_v1 Jet
Definition of the current "jet version".
TrackParticle_v1 TrackParticle
Reference the current persistent 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".
std::vector< const xAOD::TrackParticle * > goodTracks
std::vector< const xAOD::Jet * > goodMergedJets[NUMBER_OF_MERGED_JET_TYPES]
std::vector< const xAOD::Photon * > goodPhotons
std::vector< const xAOD::Electron * > goodElectrons