File indexing completed on 2023-03-17 11:19:34
0001 #ifndef RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
0002 #define RecoLocalTracker_SiPixelClusterizer_PixelThresholdClusterizer_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #include "DataFormats/Common/interface/DetSetVector.h"
0045 #include "PixelClusterizerBase.h"
0046
0047
0048 #include "SiPixelArrayBuffer.h"
0049
0050
0051 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0052
0053 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0054
0055 #include <vector>
0056
0057 class dso_hidden PixelThresholdClusterizer : public PixelClusterizerBase {
0058 public:
0059 PixelThresholdClusterizer(edm::ParameterSet const& conf);
0060 ~PixelThresholdClusterizer() override;
0061
0062
0063 void clusterizeDetUnit(const edm::DetSet<PixelDigi>& input,
0064 const PixelGeomDetUnit* pixDet,
0065 const TrackerTopology* tTopo,
0066 const std::vector<short>& badChannels,
0067 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output) override {
0068 clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output);
0069 }
0070 void clusterizeDetUnit(const edmNew::DetSet<SiPixelCluster>& input,
0071 const PixelGeomDetUnit* pixDet,
0072 const TrackerTopology* tTopo,
0073 const std::vector<short>& badChannels,
0074 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output) override {
0075 clusterizeDetUnitT(input, pixDet, tTopo, badChannels, output);
0076 }
0077
0078 static void fillPSetDescription(edm::ParameterSetDescription& desc);
0079
0080 protected:
0081 template <typename T>
0082 void clusterizeDetUnitT(const T& input,
0083 const PixelGeomDetUnit* pixDet,
0084 const TrackerTopology* tTopo,
0085 const std::vector<short>& badChannels,
0086 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output);
0087
0088
0089 SiPixelArrayBuffer theBuffer;
0090 std::vector<SiPixelCluster::PixelPos> theSeeds;
0091 std::vector<SiPixelCluster> theClusters;
0092
0093 std::vector<bool> theFakePixels;
0094
0095 std::vector<uint8_t> thePixelOccurrence;
0096
0097
0098 float thePixelThresholdInNoiseUnits;
0099 float theSeedThresholdInNoiseUnits;
0100 float theClusterThresholdInNoiseUnits;
0101
0102 const int thePixelThreshold;
0103 const int theSeedThreshold;
0104 const int theClusterThreshold;
0105 const int theClusterThreshold_L1;
0106 const int theConversionFactor;
0107 const int theConversionFactor_L1;
0108 const int theOffset;
0109 const int theOffset_L1;
0110
0111 const double theElectronPerADCGain;
0112
0113 const bool doPhase2Calibration;
0114
0115 const bool dropDuplicates;
0116
0117 const int thePhase2ReadoutMode;
0118 const double thePhase2DigiBaseline;
0119 const int thePhase2KinkADC;
0120
0121
0122 int theNumOfRows;
0123 int theNumOfCols;
0124 uint32_t theDetid;
0125 int theLayer;
0126 const bool doMissCalibrate;
0127 const bool doSplitClusters;
0128
0129 bool setup(const PixelGeomDetUnit* pixDet);
0130 void copy_to_buffer(DigiIterator begin, DigiIterator end);
0131 void copy_to_buffer(ClusterIterator begin, ClusterIterator end);
0132 void clear_buffer(DigiIterator begin, DigiIterator end);
0133 void clear_buffer(ClusterIterator begin, ClusterIterator end);
0134 SiPixelCluster make_cluster(const SiPixelCluster::PixelPos& pix,
0135 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output);
0136
0137 int calibrate(int adc, int col, int row);
0138 };
0139
0140 #endif