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
13 
14 using namespace edm;
15 
17 {
18  //HFParsAB[Depth=0/1][A=0/B=1]
19  HFParsAB[0][0] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterA");
20  HFParsAB[0][1] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterB");
21  HFParsAB[1][0] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterA");
22  HFParsAB[1][1] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterB");
23 }
24 
26 { }
27 
28 double HFRecalibration::getCorr(int ieta, int depth, double lumi)
29 {
30 
31  // parameterizations provided by James Wetzel
32 
33  ieta = (abs(ieta) - loweriEtaBin);
34 
35  if (ieta < 0 || ieta > 11 || depth < 1 || depth > 2)
36  {
37  return 1.0;
38  }
39 
40  switch (depth)
41  {
42  case 1:
43  reCalFactor = (1 + HFParsAB[0][0][ieta] * sqrt(lumi) + HFParsAB[0][1][ieta] * lumi);
44 
45  case 2:
46  reCalFactor = (1 + HFParsAB[1][0][ieta] * sqrt(lumi) + HFParsAB[1][1][ieta] * lumi);
47  }
48 
49  return reCalFactor;
50 }
51 
52 
T getParameter(std::string const &) const
std::vector< double > vecOfDoubles
HFRecalibration(const edm::ParameterSet &pset)
double getCorr(int ieta, int idepth, double lumi)
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HLT enums.