CMS 3D CMS Logo

PixelThresholdClusterizer.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
2 #define RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
3 
4 //-----------------------------------------------------------------------
39 //-----------------------------------------------------------------------
40 
41 // Base class, defines SiPixelDigi and SiPixelCluster. The latter includes
42 // Pixel, PixelPos and Shift as inner classes.
43 //
45 #include "PixelClusterizerBase.h"
46 
47 // The private pixel buffer
48 #include "SiPixelArrayBuffer.h"
49 
50 // Parameter Set:
52 
54 
55 #include <vector>
56 
58 public:
60  ~PixelThresholdClusterizer() override;
61 
62  // Full I/O in DetSet
64  const PixelGeomDetUnit* pixDet,
65  const TrackerTopology* tTopo,
66  const std::vector<short>& badChannels,
68  clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output);
69  }
71  const PixelGeomDetUnit* pixDet,
72  const TrackerTopology* tTopo,
73  const std::vector<short>& badChannels,
75  clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output);
76  }
77 
79 
80  inline bool isCalibrated() { return doMissCalibrate; }
81 
82 protected:
83  template <typename T>
84  void clusterizeDetUnitT(const T& input,
85  const PixelGeomDetUnit* pixDet,
86  const TrackerTopology* tTopo,
87  const std::vector<short>& badChannels,
89 
91  SiPixelArrayBuffer theBuffer; // internal nrow * ncol matrix
92  std::vector<SiPixelCluster::PixelPos> theSeeds; // cached seed pixels
93  std::vector<SiPixelCluster> theClusters; // resulting clusters
94 
95  std::vector<bool> theFakePixels; // fake pixels introduced to guide clustering
96 
97  std::vector<uint8_t> thePixelOccurrence; // the number of times each pixel occurs (for tracking duplicate pixels)
98 
100  float thePixelThresholdInNoiseUnits; // Pixel threshold in units of noise
101  float theSeedThresholdInNoiseUnits; // Pixel cluster seed in units of noise
102  float theClusterThresholdInNoiseUnits; // Cluster threshold in units of noise
103 
104  const int thePixelThreshold; // Pixel threshold in electrons
105  const int theSeedThreshold; // Seed threshold in electrons
106  const int theClusterThreshold; // Cluster threshold in electrons
107  const int theClusterThreshold_L1; // Cluster threshold in electrons for Layer 1
108  const int theConversionFactor; // adc to electron conversion factor
109  const int theConversionFactor_L1; // adc to electron conversion factor for Layer 1
110  const int theOffset; // adc to electron conversion offset
111  const int theOffset_L1; // adc to electron conversion offset for Layer 1
112 
113  const double theElectronPerADCGain; // ADC to electrons conversion
114 
115  const bool doPhase2Calibration; // The ADC --> electrons calibration is for phase-2 tracker
116 
117  const bool dropDuplicates; // Enabling dropping duplicate pixels
118 
119  const int thePhase2ReadoutMode; // Readout mode of the phase-2 IT digitizer
120  const double thePhase2DigiBaseline; // Threshold above which digis are measured in the phase-2 IT
121  const int thePhase2KinkADC; // ADC count at which the kink in the dual slop kicks in
122 
126  uint32_t theDetid;
127  int theLayer;
128  const bool doMissCalibrate; // Use calibration or not
129  const bool doSplitClusters;
131  bool setup(const PixelGeomDetUnit* pixDet);
132  void copy_to_buffer(DigiIterator begin, DigiIterator end);
133  void copy_to_buffer(ClusterIterator begin, ClusterIterator end);
134  void clear_buffer(DigiIterator begin, DigiIterator end);
135  void clear_buffer(ClusterIterator begin, ClusterIterator end);
136  SiPixelCluster make_cluster(const SiPixelCluster::PixelPos& pix,
138  // Calibrate the ADC charge to electrons
139  int calibrate(int adc, int col, int row);
140 };
141 
142 #endif
SiPixelArrayBuffer theBuffer
Data storage.
static std::string const input
Definition: EdmProvDump.cc:50
void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override
edm::DetSet< PixelDigi >::const_iterator DigiIterator
void clusterizeDetUnit(const edmNew::DetSet< SiPixelCluster > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override
int theNumOfRows
Geometry-related information.
#define dso_hidden
Definition: Visibility.h:12
std::vector< uint8_t > thePixelOccurrence
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
void fillPSetDescription(edm::ParameterSetDescription &desc)
std::vector< SiPixelCluster > theClusters
Pixel cluster – collection of neighboring pixels above threshold.
float thePixelThresholdInNoiseUnits
Clustering-related quantities:
col
Definition: cuy.py:1009
Definition: output.py:1
std::vector< SiPixelCluster::PixelPos > theSeeds
long double T
A specific threshold-based pixel clustering algorithm.
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Class to store ADC counts during clustering.