Main Page
Namespaces
Classes
Package Documentation
SimCalorimetry
EcalSimAlgos
src
APDShape.cc
Go to the documentation of this file.
1
#include <cmath>
2
3
#include "
SimCalorimetry/EcalSimAlgos/interface/APDShape.h
"
4
5
#include<cassert>
6
7
void
8
APDShape::fillShape
(
float
&time_interval,
double
&m_thresh,
EcalShapeBase::DVec
& aVec,
const
edm::EventSetup
* es)
const
9
{
10
if
(
m_useDBShape
)
11
{
12
if
(es ==
nullptr
)
13
{
14
throw
cms::Exception
(
"EcalShapeBase:: DB conditions are not available, const edm::EventSetup* es == nullptr "
);
15
}
16
edm::ESHandle<EcalSimPulseShape>
esps;
17
es->
get
<
EcalSimPulseShapeRcd
>().
get
(esps);
18
19
aVec = esps->
apd_shape
;
20
time_interval = esps->
time_interval
;
21
m_thresh = esps->
apd_thresh
;
22
}
23
else
24
{
25
m_thresh = 0.0;
26
time_interval = 1.0;
27
aVec.reserve(500);
28
const
double
m_tStart=74.5;
29
const
double
m_tau=40.5;
30
31
for
(
unsigned
int
i
( 0 ) ;
i
!= 500 ; ++
i
)
32
{
33
const
double
ctime ( ( 1.*
i
+ 0.5 - m_tStart )/m_tau ) ;
34
double
val
= 0 > ctime ? 0 : ctime *
exp
( 1. - ctime );
35
aVec.push_back(val);
36
}
37
}
38
}
EcalShapeBase::m_useDBShape
bool m_useDBShape
Definition:
EcalShapeBase.h:54
mps_fire.i
i
Definition:
mps_fire.py:277
Exception
Definition:
hltDiff.cc:292
APDShape.h
APDShape::fillShape
void fillShape(float &time_interval, double &m_thresh, EcalShapeBase::DVec &aVec, const edm::EventSetup *es) const override
Definition:
APDShape.cc:8
EcalSimPulseShape::time_interval
float time_interval
Definition:
EcalSimPulseShape.h:23
edm::ESHandle
Definition:
DTSurvey.h:22
EcalShapeBase::DVec
std::vector< double > DVec
Definition:
EcalShapeBase.h:28
EcalSimPulseShapeRcd
Definition:
EcalSimPulseShapeRcd.h:5
edm::EventSetup
Definition:
EventSetup.h:54
EcalSimPulseShape::apd_shape
std::vector< double > apd_shape
Definition:
EcalSimPulseShape.h:18
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:68
EcalSimPulseShape::apd_thresh
double apd_thresh
Definition:
EcalSimPulseShape.h:22
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
heppy_batch.val
val
Definition:
heppy_batch.py:350
Generated for CMSSW Reference Manual by
1.8.11