9 #include "CLHEP/Random/RandGaussQ.h"
13 double samplingFactor,
17 bool doPhotostatistics,
20 const std::vector<double>& samplingFactors,
30 theDbService(nullptr),
31 theSiPMcharacteristics(nullptr),
32 theFirstRing(firstRing),
33 theSamplingFactors(samplingFactors),
34 theSiPMSmearing(
false),
44 theDbService(nullptr),
45 theFirstRing(p.getParameter<int>(
"firstRing")),
46 theSamplingFactors(p.getParameter<std::
vector<double> >(
"samplingFactors")),
47 theSiPMSmearing(p.getParameter<bool>(
"doSiPMSmearing")),
48 doTimeSmear_(p.getParameter<bool>(
"timeSmearing")),
49 theSiPMTau(p.getParameter<double>(
"sipmTau")),
50 threshold_currentTDC_(p.getParameter<double>(
"threshold_currentTDC")),
51 delayQIE_(p.getParameter<int>(
"delayQIE")) {
81 if (!gains || !gwidths) {
82 edm::LogError(
"HcalAmplifier") <<
"Could not fetch HCAL conditions for channel " << hcalGenDetId;
128 double smearsigma = 0;
141 if (energy2 != energy1)
142 smearsigma = sigma1 + ((sigma2 - sigma1) * (ampl - energy1) / (energy2 - energy1));
144 smearsigma = (sigma2 + sigma1) / 2.;
std::vector< float > sipmNonlinearity(const DetId &detId) const
const HcalSiPMCharacteristics * theSiPMcharacteristics
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
constexpr int ietaAbs() const
get the absolute value of the cell ieta
double fCtoGeV(const DetId &detId) const
int getType() const
get SiPM type
int pixels(const DetId &detId) const
Log< level::Error, false > LogError
float getValue(int fCapId) const
get value for capId = 0..3
Main class for Parameters in different subdetectors.
float getCrossTalk(int type) const
get cross talk
static const double GeV2fC
HcalTimeSmearSettings theSmearSettings
unsigned int signalShape(const DetId &detId) const
double timeSmearRMS(double ampl) const
double simHitToPhotoelectrons() const
const HcalMCParam * getHcalMCParam(const HcalGenericDetId &fId) const
std::vector< double > theSamplingFactors
virtual double samplingFactor(const DetId &detId) const
float getDarkCurrent() const
get dark current
void defaultTimeSmearing()
Log< level::Info, false > LogInfo
HcalSimParameters(double simHitToPhotoelectrons, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase, int firstRing, const std::vector< double > &samplingFactors, double sipmTau)
double sipmDarkCurrentuA(const DetId &detId) const
const HcalGain * getGain(const HcalGenericDetId &fId) const
const HcalSiPMCharacteristics * getHcalSiPMCharacteristics() const
std::vector< float > getNonLinearities(int type) const
get nonlinearity constants
unsigned int signalShape() const
void setDbService(const HcalDbService *service)
double sipmCrossTalk(const DetId &detId) const
const HcalDbService * theDbService
int getPixels(int type) const
get # of pixels
const HcalSiPMParameter * getHcalSiPMParameter(const HcalGenericDetId &fId) const
float getFCByPE() const
get fcByPE
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs