56 #include "CLHEP/Random/RandGauss.h" 59 inline void printLog(
const uint32_t detId,
const unsigned short strip,
const double&
noise) {
60 edm::LogInfo(
"SiStripNoisesDummyCalculator") <<
"detid: " << detId <<
" strip: " << strip <<
" noise: " <<
noise;
66 findingRecord<SiStripNoisesRcd>();
70 if (!m_stripLengthMode) {
102 auto noises = std::make_unique<SiStripNoises>();
114 const double stripLength{elm.second.stripLength};
115 for (
unsigned short j{0};
j < 128 * elm.second.nApvs; ++
j) {
116 const float noise = (linearSlope * stripLength + linearQuote) /
m_noisePar0;
118 printLog(elm.first,
j, noise);
119 noises->setData(noise, theSiStripVector);
125 for (
unsigned short j{0};
j < 128 * elm.second.nApvs; ++
j) {
128 printLog(elm.first,
j, noise);
129 noises->setData(noise, theSiStripVector);
134 if (!
noises->put(elm.first, theSiStripVector)) {
135 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists";
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
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()
std::pair< int, int > index
SiStripDetInfoFileReader m_detInfoFileReader
static index getIndex(const TrackerTopology *tTopo, DetId id)
std::unique_ptr< SiStripNoises > ReturnType
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static const IOVSyncValue & beginOfTime()
~SiStripNoisesFakeESSource() override
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_tTopoToken
double get(const index &idx) const
SiStripNoisesFakeESSource(const edm::ParameterSet &)
ReturnType produce(const SiStripNoisesRcd &)
SiStripFakeAPVParameters m_noisePar1
const std::map< uint32_t, DetInfo > & getAllData() const
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
SiStripFakeAPVParameters m_noisePar2