diff --git a/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.cc b/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.cc index 96ec1ea7069c8..10cd09502cf9a 100644 --- a/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.cc +++ b/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.cc @@ -53,6 +53,7 @@ PixelThresholdClusterizer::PixelThresholdClusterizer(edm::ParameterSet const& co theOffset_L1(conf.getParameter("VCaltoElectronOffset_L1")), theElectronPerADCGain(conf.getParameter("ElectronPerADCGain")), doPhase2Calibration(conf.getParameter("Phase2Calibration")), + dropDuplicates(conf.getParameter("DropDuplicates")), thePhase2ReadoutMode(conf.getParameter("Phase2ReadoutMode")), thePhase2DigiBaseline(conf.getParameter("Phase2DigiBaseline")), thePhase2KinkADC(conf.getParameter("Phase2KinkADC")), @@ -82,6 +83,7 @@ void PixelThresholdClusterizer::fillPSetDescription(edm::ParameterSetDescription desc.add("ClusterThreshold_L1", 4000); desc.add("ClusterThreshold", 4000); desc.add("ElectronPerADCGain", 135.); + desc.add("DropDuplicates", true); desc.add("Phase2Calibration", false); desc.add("Phase2ReadoutMode", -1); desc.add("Phase2DigiBaseline", 1200.); @@ -296,8 +298,9 @@ void PixelThresholdClusterizer::copy_to_buffer(DigiIterator begin, DigiIterator of view of the final cluster charge since these are typically >= 20000. */ - thePixelOccurrence[theBuffer.index(row, col)]++; // increment the occurrence counter - uint8_t occurrence = thePixelOccurrence[theBuffer.index(row, col)]; // get the occurrence counter + thePixelOccurrence[theBuffer.index(row, col)]++; // increment the occurrence counter + uint8_t occurrence = + (!dropDuplicates) ? 1 : thePixelOccurrence[theBuffer.index(row, col)]; // get the occurrence counter switch (occurrence) { // the 1st occurrence (standard treatment) diff --git a/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.h b/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.h index 70e2964cff0c1..77ac94bb2b7e0 100644 --- a/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.h +++ b/RecoLocalTracker/SiPixelClusterizer/plugins/PixelThresholdClusterizer.h @@ -111,6 +111,7 @@ class dso_hidden PixelThresholdClusterizer : public PixelClusterizerBase { const double theElectronPerADCGain; // ADC to electrons conversion const bool doPhase2Calibration; // The ADC --> electrons calibration is for phase-2 tracker + const bool dropDuplicates; // Enabling dropping duplicate pixels const int thePhase2ReadoutMode; // Readout mode of the phase-2 IT digitizer const double thePhase2DigiBaseline; // Threshold above which digis are measured in the phase-2 IT const int thePhase2KinkADC; // ADC count at which the kink in the dual slop kicks in diff --git a/RecoLocalTracker/SiPixelClusterizer/python/SiPixelClusterizer_cfi.py b/RecoLocalTracker/SiPixelClusterizer/python/SiPixelClusterizer_cfi.py index 3e0591d564bb2..91c5cecb848bf 100644 --- a/RecoLocalTracker/SiPixelClusterizer/python/SiPixelClusterizer_cfi.py +++ b/RecoLocalTracker/SiPixelClusterizer/python/SiPixelClusterizer_cfi.py @@ -33,6 +33,7 @@ from SimTracker.SiPhase2Digitizer.phase2TrackerDigitizer_cfi import PixelDigitizerAlgorithmCommon phase2_tracker.toModify(siPixelClusters, # FIXME src = 'simSiPixelDigis:Pixel', + DropDuplicates = False, # do not drop duplicates for phase-2 until the digitizer can handle them consistently MissCalibrate = False, Phase2Calibration = True, Phase2ReadoutMode = PixelDigitizerAlgorithmCommon.Phase2ReadoutMode.value(), # Flag to decide Readout Mode : linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4 ...) with threshold subtraction