12 #include "CLHEP/Random/RandGaussQ.h" 18 theParameterMap(parameters),
30 if (!peds || !pwidths )
33 <<
"Could not fetch HCAL/CASTOR conditions for channel " << hcalGenDetId;
41 for (
int i = 0;
i < frame.
size();
i++) { gauss[
i] = CLHEP::RandGaussQ::shoot(engine, 0., 1.); }
45 for(
int tbin = 0; tbin < frame.
size(); ++tbin) {
47 double pedestal = peds->getValue (capId);
49 pedestal += noise [tbin];
51 frame[tbin] *= fCperPE;
55 LogDebug(
"CastorAmplifier") << frame;
unsigned theStartingCapId
const CastorPedestal * getPedestal(const HcalGenericDetId &fId) const
CastorAmplifier(const CastorSimParameterMap *parameters, bool addNoise)
const CastorSimParameterMap * theParameterMap
const CastorDbService * theDbService
double photoelectronsToAnalog(const DetId &detId) const override
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
CastorSimParameters castorParameters() const
accessors
virtual void amplify(CaloSamples &linearFrame, CLHEP::HepRandomEngine *) const
int size() const
get the size
const CastorPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
DetId id() const
get the (generic) id