CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/RecoParticleFlow/PFClusterTools/src/PFEnergyResolution.cc

Go to the documentation of this file.
00001 #include "RecoParticleFlow/PFClusterTools/interface/PFEnergyResolution.h"
00002 #include <TMath.h>
00003 #include <math.h>
00004 /*
00005 PFEnergyResolution::PFEnergyResolution(const edm::ParameterSet& parameters)
00006 {
00007 //--- nothing to be done yet
00008 }
00009 */
00010 PFEnergyResolution::PFEnergyResolution()
00011 {
00012 //--- nothing to be done yet
00013 }
00014 
00015 PFEnergyResolution::~PFEnergyResolution()
00016 {
00017 //--- nothing to be done yet  
00018 }
00019 
00020 
00021 double PFEnergyResolution::getEnergyResolutionEm(double CorrectedEnergy, double eta) const{
00022 
00023   //The parameters S,N,C has been determined with the Full Sim on CMSSW_2_1_0_pre4. 
00024   //The resolution must be a function of the corrected energy available in PFEnergyCalibration
00025   //Jonathan Biteau July 2008
00026 
00027   double C;
00028   double S;
00029   double N;
00030   if(TMath::Abs(eta)<1.48){C=0.35/100; S=5.51/100; N=98./1000.;}
00031   else{C=0; S=12.8/100; N=440./1000.;} 
00032   double result = TMath::Sqrt(C*C*CorrectedEnergy*CorrectedEnergy + S*S*CorrectedEnergy + N*N);
00033   return result; 
00034 }
00035 
00036 
00037 double PFEnergyResolution::getEnergyResolutionHad(double energyHCAL, double eta, double phi) const
00038 {
00039 //--- estimate **relative** resolution of energy measurement (sigmaE/E)
00040 //    for hadrons in depositing energy in HCAL
00041 //    (eta and phi dependence not implemented yet)
00042 
00043   return 1.49356/sqrt(energyHCAL) + 6.62527e-03*sqrt(energyHCAL) - 6.33966e-02;
00044 }
00045 /*
00046 double PFEnergyResolution::getEnergyResolutionHad(double energyECAL, double energyHCAL, double eta, double phi) const
00047 {
00048 //--- estimate **relative** resolution of energy measurement (sigmaE/E)
00049 //    for hadrons depositing energy in ECAL and HCAL
00050 //    (currently, the resolution function for hadrons 
00051 //     is assumed to be the same in ECAL and HCAL)
00052 
00053   return getEnergyResolutionHad(energyECAL + energyHCAL, theta, phi);
00054 }
00055 */