ATLAS Offline Software
TauSelectionCuts.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAUANALYSISTOOLS_TAUSELECTIONCUTS_H
6 #define TAUANALYSISTOOLS_TAUSELECTIONCUTS_H
7 
8 /*
9  author: Dirk Duschinger
10  mail: dirk.duschinger@cern.ch
11  documentation in: https://gitlab.cern.ch/atlas/athena/-/blob/master/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst
12 */
13 
14 // Framework include(s):
15 #include "xAODTau/TauJet.h"
16 #include "PATCore/AcceptData.h"
17 #include "PATCore/AcceptInfo.h"
18 
19 // ROOT include(s):
20 #include "TH1F.h"
21 
22 namespace TauAnalysisTools
23 {
24 
25 class TauSelectionTool;
26 
28 {
29 
30 public:
31  TauSelectionCut(const std::string& sName, TauAnalysisTools::TauSelectionTool* tTST);
32  virtual ~TauSelectionCut();
33 
35  void fillHistogramCutPre(const xAOD::TauJet& xTau);
36  void fillHistogramCut(const xAOD::TauJet& xTau);
37  virtual void setAcceptInfo (asg::AcceptInfo& info) const = 0;
38  virtual bool accept(const xAOD::TauJet& xTau,
39  asg::AcceptData& accept) = 0;
40  TH1F* CreateControlPlot(const char* sName, const char* sTitle, int iBins, double dXLow, double dXUp);
41 
42  const std::string& getName()
43  {
44  return m_sName;
45  };
46 
47  void setProperty(const std::string& name, const std::string& value);
48 
49 protected:
50  std::string m_sName;
51 
54 
56 
57  void declareProperty(const std::string& name, std::string& loc);
58  std::map<std::string, std::string&> m_mProperties;
59  std::string getProperty(const std::string& name);
60 
61 private:
62  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const = 0;
63 };
64 
66  : public TauSelectionCut
67 {
68 public:
70  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
71  virtual bool accept(const xAOD::TauJet& xTau,
72  asg::AcceptData& accept) override;
73 private:
74  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
75 };
76 
78  : public TauSelectionCut
79 {
80 public:
82  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
83  virtual bool accept(const xAOD::TauJet& xTau,
84  asg::AcceptData& accept) override;
85 private:
86  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
87 };
88 
90  : public TauSelectionCut
91 {
92 public:
94  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
95  virtual bool accept(const xAOD::TauJet& xTau,
96  asg::AcceptData& accept) override;
97 private:
98  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
99 };
100 
102  : public TauSelectionCut
103 {
104 public:
106  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
107  virtual bool accept(const xAOD::TauJet& xTau,
108  asg::AcceptData& accept) override;
109 private:
110  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
111 };
112 
114  : public TauSelectionCut
115 {
116 public:
118  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
119  virtual bool accept(const xAOD::TauJet& xTau,
120  asg::AcceptData& accept) override;
121 private:
122  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
123 };
124 
126  : public TauSelectionCut
127 {
128 public:
130  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
131  virtual bool accept(const xAOD::TauJet& xTau,
132  asg::AcceptData& accept) override;
133 private:
134  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
135 };
136 
138  : public TauSelectionCut
139 {
140 public:
142  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
143  virtual bool accept(const xAOD::TauJet& xTau,
144  asg::AcceptData& accept) override;
145 private:
146  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
147 };
148 
150  : public TauSelectionCut
151 {
152 public:
154  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
155  virtual bool accept(const xAOD::TauJet& xTau,
156  asg::AcceptData& accept) override;
157 private:
158  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
159 };
160 
162  : public TauSelectionCut
163 {
164 public:
166  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
167  virtual bool accept(const xAOD::TauJet& xTau,
168  asg::AcceptData& accept) override;
169 private:
170  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
171 };
172 
173 //added by Li-Gang Xia < ligang.xia@cern.ch >
174 //to remove taus overlapping with muons satisfying pt > 2 GeV and not calo-tagged
176  : public TauSelectionCut
177 {
178 public:
180  virtual void setAcceptInfo (asg::AcceptInfo& info) const override;
181  virtual bool accept(const xAOD::TauJet& xTau,
182  asg::AcceptData& accept) override;
183 private:
184  bool m_bTauMuonOLR; //False: overlapped, the tau is not kept. True: not overlapped, the tau is kept.)
185  virtual void fillHistogram(const xAOD::TauJet& xTau, TH1F& hHist) const override;
186 };
187 
188 
189 }
190 
191 #endif // TAUANALYSISTOOLS_TAUSELECTIONCUTS_H
grepfile.info
info
Definition: grepfile.py:38
TauAnalysisTools::TauSelectionCutAbsCharge::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:200
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
TauAnalysisTools::TauSelectionCutJetIDWP::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:384
TauAnalysisTools::TauSelectionCut::setProperty
void setProperty(const std::string &name, const std::string &value)
Definition: TauSelectionCuts.cxx:70
TauAnalysisTools::TauSelectionCut::CreateControlPlot
TH1F * CreateControlPlot(const char *sName, const char *sTitle, int iBins, double dXLow, double dXUp)
Definition: TauSelectionCuts.cxx:44
TauAnalysisTools::TauSelectionCut::m_mProperties
std::map< std::string, std::string & > m_mProperties
Definition: TauSelectionCuts.h:58
TauAnalysisTools::TauSelectionCutAbsEta::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:161
TauAnalysisTools::TauSelectionCutMuonOLR::TauSelectionCutMuonOLR
TauSelectionCutMuonOLR(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:592
TauAnalysisTools::TauSelectionCutMuonOLR::m_bTauMuonOLR
bool m_bTauMuonOLR
Definition: TauSelectionCuts.h:184
TauAnalysisTools::TauSelectionCut::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const =0
TauAnalysisTools::TauSelectionCut::getProperty
std::string getProperty(const std::string &name)
Definition: TauSelectionCuts.cxx:86
TauAnalysisTools::TauSelectionCutPt::TauSelectionCutPt
TauSelectionCutPt(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:98
TauAnalysisTools::TauSelectionCutRNNEleScore
Definition: TauSelectionCuts.h:151
TauAnalysisTools::TauSelectionTool
Definition: TauSelectionTool.h:53
TauAnalysisTools::TauSelectionCutRNNEleScore::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:452
TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans::TauSelectionCutRNNJetScoreSigTrans
TauSelectionCutRNNJetScoreSigTrans(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:262
TauAnalysisTools::TauSelectionCutRNNEleScore::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:463
TauAnalysisTools::TauSelectionCut::~TauSelectionCut
virtual ~TauSelectionCut()
Definition: TauSelectionCuts.cxx:29
athena.value
value
Definition: athena.py:124
TauAnalysisTools::TauSelectionCut::writeControlHistograms
void writeControlHistograms()
Definition: TauSelectionCuts.cxx:37
TauAnalysisTools::TauSelectionCutJetIDWP::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:378
TauAnalysisTools::TauSelectionCutNTracks::TauSelectionCutNTracks
TauSelectionCutNTracks(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:224
TauAnalysisTools::TauSelectionCut::fillHistogramCut
void fillHistogramCut(const xAOD::TauJet &xTau)
Definition: TauSelectionCuts.cxx:63
TauAnalysisTools::TauSelectionCutMuonOLR::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:620
TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:319
TauAnalysisTools::TauSelectionCutJetIDWP::TauSelectionCutJetIDWP
TauSelectionCutJetIDWP(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:340
TauAnalysisTools::TauSelectionCutAbsEta::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:155
TauAnalysisTools::TauSelectionCutEleIDWP::TauSelectionCutEleIDWP
TauSelectionCutEleIDWP(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:494
TauAnalysisTools::TauSelectionCutEleIDWP
Definition: TauSelectionCuts.h:163
TauAnalysisTools::TauSelectionCutJetIDWP::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:368
TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:274
TauAnalysisTools::TauSelectionCut::declareProperty
void declareProperty(const std::string &name, std::string &loc)
Definition: TauSelectionCuts.cxx:79
TauAnalysisTools::TauSelectionCutAbsEta
Definition: TauSelectionCuts.h:79
TauAnalysisTools::TauSelectionCutAbsEta::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:167
TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:280
asg::AcceptInfo
Definition: AcceptInfo.h:28
TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:307
TauAnalysisTools::TauSelectionCut::getName
const std::string & getName()
Definition: TauSelectionCuts.h:42
TauAnalysisTools::TauSelectionCutMuonOLR::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:614
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauAnalysisTools::TauSelectionCut::m_hHistCutPre
TH1F * m_hHistCutPre
Definition: TauSelectionCuts.h:52
TauAnalysisTools::TauSelectionCutPt::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:118
TauAnalysisTools::TauSelectionCutEleIDWP::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:535
TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:313
AcceptData.h
TauAnalysisTools::TauSelectionCut::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept)=0
TauAnalysisTools::TauSelectionCutMuonOLR
Definition: TauSelectionCuts.h:177
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TauAnalysisTools::TauSelectionCutAbsCharge::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:194
TauAnalysisTools::TauSelectionCut::TauSelectionCut
TauSelectionCut(const std::string &sName, TauAnalysisTools::TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:20
TauAnalysisTools::TauSelectionCutAbsCharge
Definition: TauSelectionCuts.h:91
TauAnalysisTools::TauSelectionCut
Definition: TauSelectionCuts.h:28
TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans
Definition: TauSelectionCuts.h:115
AcceptInfo.h
TauAnalysisTools::TauSelectionCutAbsCharge::TauSelectionCutAbsCharge
TauSelectionCutAbsCharge(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:186
TauAnalysisTools::TauSelectionCutRNNEleScore::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:469
TauAnalysisTools::TauSelectionCut::m_sName
std::string m_sName
Definition: TauSelectionCuts.h:50
TauAnalysisTools::TauSelectionCutPt::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:112
TauAnalysisTools::TauSelectionCut::fillHistogramCutPre
void fillHistogramCutPre(const xAOD::TauJet &xTau)
Definition: TauSelectionCuts.cxx:57
TauJet.h
TauAnalysisTools::TauSelectionCutEleIDWP::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:517
TauAnalysisTools::TauSelectionCutJetIDWP
Definition: TauSelectionCuts.h:139
TauAnalysisTools::TauSelectionCutNTracks::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:232
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans::TauSelectionCutGNTauScoreSigTrans
TauSelectionCutGNTauScoreSigTrans(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:300
TauAnalysisTools::TauSelectionCutMuonOLR::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:608
TauAnalysisTools::TauSelectionCutNTracks
Definition: TauSelectionCuts.h:103
TauAnalysisTools::TauSelectionCut::m_hHistCut
TH1F * m_hHistCut
Definition: TauSelectionCuts.h:53
TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:269
asg::AcceptData
Definition: AcceptData.h:30
TauAnalysisTools::TauSelectionCutNTracks::setAcceptInfo
virtual void setAcceptInfo(asg::AcceptInfo &info) const override
Definition: TauSelectionCuts.cxx:238
TauAnalysisTools::TauSelectionCutEleIDWP::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:541
TauAnalysisTools::TauSelectionCut::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const =0
TauAnalysisTools::TauSelectionCut::m_tTST
TauSelectionTool * m_tTST
Definition: TauSelectionCuts.h:55
TauAnalysisTools::TauSelectionCutNTracks::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:244
TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans
Definition: TauSelectionCuts.h:127
TauAnalysisTools::TauSelectionCutAbsCharge::accept
virtual bool accept(const xAOD::TauJet &xTau, asg::AcceptData &accept) override
Definition: TauSelectionCuts.cxx:206
TauAnalysisTools::TauSelectionCutAbsEta::TauSelectionCutAbsEta
TauSelectionCutAbsEta(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:147
TauAnalysisTools::TauSelectionCutPt
Definition: TauSelectionCuts.h:67
TauAnalysisTools::TauSelectionCutPt::fillHistogram
virtual void fillHistogram(const xAOD::TauJet &xTau, TH1F &hHist) const override
Definition: TauSelectionCuts.cxx:106
TauAnalysisTools::TauSelectionCutRNNEleScore::TauSelectionCutRNNEleScore
TauSelectionCutRNNEleScore(TauSelectionTool *tTST)
Definition: TauSelectionCuts.cxx:444