A specific threshold-based pixel clustering algorithm. More...
#include <PixelThresholdClusterizer.h>
Public Member Functions | |
void | clusterizeDetUnit (const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override |
void | clusterizeDetUnit (const edmNew::DetSet< SiPixelCluster > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) override |
PixelThresholdClusterizer (edm::ParameterSet const &conf) | |
~PixelThresholdClusterizer () override | |
Public Member Functions inherited from PixelClusterizerBase | |
void | setSiPixelGainCalibrationService (SiPixelGainCalibrationServiceBase *in) |
virtual | ~PixelClusterizerBase () |
Static Public Member Functions | |
static void | fillPSetDescription (edm::ParameterSetDescription &desc) |
Protected Member Functions | |
int | calibrate (int adc, int col, int row) |
void | clear_buffer (DigiIterator begin, DigiIterator end) |
Clear the internal buffer array. More... | |
void | clear_buffer (ClusterIterator begin, ClusterIterator end) |
template<typename T > | |
void | clusterizeDetUnitT (const T &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) |
Cluster pixels. This method operates on a matrix of pixels and finds the largest contiguous cluster around each seed pixel. Input and output data stored in DetSet. More... | |
void | copy_to_buffer (DigiIterator begin, DigiIterator end) |
Copy adc counts from PixelDigis into the buffer, identify seeds. More... | |
void | copy_to_buffer (ClusterIterator begin, ClusterIterator end) |
SiPixelCluster | make_cluster (const SiPixelCluster::PixelPos &pix, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output) |
The actual clustering algorithm: group the neighboring pixels around the seed. More... | |
bool | setup (const PixelGeomDetUnit *pixDet) |
Private helper methods: More... | |
Additional Inherited Members | |
Public Types inherited from PixelClusterizerBase | |
typedef edmNew::DetSet < SiPixelCluster > ::const_iterator | ClusterIterator |
typedef edm::DetSet< PixelDigi > ::const_iterator | DigiIterator |
A specific threshold-based pixel clustering algorithm.
An explicit threshold-based clustering algorithm.
General logic of PixelThresholdClusterizer:
The clusterization is performed on a matrix with size equal to the size of the pixel detector, each cell containing the ADC count of the corresponding pixel. The matrix is reset after each clusterization.
The search starts from seed pixels, i.e. pixels with sufficiently large amplitudes, found at the time of filling of the matrix and stored in a SiPixelArrayBuffer.
Translate the pixel charge to electrons, we are suppose to do the calibrations ADC->electrons here. Modify the thresholds to be in electrons, convert adc to electrons. d.k. 20/3/06 Get rid of the noiseVector. d.k. 28/3/06
A threshold-based clustering algorithm which clusters SiPixelDigis into SiPixelClusters for each DetUnit. The algorithm is straightforward and purely topological: the clustering process starts with seed pixels and continues by adding adjacent pixels above the pixel threshold. Once the cluster is made, it has to be above the cluster threshold as well.
The clusterization is performed on a matrix with size equal to the size of the pixel detector, each cell containing the ADC count of the corresponding pixel. The matrix is reset after each clusterization.
The search starts from seed pixels, i.e. pixels with sufficiently large amplitudes, found at the time of filling of the matrix and stored in a
At this point the noise and dead channels are ignored, but soon they won't be.
SiPixelCluster contains a barrycenter, but it should be noted that that information is largely useless. One must use a PositionEstimator class to compute the RecHit position and its error for every given cluster.
Sets the PixelArrayBuffer dimensions and pixel thresholds. Makes clusters and stores them in theCache if the option useCache has been set.
Definition at line 57 of file PixelThresholdClusterizer.h.
PixelThresholdClusterizer::PixelThresholdClusterizer | ( | edm::ParameterSet const & | conf | ) |
Constructor: Initilize the buffer to hold pixels from a detector module. This is a vector of 44k ints, stays valid all the time.
Definition at line 43 of file PixelThresholdClusterizer.cc.
References SiPixelArrayBuffer::setSize(), theBuffer, theFakePixels, theNumOfCols, and theNumOfRows.
|
override |
Definition at line 68 of file PixelThresholdClusterizer.cc.
|
protected |
Definition at line 327 of file PixelThresholdClusterizer.cc.
References doMissCalibrate, doPhase2Calibration, HI_PhotonSkim_cff::electrons, SiPixelGainCalibrationServiceBase::getGain(), SiPixelGainCalibrationServiceBase::getPedestal(), SiPixelGainCalibrationServiceBase::isDead(), SiPixelGainCalibrationServiceBase::isNoisy(), EcalCondDBWriter_cfi::pedestal, funct::pow(), theConversionFactor, theConversionFactor_L1, theDetid, theElectronPerADCGain, theLayer, theOffset, theOffset_L1, thePhase2DigiBaseline, thePhase2KinkADC, thePhase2ReadoutMode, and PixelClusterizerBase::theSiPixelGainCalibrationService_.
Referenced by copy_to_buffer().
|
protected |
Clear the internal buffer array.
Pixels which are not part of recognized clusters are NOT ERASED during the cluster finding. Erase them now.
TO DO: ask Danek... wouldn't it be faster to simply memcopy() zeros into the whole buffer array?
Definition at line 199 of file PixelThresholdClusterizer.cc.
References dataset::end, SiPixelArrayBuffer::set_adc(), and theBuffer.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), and clusterizeDetUnitT().
|
protected |
Definition at line 205 of file PixelThresholdClusterizer.cc.
References dataset::end, mps_fire::i, digitizers_cfi::pixel, SiPixelArrayBuffer::set_adc(), theBuffer, SiPixelCluster::Pixel::x, and SiPixelCluster::Pixel::y.
|
inlineoverridevirtual |
Implements PixelClusterizerBase.
Reimplemented in PixelThresholdClusterizerForBricked.
Definition at line 63 of file PixelThresholdClusterizer.h.
|
inlineoverridevirtual |
Implements PixelClusterizerBase.
Reimplemented in PixelThresholdClusterizerForBricked.
Definition at line 70 of file PixelThresholdClusterizer.h.
|
protected |
Cluster pixels. This method operates on a matrix of pixels and finds the largest contiguous cluster around each seed pixel. Input and output data stored in DetSet.
Definition at line 125 of file PixelThresholdClusterizer.cc.
References cms::cuda::assert(), SplitLinear::begin, edmNew::DetSetVector< T >::FastFiller::begin(), SiPixelCluster::charge(), GetRecoTauVFromDQM_MC_cff::cl2, clear_buffer(), copy_to_buffer(), edmNew::DetSetVector< T >::FastFiller::empty(), edmNew::DetSetVector< T >::FastFiller::end(), dataset::end, mps_fire::i, make_cluster(), SiPixelCluster::minPixelRow(), eostools::move(), edmNew::DetSetVector< T >::FastFiller::push_back(), TrackerTopology::pxbLayer(), setup(), DetId::subdetId(), theBuffer, theClusterThreshold, theClusterThreshold_L1, theDetid, theFakePixels, theLayer, theSeeds, and theSeedThreshold.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnit().
|
protected |
Copy adc counts from PixelDigis into the buffer, identify seeds.
Definition at line 218 of file PixelThresholdClusterizer.cc.
References gpuClustering::adc, cms::cuda::assert(), SplitLinear::begin, calibrate(), cuy::col, gather_cfg::cout, doMissCalibrate, doPhase2Calibration, metsig::electron, dataset::end, mps_fire::i, recoMuon::in, EcalCondDBWriter_cfi::pedestal, SiPixelArrayBuffer::set_adc(), theBuffer, theConversionFactor, theConversionFactor_L1, theDetid, theElectronPerADCGain, theFakePixels, theLayer, theNumOfCols, theOffset, theOffset_L1, thePixelThreshold, theSeeds, and theSeedThreshold.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), and clusterizeDetUnitT().
|
protected |
Definition at line 305 of file PixelThresholdClusterizer.cc.
References gpuClustering::adc, SiPixelCluster::Pixel::adc, SiPixelArrayBuffer::add_adc(), cuy::col, dataset::end, mps_fire::i, digitizers_cfi::pixel, theBuffer, thePixelThreshold, theSeeds, theSeedThreshold, SiPixelCluster::Pixel::x, and SiPixelCluster::Pixel::y.
|
static |
Definition at line 71 of file PixelThresholdClusterizer.cc.
References edm::ParameterSetDescription::add().
Referenced by SiPixelClusterProducer::fillDescriptions().
|
protected |
The actual clustering algorithm: group the neighboring pixels around the seed.
Definition at line 408 of file PixelThresholdClusterizer.cc.
References PixelClusterizerBase::AccretionCluster::adc, PixelClusterizerBase::AccretionCluster::add(), SiPixelCluster::add(), edmNew::DetSetVector< T >::FastFiller::begin(), c, SiPixelCluster::charge(), GetRecoTauVFromDQM_MC_cff::cl2, SiPixelCluster::PixelPos::col(), SiPixelArrayBuffer::columns(), doSplitClusters, PixelClusterizerBase::AccretionCluster::empty(), edmNew::DetSetVector< T >::FastFiller::end(), mps_fire::i, PixelClusterizerBase::AccretionCluster::isize, SiStripPI::max, SiStripPI::min, SiPixelCluster::minPixelRow(), SiPixelCluster::pixels(), PixelClusterizerBase::AccretionCluster::pop(), edmNew::DetSetVector< T >::FastFiller::push_back(), alignCSCRings::r, SiPixelCluster::PixelPos::row(), SiPixelArrayBuffer::rows(), SiPixelArrayBuffer::set_adc(), theBuffer, theClusterThreshold, theClusterThreshold_L1, theFakePixels, theLayer, theNumOfCols, thePixelThreshold, PixelClusterizerBase::AccretionCluster::top(), PixelClusterizerBase::AccretionCluster::x, PixelClusterizerBase::AccretionCluster::xmin, PixelClusterizerBase::AccretionCluster::y, and PixelClusterizerBase::AccretionCluster::ymin.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), and clusterizeDetUnitT().
|
protected |
Private helper methods:
Prepare the Clusterizer to work on a particular DetUnit. Re-init the size of the panel/plaquette (so update nrows and ncols),
Definition at line 93 of file PixelThresholdClusterizer.cc.
References SiPixelArrayBuffer::columns(), PixelTopology::ncolumns(), PixelTopology::nrows(), SiPixelArrayBuffer::rows(), SiPixelArrayBuffer::setSize(), PixelGeomDetUnit::specificTopology(), theBuffer, theFakePixels, theNumOfCols, and theNumOfRows.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), and clusterizeDetUnitT().
|
protected |
Definition at line 121 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 111 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 122 of file PixelThresholdClusterizer.h.
Referenced by make_cluster(), and PixelThresholdClusterizerForBricked::make_cluster_bricked().
|
protected |
Data storage.
Definition at line 89 of file PixelThresholdClusterizer.h.
Referenced by clear_buffer(), PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), copy_to_buffer(), make_cluster(), PixelThresholdClusterizerForBricked::make_cluster_bricked(), PixelThresholdClusterizer(), and setup().
|
protected |
Definition at line 91 of file PixelThresholdClusterizer.h.
|
protected |
Definition at line 102 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), make_cluster(), and PixelThresholdClusterizerForBricked::make_cluster_bricked().
|
protected |
Definition at line 103 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), make_cluster(), and PixelThresholdClusterizerForBricked::make_cluster_bricked().
|
protected |
Definition at line 98 of file PixelThresholdClusterizer.h.
|
protected |
Definition at line 104 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 105 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 119 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), and copy_to_buffer().
|
protected |
Definition at line 109 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 93 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), copy_to_buffer(), make_cluster(), PixelThresholdClusterizer(), and setup().
|
protected |
Definition at line 120 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), copy_to_buffer(), make_cluster(), and PixelThresholdClusterizerForBricked::make_cluster_bricked().
|
protected |
Definition at line 118 of file PixelThresholdClusterizer.h.
Referenced by copy_to_buffer(), make_cluster(), PixelThresholdClusterizer(), and setup().
|
protected |
Geometry-related information.
Definition at line 117 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizer(), and setup().
|
protected |
Definition at line 106 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 107 of file PixelThresholdClusterizer.h.
Referenced by calibrate(), and copy_to_buffer().
|
protected |
Definition at line 113 of file PixelThresholdClusterizer.h.
Referenced by calibrate().
|
protected |
Definition at line 114 of file PixelThresholdClusterizer.h.
Referenced by calibrate().
|
protected |
Definition at line 112 of file PixelThresholdClusterizer.h.
Referenced by calibrate().
|
protected |
Definition at line 100 of file PixelThresholdClusterizer.h.
Referenced by copy_to_buffer(), make_cluster(), and PixelThresholdClusterizerForBricked::make_cluster_bricked().
|
protected |
Clustering-related quantities:
Definition at line 96 of file PixelThresholdClusterizer.h.
|
protected |
Definition at line 90 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), and copy_to_buffer().
|
protected |
Definition at line 101 of file PixelThresholdClusterizer.h.
Referenced by PixelThresholdClusterizerForBricked::clusterizeDetUnitT(), clusterizeDetUnitT(), and copy_to_buffer().
|
protected |
Definition at line 97 of file PixelThresholdClusterizer.h.