17 theParameterMap(parameters),
35 if (!peds || !pwidths )
37 edm::LogError(
"CastorAmplifier") <<
"Could not fetch HCAL/CASTOR conditions for channel " << hcalGenDetId;
46 for(
int tbin = 0; tbin < frame.
size(); ++tbin) {
48 double pedestal = peds->getValue (capId);
50 pedestal += noise [tbin];
52 frame[tbin] *= fCperPE;
53 frame[tbin] += pedestal;
55 LogDebug(
"CastorAmplifier") << frame;
void setRandomEngine(CLHEP::HepRandomEngine &engine)
unsigned theStartingCapId
const CastorPedestal * getPedestal(const HcalGenericDetId &fId) const
CastorAmplifier(const CastorSimParameterMap *parameters, bool addNoise)
const CastorSimParameterMap * theParameterMap
const CastorDbService * theDbService
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
CastorSimParameters castorParameters() const
accessors
virtual void amplify(CaloSamples &linearFrame) const
int size() const
get the size
const CastorPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
CLHEP::RandGaussQ * theRandGaussQ
virtual double photoelectronsToAnalog(const DetId &detId) const
DetId id() const
get the (generic) id