1 #ifndef SiStripThreshold_h
2 #define SiStripThreshold_h
7 #include<boost/cstdint.hpp>
44 inline void encode (
const uint16_t& strip,
const float& lTh,
const float& hTh) {
54 inline void encode (
const uint16_t& strip,
const float& lTh,
const float& hTh,
const float& cTh) {
56 clusTh=(uint8_t)(cTh*10+.5);
68 <<
"lTh: " <<
" " <<
getLth() <<
" \t"
69 <<
"hTh: " <<
" " <<
getHth() <<
" \t"
70 <<
"cTh: " <<
" " <<
getClusth() <<
" \t";}
97 typedef std::pair<ContainerIterator, ContainerIterator>
Range;
111 void getDetIds(std::vector<uint32_t>& DetIds_)
const;
119 void setData(
const uint16_t& strip,
const float& lTh,
const float& hTh,
Container& vthr);
120 void setData(
const uint16_t& strip,
const float& lTh,
const float& hTh,
const float& cTh,
Container& vthr);
123 void allThresholds(std::vector<float> &lowThs, std::vector<float> &highThs,
const Range& range)
const;
133 void addToStat(
float value, uint16_t& range,
float& sum,
float& sum2,
float&
min,
float&
max)
const;
static const uint32_t FirstThStripShift_
bool put(const uint32_t &detID, const InputVector &vect)
Container::iterator compact(Container &input)
std::vector< DetRegistry > Registry
ContainerIterator getDataVectorBegin() const
bool operator<(const Data &d) const
void allThresholds(std::vector< float > &lowThs, std::vector< float > &highThs, const Range &range) const
ContainerIterator getDataVectorEnd() const
void encode(const uint16_t &strip, const float &lTh, const float &hTh, const float &cTh)
std::vector< Data > Container
uint16_t FirstStrip_and_Hth
const T & max(const T &a, const T &b)
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
RegistryIterator getRegistryVectorBegin() const
uint16_t getFirstStrip() const
void encode(const uint16_t &strip, const float &lTh, const float &hTh)
void print(std::stringstream &ss) const
void printDebug(std::stringstream &ss) const
Prints all the thresholds for all DetIds.
std::pair< ContainerIterator, ContainerIterator > Range
static const uint32_t HighThStripMask_
void getDetIds(std::vector< uint32_t > &DetIds_) const
bool operator()(const DetRegistry &p, const uint32_t &i) const
static const uint32_t LowThStripMask_
SiStripThreshold(const SiStripThreshold &orig)
void setData(const uint16_t &strip, const float &lTh, const float &hTh, Container &vthr)
void printSummary(std::stringstream &ss) const
Prints mean, rms, min and max threshold values for each DetId.
virtual ~SiStripThreshold()
static const uint32_t FirstThStripMask_
Registry::const_iterator RegistryIterator
bool operator==(const Data &d) const
void addToStat(float value, uint16_t &range, float &sum, float &sum2, float &min, float &max) const
bool operator()(const uint16_t &i, const Data &p) const
const Range getRange(const uint32_t &detID) const
RegistryIterator getRegistryVectorEnd() const
Container::const_iterator ContainerIterator