CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/RecoLocalTracker/SiStripClusterizer/interface/SiStripApvShotCleaner.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiStripClusterizer_SiStripApvShotCleaner_H
00002 #define RecoLocalTracker_SiStripClusterizer_SiStripApvShotCleaner_H
00003 
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 #include "DataFormats/Common/interface/DetSetVector.h"
00006 #include "DataFormats/Common/interface/DetSetVectorNew.h"
00007 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
00008 #include <vector>
00009 
00010 
00011 class SiStripApvShotCleaner{
00012   
00013  public:
00014   SiStripApvShotCleaner();
00015   
00016   ~SiStripApvShotCleaner(){};
00017 
00018   bool noShots(){return !shots_;}
00019 
00020   bool clean(const edmNew::DetSet<SiStripDigi>& in, edmNew::DetSet<SiStripDigi>::const_iterator& scan, edmNew::DetSet<SiStripDigi>::const_iterator& end){return false;} //FIXME
00021   bool clean(const    edm::DetSet<SiStripDigi>& in,    edm::DetSet<SiStripDigi>::const_iterator& scan,    edm::DetSet<SiStripDigi>::const_iterator& end);
00022 
00023   bool loop(const edmNew::DetSet<SiStripDigi>& in){return false;} //FIXME
00024   bool loop(const edm::DetSet<SiStripDigi>& in);
00025   
00026   void refresh();
00027 
00028   void reset(edm::DetSet<SiStripDigi>::const_iterator& a, edm::DetSet<SiStripDigi>::const_iterator& b);
00029   // void reset(edmNew::DetSet<SiStripDigi>::const_iterator& a, edmNew::DetSet<SiStripDigi>::const_iterator& b){;} //FIXME
00030 
00031  private:
00032 
00033   struct orderingByCharge {
00034     bool operator ()(SiStripDigi const& a, SiStripDigi const& b) {return a.adc() > b.adc();}
00035   };
00036   
00037   void subtractCM();
00038 
00039   void dumpInVector(edm::DetSet<SiStripDigi>::const_iterator* ,size_t );
00040 
00041   uint32_t cacheDetId;
00042   bool shots_;
00043   bool shotApv_[25];
00044   edm::DetSet<SiStripDigi>::const_iterator pFirstDigiOfApv[7];
00045 
00046   std::vector<SiStripDigi> vdigis,apvDigis;  //caches of digis, in case an apvshot is found
00047   edm::DetSet<SiStripDigi> * pDetSet;
00048   unsigned short maxNumOfApvs   ;  
00049   unsigned short stripsPerApv   ; 
00050   unsigned short stripsForMedian; 
00051  
00052 
00053 };
00054 
00055 #endif