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 
57 
59  public:
60 
62  ~PixelThresholdClusterizer() override;
63 
64  // Full I/O in DetSet
66  const PixelGeomDetUnit * pixDet,
67  const TrackerTopology* tTopo,
68  const std::vector<short>& badChannels,
69  edmNew::DetSetVector<SiPixelCluster>::FastFiller& output) override { clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output); }
71  const PixelGeomDetUnit * pixDet,
72  const TrackerTopology* tTopo,
73  const std::vector<short>& badChannels,
74  edmNew::DetSetVector<SiPixelCluster>::FastFiller& output) override { clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output); }
75 
77 
78  private:
79 
80  template<typename T>
81  void clusterizeDetUnitT( const T & input,
82  const PixelGeomDetUnit * pixDet,
83  const TrackerTopology* tTopo,
84  const std::vector<short>& badChannels,
86 
88  SiPixelArrayBuffer theBuffer; // internal nrow * ncol matrix
89  std::vector<SiPixelCluster::PixelPos> theSeeds; // cached seed pixels
90  std::vector<SiPixelCluster> theClusters; // resulting clusters
91 
93  float thePixelThresholdInNoiseUnits; // Pixel threshold in units of noise
94  float theSeedThresholdInNoiseUnits; // Pixel cluster seed in units of noise
95  float theClusterThresholdInNoiseUnits; // Cluster threshold in units of noise
96 
97  const int thePixelThreshold; // Pixel threshold in electrons
98  const int theSeedThreshold; // Seed threshold in electrons
99  const int theClusterThreshold; // Cluster threshold in electrons
100  const int theClusterThreshold_L1; // Cluster threshold in electrons for Layer 1
101  const int theConversionFactor; // adc to electron conversion factor
102  const int theConversionFactor_L1; // adc to electron conversion factor for Layer 1
103  const int theOffset; // adc to electron conversion offset
104  const int theOffset_L1; // adc to electron conversion offset for Layer 1
105 
106  const double theElectronPerADCGain; // ADC to electrons conversion
107 
108  const bool doPhase2Calibration; // The ADC --> electrons calibration is for phase-2 tracker
109  const int thePhase2ReadoutMode; // Readout mode of the phase-2 IT digitizer
110  const double thePhase2DigiBaseline;// Threshold above which digis are measured in the phase-2 IT
111  const int thePhase2KinkADC; // ADC count at which the kink in the dual slop kicks in
112 
116  uint32_t theDetid;
117  int theLayer;
118  const bool doMissCalibrate; // Use calibration or not
119  const bool doSplitClusters;
121  bool setup(const PixelGeomDetUnit * pixDet);
122  void copy_to_buffer( DigiIterator begin, DigiIterator end );
123  void copy_to_buffer( ClusterIterator begin, ClusterIterator end );
124  void clear_buffer( DigiIterator begin, DigiIterator end );
125  void clear_buffer( ClusterIterator begin, ClusterIterator end );
127  // Calibrate the ADC charge to electrons
128  int calibrate(int adc, int col, int row);
129 
130 };
131 
132 #endif
SiPixelArrayBuffer theBuffer
Data storage.
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
static std::string const input
Definition: EdmProvDump.cc:48
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
#define end
Definition: vmac.h:39
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
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
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:
#define begin
Definition: vmac.h:32
col
Definition: cuy.py:1010
std::vector< SiPixelCluster::PixelPos > theSeeds
long double T
A specific threshold-based pixel clustering algorithm.
Class to store ADC counts during clustering.