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 }
HFRecalibration::~HFRecalibration
~HFRecalibration()
Definition: HFRecalibration.cc:23
edm
HLT enums.
Definition: AlignableModifier.h:19
HFRecalibration.h
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
edm::ParameterSet
Definition: ParameterSet.h:47
HFRecalibration::HFRecalibration
HFRecalibration(const edm::ParameterSet &pset)
Definition: HFRecalibration.cc:15
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
lumi
Definition: LumiSectionData.h:20
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
HFRecalibration::getCorr
double getCorr(int ieta, int idepth, double lumi)
Definition: HFRecalibration.cc:25
vecOfDoubles
std::vector< double > vecOfDoubles
Definition: HFRecalibration.h:13