ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | List of all members
egammaMonitoring::IsolationHistograms Class Reference

#include <IsolationHistograms.h>

Collaboration diagram for egammaMonitoring::IsolationHistograms:

Public Member Functions

 IsolationHistograms (std::string name, std::string title, std::string folder, ITHistSvc *&rootHistSvc)
 
StatusCode initializePlots (bool do_var_histos)
 
void fill (const xAOD::Egamma &egamma)
 

Public Attributes

std::map< std::string, TH1D * > histoMap
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_folder
 
ITHistSvc * m_rootHistSvc = nullptr
 

Detailed Description

Definition at line 18 of file IsolationHistograms.h.

Constructor & Destructor Documentation

◆ IsolationHistograms()

egammaMonitoring::IsolationHistograms::IsolationHistograms ( std::string  name,
std::string  title,
std::string  folder,
ITHistSvc *&  rootHistSvc 
)
inline

Definition at line 22 of file IsolationHistograms.h.

26  : m_name(std::move(std::move(name)))
27  , m_title(std::move(std::move(title)))
28  , m_folder(std::move(std::move(folder)))
29  , m_rootHistSvc(rootHistSvc)
30  {
31  }

Member Function Documentation

◆ fill()

void IsolationHistograms::fill ( const xAOD::Egamma egamma)

Definition at line 45 of file IsolationHistograms.cxx.

45  {
46 
47  static const std::map<std::string,xAOD::Iso::IsolationType> mmap = {
48  { "ptCone20", xAOD::Iso::ptcone20 },
49  { "ptCone30", xAOD::Iso::ptcone30 },
50  { "ptVarCone20", xAOD::Iso::ptvarcone20 },
51  { "ptVarCone30", xAOD::Iso::ptvarcone30 },
52  { "topoEtCone20", xAOD::Iso::topoetcone20 },
53  { "topoEtCone30", xAOD::Iso::topoetcone30 },
54  { "topoEtCone40", xAOD::Iso::topoetcone40 } };
55  for (const auto& e : mmap) {
56  if (histoMap.find(e.first) == histoMap.end())
57  continue;
58  float x = -9e9;
59  if (egamma.isolationValue(x, e.second)) {
60  TH1D *h = histoMap[e.first];
61  double xmax = h->GetBinCenter(h->GetNbinsX());
62  h->Fill(std::min(x/1000., xmax));
63  }
64  }
65 }

◆ initializePlots()

StatusCode IsolationHistograms::initializePlots ( bool  do_var_histos)

Definition at line 16 of file IsolationHistograms.cxx.

16  {
17 
18  const char* fN = m_name.c_str();
19 
20  histoMap["ptCone20"] = new TH1D(Form("%s_ptCone20",fN), ";p_{T}^{cone20} [GeV]; Events / 0.25 GeV", 60, 0., 15.);
21  histoMap["ptCone30"] = new TH1D(Form("%s_ptCone30",fN), ";p_{T}^{cone30} [GeV]; Events / 0.25 GeV", 60, 0., 15.);
22 
23  if (do_var_histos) {
24  histoMap["ptVarCone20"] = new TH1D(Form("%s_ptVarCone20",fN), ";p_{T}^{varCone20} [GeV]; Events / 0.25 GeV", 60, 0., 15.);
25  histoMap["ptVarCone30"] = new TH1D(Form("%s_ptVarCone30",fN), ";p_{T}^{varCone30} [GeV]; Events / 0.25 GeV", 60, 0., 15.);
26  }
27  histoMap["topoEtCone20"] = new TH1D(Form("%s_topoEtCone20",fN), ";E_{T}^{topoCone20} [GeV]; Events / 0.8 GeV", 60, -20., 30.);
28  histoMap["topoEtCone30"] = new TH1D(Form("%s_topoEtCone30",fN), ";E_{T}^{topoCone30} [GeV]; Events / 0.8 GeV", 60, -20., 30.);
29  histoMap["topoEtCone40"] = new TH1D(Form("%s_topoEtCone40",fN), ";E_{T}^{topoCone40} [GeV]; Events / 0.8 GeV", 60, -20., 30.);
30 
31  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"ptCone20", histoMap["ptCone20"]));
32  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"ptCone30", histoMap["ptCone30"]));
33  if (do_var_histos) {
34  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"ptVarCone20", histoMap["ptVarCone20"]));
35  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"ptVarCone30", histoMap["ptVarCone30"]));
36  }
37  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"topoEtCone20", histoMap["topoEtCone20"]));
38  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"topoEtCone30", histoMap["topoEtCone30"]));
39  ATH_CHECK(m_rootHistSvc->regHist(m_folder+"topoEtCone40", histoMap["topoEtCone40"]));
40 
41  return StatusCode::SUCCESS;
42 
43 } // initializePlots

Member Data Documentation

◆ histoMap

std::map<std::string, TH1D*> egammaMonitoring::IsolationHistograms::histoMap

Definition at line 33 of file IsolationHistograms.h.

◆ m_folder

std::string egammaMonitoring::IsolationHistograms::m_folder
protected

Definition at line 40 of file IsolationHistograms.h.

◆ m_name

std::string egammaMonitoring::IsolationHistograms::m_name
protected

Definition at line 38 of file IsolationHistograms.h.

◆ m_rootHistSvc

ITHistSvc* egammaMonitoring::IsolationHistograms::m_rootHistSvc = nullptr
protected

Definition at line 41 of file IsolationHistograms.h.

◆ m_title

std::string egammaMonitoring::IsolationHistograms::m_title
protected

Definition at line 39 of file IsolationHistograms.h.


The documentation for this class was generated from the following files:
egammaMonitoring::IsolationHistograms::m_title
std::string m_title
Definition: IsolationHistograms.h:39
xAOD::Iso::ptvarcone30
@ ptvarcone30
Definition: IsolationType.h:56
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition: IsolationType.h:48
xAOD::Iso::ptvarcone20
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
Definition: IsolationType.h:55
egammaMonitoring::IsolationHistograms::m_rootHistSvc
ITHistSvc * m_rootHistSvc
Definition: IsolationHistograms.h:41
xAOD::Iso::ptcone30
@ ptcone30
Definition: IsolationType.h:41
xAOD::Iso::ptcone20
@ ptcone20
Track isolation.
Definition: IsolationType.h:40
xAOD::Iso::topoetcone30
@ topoetcone30
Definition: IsolationType.h:49
x
#define x
egamma
Definition: egamma.h:58
h
covarianceTool.title
title
Definition: covarianceTool.py:542
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
min
#define min(a, b)
Definition: cfImp.cxx:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
egammaMonitoring::IsolationHistograms::m_folder
std::string m_folder
Definition: IsolationHistograms.h:40
xmax
double xmax
Definition: listroot.cxx:61
egammaMonitoring::IsolationHistograms::m_name
std::string m_name
Definition: IsolationHistograms.h:38
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
egammaMonitoring::IsolationHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition: IsolationHistograms.h:33
xAOD::Iso::topoetcone40
@ topoetcone40
Definition: IsolationType.h:50