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 CaloVSimParameterMap * theParameterMap
const CastorPedestal * getPedestal(const HcalGenericDetId &fId) const
const CastorDbService * theDbService
CastorAmplifier(const CaloVSimParameterMap *parameters, bool addNoise)
Main class for Parameters in different subdetectors.
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
virtual void amplify(CaloSamples &linearFrame) const
int size() const
get the size
const CastorPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
CLHEP::RandGaussQ * theRandGaussQ
DetId id() const
get the (generic) id
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs