1 #ifndef RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPCOMMONMODENOISESUBTRACTOR_H
2 #define RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPCOMMONMODENOISESUBTRACTOR_H
15 virtual void subtract(uint32_t detId, uint16_t firstStrip, std::vector<int16_t>& digis) = 0;
16 virtual void subtract(uint32_t detId, uint16_t firstStrip, std::vector<float>& digis) = 0;
23 float median(std::vector<T>&);
30 typename std::vector<T>::iterator mid = sample.begin() + sample.size() / 2;
31 std::nth_element(sample.begin(), mid, sample.end());
32 if (sample.size() & 1)
34 return (*std::max_element(sample.begin(), mid) + *mid) / 2.;
virtual ~SiStripCommonModeNoiseSubtractor()
SiStripCommonModeNoiseSubtractor()
const std::vector< std::pair< short, float > > & getAPVsCM() const
float median(std::vector< T > &)
virtual void subtract(uint32_t detId, uint16_t firstStrip, std::vector< int16_t > &digis)=0
virtual void init(const edm::EventSetup &es)
std::vector< std::pair< short, float > > _vmedians