File indexing completed on 2024-04-06 12:26:19
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 inline bool isCalibrated() { return doMissCalibrate; }
0081
0082 protected:
0083 template <typename T>
0084 void clusterizeDetUnitT(const T& input,
0085 const PixelGeomDetUnit* pixDet,
0086 const TrackerTopology* tTopo,
0087 const std::vector<short>& badChannels,
0088 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output);
0089
0090
0091 SiPixelArrayBuffer theBuffer;
0092 std::vector<SiPixelCluster::PixelPos> theSeeds;
0093 std::vector<SiPixelCluster> theClusters;
0094
0095 std::vector<bool> theFakePixels;
0096
0097 std::vector<uint8_t> thePixelOccurrence;
0098
0099
0100 float thePixelThresholdInNoiseUnits;
0101 float theSeedThresholdInNoiseUnits;
0102 float theClusterThresholdInNoiseUnits;
0103
0104 const int thePixelThreshold;
0105 const int theSeedThreshold;
0106 const int theClusterThreshold;
0107 const int theClusterThreshold_L1;
0108 const int theConversionFactor;
0109 const int theConversionFactor_L1;
0110 const int theOffset;
0111 const int theOffset_L1;
0112
0113 const double theElectronPerADCGain;
0114
0115 const bool doPhase2Calibration;
0116
0117 const bool dropDuplicates;
0118
0119 const int thePhase2ReadoutMode;
0120 const double thePhase2DigiBaseline;
0121 const int thePhase2KinkADC;
0122
0123
0124 int theNumOfRows;
0125 int theNumOfCols;
0126 uint32_t theDetid;
0127 int theLayer;
0128 const bool doMissCalibrate;
0129 const bool doSplitClusters;
0130
0131 bool setup(const PixelGeomDetUnit* pixDet);
0132 void copy_to_buffer(DigiIterator begin, DigiIterator end);
0133 void copy_to_buffer(ClusterIterator begin, ClusterIterator end);
0134 void clear_buffer(DigiIterator begin, DigiIterator end);
0135 void clear_buffer(ClusterIterator begin, ClusterIterator end);
0136 SiPixelCluster make_cluster(const SiPixelCluster::PixelPos& pix,
0137 edmNew::DetSetVector<SiPixelCluster>::FastFiller& output);
0138
0139 int calibrate(int adc, int col, int row);
0140 };
0141
0142 #endif