23 max = max_element(begin,
end);
24 return std::make_pair(accumulate(begin,
max, uint16_t(0)), accumulate(
max + 1,
end, uint16_t(0)));
28 float q(0),
x1(0),
x2(0);
30 unsigned i = it - begin;
32 x1 += (*it) * (
i + 0.5);
33 x2 += (*it) * (
i *
i +
i + 1. / 3);
56 for (
size_t i = 0;
i <
width();
i++) {
65 std::vector<float>
gains;
67 for (
size_t i = 0;
i <
width();
i++) {
74 std::vector<bool> isBad;
75 isBad.reserve(
width());
83 float noiseSumInQuadrature = 0;
84 int numberStripsOverThreshold = 0;
88 numberStripsOverThreshold++;
91 return std::sqrt(noiseSumInQuadrature / numberStripsOverThreshold);
97 accumulate(stripBad.begin(), stripBad.end(),
false, std::logical_or<bool>());
bool IsApvBad(uint32_t detid, short apvNb) const
void setCluster(const SiStripCluster &cluster, int detId)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
float calculate_noise(const std::vector< float > &) const
bool IsAnythingBad() const
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > siStripQualityToken_
std::vector< float > stripGains() const
bool IsModuleBad(uint32_t detid) const
const SiStripApvGain::Range getRange(uint32_t detID) const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
static float getNoise(uint16_t strip, const Range &range)
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
const SiStripCluster * cluster() const
std::pair< ContainerIterator, ContainerIterator > Range
SiStripClusterInfo(edm::ConsumesCollector &&, const std::string &qualityLabel="")
const SiStripNoises * siStripNoises_
std::vector< bool > stripQualitiesBad() const
std::vector< float > stripNoises() const
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > siStripNoisesToken_
const SiStripCluster * cluster_ptr
bool IsModuleUsable() const
std::vector< float > stripNoisesRescaledByGain() const
uint16_t firstStrip() const
constexpr float gains[NGAINS]
const SiStripGain * siStripGain_
std::pair< uint16_t, uint16_t > chargeLR() const
bool IsStripBad(uint32_t detid, short strip) const
const SiStripQuality * siStripQuality_
const Range getRange(const uint32_t detID) const
edm::ESGetToken< SiStripGain, SiStripGainRcd > siStripGainToken_
std::pair< ContainerIterator, ContainerIterator > Range
void initEvent(const edm::EventSetup &iSetup)
bool IsModuleUsable(uint32_t detid) const
bool IsFiberBad(uint32_t detid, short fiberNb) const