CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoLocalTracker/SiPixelClusterizer/interface/PixelThresholdClusterizer.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
00002 #define RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
00003 
00004 //-----------------------------------------------------------------------
00039 //-----------------------------------------------------------------------
00040 
00041 // Base class, defines SiPixelDigi and SiPixelCluster.  The latter includes
00042 // Pixel, PixelPos and Shift as inner classes.
00043 //
00044 #include "DataFormats/Common/interface/DetSetVector.h"
00045 #include "RecoLocalTracker/SiPixelClusterizer/interface/PixelClusterizerBase.h"
00046 
00047 // The private pixel buffer
00048 #include "RecoLocalTracker/SiPixelClusterizer/interface/SiPixelArrayBuffer.h"
00049 
00050 // Parameter Set:
00051 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00052 
00053 #include <vector>
00054 
00055 
00056 class PixelThresholdClusterizer : public PixelClusterizerBase {
00057  public:
00058 
00059   PixelThresholdClusterizer(edm::ParameterSet const& conf);
00060   ~PixelThresholdClusterizer();
00061 
00062   // Full I/O in DetSet
00063   void clusterizeDetUnit( const edm::DetSet<PixelDigi> & input, 
00064                                   const PixelGeomDetUnit * pixDet,
00065                                   const std::vector<short>& badChannels,
00066                                   edmNew::DetSetVector<SiPixelCluster>::FastFiller& output
00067 );
00068 
00069   
00070  private:
00071 
00072   edm::ParameterSet conf_;
00073 
00075   SiPixelArrayBuffer               theBuffer;         // internal nrow * ncol matrix
00076   bool                             bufferAlreadySet;  // status of the buffer array
00077   std::vector<SiPixelCluster::PixelPos>  theSeeds;          // cached seed pixels
00078   std::vector<SiPixelCluster>            theClusters;       // resulting clusters  
00079   
00081   float thePixelThresholdInNoiseUnits;    // Pixel threshold in units of noise
00082   float theSeedThresholdInNoiseUnits;     // Pixel cluster seed in units of noise
00083   float theClusterThresholdInNoiseUnits;  // Cluster threshold in units of noise
00084 
00085   int   thePixelThreshold;  // Pixel threshold in electrons
00086   int   theSeedThreshold;   // Seed threshold in electrons 
00087   float theClusterThreshold;  // Cluster threshold in electrons
00088   int   theConversionFactor;  // adc to electron conversion factor
00089   int   theOffset;            // adc to electron conversion offset
00090 
00092   int  theNumOfRows;
00093   int  theNumOfCols;
00094   uint32_t detid_;
00095   bool dead_flag;
00096   bool doMissCalibrate; // Use calibration or not
00097   bool doSplitClusters;
00099   bool setup(const PixelGeomDetUnit * pixDet);
00100   void copy_to_buffer( DigiIterator begin, DigiIterator end );   
00101   void clear_buffer( DigiIterator begin, DigiIterator end );   
00102   SiPixelCluster make_cluster( const SiPixelCluster::PixelPos& pix, edmNew::DetSetVector<SiPixelCluster>::FastFiller& output
00103 );
00104   // Calibrate the ADC charge to electrons 
00105   int calibrate(int adc, int col, int row);
00106   int   theStackADC_;          // The maximum ADC count for the stack layers
00107   int   theFirstStack_;        // The index of the first stack layer
00108 
00109 
00110 };
00111 
00112 #endif