CMS 3D CMS Logo

PixelClusterizerBase.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPixelClusterizer_PixelClusterizerBase_H
2 #define RecoLocalTracker_SiPixelClusterizer_PixelClusterizerBase_H
3 
9 #include <vector>
10 
11 class PixelGeomDetUnit;
12 
17 public:
20 
22  typedef unsigned short UShort;
23  static constexpr UShort MAXSIZE = 256;
24  UShort adc[MAXSIZE];
25  UShort x[MAXSIZE];
26  UShort y[MAXSIZE];
27  UShort xmin=16000;
28  UShort ymin=16000;
29  unsigned int isize=0;
30  unsigned int curr=0;
31 
32  // stack interface (unsafe ok for use below)
33  UShort top() const { return curr;}
34  void pop() { ++curr;}
35  bool empty() { return curr==isize;}
36 
37  bool add(SiPixelCluster::PixelPos const & p, UShort const iadc) {
38  if (isize==MAXSIZE) return false;
39  xmin=std::min(xmin,(unsigned short)(p.row()));
40  ymin=std::min(ymin,(unsigned short)(p.col()));
41  adc[isize]=iadc;
42  x[isize]=p.row();
43  y[isize++]=p.col();
44  return true;
45  }
46  };
47 
48  // Virtual destructor, this is a base class.
49  virtual ~PixelClusterizerBase() {}
50 
51  // Build clusters in a DetUnit. Both digi and cluster stored in a DetSet
52 
53  virtual void clusterizeDetUnit( const edm::DetSet<PixelDigi> & input,
54  const PixelGeomDetUnit * pixDet,
55  const std::vector<short>& badChannels,
57 
58  virtual void clusterizeDetUnit( const edmNew::DetSet<SiPixelCluster> & input,
59  const PixelGeomDetUnit * pixDet,
60  const std::vector<short>& badChannels,
62 
63  // Configure gain calibration service
66  }
67 
68  protected:
70 
71 };
72 
73 #endif
data_type const * const_iterator
Definition: DetSetNew.h:30
#define constexpr
static std::string const input
Definition: EdmProvDump.cc:44
edm::DetSet< PixelDigi >::const_iterator DigiIterator
T min(T a, T b)
Definition: MathUtil.h:58
bool add(SiPixelCluster::PixelPos const &p, UShort const iadc)
constexpr int col() const
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
constexpr int row() const
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=0