SimCalorimetry
CaloSimAlgos
src
CaloSimParameters.cc
Go to the documentation of this file.
1
#include "
FWCore/Utilities/interface/Exception.h
"
2
#include "
SimCalorimetry/CaloSimAlgos/interface/CaloSimParameters.h
"
3
#include <iostream>
4
5
CaloSimParameters::CaloSimParameters
(
double
simHitToPhotoelectrons
,
6
double
photoelectronsToAnalog
,
7
double
samplingFactor
,
8
double
timePhase
,
9
int
readoutFrameSize
,
10
int
binOfMaximum
,
11
bool
doPhotostatistics
,
12
bool
syncPhase
)
13
: simHitToPhotoelectrons_(
simHitToPhotoelectrons
),
14
photoelectronsToAnalog_(
photoelectronsToAnalog
),
15
timePhase_(
timePhase
),
16
readoutFrameSize_(
readoutFrameSize
),
17
binOfMaximum_(
binOfMaximum
),
18
doPhotostatistics_(
doPhotostatistics
),
19
syncPhase_(
syncPhase
) {}
20
21
CaloSimParameters::CaloSimParameters
(
const
edm::ParameterSet
&
p
,
bool
skipPe2Fc)
22
: simHitToPhotoelectrons_(
p
.getParameter<double>(
"simHitToPhotoelectrons"
)),
23
photoelectronsToAnalog_(0.),
24
timePhase_(
p
.getParameter<double>(
"timePhase"
)),
25
readoutFrameSize_(
p
.getParameter<
int
>(
"readoutFrameSize"
)),
26
binOfMaximum_(
p
.getParameter<
int
>(
"binOfMaximum"
)),
27
doPhotostatistics_(
p
.getParameter<
bool
>(
"doPhotoStatistics"
)),
28
syncPhase_(
p
.getParameter<
bool
>(
"syncPhase"
)) {
29
// some subsystems may not want a single number for this
30
if
(
p
.existsAs<
double
>(
"photoelectronsToAnalog"
)) {
31
photoelectronsToAnalog_
=
p
.getParameter<
double
>(
"photoelectronsToAnalog"
);
32
}
else
if
(
p
.existsAs<std::vector<double>>(
"photoelectronsToAnalog"
)) {
33
// just take the first one
34
photoelectronsToAnalog_
=
p
.getParameter<std::vector<double>>(
"photoelectronsToAnalog"
).at(0);
35
}
else
if
(!skipPe2Fc) {
36
throw
cms::Exception
(
"CaloSimParameters"
) <<
"Cannot find parameter photoelectronsToAnalog"
;
37
}
38
// some subsystems may not want this at all
39
}
40
41
std::ostream &
operator<<
(std::ostream &os,
const
CaloSimParameters
&
p
) {
42
DetId
dummy
(0);
43
os <<
"CALO SIM PARAMETERS"
<< std::endl;
44
os <<
p
.simHitToPhotoelectrons(
dummy
) <<
" pe per SimHit energy "
<< std::endl;
45
os <<
p
.photoelectronsToAnalog() <<
" Analog signal to be digitized per pe"
<< std::endl;
46
os <<
" Incident energy / SimHit Energy "
<< std::endl;
47
return
os;
48
}
operator<<
std::ostream & operator<<(std::ostream &os, const CaloSimParameters &p)
Definition:
CaloSimParameters.cc:41
electrons_cff.bool
bool
Definition:
electrons_cff.py:393
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition:
ecalSimParameterMap_cff.py:10
CaloSimParameters::photoelectronsToAnalog_
double photoelectronsToAnalog_
Definition:
CaloSimParameters.h:62
hcalSimParameters_cfi.simHitToPhotoelectrons
simHitToPhotoelectrons
Definition:
hcalSimParameters_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
ecalSimParameterMap_cff.samplingFactor
samplingFactor
Definition:
ecalSimParameterMap_cff.py:7
CaloSimParameters.h
CaloSimParameters::CaloSimParameters
CaloSimParameters(double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase=true)
Definition:
CaloSimParameters.cc:5
DetId
Definition:
DetId.h:17
hcalSimParameters_cfi.readoutFrameSize
readoutFrameSize
Definition:
hcalSimParameters_cfi.py:14
CaloSimParameters
Main class for Parameters in different subdetectors.
Definition:
CaloSimParameters.h:14
edm::ParameterSet
Definition:
ParameterSet.h:47
createfilelist.int
int
Definition:
createfilelist.py:10
ecalSimParameterMap_cff.timePhase
timePhase
Definition:
ecalSimParameterMap_cff.py:8
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition:
ecalEBTriggerPrimitiveDigis_cfi.py:9
ecalSimParameterMap_cff.doPhotostatistics
doPhotostatistics
Definition:
ecalSimParameterMap_cff.py:11
Exception
Definition:
hltDiff.cc:246
hcalSimParameters_cfi.photoelectronsToAnalog
photoelectronsToAnalog
Definition:
hcalSimParameters_cfi.py:18
Exception.h
dummy
Definition:
DummySelector.h:38
Generated for CMSSW Reference Manual by
1.8.16