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 
4 #include <vector>
5 
12 
13 class PixelGeomDetUnit;
14 
19 public:
22 
24  static constexpr uint16_t MAXSIZE = 256;
25  uint16_t adc[MAXSIZE];
26  uint16_t x[MAXSIZE];
27  uint16_t y[MAXSIZE];
28  uint16_t xmin = 16000;
29  uint16_t ymin = 16000;
30  unsigned int isize = 0;
31  int charge = 0;
32 
33  // stack interface (unsafe ok for use below)
34  unsigned int curr = 0;
35  uint16_t top() const { return curr; }
36  void pop() { ++curr; }
37  bool empty() { return curr == isize; }
38 
39  void clear() {
40  xmin = 16000;
41  ymin = 16000;
42  isize = 0;
43  charge = 0;
44  curr = 0;
45  }
46 
47  bool add(SiPixelCluster::PixelPos const& p, uint16_t const iadc) {
48  if (isize == MAXSIZE)
49  return false;
50  xmin = std::min<uint16_t>(xmin, p.row());
51  ymin = std::min<uint16_t>(ymin, p.col());
52  adc[isize] = iadc;
53  x[isize] = p.row();
54  y[isize++] = p.col();
55  charge += iadc;
56  return true;
57  }
58  };
59 
60  // Virtual destructor, this is a base class.
61  virtual ~PixelClusterizerBase() {}
62 
63  // Build clusters in a DetUnit. Both digi and cluster stored in a DetSet
64 
66  const PixelGeomDetUnit* pixDet,
67  const TrackerTopology* tTopo,
68  const std::vector<short>& badChannels,
70 
72  const PixelGeomDetUnit* pixDet,
73  const TrackerTopology* tTopo,
74  const std::vector<short>& badChannels,
76 
77  // Configure gain calibration service
80  }
81 
82 protected:
84 };
85 
86 #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:31
static std::string const input
Definition: EdmProvDump.cc:50
edm::DetSet< PixelDigi >::const_iterator DigiIterator
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
Definition: output.py:1
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)