ATLAS Offline Software
Functions
testResolutionParam.cxx File Reference
#include <ElectronPhotonFourMomentumCorrection/egammaEnergyCorrectionTool.h>
#include "TProfile.h"
#include "TH2D.h"
#include "TCanvas.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TPad.h"
#include "TFile.h"
Include dependency graph for testResolutionParam.cxx:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 15 of file testResolutionParam.cxx.

15  {
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:83
AtlasRoot::egammaEnergyCorrectionTool
Definition: egammaEnergyCorrectionTool.h:364
lumiFormat.i
int i
Definition: lumiFormat.py:85
AtlasRoot::egammaEnergyCorrectionTool::setESModel
void setESModel(egEnergyCorr::ESModel val)
Definition: egammaEnergyCorrectionTool.h:375
egEnergyCorr::es2012a
@ es2012a
Definition: egammaEnergyCorrectionTool.h:295
makeTOC.fOut
fOut
Definition: makeTOC.py:37
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:2839
egEnergyCorr::es2012c
@ es2012c
Definition: egammaEnergyCorrectionTool.h:297
AtlasRoot::egammaEnergyCorrectionTool::initialize
int initialize()
Definition: egammaEnergyCorrectionTool.cxx:178
PATCore::ParticleType::Electron
@ Electron
Definition: PATCoreEnums.h:40