CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HCALResponse.h
Go to the documentation of this file.
1 #ifndef HCALResponse_h
2 #define HCALResponse_h
3 
10 #include <map>
11 
12 #define maxHDe 15 // energy points for hadrons
13 #define maxHDeta 51 // eta points for hadrons
14 #define maxEMe 6 // energy points e/gamma in HF
15 #define maxEMeta 21 // eta points e/gamma in HF
16 #define maxMUe 4 // energy points for muons
17 #define maxMUeta 6
18 #define maxMUbin 40 // binning oh muon histograms
19 
20 typedef std::pair<double,double> response;
22 enum type{ECAL=0, HCAL=1, VFCAL=2};
23 
24 class RandomEngine;
25 
26 namespace edm {
27  class ParameterSet;
28 }
29 
31 {
32 public:
33  HCALResponse(const edm::ParameterSet& pset,
34  const RandomEngine* engine);
36 
37  // Get the response in the for of pair
38  // parameters: energy, eta, e/gamma = 0, hadron = 1, mu = 2, mip: 0/1/2
39  // mip = 2 means "mean" response regardless actual mip
40  response responseHCAL(int mip, double energy, double eta, int partype);
41 
42  // legacy methods using simple furmulae
43  double getHCALEnergyResponse (double e, int hit);
44  double getHCALEnergyResolution (double e, int hit);
45  double getHFEnergyResolution (double EGen);
46 
47 private:
48 
49  // calculates interpolated-extrapolated reponse (mean and sigma, see below)
50  // for hadrons and e/gamma (the latter in HF specifically)
51  void interHD(int mip, double e, int ie, int ieta);
52  void interEM(double e, int ie, int ieta);
53  void interMU(double e, int ie, int ieta);
54 
57  //in the barrel and in the endcap
58  //in the ECAL, HCAL, VFCAL
59  double RespPar[3][2][3];
60 
62  double eResponseScale[3];
63  double eResponsePlateau[3];
67  double eBias;
68 
69  // just eta step of the tabulated data
70  double etaStep, muStep;
71  // mean and sigma
72  double mean, sigma;
73 
74  // Tabulated energy, et/pt and eta points
75  double eGridHD [maxHDe];
76  double eGridEM [maxEMe];
77  double eGridMU [maxMUe];
79 
80  // Tabulated response and mean for hadrons normalized to the energy
84 
85  // Tabulated response and mean for e/gamma in HF specifically (normalized)
87 
88  // muon histos
90 
91  // Famos random engine
93 
94 };
95 #endif
96 
double getHCALEnergyResponse(double e, int hit)
double etaStep
Definition: HCALResponse.h:70
type
Definition: HCALResponse.h:22
double RespPar[3][2][3]
Definition: HCALResponse.h:59
#define maxEMeta
Definition: HCALResponse.h:15
HCALResponse(const edm::ParameterSet &pset, const RandomEngine *engine)
Definition: HCALResponse.cc:16
const RandomEngine * random
Definition: HCALResponse.h:92
double eResponseCoefficient
Definition: HCALResponse.h:65
double eResponseScale[3]
HCAL response parameters.
Definition: HCALResponse.h:62
response responseHCAL(int mip, double energy, double eta, int partype)
double sigmaHD_mip[15][51]
Definition: HCALResponse.h:82
std::pair< double, double > response
Definition: HCALResponse.h:20
#define maxHDeta
Definition: HCALResponse.h:13
double sigmaHD_nomip[15][51]
Definition: HCALResponse.h:83
double eResponseExponent
Definition: HCALResponse.h:64
T eta() const
double eGridHD[15]
Definition: HCALResponse.h:75
double eGridEM[6]
Definition: HCALResponse.h:76
double muStep
Definition: HCALResponse.h:70
double getHFEnergyResolution(double EGen)
#define maxEMe
Definition: HCALResponse.h:14
#define maxMUbin
Definition: HCALResponse.h:18
double eResponseCorrection
Definition: HCALResponse.h:66
void interHD(int mip, double e, int ie, int ieta)
void interMU(double e, int ie, int ieta)
double etaGridMU[6]
Definition: HCALResponse.h:78
void interEM(double e, int ie, int ieta)
double meanHD[15][51]
Definition: HCALResponse.h:81
part
Definition: HCALResponse.h:21
double eGridMU[4]
Definition: HCALResponse.h:77
double meanEM[6][21]
Definition: HCALResponse.h:86
#define maxHDe
Definition: HCALResponse.h:12
double sigmaHD[15][51]
Definition: HCALResponse.h:81
double eBias
Definition: HCALResponse.h:67
double sigma
Definition: HCALResponse.h:72
double meanHD_mip[15][51]
Definition: HCALResponse.h:82
double responseMU[4][6][40]
Definition: HCALResponse.h:89
double getHCALEnergyResolution(double e, int hit)
double sigmaEM[6][21]
Definition: HCALResponse.h:86
#define maxMUe
Definition: HCALResponse.h:16
#define maxMUeta
Definition: HCALResponse.h:17
double eResponsePlateau[3]
Definition: HCALResponse.h:63
double meanHD_nomip[15][51]
Definition: HCALResponse.h:83