DataFormats
HcalCalibObjects
src
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
8
#include "
DataFormats/HcalCalibObjects/interface/HFRecalibration.h
"
9
10
// CMSSW Headers
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
13
14
using namespace
edm
;
15
16
HFRecalibration::HFRecalibration
(
const
edm::ParameterSet
&
pset
) {
17
//HFParsAB[Depth=0/1][A=0/B=1]
18
HFParsAB[0][0] =
pset
.getParameter<
vecOfDoubles
>(
"HFdepthOneParameterA"
);
19
HFParsAB[0][1] =
pset
.getParameter<
vecOfDoubles
>(
"HFdepthOneParameterB"
);
20
HFParsAB[1][0] =
pset
.getParameter<
vecOfDoubles
>(
"HFdepthTwoParameterA"
);
21
HFParsAB[1][1] =
pset
.getParameter<
vecOfDoubles
>(
"HFdepthTwoParameterB"
);
22
}
23
24
HFRecalibration::~HFRecalibration
() {}
25
26
double
HFRecalibration::getCorr
(
int
ieta
,
int
depth
,
double
lumi
) {
27
// parameterizations provided by James Wetzel
28
29
ieta
= (
abs
(
ieta
) - loweriEtaBin);
30
31
if
(ieta < 0 || ieta > 11 || depth < 1 || depth > 2) {
32
return
1.0;
33
}
34
35
switch
(
depth
) {
36
case
1:
37
reCalFactor = (1 + HFParsAB[0][0][
ieta
] *
sqrt
(
lumi
) + HFParsAB[0][1][
ieta
] *
lumi
);
38
break
;
39
case
2:
40
reCalFactor = (1 + HFParsAB[1][0][
ieta
] *
sqrt
(
lumi
) + HFParsAB[1][1][
ieta
] *
lumi
);
41
}
42
43
return
reCalFactor;
44
}
MessageLogger.h
HFRecalibration::~HFRecalibration
~HFRecalibration()
Definition:
HFRecalibration.cc:24
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:16
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:26
vecOfDoubles
std::vector< double > vecOfDoubles
Definition:
HFRecalibration.h:13
Generated for CMSSW Reference Manual by
1.8.16