11 Registry::iterator
p =
14 edm::LogError(
"SiStripThreshold") <<
"[" << __PRETTY_FUNCTION__ <<
"] SiStripThreshold for DetID " <<
DetId 15 <<
" is already stored. Skipping this put" << std::endl;
19 SiStripThreshold::Container::iterator new_end =
compact(vect);
21 size_t sd = new_end - vect.begin();
53 DetIds_.push_back(
p->detid);
64 const uint16_t&
strip,
const float& lTh,
const float& hTh,
const float& cTh,
Container& vthr) {
66 a.encode(
strip, lTh, hTh, cTh);
77 throw cms::Exception(
"CorruptedData") <<
"[SiStripThreshold::getData] asking for data for a strip " <<
strip 78 <<
" lower then the first stored strip " <<
p->getFirstStrip();
83 std::vector<float>& highThs,
86 size_t strips = lowThs.size();
88 while (it !=
range.second) {
89 size_t firstStrip = it->getFirstStrip();
91 float high = it->getHth(),
low = it->getLth();
94 size_t lastStrip = (it ==
range.second ?
strips : it->getFirstStrip());
100 std::fill(&lowThs[firstStrip], &lowThs[lastStrip],
low);
108 for (; rit != erit; ++rit) {
111 ss <<
"\ndetid: " << rit->detid <<
" \t ";
112 for (; it != eit; ++it) {
122 float meanLth, meanHth, meanCth;
123 float rmsLth, rmsHth, rmsCth;
124 float maxLth, maxHth, maxCth;
125 float minLth, minHth, minCth;
127 uint16_t firstStrip, stripRange;
128 for (; rit != erit; ++rit) {
131 ss <<
"\ndetid: " << rit->detid <<
" \t ";
147 for (; it != eit; ++it) {
149 firstStrip = it->getFirstStrip();
151 stripRange = (itp->getFirstStrip() - firstStrip);
159 addToStat(it->getLth(), stripRange, meanLth, rmsLth, minLth, maxLth);
160 addToStat(it->getHth(), stripRange, meanHth, rmsHth, minHth, maxHth);
161 addToStat(it->getClusth(), stripRange, meanCth, rmsCth, minCth, maxCth);
167 rmsLth =
sqrt(rmsLth /
n - meanLth * meanLth);
168 rmsHth =
sqrt(rmsHth /
n - meanHth * meanHth);
169 rmsCth =
sqrt(rmsCth /
n - meanCth * meanCth);
170 ss <<
"\nn " <<
n <<
" \tmeanLth " << meanLth <<
" \t rmsLth " << rmsLth <<
" \t minLth " << minLth <<
" \t maxLth " 172 ss <<
"\n\tmeanHth " << meanHth <<
" \t rmsHth " << rmsHth <<
" \t minHth " << minHth <<
" \t maxHth " << maxHth;
173 ss <<
"\n\tmeanCth " << meanCth <<
" \t rmsCth " << rmsCth <<
" \t minCth " << minCth <<
" \t maxCth " << maxCth;
static const uint32_t FirstThStripShift_
bool put(const uint32_t &detID, const InputVector &vect)
Container::iterator compact(Container &input)
void allThresholds(std::vector< float > &lowThs, std::vector< float > &highThs, const Range &range) const
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints mean, rms, min and max threshold values for each DetId.
Log< level::Error, false > LogError
static std::string const input
std::vector< Data > Container
def unique(seq, keepstr=True)
void addToStat(float value, uint16_t &range, float &sum, float &sum2, float &min, float &max) const
std::pair< ContainerIterator, ContainerIterator > Range
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints all the thresholds for all DetIds.
static const uint32_t HighThStripMask_
void setData(const uint16_t &strip, const float &lTh, const float &hTh, Container &vthr)
const Range getRange(const uint32_t &detID) const
static const uint32_t FirstThStripMask_
RegistryIterator getRegistryVectorEnd() const
Registry::const_iterator RegistryIterator
ContainerIterator getDataVectorBegin() const
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
void getDetIds(std::vector< uint32_t > &DetIds_) const
RegistryIterator getRegistryVectorBegin() const
Container::const_iterator ContainerIterator