CMS 3D CMS Logo

PFResolutionMapManager.cc
Go to the documentation of this file.
2 #include <iostream>
3 #include <TFile.h>
4 
5 using namespace std;
6 
8  TFile f(mapfile);
9  TH2D *hSEtaC = (TH2D*)f.Get("Sigma_Eta_WithECorrection");
10  TH2D *hSEta = (TH2D*)f.Get("Sigma_Eta");
11  TH2D *hSPhiC = (TH2D*)f.Get("Sigma_Phi_WithECorrection");
12  TH2D *hSPhi = (TH2D*)f.Get("Sigma_Phi");
13 
14  M1 = PFResolutionMap(*hSEtaC);
15  M2 = PFResolutionMap(*hSEta);
16  M3 = PFResolutionMap(*hSPhiC);
17  M4 = PFResolutionMap(*hSPhi);
18 }
19 
21  if(MapEta){
22  if(Corr) return M1;
23  else return M2;
24  }
25  else{
26  if(Corr) return M3;
27  else return M4;
28  }
29 }
PFResolutionMapManager(const char *name)
double f[11][100]
const PFResolutionMap & GetResolutionMap(bool MapEta, bool Corr)
Resolution Map (resolution as a function of eta and E)