ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaValidation
src
WidthPlot.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 "
WidthPlot.h
"
6
#include "GaudiKernel/ITHistSvc.h"
7
#include "
AsgTools/AnaToolHandle.h
"
8
9
#include "TH1D.h"
10
#include "TH2D.h"
11
12
#include "
TruthPhotonHistograms.h
"
13
#include "
widthestimators.h
"
14
15
using namespace
widthestimators
;
16
17
namespace
egammaMonitoring
{
18
19
WidthPlot::WidthPlot
(std::string name, std::string folder, SmartIF<ITHistSvc> rootHistSvc ) :
20
m_name
(
std
::move(name)),
21
m_folder
(
std
::move(folder)),
22
m_rootHistSvc
(
std
::move(rootHistSvc)) { }
23
24
StatusCode
WidthPlot::fill
(
IHistograms
*input) {
25
26
TruthPhotonHistograms
*histograms =
dynamic_cast<
TruthPhotonHistograms
*
>
(input);
27
28
for
(
const
auto
&p : histograms->histo2DMap ) {
29
TH1D* hist68 =
30
new
TH1D(Form(
"%s_%s"
,
m_name
.c_str(), p.first.c_str()),
31
Form(
"; %s ; resolution"
, p.second->GetXaxis()->GetTitle()),
32
p.second->GetXaxis()->GetNbins(),
33
p.second->GetXaxis()->GetXmin(),
34
p.second->GetXaxis()->GetXmax());
35
hist68->SetStats(0);
36
37
for
(
int
bin
= 1;
bin
<= p.second->GetXaxis()->GetNbins();
bin
++) {
38
TH1D *proj = p.second->ProjectionY(Form(
"%s_%d_projection"
, p.first.c_str(),
bin
),
bin
,
bin
+1);
39
40
double
s68 =
binned::s68
(proj);
41
hist68->SetBinContent(
bin
, s68);
42
43
}
44
45
ATH_CHECK
(
m_rootHistSvc
->regHist(Form(
"%sWidth_%s"
,
m_folder
.c_str(), p.first.c_str()), hist68));
46
47
}
48
49
return
StatusCode::SUCCESS;
50
51
}
//
52
53
54
}
// namespace
AnaToolHandle.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
TruthPhotonHistograms.h
WidthPlot.h
bin
Definition
BinsDiffFromStripMedian.h:43
egammaMonitoring::IHistograms
Definition
IHistograms.h:21
egammaMonitoring::TruthPhotonHistograms
Definition
TruthPhotonHistograms.h:18
egammaMonitoring::WidthPlot::m_name
std::string m_name
Definition
WidthPlot.h:23
egammaMonitoring::WidthPlot::WidthPlot
WidthPlot(std::string name, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
Definition
WidthPlot.cxx:19
egammaMonitoring::WidthPlot::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition
WidthPlot.h:25
egammaMonitoring::WidthPlot::fill
StatusCode fill(IHistograms *input)
Definition
WidthPlot.cxx:24
egammaMonitoring::WidthPlot::m_folder
std::string m_folder
Definition
WidthPlot.h:24
egammaMonitoring
Definition
ClusterHistograms.h:19
std
STL namespace.
widthestimators::binned::s68
double s68(const T &histo)
Definition
widthestimators.h:98
widthestimators
Definition
widthestimators.h:28
widthestimators.h
Generated on
for ATLAS Offline Software by
1.17.0