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

#include <DiTauSelectionCuts.h>

Inheritance diagram for TauAnalysisTools::DiTauSelectionCut:
Collaboration diagram for TauAnalysisTools::DiTauSelectionCut:

Public Member Functions

 DiTauSelectionCut (const std::string &sName, TauAnalysisTools::DiTauSelectionTool *tDTST)
 
virtual ~DiTauSelectionCut ()
 
void writeControlHistograms ()
 
void fillHistogramCutPre (const xAOD::DiTauJet &xTau)
 
void fillHistogramCut (const xAOD::DiTauJet &xTau)
 
virtual void setAcceptInfo (asg::AcceptInfo &info) const =0
 
virtual bool accept (const xAOD::DiTauJet &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
 
DiTauSelectionToolm_tDTST
 
std::map< std::string, std::string & > m_mProperties
 

Private Member Functions

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

Detailed Description

Definition at line 28 of file DiTauSelectionCuts.h.

Constructor & Destructor Documentation

◆ DiTauSelectionCut()

DiTauSelectionCut::DiTauSelectionCut ( const std::string &  sName,
TauAnalysisTools::DiTauSelectionTool tDTST 
)

Definition at line 16 of file DiTauSelectionCuts.cxx.

17  : m_sName(sName)
18  , m_hHistCutPre(nullptr)
19  , m_hHistCut(nullptr)
20  , m_tDTST(tDTST)
21 {
22 }

◆ ~DiTauSelectionCut()

DiTauSelectionCut::~DiTauSelectionCut ( )
virtual

Definition at line 25 of file DiTauSelectionCuts.cxx.

26 {
27  // FIXME: could use unique_ptr
28  delete m_hHistCutPre;
29  delete m_hHistCut;
30 }

Member Function Documentation

◆ accept()

virtual bool TauAnalysisTools::DiTauSelectionCut::accept ( const xAOD::DiTauJet xTau,
asg::AcceptData accept 
)
pure virtual

◆ CreateControlPlot()

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

Definition at line 40 of file DiTauSelectionCuts.cxx.

41 {
43  {
44  TH1F* hHist = new TH1F(sName, sTitle, iBins, dXLow, dXUp);
45  hHist->SetDirectory(0);
46  return hHist;
47  }
48 
49  return nullptr;
50 }

◆ declareProperty()

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

Definition at line 75 of file DiTauSelectionCuts.cxx.

76 {
77  std::pair<std::string, std::string&> p(name, loc);
78  m_mProperties.insert(p);
79 }

◆ fillHistogram()

virtual void TauAnalysisTools::DiTauSelectionCut::fillHistogram ( const xAOD::DiTauJet xTau,
TH1F &  hHist 
) const
privatepure virtual

◆ fillHistogramCut()

void DiTauSelectionCut::fillHistogramCut ( const xAOD::DiTauJet xTau)

Definition at line 59 of file DiTauSelectionCuts.cxx.

60 {
61  fillHistogram(xDiTau, *m_hHistCut);
62 }

◆ fillHistogramCutPre()

void DiTauSelectionCut::fillHistogramCutPre ( const xAOD::DiTauJet xTau)

Definition at line 53 of file DiTauSelectionCuts.cxx.

54 {
55  fillHistogram(xDiTau, *m_hHistCutPre);
56 }

◆ getName()

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

Definition at line 43 of file DiTauSelectionCuts.h.

44  {
45  return m_sName;
46  };

◆ getProperty()

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

Definition at line 82 of file DiTauSelectionCuts.cxx.

83 {
85  if(it == m_mProperties.end() )
86  throw std::runtime_error (("Undeclared property: " + name + "\n").c_str());
87 
88  return it->second;
89 }

◆ setAcceptInfo()

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

◆ setProperty()

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

Definition at line 66 of file DiTauSelectionCuts.cxx.

67 {
69  if(it == m_mProperties.end() )
70  throw std::runtime_error (("Undeclared property: " + name + "\n").c_str());
71  it->second = value;
72 }

◆ writeControlHistograms()

void DiTauSelectionCut::writeControlHistograms ( )

Definition at line 33 of file DiTauSelectionCuts.cxx.

34 {
35  m_hHistCutPre->Write();
36  m_hHistCut->Write();
37 }

Member Data Documentation

◆ m_hHistCut

TH1F* TauAnalysisTools::DiTauSelectionCut::m_hHistCut
protected

Definition at line 54 of file DiTauSelectionCuts.h.

◆ m_hHistCutPre

TH1F* TauAnalysisTools::DiTauSelectionCut::m_hHistCutPre
protected

Definition at line 53 of file DiTauSelectionCuts.h.

◆ m_mProperties

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

Definition at line 59 of file DiTauSelectionCuts.h.

◆ m_sName

std::string TauAnalysisTools::DiTauSelectionCut::m_sName
protected

Definition at line 51 of file DiTauSelectionCuts.h.

◆ m_tDTST

DiTauSelectionTool* TauAnalysisTools::DiTauSelectionCut::m_tDTST
protected

Definition at line 56 of file DiTauSelectionCuts.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TauAnalysisTools::DiTauSelectionTool::m_bCreateControlPlots
bool m_bCreateControlPlots
Definition: DiTauSelectionTool.h:122
skel.it
it
Definition: skel.GENtoEVGEN.py:396
athena.value
value
Definition: athena.py:124
TauAnalysisTools::DiTauSelectionCut::m_sName
std::string m_sName
Definition: DiTauSelectionCuts.h:51
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TauAnalysisTools::DiTauSelectionCut::m_hHistCut
TH1F * m_hHistCut
Definition: DiTauSelectionCuts.h:54
TauAnalysisTools::DiTauSelectionCut::m_mProperties
std::map< std::string, std::string & > m_mProperties
Definition: DiTauSelectionCuts.h:59
TauAnalysisTools::DiTauSelectionCut::m_hHistCutPre
TH1F * m_hHistCutPre
Definition: DiTauSelectionCuts.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TauAnalysisTools::DiTauSelectionCut::m_tDTST
DiTauSelectionTool * m_tDTST
Definition: DiTauSelectionCuts.h:56
TauAnalysisTools::DiTauSelectionCut::fillHistogram
virtual void fillHistogram(const xAOD::DiTauJet &xTau, TH1F &hHist) const =0
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24