Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
CondFormats
CastorObjects
src
CastorCalibrationQIECoder.cc
Go to the documentation of this file.
1
8
#include <iostream>
9
10
#include "
CondFormats/CastorObjects/interface/CastorQIEShape.h
"
11
#include "
CondFormats/CastorObjects/interface/CastorCalibrationQIECoder.h
"
12
13
float
CastorCalibrationQIECoder::charge
(
unsigned
fAdc)
const
{
14
const
float
*
data
=
base
();
15
if
(fAdc >= 31)
16
return
(3 *
data
[31] -
data
[30]) / 2.;
// extrapolation
17
return
(
data
[fAdc] +
data
[fAdc + 1]) / 2;
18
}
19
20
unsigned
CastorCalibrationQIECoder::adc
(
float
fCharge)
const
{
21
const
float
*
data
=
base
();
22
unsigned
adc
= 1;
23
for
(;
adc
< 32;
adc
++) {
24
if
(fCharge <
data
[
adc
])
25
return
adc
- 1;
26
}
27
return
31;
// overflow
28
}
29
30
float
CastorCalibrationQIECoder::minCharge
(
unsigned
fBin)
const
{
31
const
float
*
data
=
base
();
32
return
fBin < 32 ?
data
[fBin] :
data
[31];
33
}
34
35
const
float
*
CastorCalibrationQIECoder::minCharges
()
const
{
36
const
float
*
data
=
base
();
37
return
data
;
38
}
39
40
void
CastorCalibrationQIECoder::setMinCharge
(
unsigned
fBin,
float
fValue) {
41
float
*
data
=
base
();
42
if
(fBin < 32)
43
data
[fBin] = fValue;
44
}
45
46
void
CastorCalibrationQIECoder::setMinCharges
(
const
float
fValue[32]) {
47
float
*
data
=
base
();
48
for
(
int
i
= 0;
i
< 32;
i
++)
49
data
[
i
] = fValue[
i
];
50
}
mps_fire.i
i
Definition:
mps_fire.py:428
CastorCalibrationQIECoder::base
const float * base() const
Definition:
CastorCalibrationQIECoder.h:67
CastorCalibrationQIECoder::setMinCharges
void setMinCharges(const float fValue[32])
Definition:
CastorCalibrationQIECoder.cc:46
CastorCalibrationQIECoder::minCharge
float minCharge(unsigned fBin) const
Definition:
CastorCalibrationQIECoder.cc:30
CastorCalibrationQIECoder::adc
unsigned adc(const float fCharge) const
fC -> ADC conversion
Definition:
CastorCalibrationQIECoder.cc:20
CastorCalibrationQIECoder::setMinCharge
void setMinCharge(unsigned fBin, float fValue)
Definition:
CastorCalibrationQIECoder.cc:40
CastorCalibrationQIECoder::charge
float charge(const unsigned fAdc) const
ADC [0..31] -> fC conversion.
Definition:
CastorCalibrationQIECoder.cc:13
CastorCalibrationQIECoder.h
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
CastorQIEShape.h
CastorCalibrationQIECoder::minCharges
const float * minCharges() const
Definition:
CastorCalibrationQIECoder.cc:35
Generated for CMSSW Reference Manual by
1.8.16