ATLAS Offline Software
Reconstruction
egamma
egammaValidation
src
EfficiencyPlot.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
EfficiencyPlot.h
"
6
#include "GaudiKernel/ITHistSvc.h"
7
#include "
AsgMessaging/Check.h
"
8
9
#include "TH1D.h"
10
11
namespace
egammaMonitoring
{
12
13
EfficiencyPlot::EfficiencyPlot
(std::string
name
, std::string
folder
, SmartIF<ITHistSvc> rootHistSvc ) :
14
m_name(std::move(
name
)),
15
m_folder(std::move(
folder
)),
16
m_rootHistSvc(std::move(rootHistSvc)) {
17
}
18
19
StatusCode
EfficiencyPlot::divide
(
IHistograms
*pass,
IHistograms
* total) {
20
21
for
(
const
auto
&
p
: total->
histoMap
){
22
TH1D *
efficiency
= (TH1D*) pass->
histoMap
[
p
.first]->Clone(Form(
"%s_%s"
,
m_name
.c_str(),
p
.first.c_str()));
23
efficiency
->Divide(pass->
histoMap
[
p
.first],
p
.second, 1, 1,
"B"
);
24
efficiency
->GetYaxis()->SetTitle(
"Efficiency"
);
25
efficiency
->GetYaxis()->SetRangeUser(0,1.1);
26
efficiency
->SetStats(0);
27
ATH_CHECK
(
m_rootHistSvc
->regHist(Form(
"%sEff_%s"
,
m_folder
.c_str(),
p
.first.c_str()),
efficiency
));
28
}
29
30
return
StatusCode::SUCCESS;
31
32
}
//
33
34
}
// namespace
egammaMonitoring::IHistograms
Definition:
IHistograms.h:21
egammaMonitoring::EfficiencyPlot::EfficiencyPlot
EfficiencyPlot(std::string name, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
Definition:
EfficiencyPlot.cxx:13
Check.h
egammaMonitoring::EfficiencyPlot::m_folder
std::string m_folder
Definition:
EfficiencyPlot.h:25
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition:
dependence.cxx:128
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
egammaMonitoring::EfficiencyPlot::m_rootHistSvc
SmartIF< ITHistSvc > m_rootHistSvc
Definition:
EfficiencyPlot.h:26
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
EfficiencyPlot.h
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
egammaMonitoring
Definition:
ClusterHistograms.h:19
egammaMonitoring::EfficiencyPlot::divide
StatusCode divide(IHistograms *pass, IHistograms *total)
Definition:
EfficiencyPlot.cxx:19
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition:
CaloCondBlobAlgs_fillNoiseFromASCII.py:56
egammaMonitoring::EfficiencyPlot::m_name
std::string m_name
Definition:
EfficiencyPlot.h:24
egammaMonitoring::IHistograms::histoMap
std::map< std::string, TH1D * > histoMap
Definition:
IHistograms.h:40
Generated on Thu Nov 7 2024 21:14:05 for ATLAS Offline Software by
1.8.18