28 typename std::vector<T>::iterator
fs,
ls;
30 std::vector<std::pair<float, float> > subset;
35 uint16_t
APV = firstAPV;
36 for (; APV < digis.size() / 128 + firstAPV; ++
APV) {
39 for (uint16_t istrip = APV * 128; istrip < (APV + 1) * 128; ++istrip) {
41 std::pair<float, float> pin((
float)digis[istrip - firstAPV * 128],
43 subset.push_back(pin);
54 std::vector<std::pair<float, float> >::iterator si = subset.begin();
55 while (si != subset.end()) {
57 si = subset.erase(si);
66 _vmedians.push_back(std::pair<short, float>(APV, offset));
69 fs = digis.begin() + (APV - firstAPV) * 128;
70 ls = digis.begin() + (APV - firstAPV + 1) * 128;
72 *fs =
static_cast<T>(*fs -
offset);
79 std::vector<std::pair<float, float> >::iterator mid =
sample.begin() +
sample.size() / 2;
83 return ((*std::max_element(
sample.begin(), mid)).first + (*mid).first) / 2.;
bool IsStripBad(const uint32_t &detid, const short &strip) const
bool getData(T &iHolder) const
static float getNoiseFast(const uint16_t &strip, const Range &range)
bool check(const edm::EventSetup &iSetup)
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