29 subtract_(
const uint32_t& detId,
const uint16_t& firstAPV, std::vector<T>& digis){
35 typename std::vector<T>::iterator
fs,
ls;
39 for (uint16_t istrip=0; istrip<digis.size(); ++istrip){
41 if ( !
qualityHandle->IsStripBad(detQualityRange,istrip+firstAPV*128) ) {
42 float stripNoise=
noiseHandle->getNoiseFast(istrip+firstAPV*128,detNoiseRange);
45 double nWeight = 1/(stripNoise*stripNoise);
46 sumVal += (digis[istrip]-FixedBias)*nWeight;
51 if (istrip%128 == 127){
52 double CM = (sumWt) ? sumVal/sumWt :0.0;
54 fs = digis.begin()+istrip-127;
55 ls = digis.begin()+istrip+1;
58 *fs =
static_cast<T>(*fs-FixedBias-CM);
void init(const edm::EventSetup &es)
double cut_to_avoid_signal_
edm::ESHandle< SiStripNoises > noiseHandle
void subtract_(const uint32_t &, const uint16_t &, std::vector< T > &)
edm::ESHandle< SiStripQuality > qualityHandle
Abs< T >::type abs(const T &t)
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
uint32_t quality_cache_id
void subtract(const uint32_t &, const uint16_t &, std::vector< int16_t > &)
edm::Service< TFileService > fs