src
CalibCalorimetry
HcalAlgos
src
HcalAlgoUtils.cc
Go to the documentation of this file.
1
#include "
CalibCalorimetry/HcalAlgos/interface/HcalAlgoUtils.h
"
2
#include <cmath>
3
4
void
getLinearizedADC
(
const
HcalQIEShape
&
shape
,
const
HcalQIECoder
* coder,
int
bins
,
int
capid,
float
& lo,
float
&
hi
) {
5
float
low
= coder->
charge
(
shape
, 0, capid);
6
float
high
= coder->
charge
(
shape
,
bins
- 1, capid);
7
float
step
= (
high
-
low
) / (
bins
- 1);
8
low
-=
step
/ 2.0;
9
high
+=
step
/ 2.0;
10
lo =
low
;
11
hi
=
high
;
12
return
;
13
}
14
15
float
maxDiff
(
float
one
,
float
two
,
float
three,
float
four) {
16
float
max
= -1000;
17
float
min
= 1000;
18
if
(
one
>
max
)
19
max
=
one
;
20
if
(
one
<
min
)
21
min
=
one
;
22
if
(
two
>
max
)
23
max
=
two
;
24
if
(
two
<
min
)
25
min
=
two
;
26
if
(three >
max
)
27
max
= three;
28
if
(three <
min
)
29
min
= three;
30
if
(four >
max
)
31
max
= four;
32
if
(four <
min
)
33
min
= four;
34
return
fabs(
max
-
min
);
35
}
LaserClient_cfi.high
high
Definition:
LaserClient_cfi.py:52
LaserClient_cfi.low
low
Definition:
LaserClient_cfi.py:54
l1trig_cff.shape
shape
Definition:
l1trig_cff.py:152
HcalAlgoUtils.h
one
maxDiff
float maxDiff(float one, float two, float three, float four)
Definition:
HcalAlgoUtils.cc:15
trigObjTnPSource_cfi.bins
bins
Definition:
trigObjTnPSource_cfi.py:20
getLinearizedADC
void getLinearizedADC(const HcalQIEShape &shape, const HcalQIECoder *coder, int bins, int capid, float &lo, float &hi)
Definition:
HcalAlgoUtils.cc:4
hi
Definition:
EPCuts.h:4
SiStripPI::min
Definition:
SiStripPayloadInspectorHelper.h:178
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:178
SiPixelPI::one
Definition:
SiPixelPayloadInspectorHelper.h:39
HcalQIEShape
Definition:
HcalQIEShape.h:17
SiPixelPI::two
Definition:
SiPixelPayloadInspectorHelper.h:39
HcalQIECoder
Definition:
HcalQIECoder.h:20
step
step
Definition:
StallMonitor.cc:98
HcalQIECoder::charge
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition:
HcalQIECoder.cc:20
Generated for CMSSW Reference Manual by
1.8.14