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 
10 #include <vector>
11 
12 class PixelGeomDetUnit;
13 
18 public:
21 
23  typedef unsigned short UShort;
24  static constexpr UShort MAXSIZE = 256;
25  UShort adc[MAXSIZE];
26  UShort x[MAXSIZE];
27  UShort y[MAXSIZE];
28  UShort xmin=16000;
29  UShort ymin=16000;
30  unsigned int isize=0;
31  unsigned int curr=0;
32 
33  // stack interface (unsafe ok for use below)
34  UShort top() const { return curr;}
35  void pop() { ++curr;}
36  bool empty() { return curr==isize;}
37 
38  bool add(SiPixelCluster::PixelPos const & p, UShort const iadc) {
39  if (isize==MAXSIZE) return false;
40  xmin=std::min(xmin,(unsigned short)(p.row()));
41  ymin=std::min(ymin,(unsigned short)(p.col()));
42  adc[isize]=iadc;
43  x[isize]=p.row();
44  y[isize++]=p.col();
45  return true;
46  }
47  };
48 
49  // Virtual destructor, this is a base class.
50  virtual ~PixelClusterizerBase() {}
51 
52  // Build clusters in a DetUnit. Both digi and cluster stored in a DetSet
53 
54  virtual void clusterizeDetUnit( const edm::DetSet<PixelDigi> & input,
55  const PixelGeomDetUnit * pixDet,
56  const TrackerTopology* tTopo,
57  const std::vector<short>& badChannels,
59 
60  virtual void clusterizeDetUnit( const edmNew::DetSet<SiPixelCluster> & input,
61  const PixelGeomDetUnit * pixDet,
62  const TrackerTopology* tTopo,
63  const std::vector<short>& badChannels,
65 
66  // Configure gain calibration service
69  }
70 
71  protected:
73 
74 };
75 
76 #endif
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=0
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)