CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/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 
00005 class ThreeThresholdAlgorithm : public StripClusterizerAlgorithm {
00006 
00007   friend class StripClusterizerAlgorithmFactory;
00008 
00009  public:
00010 
00011   void clusterizeDetUnit(const    edm::DetSet<SiStripDigi> &, output_t::FastFiller &);
00012   void clusterizeDetUnit(const edmNew::DetSet<SiStripDigi> &, output_t::FastFiller &);
00013 
00014   bool stripByStripBegin(uint32_t id);
00015   void stripByStripAdd(uint16_t strip, uint16_t adc, std::vector<SiStripCluster>& out);
00016   void stripByStripEnd(std::vector<SiStripCluster>& out);
00017 
00018  private:
00019 
00020   template<class T> void clusterizeDetUnit_(const T&, output_t::FastFiller&);
00021   ThreeThresholdAlgorithm(float, float, float, unsigned, unsigned, unsigned, std::string qualityLabel,
00022                           bool setDetId);
00023 
00024   //state of the candidate cluster
00025   std::vector<uint16_t> ADCs;  
00026   uint16_t lastStrip;
00027   float noiseSquared;
00028   bool candidateLacksSeed;
00029 
00030   //constant methods with state information
00031   uint16_t firstStrip() const {return lastStrip - ADCs.size() + 1;}
00032   bool candidateEnded(const uint16_t&) const;
00033   bool candidateAccepted() const;
00034 
00035   //state modification methods
00036   template<class T> void endCandidate(T&);
00037   void clearCandidate() { candidateLacksSeed = true;  noiseSquared = 0;  ADCs.clear();}
00038   void addToCandidate(const SiStripDigi&);
00039   void appendBadNeighbors();
00040   void applyGains();
00041 
00042   float ChannelThreshold, SeedThreshold, ClusterThresholdSquared;
00043   uint8_t MaxSequentialHoles, MaxSequentialBad, MaxAdjacentBad;
00044 };
00045 
00046 #endif