ATLAS Offline Software
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
25 #include "xAODJet/JetContainer.h"
26 #include "xAODMuon/MuonContainer.h"
27 
29 
30 namespace DerivationFramework {
31 
35  class SkimmingToolHIGG2 : public AthAlgTool, public 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;
92  std::string m_tightElectronQual;
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 
106  double m_muonPtCut;
109  double m_jetPtCut;
112  double m_trackPtCut;
113 
115  double m_muonEtaCut;
117  double m_jetEtaCut;
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
DerivationFramework::SkimmingToolHIGG2::jetFourMomentum
TLorentzVector jetFourMomentum(const xAOD::Jet *jet) const
Definition: SkimmingToolHIGG2.cxx:795
DerivationFramework::SkimmingToolHIGG2::m_leadingElectronEtCut
double m_leadingElectronEtCut
Definition: SkimmingToolHIGG2.h:129
DerivationFramework::SkimmingToolHIGG2::m_tightMuonPtCut
double m_tightMuonPtCut
Definition: SkimmingToolHIGG2.h:108
DerivationFramework::SkimmingToolHIGG2::eventPassesFilter
virtual bool eventPassesFilter() const override
Check that the current event passes this filter.
Definition: SkimmingToolHIGG2.cxx:147
DerivationFramework::SkimmingToolHIGG2::check4L
bool check4L(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:449
DerivationFramework::SkimmingToolHIGG2::m_muonQual
std::string m_muonQual
Definition: SkimmingToolHIGG2.h:90
DerivationFramework::SkimmingToolHIGG2::Candidates::goodJets
std::vector< const xAOD::Jet * > goodJets
Definition: SkimmingToolHIGG2.h:66
DerivationFramework::SkimmingToolHIGG2::m_photonSGKey
std::string m_photonSGKey
Definition: SkimmingToolHIGG2.h:78
DerivationFramework::SkimmingToolHIGG2::checkMergedJetQuality
bool checkMergedJetQuality(const xAOD::Jet *jet, const unsigned int type) const
Definition: SkimmingToolHIGG2.cxx:358
DerivationFramework::SkimmingToolHIGG2::m_jetPtCut
double m_jetPtCut
Definition: SkimmingToolHIGG2.h:109
DerivationFramework::SkimmingToolHIGG2::SkimmingToolHIGG2
SkimmingToolHIGG2(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: SkimmingToolHIGG2.cxx:23
DerivationFramework::SkimmingToolHIGG2::m_checkLArError
bool m_checkLArError
Definition: SkimmingToolHIGG2.h:134
DerivationFramework::SkimmingToolHIGG2::finalize
virtual StatusCode finalize() override
Definition: SkimmingToolHIGG2.cxx:139
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
DerivationFramework::SkimmingToolHIGG2::check2L
bool check2L(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:400
DerivationFramework::SkimmingToolHIGG2::Candidates
Definition: SkimmingToolHIGG2.h:63
DerivationFramework::SkimmingToolHIGG2::m_electronSGKey
std::string m_electronSGKey
Definition: SkimmingToolHIGG2.h:74
DerivationFramework::SkimmingToolHIGG2::m_mergedJetPtCut
double m_mergedJetPtCut[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:110
DerivationFramework::SkimmingToolHIGG2::m_invariantMassCut
double m_invariantMassCut
Definition: SkimmingToolHIGG2.h:121
DerivationFramework::SkimmingToolHIGG2::checkTrackQuality
bool checkTrackQuality(const xAOD::TrackParticle *trk) const
Definition: SkimmingToolHIGG2.cxx:391
DerivationFramework::SkimmingToolHIGG2::m_trigger2L2Q
std::vector< std::string > m_trigger2L2Q
Definition: SkimmingToolHIGG2.h:101
DerivationFramework::SkimmingToolHIGG2::m_DFCommonJetFourMomentum
bool m_DFCommonJetFourMomentum
Definition: SkimmingToolHIGG2.h:143
DerivationFramework::SkimmingToolHIGG2::m_mergedJetQual
std::string m_mergedJetQual[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:94
DerivationFramework::SkimmingToolHIGG2::m_requireTightLeptons
bool m_requireTightLeptons
Definition: SkimmingToolHIGG2.h:145
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
TrigDecisionTool.h
DerivationFramework::ISkimmingTool
Definition: ISkimmingTool.h:25
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::SkimmingToolHIGG2::m_jetSGKey
std::string m_jetSGKey
Definition: SkimmingToolHIGG2.h:76
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
DerivationFramework::SkimmingToolHIGG2::m_caloMuonEtaCut
double m_caloMuonEtaCut
Definition: SkimmingToolHIGG2.h:116
DerivationFramework::SkimmingToolHIGG2::s_MZ
static const double s_MZ
Definition: SkimmingToolHIGG2.h:167
DerivationFramework::SkimmingToolHIGG2::Candidates::goodMuons
std::vector< const xAOD::Muon * > goodMuons
Definition: SkimmingToolHIGG2.h:65
DerivationFramework::SkimmingToolHIGG2::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition: SkimmingToolHIGG2.h:56
DerivationFramework::SkimmingToolHIGG2
Definition: SkimmingToolHIGG2.h:35
DerivationFramework::SkimmingToolHIGG2::m_invariantMassPhiUpCut
double m_invariantMassPhiUpCut
Definition: SkimmingToolHIGG2.h:127
DerivationFramework::SkimmingToolHIGG2::checkPHI
bool checkPHI(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:718
DerivationFramework::SkimmingToolHIGG2::m_defaultElectronFourMomentum
bool m_defaultElectronFourMomentum
Definition: SkimmingToolHIGG2.h:135
DerivationFramework::SkimmingToolHIGG2::m_muonSGKey
std::string m_muonSGKey
Definition: SkimmingToolHIGG2.h:75
DerivationFramework::SkimmingToolHIGG2::Candidates::goodPhotons
std::vector< const xAOD::Photon * > goodPhotons
Definition: SkimmingToolHIGG2.h:68
DerivationFramework::SkimmingToolHIGG2::m_tightElectronEtCut
double m_tightElectronEtCut
Definition: SkimmingToolHIGG2.h:107
DerivationFramework::SkimmingToolHIGG2::s_MKplus
static const double s_MKplus
Definition: SkimmingToolHIGG2.h:168
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::SkimmingToolHIGG2::m_nLeptons
unsigned int m_nLeptons
Definition: SkimmingToolHIGG2.h:81
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
DerivationFramework::SkimmingToolHIGG2::m_jetEtaCut
double m_jetEtaCut
Definition: SkimmingToolHIGG2.h:117
DerivationFramework::SkimmingToolHIGG2::m_trackSGKey
std::string m_trackSGKey
Definition: SkimmingToolHIGG2.h:79
DerivationFramework::SkimmingToolHIGG2::m_npass
std::atomic< unsigned int > m_npass
Definition: SkimmingToolHIGG2.h:59
ElectronContainer.h
DerivationFramework::SkimmingToolHIGG2::m_muonPtCut
double m_muonPtCut
Definition: SkimmingToolHIGG2.h:106
DerivationFramework::SkimmingToolHIGG2::m_nMergedJets
unsigned int m_nMergedJets[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:85
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::SkimmingToolHIGG2::m_electronQual
std::string m_electronQual
Definition: SkimmingToolHIGG2.h:89
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::SkimmingToolHIGG2::muonFourMomentum
static TLorentzVector muonFourMomentum(const xAOD::Muon *mu)
Definition: SkimmingToolHIGG2.cxx:788
DerivationFramework::SkimmingToolHIGG2::getDeltaR
static double getDeltaR(const double eta1, const double phi1, const double eta2, const double phi2)
Definition: SkimmingToolHIGG2.cxx:816
DerivationFramework::SkimmingToolHIGG2::NUMBER_OF_MERGED_JET_TYPES
@ NUMBER_OF_MERGED_JET_TYPES
Definition: SkimmingToolHIGG2.h:53
AthAlgTool.h
DerivationFramework::SkimmingToolHIGG2::m_primaryElectronQual4L
std::string m_primaryElectronQual4L
Definition: SkimmingToolHIGG2.h:97
DerivationFramework::SkimmingToolHIGG2::m_tightMuonQual
std::string m_tightMuonQual
Definition: SkimmingToolHIGG2.h:91
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
DerivationFramework::SkimmingToolHIGG2::m_nMuons
unsigned int m_nMuons
Definition: SkimmingToolHIGG2.h:83
DerivationFramework::SkimmingToolHIGG2::m_skipTriggerRequirement
bool m_skipTriggerRequirement
Definition: SkimmingToolHIGG2.h:61
DerivationFramework::SkimmingToolHIGG2::m_triggerTP
std::vector< std::string > m_triggerTP
Definition: SkimmingToolHIGG2.h:100
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::SkimmingToolHIGG2::m_mergedJetSGKey
std::string m_mergedJetSGKey[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:77
DerivationFramework::SkimmingToolHIGG2::m_nTracks
unsigned int m_nTracks
Definition: SkimmingToolHIGG2.h:87
DerivationFramework::SkimmingToolHIGG2::m_jetQual
std::string m_jetQual
Definition: SkimmingToolHIGG2.h:93
DerivationFramework::SkimmingToolHIGG2::m_invariantMassUpsilonUpCut
double m_invariantMassUpsilonUpCut
Definition: SkimmingToolHIGG2.h:125
DerivationFramework::SkimmingToolHIGG2::m_invariantMassUpsilonLowCut
double m_invariantMassUpsilonLowCut
Definition: SkimmingToolHIGG2.h:124
DerivationFramework::SkimmingToolHIGG2::electronFourMomentum
TLorentzVector electronFourMomentum(const xAOD::Electron *el) const
Definition: SkimmingToolHIGG2.cxx:758
DerivationFramework::SkimmingToolHIGG2::m_muonEtaCut
double m_muonEtaCut
Definition: SkimmingToolHIGG2.h:115
DerivationFramework::SkimmingToolHIGG2::checkMuonQuality
bool checkMuonQuality(const xAOD::Muon *mu, const bool isTight=false) const
Definition: SkimmingToolHIGG2.cxx:299
DerivationFramework::SkimmingToolHIGG2::m_trackPtCut
double m_trackPtCut
Definition: SkimmingToolHIGG2.h:112
DerivationFramework::SkimmingToolHIGG2::m_electronEtaCut
double m_electronEtaCut
Definition: SkimmingToolHIGG2.h:114
DerivationFramework::SkimmingToolHIGG2::checkTP
bool checkTP(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:530
DerivationFramework::SkimmingToolHIGG2::m_photonPtCut
double m_photonPtCut
Definition: SkimmingToolHIGG2.h:111
xAOD::Electron_v1
Definition: Electron_v1.h:34
DerivationFramework::SkimmingToolHIGG2::Candidates::goodMergedJets
std::vector< const xAOD::Jet * > goodMergedJets[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:67
MuonContainer.h
DerivationFramework::SkimmingToolHIGG2::checkJetQuality
bool checkJetQuality(const xAOD::Jet *jet) const
Definition: SkimmingToolHIGG2.cxx:343
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
DerivationFramework::SkimmingToolHIGG2::m_invariantMassPhiLowCut
double m_invariantMassPhiLowCut
Definition: SkimmingToolHIGG2.h:126
DerivationFramework::SkimmingToolHIGG2::checkJPSI
bool checkJPSI(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:679
JetContainer.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
DerivationFramework::SkimmingToolHIGG2::m_leadingMuonPtCut
double m_leadingMuonPtCut
Definition: SkimmingToolHIGG2.h:130
DerivationFramework::SkimmingToolHIGG2::m_invariantMassJpsiUpCut
double m_invariantMassJpsiUpCut
Definition: SkimmingToolHIGG2.h:123
DerivationFramework::SkimmingToolHIGG2::m_dRElectronJetCut
double m_dRElectronJetCut
Definition: SkimmingToolHIGG2.h:132
DerivationFramework::SkimmingToolHIGG2::m_photonQual
std::string m_photonQual
Definition: SkimmingToolHIGG2.h:95
DerivationFramework::SkimmingToolHIGG2::Candidates::goodTracks
std::vector< const xAOD::TrackParticle * > goodTracks
Definition: SkimmingToolHIGG2.h:69
DerivationFramework::SkimmingToolHIGG2::m_nPhotons
unsigned int m_nPhotons
Definition: SkimmingToolHIGG2.h:86
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DerivationFramework::SkimmingToolHIGG2::Candidates::goodElectrons
std::vector< const xAOD::Electron * > goodElectrons
Definition: SkimmingToolHIGG2.h:64
DerivationFramework::SkimmingToolHIGG2::checkElectronQuality
bool checkElectronQuality(const xAOD::Electron *el, const bool isTight=false) const
Definition: SkimmingToolHIGG2.cxx:236
DerivationFramework::SkimmingToolHIGG2::initialize
virtual StatusCode initialize() override
Definition: SkimmingToolHIGG2.cxx:120
DerivationFramework::SkimmingToolHIGG2::m_triggerPHI
std::vector< std::string > m_triggerPHI
Definition: SkimmingToolHIGG2.h:103
DerivationFramework::SkimmingToolHIGG2::m_ntot
std::atomic< unsigned int > m_ntot
Definition: SkimmingToolHIGG2.h:58
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DerivationFramework::SkimmingToolHIGG2::check2L2Q
bool check2L2Q(const Candidates &evt) const
Definition: SkimmingToolHIGG2.cxx:578
AthAlgTool
Definition: AthAlgTool.h:26
DerivationFramework::SkimmingToolHIGG2::checkPhotonQuality
bool checkPhotonQuality(const xAOD::Photon *ph) const
Definition: SkimmingToolHIGG2.cxx:372
DerivationFramework::SkimmingToolHIGG2::m_mergedJetEtaCut
double m_mergedJetEtaCut[NUMBER_OF_MERGED_JET_TYPES]
Definition: SkimmingToolHIGG2.h:118
DerivationFramework::SkimmingToolHIGG2::m_invariantMassJpsiLowCut
double m_invariantMassJpsiLowCut
Definition: SkimmingToolHIGG2.h:122
DerivationFramework::SkimmingToolHIGG2::m_filterType
std::string m_filterType
Definition: SkimmingToolHIGG2.h:72
DerivationFramework::SkimmingToolHIGG2::m_electronEtCut
double m_electronEtCut
Definition: SkimmingToolHIGG2.h:105
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
DerivationFramework::SkimmingToolHIGG2::m_tightElectronQual
std::string m_tightElectronQual
Definition: SkimmingToolHIGG2.h:92
PhotonContainer.h
DerivationFramework::SkimmingToolHIGG2::m_trigger2L
std::vector< std::string > m_trigger2L
Definition: SkimmingToolHIGG2.h:99
ISkimmingTool.h
DerivationFramework::SkimmingToolHIGG2::~SkimmingToolHIGG2
~SkimmingToolHIGG2()
Destructor.
Definition: SkimmingToolHIGG2.cxx:116
DerivationFramework::SkimmingToolHIGG2::m_nJets
unsigned int m_nJets
Definition: SkimmingToolHIGG2.h:84
DerivationFramework::SkimmingToolHIGG2::m_triggerJPSI
std::vector< std::string > m_triggerJPSI
Definition: SkimmingToolHIGG2.h:102
DerivationFramework::SkimmingToolHIGG2::m_nElectrons
unsigned int m_nElectrons
Definition: SkimmingToolHIGG2.h:82
DerivationFramework::SkimmingToolHIGG2::m_photonEtaCut
double m_photonEtaCut
Definition: SkimmingToolHIGG2.h:119