ATLAS Offline Software
Loading...
Searching...
No Matches
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, SmartIF< 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
SmartIF< ITHistSvc > m_rootHistSvc

Detailed Description

Definition at line 20 of file IsolationHistograms.h.

Constructor & Destructor Documentation

◆ IsolationHistograms()

egammaMonitoring::IsolationHistograms::IsolationHistograms ( std::string name,
std::string title,
std::string folder,
SmartIF< ITHistSvc > rootHistSvc )
inline

Definition at line 24 of file IsolationHistograms.h.

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

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}
#define x
std::map< std::string, TH1D * > histoMap
double xmax
Definition listroot.cxx:61
@ topoetcone20
Topo-cluster ET-sum.
@ ptcone20
Track isolation.
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.

◆ 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
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ histoMap

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

Definition at line 35 of file IsolationHistograms.h.

◆ m_folder

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

Definition at line 42 of file IsolationHistograms.h.

◆ m_name

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

Definition at line 40 of file IsolationHistograms.h.

◆ m_rootHistSvc

SmartIF<ITHistSvc> egammaMonitoring::IsolationHistograms::m_rootHistSvc
protected

Definition at line 43 of file IsolationHistograms.h.

◆ m_title

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

Definition at line 41 of file IsolationHistograms.h.


The documentation for this class was generated from the following files: