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

#include <DiTauSelectionCuts.h>

Inheritance diagram for TauAnalysisTools::DiTauSelectionCutAbsEta:
Collaboration diagram for TauAnalysisTools::DiTauSelectionCutAbsEta:

Public Member Functions

 DiTauSelectionCutAbsEta (DiTauSelectionTool *tDTST)
 
virtual void setAcceptInfo (asg::AcceptInfo &info) const override
 
virtual bool accept (const xAOD::DiTauJet &xTau, asg::AcceptData &accept) override
 
void writeControlHistograms ()
 
void fillHistogramCutPre (const xAOD::DiTauJet &xTau)
 
void fillHistogramCut (const xAOD::DiTauJet &xTau)
 
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 override
 

Detailed Description

Definition at line 78 of file DiTauSelectionCuts.h.

Constructor & Destructor Documentation

◆ DiTauSelectionCutAbsEta()

DiTauSelectionCutAbsEta::DiTauSelectionCutAbsEta ( DiTauSelectionTool tDTST)

Definition at line 143 of file DiTauSelectionCuts.cxx.

144  : DiTauSelectionCut("CutAbsEta", tDTST)
145 {
146  m_hHistCutPre = CreateControlPlot("hEta_pre","Eta_pre;di-#tau-#eta; events",100,-3,3);
147  m_hHistCut = CreateControlPlot("hEta_cut","Eta_cut;di-#tau-#eta; events",100,-3,3);
148 }

Member Function Documentation

◆ accept()

bool DiTauSelectionCutAbsEta::accept ( const xAOD::DiTauJet xTau,
asg::AcceptData accept 
)
overridevirtual

Implements TauAnalysisTools::DiTauSelectionCut.

Definition at line 163 of file DiTauSelectionCuts.cxx.

165 {
166  // check regions of eta, if ditau is in one region then return true; false otherwise
167  unsigned int iNumEtaRegion = m_tDTST->m_vAbsEtaRegion.size()/2;
168  for( unsigned int iEtaRegion = 0; iEtaRegion < iNumEtaRegion; iEtaRegion++ )
169  {
170  if ( std::abs( xDiTau.eta() ) >= m_tDTST->m_vAbsEtaRegion.at(iEtaRegion*2) and std::abs( xDiTau.eta() ) <= m_tDTST->m_vAbsEtaRegion.at(iEtaRegion*2+1))
171  {
172  acceptData.setCutResult( "AbsEta", true );
173  return true;
174  }
175  }
176  m_tDTST->msg() << MSG::VERBOSE << "DiTau failed eta requirement, ditau eta: " << xDiTau.eta() << endmsg;
177  return false;
178 }

◆ CreateControlPlot()

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

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 
)
protectedinherited

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()

void DiTauSelectionCutAbsEta::fillHistogram ( const xAOD::DiTauJet xTau,
TH1F &  hHist 
) const
overrideprivatevirtual

Implements TauAnalysisTools::DiTauSelectionCut.

Definition at line 151 of file DiTauSelectionCuts.cxx.

152 {
153  hHist.Fill(xDiTau.eta());
154 }

◆ fillHistogramCut()

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

Definition at line 59 of file DiTauSelectionCuts.cxx.

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

◆ fillHistogramCutPre()

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

Definition at line 53 of file DiTauSelectionCuts.cxx.

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

◆ getName()

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

Definition at line 43 of file DiTauSelectionCuts.h.

44  {
45  return m_sName;
46  };

◆ getProperty()

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

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()

void DiTauSelectionCutAbsEta::setAcceptInfo ( asg::AcceptInfo info) const
overridevirtual

Implements TauAnalysisTools::DiTauSelectionCut.

Definition at line 157 of file DiTauSelectionCuts.cxx.

158 {
159  info.addCut( "AbsEta",
160  "Selection of ditaus according to their absolute pseudorapidity" );
161 }

◆ setProperty()

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

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 ( )
inherited

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
protectedinherited

Definition at line 54 of file DiTauSelectionCuts.h.

◆ m_hHistCutPre

TH1F* TauAnalysisTools::DiTauSelectionCut::m_hHistCutPre
protectedinherited

Definition at line 53 of file DiTauSelectionCuts.h.

◆ m_mProperties

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

Definition at line 59 of file DiTauSelectionCuts.h.

◆ m_sName

std::string TauAnalysisTools::DiTauSelectionCut::m_sName
protectedinherited

Definition at line 51 of file DiTauSelectionCuts.h.

◆ m_tDTST

DiTauSelectionTool* TauAnalysisTools::DiTauSelectionCut::m_tDTST
protectedinherited

Definition at line 56 of file DiTauSelectionCuts.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
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::CreateControlPlot
TH1F * CreateControlPlot(const char *sName, const char *sTitle, int iBins, double dXLow, double dXUp)
Definition: DiTauSelectionCuts.cxx:40
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::DiTauSelectionCut
DiTauSelectionCut(const std::string &sName, TauAnalysisTools::DiTauSelectionTool *tDTST)
Definition: DiTauSelectionCuts.cxx:16
TauAnalysisTools::DiTauSelectionTool::m_vAbsEtaRegion
std::vector< float > m_vAbsEtaRegion
Definition: DiTauSelectionTool.h:99
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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:221
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
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14