ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
TauAnalysisTools::TauSelectionCut Class Referenceabstract

#include <TauSelectionCuts.h>

Inherited by TauAnalysisTools::TauSelectionCutAbsCharge, TauAnalysisTools::TauSelectionCutAbsEta, TauAnalysisTools::TauSelectionCutEleIDWP, TauAnalysisTools::TauSelectionCutGNTauScoreSigTrans, TauAnalysisTools::TauSelectionCutJetIDWP, TauAnalysisTools::TauSelectionCutMuonOLR, TauAnalysisTools::TauSelectionCutNTracks, TauAnalysisTools::TauSelectionCutPt, TauAnalysisTools::TauSelectionCutRNNEleScore, and TauAnalysisTools::TauSelectionCutRNNJetScoreSigTrans.

Collaboration diagram for TauAnalysisTools::TauSelectionCut:

Public Member Functions

 TauSelectionCut (const std::string &sName, TauAnalysisTools::TauSelectionTool *tTST)
 
virtual ~TauSelectionCut ()
 
void writeControlHistograms ()
 
void fillHistogramCutPre (const xAOD::TauJet &xTau)
 
void fillHistogramCut (const xAOD::TauJet &xTau)
 
virtual void setAcceptInfo (asg::AcceptInfo &info) const =0
 
virtual bool accept (const xAOD::TauJet &xTau, asg::AcceptData &accept)=0
 
TH1F * CreateControlPlot (const char *sName, const char *sTitle, int iBins, double dXLow, double dXUp)
 
const std::string & getName ()
 
void setProperty (const std::string &name, const std::string &value)
 

Protected Member Functions

void declareProperty (const std::string &name, std::string &loc)
 
std::string getProperty (const std::string &name)
 

Protected Attributes

std::string m_sName
 
TH1F * m_hHistCutPre
 
TH1F * m_hHistCut
 
TauSelectionToolm_tTST
 
std::map< std::string, std::string & > m_mProperties
 

Private Member Functions

virtual void fillHistogram (const xAOD::TauJet &xTau, TH1F &hHist) const =0
 

Detailed Description

Definition at line 27 of file TauSelectionCuts.h.

Constructor & Destructor Documentation

◆ TauSelectionCut()

TauSelectionCut::TauSelectionCut ( const std::string &  sName,
TauAnalysisTools::TauSelectionTool tTST 
)

Definition at line 20 of file TauSelectionCuts.cxx.

21  : m_sName(sName)
22  , m_hHistCutPre(nullptr)
23  , m_hHistCut(nullptr)
24  , m_tTST(tTST)
25 {
26 }

◆ ~TauSelectionCut()

TauSelectionCut::~TauSelectionCut ( )
virtual

Definition at line 29 of file TauSelectionCuts.cxx.

30 {
31  // FIXME: could use unique_ptr
32  delete m_hHistCutPre;
33  delete m_hHistCut;
34 }

Member Function Documentation

◆ accept()

virtual bool TauAnalysisTools::TauSelectionCut::accept ( const xAOD::TauJet xTau,
asg::AcceptData accept 
)
pure virtual

◆ CreateControlPlot()

TH1F * TauSelectionCut::CreateControlPlot ( const char *  sName,
const char *  sTitle,
int  iBins,
double  dXLow,
double  dXUp 
)

Definition at line 44 of file TauSelectionCuts.cxx.

45 {
47  {
48  TH1F* hHist = new TH1F(sName, sTitle, iBins, dXLow, dXUp);
49  hHist->SetDirectory(0);
50  return hHist;
51  }
52 
53  return nullptr;
54 }

◆ declareProperty()

void TauSelectionCut::declareProperty ( const std::string &  name,
std::string &  loc 
)
protected

Definition at line 79 of file TauSelectionCuts.cxx.

80 {
81  std::pair<std::string, std::string&> p(name, loc);
82  m_mProperties.insert(p);
83 }

◆ fillHistogram()

virtual void TauAnalysisTools::TauSelectionCut::fillHistogram ( const xAOD::TauJet xTau,
TH1F &  hHist 
) const
privatepure virtual

◆ fillHistogramCut()

void TauSelectionCut::fillHistogramCut ( const xAOD::TauJet xTau)

Definition at line 63 of file TauSelectionCuts.cxx.

64 {
65  fillHistogram(xTau, *m_hHistCut);
66 }

◆ fillHistogramCutPre()

void TauSelectionCut::fillHistogramCutPre ( const xAOD::TauJet xTau)

Definition at line 57 of file TauSelectionCuts.cxx.

58 {
60 }

◆ getName()

const std::string& TauAnalysisTools::TauSelectionCut::getName ( )
inline

Definition at line 42 of file TauSelectionCuts.h.

43  {
44  return m_sName;
45  };

◆ getProperty()

std::string TauSelectionCut::getProperty ( const std::string &  name)
protected

Definition at line 86 of file TauSelectionCuts.cxx.

87 {
89  if(it == m_mProperties.end() )
90  throw std::runtime_error (("Undeclared property: " + name + "\n").c_str());
91 
92  return it->second;
93 }

◆ setAcceptInfo()

virtual void TauAnalysisTools::TauSelectionCut::setAcceptInfo ( asg::AcceptInfo info) const
pure virtual

◆ setProperty()

void TauSelectionCut::setProperty ( const std::string &  name,
const std::string &  value 
)

Definition at line 70 of file TauSelectionCuts.cxx.

71 {
73  if(it == m_mProperties.end() )
74  throw std::runtime_error (("Undeclared property: " + name + "\n").c_str());
75  it->second = value;
76 }

◆ writeControlHistograms()

void TauSelectionCut::writeControlHistograms ( )

Definition at line 37 of file TauSelectionCuts.cxx.

38 {
39  m_hHistCutPre->Write();
40  m_hHistCut->Write();
41 }

Member Data Documentation

◆ m_hHistCut

TH1F* TauAnalysisTools::TauSelectionCut::m_hHistCut
protected

Definition at line 53 of file TauSelectionCuts.h.

◆ m_hHistCutPre

TH1F* TauAnalysisTools::TauSelectionCut::m_hHistCutPre
protected

Definition at line 52 of file TauSelectionCuts.h.

◆ m_mProperties

std::map<std::string, std::string&> TauAnalysisTools::TauSelectionCut::m_mProperties
protected

Definition at line 58 of file TauSelectionCuts.h.

◆ m_sName

std::string TauAnalysisTools::TauSelectionCut::m_sName
protected

Definition at line 50 of file TauSelectionCuts.h.

◆ m_tTST

TauSelectionTool* TauAnalysisTools::TauSelectionCut::m_tTST
protected

Definition at line 55 of file TauSelectionCuts.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TauAnalysisTools::TauSelectionCut::m_mProperties
std::map< std::string, std::string & > m_mProperties
Definition: TauSelectionCuts.h:58
skel.it
it
Definition: skel.GENtoEVGEN.py:396
athena.value
value
Definition: athena.py:124
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TauAnalysisTools::TauSelectionCut::m_hHistCutPre
TH1F * m_hHistCutPre
Definition: TauSelectionCuts.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TauAnalysisTools::TauSelectionTool::m_bCreateControlPlots
bool m_bCreateControlPlots
Definition: TauSelectionTool.h:176
TauAnalysisTools::TauSelectionCut::m_sName
std::string m_sName
Definition: TauSelectionCuts.h:50
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
TauAnalysisTools::TauSelectionCut::m_hHistCut
TH1F * m_hHistCut
Definition: TauSelectionCuts.h:53
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