ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
ElectronPhotonID
ElectronPhotonFourMomentumCorrection
util
testResolutionParam.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 <
ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h
>
6
7
#include "TProfile.h"
8
#include "TH2D.h"
9
#include "TCanvas.h"
10
#include "TLegend.h"
11
#include "TStyle.h"
12
#include "TPad.h"
13
#include "TFile.h"
14
15
int
main
() {
16
17
AtlasRoot::egammaEnergyCorrectionTool
ect12c;
18
ect12c.
setESModel
(
egEnergyCorr::es2012c
);
19
ect12c.
initialize
();
20
// ect12c.setDebug(true);
21
22
AtlasRoot::egammaEnergyCorrectionTool
ect12a;
23
ect12a.
setESModel
(
egEnergyCorr::es2012a
);
24
ect12a.
initialize
();
25
26
TH2D res2012c(
"res2012c"
,
"res012c"
, 48, -2.4, 2.4, 200, 5., 205.);
27
TH2D res2012a(
"res2012a"
,
"res012a"
, 48, -2.4, 2.4, 200, 5., 205.);
28
29
for
(
int
i=1; i<=res2012c.GetNbinsX(); i++)
30
for
(
int
j=1; j<=res2012c.GetNbinsY(); j++) {
31
32
double
eta
= res2012c.GetXaxis()->GetBinCenter(i);
33
double
ene = res2012c.GetYaxis()->GetBinCenter(j) * 1000.;
34
35
res2012c.SetBinContent(i, j, ect12c.
resolution
(ene,
eta
,
eta
,
PATCore::ParticleType::Electron
,
false
,
false
));
36
res2012c.SetBinError(i, j, 0.);
37
38
res2012a.SetBinContent(i, j, ect12a.
resolution
(ene,
eta
,
eta
,
PATCore::ParticleType::Electron
,
false
,
false
));
39
res2012a.SetBinError(i, j, 0.);
40
41
}
42
43
44
TFile fOut(
"resoParam.root"
,
"recreate"
);
45
res2012a.Write();
46
res2012c.Write();
47
fOut.Close();
48
49
return
0;
50
51
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
AtlasRoot::egammaEnergyCorrectionTool
Definition
egammaEnergyCorrectionTool.h:377
AtlasRoot::egammaEnergyCorrectionTool::setESModel
void setESModel(egEnergyCorr::ESModel val)
Definition
egammaEnergyCorrectionTool.h:388
AtlasRoot::egammaEnergyCorrectionTool::resolution
double resolution(double energy, double cl_eta, double cl_etaCalo, PATCore::ParticleType::Type ptype, bool withCT, bool fast, egEnergyCorr::Resolution::resolutionType resType=egEnergyCorr::Resolution::SigmaEff90) const
Definition
egammaEnergyCorrectionTool.cxx:2867
AtlasRoot::egammaEnergyCorrectionTool::initialize
int initialize()
Definition
egammaEnergyCorrectionTool.cxx:238
egammaEnergyCorrectionTool.h
PATCore::ParticleType::Electron
@ Electron
Definition
PATCoreEnums.h:40
egEnergyCorr::es2012a
@ es2012a
Definition
egammaEnergyCorrectionTool.h:305
egEnergyCorr::es2012c
@ es2012c
Definition
egammaEnergyCorrectionTool.h:307
main
int main()
Definition
testResolutionParam.cxx:15
Generated on
for ATLAS Offline Software by
1.17.0