13 : printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug", 1)),
17 stripLengthMode_(
true),
19 tTopoToken_ = esConsumes<TrackerTopology, TrackerTopologyRcd>();
20 tGeomToken_ = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>();
29 std::vector<uint32_t> inputDetIds;
30 inputApvGain.getDetIds(inputDetIds);
49 unsigned int count = 0;
50 for (
const auto det : tGeom.detUnits()) {
52 if (stripDet !=
nullptr) {
65 double linearSlope = noiseStripLengthLinearSlope.get(sl);
66 double linearQuote = noiseStripLengthLinearQuote.get(sl);
68 for (
unsigned short j = 0;
j < nApvs; ++
j) {
71 for (
unsigned short stripId = 0; stripId < 128; ++stripId) {
73 if (count < printDebug_)
74 printLog(detId, stripId + 128 *
j, noise);
75 obj->
setData(noise, theSiStripVector);
80 double meanN = meanNoise.get(sl);
81 double sigmaN = sigmaNoise.get(sl);
82 for (
unsigned short j = 0;
j < nApvs; ++
j) {
85 for (
unsigned short stripId = 0; stripId < 128; ++stripId) {
86 noise = (CLHEP::RandGauss::shoot(meanN, sigmaN)) * gain;
89 if (count < printDebug_)
90 printLog(detId, stripId + 128 *
j, noise);
91 obj->
setData(noise, theSiStripVector);
97 if (!obj->
put(detId, theSiStripVector)) {
98 edm::LogError(
"SiStripNoisesFakeESSource::produce ") <<
" detid already exists" << std::endl;
114 edm::LogError(
"SiStripNoiseNormalizedWithApvGainBuilder") <<
"Service is unavailable" << std::endl;
edm::ESGetToken< SiStripApvGain, SiStripApvGainRcd > inputApvGainToken_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual float stripLength() const =0
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< uint16_t > InputVector
SiStripNoiseNormalizedWithApvGainBuilder(const edm::ParameterSet &iConfig)
std::pair< int, int > index
static index getIndex(const TrackerTopology *tTopo, DetId id)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
bool getData(T &iHolder) const
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
std::pair< ContainerIterator, ContainerIterator > Range
DetId geographicalId() const
The label of this GeomDet.
void printLog(const uint32_t detId, const unsigned short strip, const double &noise) const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
bool put(const uint32_t &detID, const InputVector &input)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
virtual int nstrips() const =0
cond::Time_t endOfTime() const
cond::Time_t currentTime() const
void setData(float noise_, InputVector &vped)
void analyze(const edm::Event &, const edm::EventSetup &) override