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)
40  return false;
41  xmin = std::min(xmin, (unsigned short)(p.row()));
42  ymin = std::min(ymin, (unsigned short)(p.col()));
43  adc[isize] = iadc;
44  x[isize] = p.row();
45  y[isize++] = p.col();
46  return true;
47  }
48  };
49 
50  // Virtual destructor, this is a base class.
51  virtual ~PixelClusterizerBase() {}
52 
53  // Build clusters in a DetUnit. Both digi and cluster stored in a DetSet
54 
56  const PixelGeomDetUnit* pixDet,
57  const TrackerTopology* tTopo,
58  const std::vector<short>& badChannels,
60 
61  virtual void clusterizeDetUnit(const edmNew::DetSet<SiPixelCluster>& input,
62  const PixelGeomDetUnit* pixDet,
63  const TrackerTopology* tTopo,
64  const std::vector<short>& badChannels,
66 
67  // Configure gain calibration service
70  }
71 
72 protected:
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:31
static std::string const input
Definition: EdmProvDump.cc:48
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:32
constexpr int row() const
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
#define constexpr