14 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug",1)),
18 stripLengthMode_(
true),
32 std::vector<uint32_t> inputDetIds;
54 unsigned int count = 0;
55 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >& DetInfos = reader->getAllData();
56 for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++) {
64 uint32_t detId = it->first;
66 unsigned short nApvs = it->second.nApvs;
70 double linearSlope = noiseStripLengthLinearSlope.get(sl);
71 double linearQuote = noiseStripLengthLinearQuote.get(sl);
72 double stripLength = it->second.stripLength;
73 for(
unsigned short j=0; j<nApvs; ++j ) {
77 for(
unsigned short stripId = 0; stripId < 128; ++stripId ) {
79 if( count<printDebug_ )
printLog(detId, stripId+128*j, noise);
80 obj->
setData(noise, theSiStripVector);
86 double meanN = meanNoise.get(sl);
87 double sigmaN = sigmaNoise.get(sl);
88 for(
unsigned short j=0; j<nApvs; ++j ) {
92 for(
unsigned short stripId = 0; stripId < 128; ++stripId ) {
93 noise = ( CLHEP::RandGauss::shoot(meanN, sigmaN) ) * gain;
95 if( count<printDebug_ )
printLog(detId, stripId+128*j, noise);
96 obj->
setData(noise, theSiStripVector);
102 if ( ! obj->
put(it->first,theSiStripVector) ) {
103 edm::LogError(
"SiStripNoisesFakeESSource::produce ")<<
" detid already exists"<<std::endl;
119 edm::LogError(
"SiStripNoiseNormalizedWithApvGainBuilder")<<
"Service is unavailable"<<std::endl;
std::pair< int, int > index
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static float getApvGain(uint16_t apv, const Range &range)
std::vector< uint16_t > InputVector
SiStripNoiseNormalizedWithApvGainBuilder(const edm::ParameterSet &iConfig)
static index getIndex(const TrackerTopology *tTopo, DetId id)
void getDetIds(std::vector< uint32_t > &DetIds_) 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
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)
cond::Time_t endOfTime() const
inputRange
Get input source.
cond::Time_t currentTime() const
const Range getRange(const uint32_t detID) const
T const * product() const
void setData(float noise_, InputVector &vped)
void analyze(const edm::Event &, const edm::EventSetup &) override