ATLAS Offline Software
Reconstruction
egamma
egammaValidation
src
IsolationHistograms.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
IsolationHistograms.h
"
6
7
#include "
AsgMessaging/Check.h
"
8
9
#include "GaudiKernel/ITHistSvc.h"
10
11
#include "TH1D.h"
12
13
14
using namespace
egammaMonitoring
;
15
16
StatusCode
IsolationHistograms::initializePlots
(
bool
do_var_histos) {
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
44
45
void
IsolationHistograms::fill
(
const
xAOD::Egamma
&
egamma
) {
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
}
AllowedVariables::e
e
Definition:
AsgElectronSelectorTool.cxx:37
xAOD::Iso::ptvarcone30
@ ptvarcone30
Definition:
IsolationType.h:56
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition:
IsolationType.h:48
Check.h
xAOD::Iso::ptvarcone20
@ ptvarcone20
Mini-Isolation http://arxiv.org/abs/1007.2221.
Definition:
IsolationType.h:55
min
constexpr double min()
Definition:
ap_fixedTest.cxx:26
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
xAOD::Egamma_v1
Definition:
Egamma_v1.h:56
x
#define x
egamma
Definition:
egamma.h:58
h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
egammaMonitoring
Definition:
ClusterHistograms.h:19
egammaMonitoring::IsolationHistograms::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition:
IsolationHistograms.h:43
IsolationHistograms.h
egammaMonitoring::IsolationHistograms::m_folder
std::string m_folder
Definition:
IsolationHistograms.h:42
xmax
double xmax
Definition:
listroot.cxx:61
egammaMonitoring::IsolationHistograms::m_name
std::string m_name
Definition:
IsolationHistograms.h:40
egammaMonitoring::IsolationHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition:
IsolationHistograms.h:35
egammaMonitoring::IsolationHistograms::fill
void fill(const xAOD::Egamma &egamma)
Definition:
IsolationHistograms.cxx:45
xAOD::Iso::topoetcone40
@ topoetcone40
Definition:
IsolationType.h:50
egammaMonitoring::IsolationHistograms::initializePlots
StatusCode initializePlots(bool do_var_histos)
Definition:
IsolationHistograms.cxx:16
Generated on Fri Jan 10 2025 21:11:49 for ATLAS Offline Software by
1.8.18