src
CalibCalorimetry
CastorCalib
src
CastorAlgoUtils.cc
Go to the documentation of this file.
1
#include "
CalibCalorimetry/CastorCalib/interface/CastorAlgoUtils.h
"
2
#include <cmath>
3
4
namespace
reco
{
5
namespace
castor
{
6
7
void
getLinearizedADC
(
8
const
CastorQIEShape
&
shape
,
const
CastorQIECoder
* coder,
int
bins
,
int
capid,
float
& lo,
float
&
hi
) {
9
float
low
= coder->
charge
(
shape
, 0, capid);
10
float
high
= coder->
charge
(
shape
,
bins
- 1, capid);
11
float
step
= (
high
-
low
) / (
bins
- 1);
12
low
-=
step
/ 2.0;
13
high
+=
step
/ 2.0;
14
lo =
low
;
15
hi
=
high
;
16
return
;
17
}
18
19
float
maxDiff
(
float
one
,
float
two
,
float
three,
float
four) {
20
float
max
= -1000;
21
float
min
= 1000;
22
if
(
one
>
max
)
23
max
=
one
;
24
if
(
one
<
min
)
25
min
=
one
;
26
if
(
two
>
max
)
27
max
=
two
;
28
if
(
two
<
min
)
29
min
=
two
;
30
if
(three >
max
)
31
max
= three;
32
if
(three <
min
)
33
min
= three;
34
if
(four >
max
)
35
max
= four;
36
if
(four <
min
)
37
min
= four;
38
return
fabs(
max
-
min
);
39
}
40
41
}
// namespace castor
42
}
// namespace reco
CastorQIECoder::charge
float charge(const CastorQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition:
CastorQIECoder.cc:17
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
one
CastorQIECoder
Definition:
CastorQIECoder.h:21
trigObjTnPSource_cfi.bins
bins
Definition:
trigObjTnPSource_cfi.py:20
CastorQIEShape
Definition:
CastorQIEShape.h:14
hi
Definition:
EPCuts.h:4
reco::castor::getLinearizedADC
void getLinearizedADC(const CastorQIEShape &shape, const CastorQIECoder *coder, int bins, int capid, float &lo, float &hi)
Definition:
CastorAlgoUtils.cc:7
SiStripPI::min
Definition:
SiStripPayloadInspectorHelper.h:178
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:178
SiPixelPI::one
Definition:
SiPixelPayloadInspectorHelper.h:39
castorDigitizer_cfi.castor
castor
Definition:
castorDigitizer_cfi.py:9
SiPixelPI::two
Definition:
SiPixelPayloadInspectorHelper.h:39
reco::castor::maxDiff
float maxDiff(float one, float two, float three, float four)
Definition:
CastorAlgoUtils.cc:19
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
step
step
Definition:
StallMonitor.cc:83
CastorAlgoUtils.h
Generated for CMSSW Reference Manual by
1.8.14