CMS 3D CMS Logo

HFRecalibration.cc
Go to the documentation of this file.
1 // File: HFRecalibration.cc
3 // Description: simple helper class containing parameterized
4 // function for HF damade recovery for Upgrade studies
5 // evaluated using SimG4CMS/Calo/ HFDarkening
7 
9 
10 // CMSSW Headers
12 
13 using namespace edm;
14 
16  //HFParsAB[Depth=0/1][A=0/B=1]
17  HFParsAB[0][0] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterA");
18  HFParsAB[0][1] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterB");
19  HFParsAB[1][0] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterA");
20  HFParsAB[1][1] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterB");
21 }
22 
24 
25 double HFRecalibration::getCorr(int ieta, int depth, double lumi) {
26  // parameterizations provided by James Wetzel
27 
28  ieta = (abs(ieta) - loweriEtaBin);
29 
30  if (ieta < 0 || ieta > 11 || depth < 1 || depth > 2) {
31  return 1.0;
32  }
33 
34  switch (depth) {
35  case 1:
36  reCalFactor = (1 + HFParsAB[0][0][ieta] * sqrt(lumi) + HFParsAB[0][1][ieta] * lumi);
37  break;
38  case 2:
39  reCalFactor = (1 + HFParsAB[1][0][ieta] * sqrt(lumi) + HFParsAB[1][1][ieta] * lumi);
40  }
41 
42  return reCalFactor;
43 }
std::vector< double > vecOfDoubles
HFRecalibration(const edm::ParameterSet &pset)
double getCorr(int ieta, int idepth, double lumi)
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HLT enums.