ATLAS Offline Software
SkimmingToolEXOT14.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 // SkimmingToolEXOT14.h, (c) ATLAS Detector software
8 
9 #ifndef DERIVATIONFRAMEWORK_SKIMMINGTOOLEXOT14_H
10 #define DERIVATIONFRAMEWORK_SKIMMINGTOOLEXOT14_H 1
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 // #include "xAODRootAccess/TStore.h"
25 
26 // xAOD header files
27 #include "xAODJet/JetContainer.h"
28 // #include "xAODEgamma/ElectronContainer.h"
29 // #include "xAODEgamma/PhotonContainer.h"
30 // #include "xAODMuon/MuonContainer.h"
31 
33 
34 #include "GaudiKernel/ToolHandle.h"
37 
38 class JetCalibrationTool;
39 
40 namespace DerivationFramework {
41 
45  class SkimmingToolEXOT14 : public AthAlgTool, public ISkimmingTool {
46 
47  public:
49  SkimmingToolEXOT14( const std::string& t, const std::string& n, const IInterface* p );
50 
53 
54  // Athena algtool's Hooks
55  virtual StatusCode initialize() override;
56  virtual StatusCode finalize() override;
57 
59  virtual bool eventPassesFilter() const override;
60 
61  private:
62 
65 
66  ToolHandle<Trig::TrigDecisionTool> m_trigDecisionTool;
67  ToolHandle<IJetCalibrationTool> m_JESTool;
68 
71 
72  std::string m_jetSGKey;
73 
74  // CUTS TO APPLY OR NOT
75  bool m_reqGRL;
83 
84  // CUT VALUES/SETTINGS
85 
86  std::string m_goodRunList;
87 
88  std::string m_defaultTrigger;
89  std::vector<std::string> m_triggers;
90 
91  double m_minJetPt;
92  double m_maxEta;
93  double m_leadingJetPt ;
96  double m_dijetMass;
97  double m_jetDPhi;
98 
101 
102  // Cuts
103  using LeadingJets_t = std::array<TLorentzVector, 2>;
104  std::optional<LeadingJets_t> SubcutPreselect() const;
105  bool SubcutGoodRunList() const;
106  bool SubcutLArError() const;
107  bool SubcutTrigger() const;
108  bool SubcutJetPts(const LeadingJets_t& jets) const;
109  bool SubcutJetDEta(const LeadingJets_t& jets) const;
110  bool SubcutDijetMass(const LeadingJets_t& jets) const;
111  bool SubcutJetDPhi(const LeadingJets_t& jets) const;
112 
113  // Helpers
114  std::string TriggerVarName(std::string s) const;
115 
116 
119  mutable std::atomic<unsigned int> m_n_tot;
120  mutable std::atomic<unsigned int> m_n_passGRL;
121  mutable std::atomic<unsigned int> m_n_passLArError;
122  mutable std::atomic<unsigned int> m_n_passTrigger;
123  mutable std::atomic<unsigned int> m_n_passPreselect;
124  mutable std::atomic<unsigned int> m_n_passJetPts;
125  mutable std::atomic<unsigned int> m_n_passJetsDEta;
126  mutable std::atomic<unsigned int> m_n_passDiJetMass;
127  mutable std::atomic<unsigned int> m_n_passJetsDPhi;
128  mutable std::atomic<unsigned int> m_n_pass;
129 
130  static const double s_MZ;
131 
132  };
133 
134 }
135 
136 #endif // DERIVATIONFRAMEWORK_SKIMMINGTOOLEXAMPLE_H
DerivationFramework::SkimmingToolEXOT14::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition: SkimmingToolEXOT14.h:66
DerivationFramework::SkimmingToolEXOT14
Definition: SkimmingToolEXOT14.h:45
DerivationFramework::SkimmingToolEXOT14::m_JESTool
ToolHandle< IJetCalibrationTool > m_JESTool
Definition: SkimmingToolEXOT14.h:67
DerivationFramework::SkimmingToolEXOT14::m_n_passPreselect
std::atomic< unsigned int > m_n_passPreselect
Definition: SkimmingToolEXOT14.h:123
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
DerivationFramework::SkimmingToolEXOT14::m_subleadingJetPt
double m_subleadingJetPt
Definition: SkimmingToolEXOT14.h:94
DerivationFramework::SkimmingToolEXOT14::m_triggers
std::vector< std::string > m_triggers
Definition: SkimmingToolEXOT14.h:89
DerivationFramework::SkimmingToolEXOT14::m_leadingJetPt
double m_leadingJetPt
Definition: SkimmingToolEXOT14.h:93
DerivationFramework::SkimmingToolEXOT14::SubcutTrigger
bool SubcutTrigger() const
Definition: SkimmingToolEXOT14.cxx:181
DerivationFramework::SkimmingToolEXOT14::m_n_pass
std::atomic< unsigned int > m_n_pass
Definition: SkimmingToolEXOT14.h:128
DerivationFramework::SkimmingToolEXOT14::m_n_tot
std::atomic< unsigned int > m_n_tot
Definition: SkimmingToolEXOT14.h:119
DerivationFramework::SkimmingToolEXOT14::m_n_passTrigger
std::atomic< unsigned int > m_n_passTrigger
Definition: SkimmingToolEXOT14.h:122
DerivationFramework::SkimmingToolEXOT14::m_n_passJetPts
std::atomic< unsigned int > m_n_passJetPts
Definition: SkimmingToolEXOT14.h:124
DerivationFramework::SkimmingToolEXOT14::SubcutJetDPhi
bool SubcutJetDPhi(const LeadingJets_t &jets) const
Definition: SkimmingToolEXOT14.cxx:291
DerivationFramework::SkimmingToolEXOT14::SubcutJetDEta
bool SubcutJetDEta(const LeadingJets_t &jets) const
Definition: SkimmingToolEXOT14.cxx:270
TrigDecisionTool.h
DerivationFramework::ISkimmingTool
Definition: ISkimmingTool.h:25
DerivationFramework::SkimmingToolEXOT14::m_minJetPt
double m_minJetPt
Definition: SkimmingToolEXOT14.h:91
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::SkimmingToolEXOT14::m_defaultTrigger
std::string m_defaultTrigger
Definition: SkimmingToolEXOT14.h:88
IJetCalibrationTool.h
DerivationFramework::SkimmingToolEXOT14::m_n_passJetsDPhi
std::atomic< unsigned int > m_n_passJetsDPhi
Definition: SkimmingToolEXOT14.h:127
AthAlgorithm.h
DerivationFramework::SkimmingToolEXOT14::m_reqJetsDPhi
bool m_reqJetsDPhi
Definition: SkimmingToolEXOT14.h:82
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::SkimmingToolEXOT14::LeadingJets_t
std::array< TLorentzVector, 2 > LeadingJets_t
Definition: SkimmingToolEXOT14.h:103
DerivationFramework::SkimmingToolEXOT14::TriggerVarName
std::string TriggerVarName(std::string s) const
Definition: SkimmingToolEXOT14.cxx:301
DerivationFramework::SkimmingToolEXOT14::m_reqPreselection
bool m_reqPreselection
Definition: SkimmingToolEXOT14.h:78
DerivationFramework::SkimmingToolEXOT14::s_MZ
static const double s_MZ
Definition: SkimmingToolEXOT14.h:130
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::SkimmingToolEXOT14::m_reqJetPts
bool m_reqJetPts
Definition: SkimmingToolEXOT14.h:79
AthAlgTool.h
JetCalibrationTool
Definition: JetCalibrationTool.h:34
DerivationFramework::SkimmingToolEXOT14::m_reqLArError
bool m_reqLArError
Definition: SkimmingToolEXOT14.h:76
DerivationFramework::SkimmingToolEXOT14::SubcutPreselect
std::optional< LeadingJets_t > SubcutPreselect() const
Definition: SkimmingToolEXOT14.cxx:205
DerivationFramework::SkimmingToolEXOT14::initialize
virtual StatusCode initialize() override
Definition: SkimmingToolEXOT14.cxx:77
DerivationFramework::SkimmingToolEXOT14::m_maxEta
double m_maxEta
Definition: SkimmingToolEXOT14.h:92
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::SkimmingToolEXOT14::SubcutDijetMass
bool SubcutDijetMass(const LeadingJets_t &jets) const
Definition: SkimmingToolEXOT14.cxx:281
DerivationFramework::SkimmingToolEXOT14::SubcutLArError
bool SubcutLArError() const
Definition: SkimmingToolEXOT14.cxx:167
DerivationFramework::SkimmingToolEXOT14::m_reqTrigger
bool m_reqTrigger
Definition: SkimmingToolEXOT14.h:77
DerivationFramework::SkimmingToolEXOT14::m_reqDiJetMass
bool m_reqDiJetMass
Definition: SkimmingToolEXOT14.h:81
DerivationFramework::SkimmingToolEXOT14::m_dijetMass
double m_dijetMass
Definition: SkimmingToolEXOT14.h:96
DerivationFramework::SkimmingToolEXOT14::m_jetDPhi
double m_jetDPhi
Definition: SkimmingToolEXOT14.h:97
DerivationFramework::SkimmingToolEXOT14::SkimmingToolEXOT14
SkimmingToolEXOT14(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: SkimmingToolEXOT14.cxx:23
DerivationFramework::SkimmingToolEXOT14::m_jetSGKey
std::string m_jetSGKey
Definition: SkimmingToolEXOT14.h:72
DerivationFramework::SkimmingToolEXOT14::m_n_passDiJetMass
std::atomic< unsigned int > m_n_passDiJetMass
Definition: SkimmingToolEXOT14.h:126
DerivationFramework::SkimmingToolEXOT14::m_reqJetsDEta
bool m_reqJetsDEta
Definition: SkimmingToolEXOT14.h:80
JetContainer.h
DerivationFramework::SkimmingToolEXOT14::~SkimmingToolEXOT14
~SkimmingToolEXOT14()
Destructor.
Definition: SkimmingToolEXOT14.cxx:73
DerivationFramework::SkimmingToolEXOT14::m_goodRunList
std::string m_goodRunList
Definition: SkimmingToolEXOT14.h:86
DerivationFramework::SkimmingToolEXOT14::m_reqGRL
bool m_reqGRL
Definition: SkimmingToolEXOT14.h:75
DerivationFramework::SkimmingToolEXOT14::eventPassesFilter
virtual bool eventPassesFilter() const override
Check that the current event passes this filter.
Definition: SkimmingToolEXOT14.cxx:122
DerivationFramework::SkimmingToolEXOT14::finalize
virtual StatusCode finalize() override
Definition: SkimmingToolEXOT14.cxx:103
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
DerivationFramework::SkimmingToolEXOT14::m_n_passJetsDEta
std::atomic< unsigned int > m_n_passJetsDEta
Definition: SkimmingToolEXOT14.h:125
AthAlgTool
Definition: AthAlgTool.h:26
DerivationFramework::SkimmingToolEXOT14::m_n_passLArError
std::atomic< unsigned int > m_n_passLArError
Definition: SkimmingToolEXOT14.h:121
DerivationFramework::SkimmingToolEXOT14::m_n_passGRL
std::atomic< unsigned int > m_n_passGRL
Definition: SkimmingToolEXOT14.h:120
ISkimmingTool.h
DerivationFramework::SkimmingToolEXOT14::SubcutGoodRunList
bool SubcutGoodRunList() const
Definition: SkimmingToolEXOT14.cxx:158
DerivationFramework::SkimmingToolEXOT14::m_etaSeparation
double m_etaSeparation
Definition: SkimmingToolEXOT14.h:95
DerivationFramework::SkimmingToolEXOT14::SubcutJetPts
bool SubcutJetPts(const LeadingJets_t &jets) const
Definition: SkimmingToolEXOT14.cxx:260