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
PixelClusterizerBase::DigiIterator
edm::DetSet< PixelDigi >::const_iterator DigiIterator
Definition: PixelClusterizerBase.h:20
input
static const std::string input
Definition: EdmProvDump.cc:48
PixelClusterizerBase::ClusterIterator
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
Definition: PixelClusterizerBase.h:21
PixelClusterizerBase::AccretionCluster::isize
unsigned int isize
Definition: PixelClusterizerBase.h:30
PixelClusterizerBase::AccretionCluster::adc
uint16_t adc[MAXSIZE]
Definition: PixelClusterizerBase.h:25
edm::DetSet
Definition: DetSet.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
TrackerTopology
Definition: TrackerTopology.h:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiPixelCluster.h
PixelClusterizerBase::theSiPixelGainCalibrationService_
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibrationService_
Definition: PixelClusterizerBase.h:83
PixelDigi.h
PixelClusterizerBase::clusterizeDetUnit
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
PixelClusterizerBase::AccretionCluster::ymin
uint16_t ymin
Definition: PixelClusterizerBase.h:29
TrackerTopology.h
PixelClusterizerBase::AccretionCluster::clear
void clear()
Definition: PixelClusterizerBase.h:39
PixelClusterizerBase::AccretionCluster::xmin
uint16_t xmin
Definition: PixelClusterizerBase.h:28
PixelClusterizerBase::AccretionCluster::x
uint16_t x[MAXSIZE]
Definition: PixelClusterizerBase.h:26
PixelClusterizerBase::AccretionCluster::charge
int charge
Definition: PixelClusterizerBase.h:31
PixelClusterizerBase::setSiPixelGainCalibrationService
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
Definition: PixelClusterizerBase.h:78
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
edmNew::DetSet
Definition: DetSetNew.h:22
PixelClusterizerBase::AccretionCluster::MAXSIZE
static constexpr uint16_t MAXSIZE
Definition: PixelClusterizerBase.h:24
PixelClusterizerBase::AccretionCluster::pop
void pop()
Definition: PixelClusterizerBase.h:36
PixelClusterizerBase
Definition: PixelClusterizerBase.h:18
PixelClusterizerBase::AccretionCluster::curr
unsigned int curr
Definition: PixelClusterizerBase.h:34
SiPixelGainCalibrationServiceBase
Definition: SiPixelGainCalibrationServiceBase.h:29
PixelClusterizerBase::AccretionCluster
Definition: PixelClusterizerBase.h:23
recoMuon::in
Definition: RecoMuonEnumerators.h:6
PixelClusterizerBase::AccretionCluster::empty
bool empty()
Definition: PixelClusterizerBase.h:37
DetSetVector.h
SiPixelGainCalibrationServiceBase.h
PixelClusterizerBase::AccretionCluster::add
bool add(SiPixelCluster::PixelPos const &p, uint16_t const iadc)
Definition: PixelClusterizerBase.h:47
PixelClusterizerBase::~PixelClusterizerBase
virtual ~PixelClusterizerBase()
Definition: PixelClusterizerBase.h:61
PixelClusterizerBase::AccretionCluster::top
uint16_t top() const
Definition: PixelClusterizerBase.h:35
edmNew::DetSetVector::FastFiller
Definition: DetSetVectorNew.h:202
PixelClusterizerBase::AccretionCluster::y
uint16_t y[MAXSIZE]
Definition: PixelClusterizerBase.h:27
SiPixelCluster::PixelPos
Definition: SiPixelCluster.h:53
DetSetVectorNew.h
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31