test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimCalorimetry
CaloSimAlgos
src
CaloCachedShapeIntegrator.cc
Go to the documentation of this file.
1
#include "
SimCalorimetry/CaloSimAlgos/interface/CaloCachedShapeIntegrator.h
"
2
3
const
int
NBINS
= 281;
// 256, plus 25 before
4
5
CaloCachedShapeIntegrator::CaloCachedShapeIntegrator
(
const
CaloVShape
* aShape ) :
6
v_(
NBINS
, 0.),
7
timeToRise_(aShape->timeToRise())
8
{
9
for
(
int
t
= 0;
t
< 256; ++
t
)
10
{
11
double
amount = (*aShape)(
t
);
12
for
(
int
istep = 0; istep < 25; ++istep)
13
{
14
int
ibin =
t
+ istep;
15
v_
[ibin] += amount;
16
}
17
}
18
}
19
20
CaloCachedShapeIntegrator::~CaloCachedShapeIntegrator
()
21
{
22
}
23
24
double
25
CaloCachedShapeIntegrator::timeToRise
()
const
26
{
27
return
timeToRise_
;
28
}
29
30
double
31
CaloCachedShapeIntegrator::operator()
(
double
startTime )
const
32
{
33
// round up, and account for the -25 ns offset
34
int
ibin =
static_cast<
int
>
(startTime+25.0);
35
return
(ibin<0 || ibin >=
NBINS
) ? 0. :
v_
[ibin];
36
}
37
38
CaloCachedShapeIntegrator.h
lumiQTWidget.t
tuple t
Definition:
lumiQTWidget.py:50
CaloCachedShapeIntegrator::CaloCachedShapeIntegrator
CaloCachedShapeIntegrator(const CaloVShape *aShape)
Definition:
CaloCachedShapeIntegrator.cc:5
CaloVShape
Electronic response of the preamp.
Definition:
CaloVShape.h:11
CaloCachedShapeIntegrator::v_
std::vector< double > v_
Definition:
CaloCachedShapeIntegrator.h:25
CaloCachedShapeIntegrator::~CaloCachedShapeIntegrator
virtual ~CaloCachedShapeIntegrator()
Definition:
CaloCachedShapeIntegrator.cc:20
CaloCachedShapeIntegrator::timeToRise_
double timeToRise_
Definition:
CaloCachedShapeIntegrator.h:26
CaloCachedShapeIntegrator::operator()
virtual double operator()(double startTime) const
Definition:
CaloCachedShapeIntegrator.cc:31
NBINS
const int NBINS
Definition:
CaloCachedShapeIntegrator.cc:3
CaloCachedShapeIntegrator::timeToRise
virtual double timeToRise() const
Definition:
CaloCachedShapeIntegrator.cc:25
Generated for CMSSW Reference Manual by
1.8.5