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;
57 results.reserve(
width());
68 std::vector<float> noises;
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::auto_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 );
edm::ESHandle< SiStripGain > gainHandle
uint16_t firstStrip() const
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
std::vector< bool > stripQualitiesBad() const
float calculate_noise(const std::vector< float > &) const
auto stripCharges() const -> decltype(cluster() ->amplitudes())
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
std::pair< ContainerIterator, ContainerIterator > Range
const edm::EventSetup & es
bool IsModuleUsable() const
edm::ESHandle< SiStripNoises > noiseHandle
std::vector< float > stripNoises() const
std::vector< SiStripCluster > reclusterize(const edm::ParameterSet &) const
std::pair< ContainerIterator, ContainerIterator > Range
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< float > stripNoisesRescaledByGain() const