ATLAS Offline Software
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 
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 
19  ect12c.initialize();
20  // ect12c.setDebug(true);
21 
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:79
TH2D::SetBinContent
void SetBinContent(int, double)
Definition: rootspy.cxx:436
egammaEnergyCorrectionTool.h
AtlasRoot::egammaEnergyCorrectionTool
Definition: egammaEnergyCorrectionTool.h:362
lumiFormat.i
int i
Definition: lumiFormat.py:92
AtlasRoot::egammaEnergyCorrectionTool::setESModel
void setESModel(egEnergyCorr::ESModel val)
Definition: egammaEnergyCorrectionTool.h:373
egEnergyCorr::es2012a
@ es2012a
Definition: egammaEnergyCorrectionTool.h:295
main
int main()
Definition: testResolutionParam.cxx:15
makeTOC.fOut
fOut
Definition: makeTOC.py:37
TH2D
Definition: rootspy.cxx:430
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:2808
egEnergyCorr::es2012c
@ es2012c
Definition: egammaEnergyCorrectionTool.h:297
AtlasRoot::egammaEnergyCorrectionTool::initialize
int initialize()
Definition: egammaEnergyCorrectionTool.cxx:178
PATCore::ParticleType::Electron
@ Electron
Definition: PATCoreEnums.h:40