CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoLocalTracker/SiStripZeroSuppression/interface/IteratedMedianCMNSubtractor.h

Go to the documentation of this file.
00001 
00002 #ifndef RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPITERATEDMEDIANCOMMONMODENOISESUBTRACTION_H
00003 #define RECOLOCALTRACKER_SISTRIPZEROSUPPRESSION_SISTRIPITERATEDMEDIANCOMMONMODENOISESUBTRACTION_H
00004 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripCommonModeNoiseSubtractor.h"
00005 
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007  
00008 class SiStripNoises;
00009 class SiStripQuality;
00010 
00011 class IteratedMedianCMNSubtractor : public SiStripCommonModeNoiseSubtractor {
00012   
00013   friend class SiStripRawProcessingFactory;
00014   
00015  public:
00016   
00017   void init(const edm::EventSetup& es);
00018   void subtract(const uint32_t&,const uint16_t&, std::vector<int16_t>&);
00019   void subtract(const uint32_t&,const uint16_t&, std::vector<float>&);
00020   
00021  private:
00022 
00023   template<typename T >void subtract_(const uint32_t&, const uint16_t&, std::vector<T>&);
00024 inline float pairMedian( std::vector<std::pair<float,float> >& sample);
00025  
00026   IteratedMedianCMNSubtractor(double sigma, int iterations) : 
00027     cut_to_avoid_signal_(sigma),
00028     iterations_(iterations),
00029     noise_cache_id(0),
00030     quality_cache_id(0) {};
00031   double cut_to_avoid_signal_;
00032   int iterations_;
00033   edm::ESHandle<SiStripNoises> noiseHandle;
00034   edm::ESHandle<SiStripQuality> qualityHandle;
00035   uint32_t noise_cache_id, quality_cache_id;
00036     
00037 
00038 };
00039 #endif
00040