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;
65 : m_tTopoToken(setWhatProduced(this).consumes()) {
66 findingRecord<SiStripNoisesRcd>();
101 auto noises = std::make_unique<SiStripNoises>();
113 const double stripLength{elm.second.stripLength};
114 for (
unsigned short j{0};
j < 128 * elm.second.nApvs; ++
j) {
115 const float noise = (linearSlope * stripLength + linearQuote) /
m_noisePar0;
117 printLog(elm.first,
j,
noise);
124 for (
unsigned short j{0};
j < 128 * elm.second.nApvs; ++
j) {
127 printLog(elm.first,
j,
noise);
133 if (!
noises->put(elm.first, theSiStripVector)) {
134 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists";
T getParameter(std::string const &) const
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
std::string fullPath() const
std::vector< uint16_t > InputVector
static const IOVSyncValue & endOfTime()
std::pair< int, int > index
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_tTopoToken
static index getIndex(const TrackerTopology *tTopo, DetId id)
Log< level::Error, false > LogError
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< SiStripNoises > ReturnType
double get(const index &idx) const
static const IOVSyncValue & beginOfTime()
~SiStripNoisesFakeESSource() override
SiStripDetInfo read(std::string filePath)
SiStripNoisesFakeESSource(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
ReturnType produce(const SiStripNoisesRcd &)
const std::map< uint32_t, DetInfo > & getAllData() const noexcept
SiStripFakeAPVParameters m_noisePar1
SiStripFakeAPVParameters m_noisePar2
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const