CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/FastSimulation/Calorimetry/interface/HCALResponse.h

Go to the documentation of this file.
00001 #ifndef HCALResponse_h
00002 #define HCALResponse_h
00003 
00010 #include <map>
00011 
00012 #define maxHDe    15   // energy points for hadrons  
00013 #define maxHDeta  51   // eta    points for hadrons
00014 #define maxEMe     6   // energy points  e/gamma in HF
00015 #define maxEMeta  21   // eta points     e/gamma in HF
00016 #define maxMUe     4   // energy points for muons
00017 #define maxMUeta   6   
00018 #define maxMUbin  40   // binning oh muon histograms  
00019 
00020 typedef std::pair<double,double> response;
00021 enum part{hcbarrel=0, hcendcap=1, hcforward=2};
00022 enum type{ECAL=0, HCAL=1, VFCAL=2};
00023 
00024 class RandomEngine;
00025 
00026 namespace edm { 
00027   class ParameterSet;
00028 }
00029 
00030 class HCALResponse
00031 {
00032 public:
00033   HCALResponse(const edm::ParameterSet& pset,
00034                const RandomEngine* engine);
00035   ~HCALResponse(){;} 
00036 
00037   // Get the response in the for of pair 
00038   // parameters:  energy, eta, e/gamma = 0, hadron = 1, mu = 2, mip: 0/1/2
00039   // mip = 2 means "mean" response regardless actual mip
00040   response responseHCAL(int mip, double energy, double eta, int partype);
00041 
00042   // legacy methods using simple furmulae
00043   double getHCALEnergyResponse   (double e, int hit);
00044   double getHCALEnergyResolution (double e, int hit);
00045   double getHFEnergyResolution   (double EGen);
00046   
00047 private:
00048 
00049   // calculates interpolated-extrapolated reponse (mean and sigma, see below)
00050   // for hadrons and e/gamma (the latter in HF specifically)
00051   void interHD(int mip, double e, int ie, int ieta);
00052   void interEM(double e, int ie, int ieta); 
00053   void interMU(double e, int ie, int ieta); 
00054 
00057   //in the barrel and in the endcap
00058   //in the ECAL, HCAL, VFCAL
00059   double RespPar[3][2][3];
00060 
00062   double eResponseScale[3];
00063   double eResponsePlateau[3];
00064   double eResponseExponent;
00065   double eResponseCoefficient;
00066   double eResponseCorrection;
00067   double eBias;
00068 
00069   // just eta step of the tabulated data
00070   double etaStep, muStep;
00071   // mean and sigma
00072   double mean, sigma; 
00073 
00074   // Tabulated energy, et/pt and eta points
00075   double eGridHD  [maxHDe];
00076   double eGridEM  [maxEMe];
00077   double eGridMU  [maxMUe];
00078   double etaGridMU[maxMUeta];
00079 
00080   // Tabulated response and mean for hadrons normalized to the energy
00081   double meanHD      [maxHDe][maxHDeta], sigmaHD      [maxHDe][maxHDeta];
00082   double meanHD_mip  [maxHDe][maxHDeta], sigmaHD_mip  [maxHDe][maxHDeta];
00083   double meanHD_nomip[maxHDe][maxHDeta], sigmaHD_nomip[maxHDe][maxHDeta];
00084   
00085   // Tabulated response and mean for e/gamma in HF specifically (normalized) 
00086   double meanEM[maxEMe][maxEMeta], sigmaEM[maxEMe][maxEMeta];
00087 
00088   // muon histos 
00089   double responseMU[maxMUe][maxMUeta][maxMUbin]; 
00090 
00091   // Famos random engine
00092   const RandomEngine* random;
00093 
00094 };
00095 #endif
00096