53 #include "CLHEP/Random/RandGauss.h" 56 inline void printLog(
const uint32_t detId,
const unsigned short strip,
const double & noise)
58 edm::LogInfo(
"SiStripNoisesDummyCalculator") <<
"detid: " << detId <<
" strip: " << strip <<
" noise: " << noise;
65 findingRecord<SiStripNoisesRcd>();
69 if ( ! m_stripLengthMode ) {
106 for (
const auto& elm :
reader.getAllData() ) {
115 const double stripLength{elm.second.stripLength};
116 for (
unsigned short j{0}; j < 128*elm.second.nApvs; ++j ) {
117 const float noise = (linearSlope*stripLength + linearQuote) /
m_noisePar0;
119 noises->setData(noise, theSiStripVector);
125 for (
unsigned short j{0}; j < 128*elm.second.nApvs; ++j ) {
128 noises->setData(noise, theSiStripVector);
133 if ( ! noises->put(elm.first, theSiStripVector) ) {
134 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists";
std::pair< int, int > index
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
std::vector< uint16_t > InputVector
static const IOVSyncValue & endOfTime()
static index getIndex(const TrackerTopology *tTopo, DetId id)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
const DepRecordT & getRecord() const
static const IOVSyncValue & beginOfTime()
~SiStripNoisesFakeESSource() override
double get(const index &idx) const
SiStripNoisesFakeESSource(const edm::ParameterSet &)
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
ReturnType produce(const SiStripNoisesRcd &)
SiStripFakeAPVParameters m_noisePar1
std::string fullPath() const
SiStripFakeAPVParameters m_noisePar2
std::shared_ptr< SiStripNoises > ReturnType
T const * product() const