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),
31 theFirstRing( p.getParameter<int>(
"firstRing") ),
32 theSamplingFactors( p.getParameter<std::vector<double> >(
"samplingFactors") ),
33 thePE2fCByRing( p.getParameter<std::vector<double> >(
"photoelectronsToAnalog") ),
35 doTimeSmear_( p.getParameter<bool>(
"timeSmearing"))
64 if (!gains || !gwidths )
66 edm::LogError(
"HcalAmplifier") <<
"Could not fetch HCAL conditions for channel " << hcalGenDetId;
92 static const double GeV2fC = 1.0/0.4;
127 if (energy2 != energy1)
128 smearsigma = sigma1 + ((sigma2-sigma1)*(ampl-energy1)/(energy2-energy1));
130 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
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs