Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimCalorimetry
HcalSimAlgos
src
HcalSiPMShape.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/HcalSimAlgos/interface/HcalSiPMShape.h
"
2
3
#include <cmath>
4
5
HcalSiPMShape::HcalSiPMShape
() :
CaloVShape
(), nBins_(512), nt_(nBins_, 0.) {
6
computeShape
();
7
}
8
9
HcalSiPMShape::HcalSiPMShape
(
const
HcalSiPMShape
& other) :
10
CaloVShape
(other), nBins_(other.nBins_), nt_(other.nt_) {
11
}
12
13
double
HcalSiPMShape::operator ()
(
double
time
)
const
{
14
int
jtime =
static_cast<
int
>
(time + 0.5);
15
if
(jtime>=0 && jtime<
nBins_
)
16
return
nt_
[jtime];
17
return
0.;
18
}
19
20
void
HcalSiPMShape::computeShape
() {
21
22
double
norm
= 0.;
23
for
(
int
j
= 0;
j
<
nBins_
; ++
j
) {
24
if
(
j
<= 31.)
25
nt_
[
j
] = 2.15*
j
;
26
else
if
((
j
> 31) && (
j
<= 96))
27
nt_
[
j
] = 102.1 - 1.12*
j
;
28
else
29
nt_
[
j
] = 0.0076*
j
- 6.4;
30
norm += (
nt_
[
j
]>0) ?
nt_
[
j
] : 0.;
31
}
32
33
for
(
int
j
= 0;
j
<
nBins_
; ++
j
) {
34
nt_
[
j
] /=
norm
;
35
}
36
}
HcalSiPMShape
Definition:
HcalSiPMShape.h:8
HcalSiPMShape::operator()
virtual double operator()(double time) const
Definition:
HcalSiPMShape.cc:13
HcalSiPMShape.h
CaloVShape
Electronic response of the preamp.
Definition:
CaloVShape.h:11
HcalSiPMShape::nBins_
int nBins_
Definition:
HcalSiPMShape.h:24
HcalSiPMShape::nt_
std::vector< double > nt_
Definition:
HcalSiPMShape.h:25
cond::rpcobgas::time
Definition:
RPCObGasPyWrapper.cc:61
lumiNorm.norm
tuple norm
Definition:
lumiNorm.py:78
j
int j
Definition:
DBlmapReader.cc:9
HcalSiPMShape::computeShape
void computeShape()
Definition:
HcalSiPMShape.cc:20
HcalSiPMShape::HcalSiPMShape
HcalSiPMShape()
Definition:
HcalSiPMShape.cc:5
Generated for CMSSW Reference Manual by
1.8.5