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