17 : cluster_ptr(&cluster),
19 qualityLabel(quality),
28 std::vector<uint8_t>::const_iterator
32 return std::make_pair( accumulate(
begin, max, uint16_t(0) ),
33 accumulate(max+1,
end, uint16_t(0) ) );
39 float q(0),
x1(0),
x2(0);
45 x1 += (*it) * (i+0.5);
46 x2 += (*it) * (i*i+i+1./3);
48 return (x2 -
x1*
x1/
q ) /
q;
56 std::vector<float> results;
57 results.reserve(
width());
69 noises.reserve(
width());
80 std::vector<float> gains;
81 gains.reserve(
width());
90 std::vector<bool> isBad;
91 isBad.reserve(
width());
101 float noiseSumInQuadrature = 0;
102 int numberStripsOverThreshold = 0;
105 noiseSumInQuadrature += noise.at(
i) * noise.at(
i);
106 numberStripsOverThreshold++;
109 return std::sqrt( noiseSumInQuadrature / numberStripsOverThreshold );
120 accumulate(stripBad.begin(), stripBad.end(),
122 std::logical_or<bool>());
152 std::vector<SiStripCluster>
clusters;
156 for(
unsigned i=0;
i < charges.size();
i++)
157 charges[
i] = (charges[
i] < 254)
158 ?
static_cast<uint8_t
>(charges[
i] * gains[
i])
161 std::unique_ptr<StripClusterizerAlgorithm>
163 algorithm->initialize(
es);
164 auto const & det = algorithm->stripByStripBegin(
detId_ );
168 algorithm->stripByStripAdd(state,
firstStrip()+
i, charges[
i], clusters );
169 algorithm->stripByStripEnd(state, clusters );
bool IsFiberBad(const uint32_t &detid, const short &fiberNb) const
bool IsApvBad(const uint32_t &detid, const short &apvNb) const
edm::ESHandle< SiStripGain > gainHandle
uint16_t firstStrip() const
static std::unique_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
edm::ESHandle< SiStripQuality > qualityHandle
SiStripClusterInfo(const SiStripCluster &cluster, const edm::EventSetup &es, const int detid, const std::string &qualityLabel="")
std::vector< float > stripGains() const
bool IsAnythingBad() const
std::pair< uint16_t, uint16_t > chargeLR() const
bool IsStripBad(const uint32_t &detid, const short &strip) const
std::vector< bool > stripQualitiesBad() const
def setup(process, global_tag, zero_tesla=False)
float calculate_noise(const std::vector< float > &) const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
static float getNoise(uint16_t strip, const Range &range)
bool IsModuleUsable(const uint32_t &detid) const
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
std::pair< ContainerIterator, ContainerIterator > Range
bool IsModuleBad(const uint32_t &detid) const
const edm::EventSetup & es
bool IsModuleUsable() const
edm::ESHandle< SiStripNoises > noiseHandle
std::vector< float > stripNoises() const
const Range getRange(const uint32_t detID) const
std::vector< SiStripCluster > reclusterize(const edm::ParameterSet &) const
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< float > stripNoisesRescaledByGain() const
const SiStripApvGain::Range getRange(uint32_t detID) const