CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiStripClusterizer_ThreeThresholdAlgorithm_h
00002 #define RecoLocalTracker_SiStripClusterizer_ThreeThresholdAlgorithm_h
00003 #include "RecoLocalTracker/SiStripClusterizer/interface/StripClusterizerAlgorithm.h"
00004 #include "RecoLocalTracker/SiStripClusterizer/interface/SiStripApvShotCleaner.h"
00005 
00006 class ThreeThresholdAlgorithm : public StripClusterizerAlgorithm {
00007 
00008   friend class StripClusterizerAlgorithmFactory;
00009 
00010  public:
00011 
00012   void clusterizeDetUnit(const    edm::DetSet<SiStripDigi> &, output_t::FastFiller &);
00013   void clusterizeDetUnit(const edmNew::DetSet<SiStripDigi> &, output_t::FastFiller &);
00014 
00015   bool stripByStripBegin(uint32_t id);
00016   void stripByStripAdd(uint16_t strip, uint16_t adc, std::vector<SiStripCluster>& out);
00017   void stripByStripEnd(std::vector<SiStripCluster>& out);
00018 
00019  private:
00020 
00021   template<class T> void clusterizeDetUnit_(const T&, output_t::FastFiller&);
00022   ThreeThresholdAlgorithm(float, float, float, unsigned, unsigned, unsigned, std::string qualityLabel,
00023                           bool setDetId, bool removeApvShots=false);
00024 
00025   //state of the candidate cluster
00026   std::vector<uint16_t> ADCs;  
00027   uint16_t lastStrip;
00028   float noiseSquared;
00029   bool candidateLacksSeed;
00030 
00031   //constant methods with state information
00032   uint16_t firstStrip() const {return lastStrip - ADCs.size() + 1;}
00033   bool candidateEnded(const uint16_t&) const;
00034   bool candidateAccepted() const;
00035 
00036   //state modification methods
00037   template<class T> void endCandidate(T&);
00038   void clearCandidate() { candidateLacksSeed = true;  noiseSquared = 0;  ADCs.clear();}
00039   void addToCandidate(const SiStripDigi&);
00040   void appendBadNeighbors();
00041   void applyGains();
00042 
00043   float ChannelThreshold, SeedThreshold, ClusterThresholdSquared;
00044   uint8_t MaxSequentialHoles, MaxSequentialBad, MaxAdjacentBad;
00045   bool RemoveApvShots;
00046 
00047   SiStripApvShotCleaner ApvCleaner;
00048 };
00049 
00050 #endif