|
|
Go to the documentation of this file.
11 Registry::iterator
p =
14 edm::LogError(
"SiStripThreshold") <<
"[" << __PRETTY_FUNCTION__ <<
"] SiStripThreshold for DetID " <<
DetId
15 <<
" is already stored. Skippig 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;
void allThresholds(std::vector< float > &lowThs, std::vector< float > &highThs, const Range &range) const
static const std::string input
Container::iterator compact(Container &input)
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints all the thresholds for all DetIds.
RegistryIterator getRegistryVectorEnd() const
void getDetIds(std::vector< uint32_t > &DetIds_) const
std::vector< Data > Container
Registry::const_iterator RegistryIterator
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
Prints mean, rms, min and max threshold values for each DetId.
void addToStat(float value, uint16_t &range, float &sum, float &sum2, float &min, float &max) const
__host__ constexpr __device__ RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
ContainerIterator getDataVectorBegin() const
const Range getRange(const uint32_t &detID) const
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
bool put(const uint32_t &detID, const InputVector &vect)
std::pair< ContainerIterator, ContainerIterator > Range
RegistryIterator getRegistryVectorBegin() const
static const uint32_t HighThStripMask_
def unique(seq, keepstr=True)
static const uint32_t FirstThStripShift_
Container::const_iterator ContainerIterator
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
void setData(const uint16_t &strip, const float &lTh, const float &hTh, Container &vthr)
static const uint32_t FirstThStripMask_