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