Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:27

0001 #include "RecoParticleFlow/PFClusterTools/interface/PFEnergyResolution.h"
0002 #include <TMath.h>
0003 #include <cmath>
0004 /*
0005 PFEnergyResolution::PFEnergyResolution(const edm::ParameterSet& parameters)
0006 {
0007 //--- nothing to be done yet
0008 }
0009 */
0010 PFEnergyResolution::PFEnergyResolution() {
0011   //--- nothing to be done yet
0012 }
0013 
0014 PFEnergyResolution::~PFEnergyResolution() {
0015   //--- nothing to be done yet
0016 }
0017 
0018 double PFEnergyResolution::getEnergyResolutionEm(double CorrectedEnergy, double eta) const {
0019   //The parameters S,N,C has been determined with the Full Sim on CMSSW_2_1_0_pre4.
0020   //The resolution must be a function of the corrected energy available in PFEnergyCalibration
0021   //Jonathan Biteau July 2008
0022 
0023   double C;
0024   double S;
0025   double N;
0026   if (TMath::Abs(eta) < 1.48) {
0027     C = 0.35 / 100;
0028     S = 5.51 / 100;
0029     N = 98. / 1000.;
0030   } else {
0031     C = 0;
0032     S = 12.8 / 100;
0033     N = 440. / 1000.;
0034   }
0035   double result = TMath::Sqrt(C * C * CorrectedEnergy * CorrectedEnergy + S * S * CorrectedEnergy + N * N);
0036   return result;
0037 }
0038 
0039 double PFEnergyResolution::getEnergyResolutionHad(double energyHCAL, double eta, double phi) const {
0040   //--- estimate **relative** resolution of energy measurement (sigmaE/E)
0041   //    for hadrons in depositing energy in HCAL
0042   //    (eta and phi dependence not implemented yet)
0043 
0044   return 1.49356 / sqrt(energyHCAL) + 6.62527e-03 * sqrt(energyHCAL) - 6.33966e-02;
0045 }
0046 /*
0047 double PFEnergyResolution::getEnergyResolutionHad(double energyECAL, double energyHCAL, double eta, double phi) const
0048 {
0049 //--- estimate **relative** resolution of energy measurement (sigmaE/E)
0050 //    for hadrons depositing energy in ECAL and HCAL
0051 //    (currently, the resolution function for hadrons 
0052 //     is assumed to be the same in ECAL and HCAL)
0053 
0054   return getEnergyResolutionHad(energyECAL + energyHCAL, theta, phi);
0055 }
0056 */