Go to the documentation of this file.00001 #ifndef HCALResponse_h
00002 #define HCALResponse_h
00003
00010 #include <map>
00011 #include <vector>
00012
00013 typedef std::pair<double,double> response;
00014 enum part{hcbarrel=0, hcendcap=1, hcforward=2};
00015 enum type{ECAL=0, HCAL=1, VFCAL=2};
00016
00017 class RandomEngine;
00018
00019 namespace edm {
00020 class ParameterSet;
00021 }
00022
00023 class HCALResponse
00024 {
00025 public:
00026 HCALResponse(const edm::ParameterSet& pset,
00027 const RandomEngine* engine);
00028 ~HCALResponse(){;}
00029
00030
00031
00032
00033 response responseHCAL(int _mip, double energy, double eta, int partype);
00034
00035
00036 double getHCALEnergyResponse (double e, int hit);
00037 double getHCALEnergyResolution (double e, int hit);
00038 double getHFEnergyResolution (double EGen);
00039
00040 private:
00041
00042
00043
00044 void interHD(int mip, double e, int ie, int ieta);
00045 void interEM(double e, int ie, int ieta);
00046 void interMU(double e, int ie, int ieta);
00047
00048
00049 bool debug, usemip;
00050
00051
00052
00053
00054
00055 double RespPar[3][2][3];
00056
00057
00058 double eResponseScale[3];
00059 double eResponsePlateau[3];
00060 double eResponseExponent;
00061 double eResponseCoefficient;
00062 double eResponseCorrection;
00063 double eBias;
00064
00065
00066 bool useAdHocCorrections_;
00067 std::vector<double> barrelCorrection;
00068 std::vector<double> endcapCorrection;
00069 std::vector<double> forwardCorrectionEnergyDependent;
00070 std::vector<double> forwardCorrectionEtaDependent;
00071
00072
00073 int maxHDe, maxHDeta, maxMUe, maxMUeta, maxMUbin, maxEMe, maxEMeta;
00074
00075
00076 double etaStep;
00077
00078 int barrelHDeta, endcapHDeta, forwardHDeta, barrelMUeta, endcapMUeta;
00079
00080 double muStep;
00081
00082 double respFactorEM;
00083
00084 double mean, sigma;
00085
00086
00087 std::vector<double> eGridHD;
00088 std::vector<double> eGridEM;
00089 std::vector<double> eGridMU;
00090 std::vector<double> etaGridMU;
00091
00092
00093
00094 std::vector<std::vector<double> > meanHD, sigmaHD;
00095 std::vector<std::vector<double> > meanHD_mip, sigmaHD_mip;
00096 std::vector<std::vector<double> > meanHD_nomip, sigmaHD_nomip;
00097
00098
00099
00100 std::vector<std::vector<double> > meanEM, sigmaEM;
00101
00102
00103
00104 std::vector<std::vector<std::vector<double> > > responseMU;
00105
00106
00107 const RandomEngine* random;
00108
00109 };
00110 #endif
00111