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 private:
81  template <typename T>
82  void clusterizeDetUnitT(const T& input,
83  const PixelGeomDetUnit* pixDet,
84  const TrackerTopology* tTopo,
85  const std::vector<short>& badChannels,
87 
89  SiPixelArrayBuffer theBuffer; // internal nrow * ncol matrix
90  std::vector<SiPixelCluster::PixelPos> theSeeds; // cached seed pixels
91  std::vector<SiPixelCluster> theClusters; // resulting clusters
92 
93  std::vector<bool> theFakePixels; // fake pixels introduced to guide clustering
94 
96  float thePixelThresholdInNoiseUnits; // Pixel threshold in units of noise
97  float theSeedThresholdInNoiseUnits; // Pixel cluster seed in units of noise
98  float theClusterThresholdInNoiseUnits; // Cluster threshold in units of noise
99 
100  const int thePixelThreshold; // Pixel threshold in electrons
101  const int theSeedThreshold; // Seed threshold in electrons
102  const int theClusterThreshold; // Cluster threshold in electrons
103  const int theClusterThreshold_L1; // Cluster threshold in electrons for Layer 1
104  const int theConversionFactor; // adc to electron conversion factor
105  const int theConversionFactor_L1; // adc to electron conversion factor for Layer 1
106  const int theOffset; // adc to electron conversion offset
107  const int theOffset_L1; // adc to electron conversion offset for Layer 1
108 
109  const double theElectronPerADCGain; // ADC to electrons conversion
110 
111  const bool doPhase2Calibration; // The ADC --> electrons calibration is for phase-2 tracker
112  const int thePhase2ReadoutMode; // Readout mode of the phase-2 IT digitizer
113  const double thePhase2DigiBaseline; // Threshold above which digis are measured in the phase-2 IT
114  const int thePhase2KinkADC; // ADC count at which the kink in the dual slop kicks in
115 
119  uint32_t theDetid;
120  int theLayer;
121  const bool doMissCalibrate; // Use calibration or not
122  const bool doSplitClusters;
124  bool setup(const PixelGeomDetUnit* pixDet);
125  void copy_to_buffer(DigiIterator begin, DigiIterator end);
126  void copy_to_buffer(ClusterIterator begin, ClusterIterator end);
127  void clear_buffer(DigiIterator begin, DigiIterator end);
128  void clear_buffer(ClusterIterator begin, ClusterIterator end);
129  SiPixelCluster make_cluster(const SiPixelCluster::PixelPos& pix,
131  // Calibrate the ADC charge to electrons
132  int calibrate(int adc, int col, int row);
133 };
134 
135 #endif
PixelClusterizerBase::DigiIterator
edm::DetSet< PixelDigi >::const_iterator DigiIterator
Definition: PixelClusterizerBase.h:20
PixelThresholdClusterizer::theClusters
std::vector< SiPixelCluster > theClusters
Definition: PixelThresholdClusterizer.h:91
input
static const std::string input
Definition: EdmProvDump.cc:48
PixelClusterizerBase::ClusterIterator
edmNew::DetSet< SiPixelCluster >::const_iterator ClusterIterator
Definition: PixelClusterizerBase.h:21
PixelThresholdClusterizer::theSeedThresholdInNoiseUnits
float theSeedThresholdInNoiseUnits
Definition: PixelThresholdClusterizer.h:97
edm::DetSet
Definition: DetSet.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
PixelThresholdClusterizer::theNumOfRows
int theNumOfRows
Geometry-related information.
Definition: PixelThresholdClusterizer.h:117
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
TrackerTopology
Definition: TrackerTopology.h:16
PixelThresholdClusterizer::theOffset
const int theOffset
Definition: PixelThresholdClusterizer.h:106
PixelThresholdClusterizer::theClusterThreshold_L1
const int theClusterThreshold_L1
Definition: PixelThresholdClusterizer.h:103
cuy.col
col
Definition: cuy.py:1009
PixelThresholdClusterizer::theClusterThreshold
const int theClusterThreshold
Definition: PixelThresholdClusterizer.h:102
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelThresholdClusterizer::theSeeds
std::vector< SiPixelCluster::PixelPos > theSeeds
Definition: PixelThresholdClusterizer.h:90
PixelThresholdClusterizer::theNumOfCols
int theNumOfCols
Definition: PixelThresholdClusterizer.h:118
PixelThresholdClusterizer::thePhase2KinkADC
const int thePhase2KinkADC
Definition: PixelThresholdClusterizer.h:114
PixelClusterizerBase.h
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:28
PixelThresholdClusterizer
A specific threshold-based pixel clustering algorithm.
Definition: PixelThresholdClusterizer.h:57
PixelThresholdClusterizer::thePixelThresholdInNoiseUnits
float thePixelThresholdInNoiseUnits
Clustering-related quantities:
Definition: PixelThresholdClusterizer.h:96
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiPixelArrayBuffer.h
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
mps_fire.end
end
Definition: mps_fire.py:242
edmNew::DetSet
Definition: DetSetNew.h:22
PixelThresholdClusterizer::thePhase2DigiBaseline
const double thePhase2DigiBaseline
Definition: PixelThresholdClusterizer.h:113
PixelClusterizerBase
Definition: PixelClusterizerBase.h:18
ParameterSetDescription.h
PixelThresholdClusterizer::thePhase2ReadoutMode
const int thePhase2ReadoutMode
Definition: PixelThresholdClusterizer.h:112
dso_hidden
#define dso_hidden
Definition: Visibility.h:12
PixelThresholdClusterizer::theLayer
int theLayer
Definition: PixelThresholdClusterizer.h:120
PixelThresholdClusterizer::thePixelThreshold
const int thePixelThreshold
Definition: PixelThresholdClusterizer.h:100
edm::ParameterSet
Definition: ParameterSet.h:47
reco::modules::fillPSetDescription
void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: ParameterAdapter.h:34
PixelThresholdClusterizer::theFakePixels
std::vector< bool > theFakePixels
Definition: PixelThresholdClusterizer.h:93
PixelThresholdClusterizer::theClusterThresholdInNoiseUnits
float theClusterThresholdInNoiseUnits
Definition: PixelThresholdClusterizer.h:98
PixelThresholdClusterizer::theOffset_L1
const int theOffset_L1
Definition: PixelThresholdClusterizer.h:107
DetSetVector.h
PixelThresholdClusterizer::theConversionFactor
const int theConversionFactor
Definition: PixelThresholdClusterizer.h:104
PixelThresholdClusterizer::theConversionFactor_L1
const int theConversionFactor_L1
Definition: PixelThresholdClusterizer.h:105
PixelThresholdClusterizer::clusterizeDetUnit
void clusterizeDetUnit(const edmNew::DetSet< SiPixelCluster > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override
Definition: PixelThresholdClusterizer.h:70
PixelThresholdClusterizer::doSplitClusters
const bool doSplitClusters
Definition: PixelThresholdClusterizer.h:122
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelThresholdClusterizer::clusterizeDetUnit
void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override
Definition: PixelThresholdClusterizer.h:63
T
long double T
Definition: Basic3DVectorLD.h:48
PixelThresholdClusterizer::doPhase2Calibration
const bool doPhase2Calibration
Definition: PixelThresholdClusterizer.h:111
edmNew::DetSetVector::FastFiller
Definition: DetSetVectorNew.h:202
SiPixelArrayBuffer
Class to store ADC counts during clustering.
Definition: SiPixelArrayBuffer.h:25
ParameterSet.h
PixelThresholdClusterizer::doMissCalibrate
const bool doMissCalibrate
Definition: PixelThresholdClusterizer.h:121
PixelThresholdClusterizer::theSeedThreshold
const int theSeedThreshold
Definition: PixelThresholdClusterizer.h:101
SiPixelCluster::PixelPos
Definition: SiPixelCluster.h:56
PixelThresholdClusterizer::theBuffer
SiPixelArrayBuffer theBuffer
Data storage.
Definition: PixelThresholdClusterizer.h:89
PixelThresholdClusterizer::theElectronPerADCGain
const double theElectronPerADCGain
Definition: PixelThresholdClusterizer.h:109
PixelThresholdClusterizer::theDetid
uint32_t theDetid
Definition: PixelThresholdClusterizer.h:119