12 #include "CLHEP/Random/RandGaussQ.h" 18 : theDbService(nullptr), theParameterMap(
parameters), theStartingCapId(0), addNoise_(addNoise) {}
26 if (!peds || !pwidths) {
27 edm::LogError(
"CastorAmplifier") <<
"Could not fetch HCAL/CASTOR conditions for channel " << hcalGenDetId;
32 double nominalfCperPE =
parameters.getNominalfCperPE();
34 for (
int i = 0;
i <
frame.size();
i++) {
35 gauss[
i] = CLHEP::RandGaussQ::shoot(engine, 0., 1.);
40 for (
int tbin = 0; tbin <
frame.size(); ++tbin) {
42 double pedestal = peds->getValue(capId);
46 frame[tbin] *= fCperPE;
unsigned theStartingCapId
CastorAmplifier(const CastorSimParameterMap *parameters, bool addNoise)
const CastorSimParameterMap * theParameterMap
const CastorDbService * theDbService
virtual void amplify(CaloSamples &linearFrame, CLHEP::HepRandomEngine *) const
Log< level::Error, false > LogError
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
const CastorPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
const CastorPedestal * getPedestal(const HcalGenericDetId &fId) const
CastorSimParameters castorParameters() const
accessors