35 typename std::vector<T>::iterator fs,
ls;
37 std::vector<std::pair<float, float> > subset;
42 uint16_t
APV = firstAPV;
43 for (; APV < digis.size() / 128 + firstAPV; ++
APV) {
46 for (uint16_t istrip = APV * 128; istrip < (APV + 1) * 128; ++istrip) {
48 std::pair<float, float> pin((
float)digis[istrip - firstAPV * 128],
50 subset.push_back(pin);
61 std::vector<std::pair<float, float> >::iterator si = subset.begin();
62 while (si != subset.end()) {
64 si = subset.erase(si);
73 _vmedians.push_back(std::pair<short, float>(APV, offset));
76 fs = digis.begin() + (APV - firstAPV) * 128;
77 ls = digis.begin() + (APV - firstAPV + 1) * 128;
79 *fs =
static_cast<T>(*fs -
offset);
86 std::vector<std::pair<float, float> >::iterator mid =
sample.begin() +
sample.size() / 2;
90 return ((*std::max_element(
sample.begin(), mid)).first + (*mid).first) / 2.;
bool IsStripBad(const uint32_t &detid, const short &strip) const
static float getNoiseFast(const uint16_t &strip, const Range &range)
const Range getRange(const uint32_t detID) const
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::pair< short, float > > _vmedians