Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:10

0001 #ifndef RecoLocalTracker_SiStripClusterizer_SiStripApvShotCleaner_H
0002 #define RecoLocalTracker_SiStripClusterizer_SiStripApvShotCleaner_H
0003 
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include "DataFormats/Common/interface/DetSetVector.h"
0006 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0007 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
0008 #include <vector>
0009 #include <memory>
0010 
0011 class SiStripApvShotCleaner {
0012 public:
0013   SiStripApvShotCleaner();
0014 
0015   ~SiStripApvShotCleaner(){};
0016 
0017   bool noShots() { return !shots_; }
0018 
0019   bool clean(const edmNew::DetSet<SiStripDigi>& in,
0020              edmNew::DetSet<SiStripDigi>::const_iterator& scan,
0021              edmNew::DetSet<SiStripDigi>::const_iterator& end) {
0022     return false;
0023   }  //FIXME
0024   bool clean(const edm::DetSet<SiStripDigi>& in,
0025              edm::DetSet<SiStripDigi>::const_iterator& scan,
0026              edm::DetSet<SiStripDigi>::const_iterator& end);
0027 
0028   bool loop(const edmNew::DetSet<SiStripDigi>& in) { return false; }  //FIXME
0029   bool loop(const edm::DetSet<SiStripDigi>& in);
0030 
0031   void reset(edm::DetSet<SiStripDigi>::const_iterator& a, edm::DetSet<SiStripDigi>::const_iterator& b);
0032   // void reset(edmNew::DetSet<SiStripDigi>::const_iterator& a, edmNew::DetSet<SiStripDigi>::const_iterator& b){;} //FIXME
0033 
0034 private:
0035   void subtractCM();
0036 
0037   void dumpInVector(edm::DetSet<SiStripDigi>::const_iterator*, size_t);
0038 
0039   uint32_t cacheDetId;
0040   bool shots_;
0041   bool shotApv_[25];
0042   edm::DetSet<SiStripDigi>::const_iterator pFirstDigiOfApv[7];
0043 
0044   std::vector<SiStripDigi> vdigis, apvDigis;  //caches of digis, in case an apvshot is found
0045   std::unique_ptr<edm::DetSet<SiStripDigi>> pDetSet;
0046   unsigned short maxNumOfApvs;
0047   unsigned short stripsPerApv;
0048   unsigned short stripsForMedian;
0049 };
0050 
0051 #endif