8 #include "CLHEP/Random/RandGaussQ.h"
12 double samplingFactor,
double timePhase,
14 bool doPhotostatistics,
bool syncPhase,
15 int firstRing,
const std::vector<double> & samplingFactors)
16 :
CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog[0], samplingFactor, timePhase,
17 readoutFrameSize, binOfMaximum, doPhotostatistics, syncPhase),
19 theFirstRing(firstRing),
20 theSamplingFactors(samplingFactors),
21 thePE2fCByRing(photoelectronsToAnalog),
23 theSiPMSmearing(
false),
32 theFirstRing( p.getParameter<int>(
"firstRing") ),
33 theSamplingFactors( p.getParameter<std::vector<double> >(
"samplingFactors") ),
34 thePE2fCByRing( p.getParameter<std::vector<double> >(
"photoelectronsToAnalog") ),
35 thePixels(0), theSiPMSmearing(
false),
36 doTimeSmear_( p.getParameter<bool>(
"timeSmearing"))
42 if (p.
exists(
"doSiPMSmearing"))
67 if (!gains || !gwidths )
69 edm::LogError(
"HcalAmplifier") <<
"Could not fetch HCAL conditions for channel " << hcalGenDetId;
95 static const double GeV2fC = 1.0/0.4;
130 if (energy2 != energy1)
131 smearsigma = sigma1 + ((sigma2-sigma1)*(ampl-energy1)/(energy2-energy1));
133 smearsigma = (sigma2+sigma1)/2.;
T getParameter(std::string const &) const
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
double fCtoGeV(const DetId &detId) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
float getValue(int fCapId) const
get value for capId = 0..3
Main class for Parameters in different subdetectors.
static const double GeV2fC
HcalTimeSmearSettings theSmearSettings
std::vector< double > thePE2fCByRing
double timeSmearRMS(double ampl) const
double simHitToPhotoelectrons() const
std::vector< double > theSamplingFactors
virtual double samplingFactor(const DetId &detId) const
void defaultTimeSmearing()
int ietaAbs() const
get the absolute value of the cell ieta
HcalSimParameters(double simHitToPhotoelectrons, const std::vector< double > &photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase, int firstRing, const std::vector< double > &samplingFactors)
const HcalGain * getGain(const HcalGenericDetId &fId) const
const HcalDbService * theDbService
volatile std::atomic< bool > shutdown_flag false
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs