CMS 3D CMS Logo

PFEnergyCalibration.h

Go to the documentation of this file.
00001 #ifndef RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h
00002 #define RecoParticleFlow_PFClusterTools_PFEnergyCalibration_h 
00003 
00004 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00005 #include "RecoParticleFlow/PFClusterAlgo/interface/PFClusterAlgo.h"
00006 #include "RecoParticleFlow/PFBlockAlgo/interface/PFBlockAlgo.h"
00007 
00008 // -*- C++ -*-
00009 //
00010 // Package:    PFClusterTools
00011 // Class:      PFEnergyCalibration
00012 // 
00023 //
00024 // Original Author:  Christian Veelken
00025 //         Created:  Tue Aug  8 16:26:18 CDT 2006
00026 // $Id: PFEnergyCalibration.h,v 1.4 2008/09/04 09:29:43 benedet Exp $
00027 //
00028 //
00029 
00030 #include <iostream>
00031 
00032 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
00033 
00034 class PFEnergyCalibration 
00035 {
00036  public:
00037   PFEnergyCalibration(); // default constructor;
00038                          // needed by PFRootEvent
00039 
00040   PFEnergyCalibration( double e_slope,
00041                        double e_offset, 
00042                        double eh_eslope,
00043                        double eh_hslope,
00044                        double eh_offset,
00045                        double h_slope,
00046                        double h_offset,
00047                        double h_damping );
00048 
00049   ~PFEnergyCalibration();
00050 
00051   // ecal calibration
00052   double energyEm(double uncalibratedEnergyECAL, 
00053                   double eta=0, double phi=0) const;
00054   
00055   double energyEm(const reco::PFCluster& clusterEcal,std::vector<double> &EclustersPS1,std::vector<double> &EclustersPS2);
00056 
00057   // HCAL only calibration
00058   double energyHad(double uncalibratedEnergyHCAL, 
00059                    double eta=0, double phi=0) const;
00060   
00061   
00062   // ECAL+HCAL (abc) calibration
00063   double energyEmHad(double uncalibratedEnergyECAL, 
00064                      double uncalibratedEnergyHCAL, 
00065                      double eta=0, double phi=0) const;
00066   
00067   // set calibration parameters for energy deposits of electrons and photons in ECAL; this member function is needed by PFRootEvent
00068   void setCalibrationParametersEm(double paramECAL_slope, 
00069                                   double paramECAL_offset);
00070 
00071   double paramECAL_slope() const {return  paramECAL_slope_;} 
00072 
00073   double paramECAL_offset() const {return paramECAL_offset_;} 
00074 
00075   double paramECALplusHCAL_slopeECAL() const {
00076     return paramECALplusHCAL_slopeECAL_;
00077   } 
00078 
00079   double paramECALplusHCAL_slopeHCAL() const {
00080     return paramECALplusHCAL_slopeHCAL_;
00081   } 
00082 
00083   double paramECALplusHCAL_offset() const {return paramECALplusHCAL_offset_;} 
00084 
00085   double paramHCAL_slope() const {return paramHCAL_slope_;} 
00086   double paramHCAL_offset() const {return paramHCAL_offset_;} 
00087   double paramHCAL_damping() const {return paramHCAL_damping_;} 
00088 
00089   
00090   friend std::ostream& operator<<(std::ostream& out, 
00091                                   const PFEnergyCalibration& calib);
00092 
00093  protected:
00094   double paramECAL_slope_;
00095   double paramECAL_offset_;
00096   
00097   double paramECALplusHCAL_slopeECAL_;
00098   double paramECALplusHCAL_slopeHCAL_;
00099   double paramECALplusHCAL_offset_;
00100   
00101   double paramHCAL_slope_;
00102   double paramHCAL_offset_;
00103   double paramHCAL_damping_;
00104 
00105  private:
00106   
00107   double minimum(double a,double b);
00108   double dCrackPhi(double phi, double eta);
00109   double CorrPhi(double phi, double eta);
00110   double CorrEta(double eta);
00111   double CorrBarrel(double E, double eta);
00112   double Alpha(double eta);
00113   double Beta(double E, double eta);
00114   double Gamma(double etaEcal);
00115   double EcorrBarrel(double E, double eta, double phi);
00116   double EcorrZoneBeforePS(double E, double eta);
00117   double EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal);
00118   double EcorrPS_ePSNil(double eEcal,double eta);
00119   double EcorrZoneAfterPS(double E, double eta);
00120   double Ecorr(double eEcal,double ePS1,double ePS2,double eta,double phi);
00121 };
00122 
00123 #endif
00124 
00125 

Generated on Tue Jun 9 17:44:41 2009 for CMSSW by  doxygen 1.5.4