52 #include "CLHEP/Random/RandGauss.h" 55 inline void printLog(
const uint32_t detId,
const unsigned short strip,
const double & noise)
57 edm::LogInfo(
"SiStripNoisesDummyCalculator") <<
"detid: " << detId <<
" strip: " << strip <<
" noise: " << noise;
64 findingRecord<SiStripNoisesRcd>();
68 if ( ! m_stripLengthMode ) {
99 auto noises = std::make_unique<SiStripNoises>();
103 for (
const auto& elm : reader->getAllData() ) {
112 const double stripLength{elm.second.stripLength};
113 for (
unsigned short j{0}; j < 128*elm.second.nApvs; ++j ) {
114 const float noise = (linearSlope*stripLength + linearQuote) /
m_noisePar0;
116 noises->setData(noise, theSiStripVector);
122 for (
unsigned short j{0}; j < 128*elm.second.nApvs; ++j ) {
125 noises->setData(noise, theSiStripVector);
130 if ( !
noises->put(elm.first, theSiStripVector) ) {
131 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())
std::unique_ptr< SiStripNoises > ReturnType
static const IOVSyncValue & beginOfTime()
const DepRecordT getRecord() const
~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
SiStripFakeAPVParameters m_noisePar2
T const * product() const