33 : theDbService(0), theShapes(shapes),
34 theRandBinomial(0), theRandFlat(0), theRandGauss(0), theRandPoissonQ(0)
66 if(isInGeV) GeVperfC = 1./
fCtoGeV(detId);
68 double charge = signal / GeVperfC;
71 if (charge > 3. * pedWidth) {
74 double electronEmission = 0.08;
80 return (noise * GeVperfC);
87 double rateInTail = 0.000211988;
88 double rateInSecondTail = 4.61579e-06;
99 double p4 = 2.06117e+01;
100 double p5 = 1.09239e+01;
104 double p7 = 5.45548e+01;
105 double p8 = 1.59696e+01;
111 for (
int j = 0;
j < nFirst; ++
j) {
114 for (
int j = 0;
j < nSecond; ++
j) {
126 double meanPE = 0.02;
128 int nSamples = samples.
size();
130 for(
int i = 0;
i < nSamples; ++
i)
138 for(
int j =
i;
j < nSamples; ++
j)
140 double timeFromPE = (
j-
i) * 25.;
141 samples[
j] += (*shape)(timeFromPE) * npe;
154 if (!gains || !gwidths )
156 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