32 : theDbService(0), theShapes(shapes),
33 theRandBinomial(0), theRandFlat(0), theRandGauss(0), theRandPoissonQ(0)
65 if(isInGeV) GeVperfC = 1./
fCtoGeV(detId);
67 double charge = signal / GeVperfC;
70 if (charge > 3. * pedWidth) {
73 double electronEmission = 0.08;
79 return (noise * GeVperfC);
86 double rateInTail = 0.000211988;
87 double rateInSecondTail = 4.61579e-06;
98 double p4 = 2.06117e+01;
99 double p5 = 1.09239e+01;
103 double p7 = 5.45548e+01;
104 double p8 = 1.59696e+01;
110 for (
int j = 0;
j < nFirst; ++
j) {
113 for (
int j = 0;
j < nSecond; ++
j) {
125 double meanPE = 0.02;
127 int nSamples = samples.
size();
129 for(
int i = 0;
i < nSamples; ++
i)
137 for(
int j =
i;
j < nSamples; ++
j)
139 double timeFromPE = (
j-
i) * 25.;
140 samples[
j] += (*shape)(timeFromPE) * npe;
153 if (!gains || !gwidths )
155 edm::LogError(
"HcalAmplifier") <<
"Could not fetch HCAL conditions for channel " << hcalGenDetId;
HPDIonFeedbackSim(const edm::ParameterSet &, const CaloShapes *shapes)
need a shaper in order to set thermal noise
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
void addThermalNoise(CaloSamples &samples)
CLHEP::RandGaussQ * theRandGauss
double fCtoGeV(const DetId &detId) const
CLHEP::RandFlat * theRandFlat
Electronic response of the preamp.
float getValue(int fCapId) const
get value for capId = 0..3
const HcalDbService * theDbService
virtual double correctPE(const DetId &detId, double npe) const
const T & max(const T &a, const T &b)
void setRandomEngine(CLHEP::HepRandomEngine &engine)
need a shaper in order to set thermal noise
CLHEP::RandBinomial * theRandBinomial
CLHEP::RandPoissonQ * theRandPoissonQ
int size() const
get the size
const HcalGain * getGain(const HcalGenericDetId &fId) const
const CaloShapes * theShapes
DetId id() const
get the (generic) id
double getIonFeedback(DetId detId, double signal, double pedWidth, bool doThermal, bool isInGeV)
virtual const CaloVShape * shape(const DetId &detId) const