An explicit threshold-based clustering algorithm. More...
#include <MTDThresholdClusterizer.h>
Public Member Functions | |
void | clusterize (const FTLRecHitCollection &input, const MTDGeometry *geom, const MTDTopology *topo, FTLClusterCollection &output) override |
Cluster hits. This method operates on a matrix of hits and finds the largest contiguous cluster around each seed hit. Input and output data stored in DetSet. More... | |
MTDThresholdClusterizer (edm::ParameterSet const &conf) | |
Constructor: More... | |
~MTDThresholdClusterizer () override | |
Public Member Functions inherited from MTDClusterizerBase | |
virtual | ~MTDClusterizerBase () |
Static Public Member Functions | |
static void | fillPSetDescription (edm::ParameterSetDescription &desc) |
Private Member Functions | |
void | clear_buffer (RecHitIterator itr) |
Clear the internal buffer array. More... | |
void | copy_to_buffer (RecHitIterator itr, const MTDGeometry *geom, const MTDTopology *topo) |
Copy FTLRecHit into the buffer, identify seeds. More... | |
FTLCluster | make_cluster (const FTLCluster::FTLHitPos &hit) |
The actual clustering algorithm: group the neighboring hits around the seed. More... | |
bool | setup (const MTDGeometry *geometry, const MTDTopology *topo, const DetId &id) |
Private Attributes | |
bool | bufferAlreadySet |
MTDArrayBuffer | theBuffer |
Data storage. More... | |
std::vector< FTLCluster > | theClusters |
const float | theClusterThreshold |
DetId | theCurrentId |
const float | theHitThreshold |
Clustering-related quantities: More... | |
int | theNumOfCols |
int | theNumOfRows |
Geometry-related information. More... | |
const float | thePositionThreshold |
std::vector< FTLCluster::FTLHitPos > | theSeeds |
const float | theSeedThreshold |
const float | theTimeThreshold |
Additional Inherited Members | |
Public Types inherited from MTDClusterizerBase | |
typedef FTLClusterCollection::const_iterator | ClusterIterator |
typedef FTLRecHitCollection::const_iterator | RecHitIterator |
An explicit threshold-based clustering algorithm.
A threshold-based clustering algorithm which clusters FTLRecHits into FTLClusters for each DetUnit. The algorithm is straightforward and purely topological: the clustering process starts with seed hits and continues by adding adjacent hits above the hit 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 MTD detector, each cell containing the cahrge and time of the corresponding hit The matrix is reset after each clusterization.
The search starts from seed hits, i.e. hits with sufficiently large amplitudes
FTLCluster contains a barycenter, 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 MTDArrayBuffer dimensions and pixel thresholds. Makes clusters and stores them in theCache if the option useCache has been set.
Definition at line 51 of file MTDThresholdClusterizer.h.
MTDThresholdClusterizer::MTDThresholdClusterizer | ( | edm::ParameterSet const & | conf | ) |
Constructor:
Definition at line 26 of file MTDThresholdClusterizer.cc.
|
override |
Definition at line 39 of file MTDThresholdClusterizer.cc.
|
private |
Clear the internal buffer array.
MTDs which are not part of recognized clusters are NOT ERASED during the cluster finding. Erase them now.
Definition at line 189 of file MTDThresholdClusterizer.cc.
References MTDArrayBuffer::clear(), and theBuffer.
Referenced by clusterize().
|
overridevirtual |
Cluster hits. This method operates on a matrix of hits and finds the largest contiguous cluster around each seed hit. Input and output data stored in DetSet.
Implements MTDClusterizerBase.
Definition at line 90 of file MTDThresholdClusterizer.cc.
References cms::cuda::assert(), MTDDetId::BTL, clear_buffer(), copy_to_buffer(), MTDTopologyMode::crysLayoutFromTopoMode(), TauDecayModes::dec, mps_fire::end, MTDArrayBuffer::energy(), FTLCluster::energy(), MTDDetId::ETL, Exception, MTDDetId::FastTime, totem::nt2::vfat::geoId(), relativeConstraints::geom, FTLCluster::getClusterErrorX(), FTLCluster::getClusterPosX(), MTDTopology::getMTDTopologyMode(), mps_fire::i, input, LogDebug, make_cluster(), MTDDetId::mtdSubDetector(), convertSQLitetoXML_cfg::output, edmNew::DetSetVector< T >::FastFiller::push_back(), FastTimerService_cff::range, DetId::rawId(), setup(), FTLCluster::size(), MTDDetId::subDetector(), theBuffer, theClusterThreshold, theSeeds, theSeedThreshold, FTLCluster::time(), FTLCluster::timeError(), FTLCluster::x(), and FTLCluster::y().
|
private |
Copy FTLRecHit into the buffer, identify seeds.
Definition at line 194 of file MTDThresholdClusterizer.cc.
References GeomDetEnumerators::barrel, MTDDetId::BTL, cuy::col, MTDTopologyMode::crysLayoutFromTopoMode(), GeomDetEnumerators::endcap, HCALHighEnergyHPDFilter_cfi::energy, MTDDetId::ETL, totem::nt2::vfat::geoId(), relativeConstraints::geom, MTDTopology::getMTDTopologyMode(), GeomDetEnumerators::invalidLoc, BTLRecHitsErrorEstimatorIM::localError(), LogDebug, MTDDetId::mtdSubDetector(), RectangularMTDTopology::pixelToModuleLocalPoint(), position, DetId::rawId(), MTDArrayBuffer::set(), ProxyMTDTopology::specificTopology(), mathSSE::sqrt(), theBuffer, theHitThreshold, theSeeds, theSeedThreshold, protons_cff::time, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by clusterize().
|
static |
Definition at line 42 of file MTDThresholdClusterizer.cc.
References submitPVResolutionJobs::desc.
Referenced by MTDClusterProducer::fillDescriptions().
|
private |
The actual clustering algorithm: group the neighboring hits around the seed.
Definition at line 249 of file MTDThresholdClusterizer.cc.
References funct::abs(), MTDClusterizerBase::AccretionCluster::add(), GeomDetEnumerators::barrel, HltBtagPostValidation_cff::c, MTDArrayBuffer::clear(), MTDArrayBuffer::columns(), MTDClusterizerBase::AccretionCluster::empty(), MTDArrayBuffer::energy(), MTDClusterizerBase::AccretionCluster::energy, f, MTDClusterizerBase::AccretionCluster::isize, MTDArrayBuffer::local_error(), MTDArrayBuffer::local_point(), LogDebug, mag2(), SiStripPI::max, SiStripPI::min, MTDClusterizerBase::AccretionCluster::pop(), alignCSCRings::r, MTDArrayBuffer::rows(), mathSSE::sqrt(), MTDArrayBuffer::subDet(), theBuffer, theCurrentId, theHitThreshold, thePositionThreshold, theTimeThreshold, MTDArrayBuffer::time(), MTDClusterizerBase::AccretionCluster::time, MTDArrayBuffer::time_error(), MTDClusterizerBase::AccretionCluster::timeError, MTDClusterizerBase::AccretionCluster::top(), MTDClusterizerBase::AccretionCluster::x, MTDClusterizerBase::AccretionCluster::xmin, MTDArrayBuffer::xpos(), geometryCSVtoXML::xx, LocalError::xx(), MTDClusterizerBase::AccretionCluster::y, MTDClusterizerBase::AccretionCluster::ymin, geometryCSVtoXML::yy, and LocalError::yy().
Referenced by clusterize().
|
private |
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 54 of file MTDThresholdClusterizer.cc.
References bufferAlreadySet, MTDArrayBuffer::columns(), TauDecayModes::dec, Exception, relativeConstraints::geom, l1ctLayer2EG_cff::id, LogDebug, hgcalPlots::ncols, RectangularMTDTopology::ncolumns(), RectangularMTDTopology::nrows(), MTDArrayBuffer::rows(), MTDArrayBuffer::setSize(), ProxyMTDTopology::specificTopology(), theBuffer, theCurrentId, theNumOfCols, and theNumOfRows.
Referenced by clusterize().
|
private |
Definition at line 83 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
private |
Data storage.
Definition at line 82 of file MTDThresholdClusterizer.h.
Referenced by clear_buffer(), clusterize(), copy_to_buffer(), make_cluster(), and setup().
|
private |
Definition at line 66 of file MTDThresholdClusterizer.h.
|
private |
Definition at line 71 of file MTDThresholdClusterizer.h.
Referenced by clusterize().
|
private |
Definition at line 79 of file MTDThresholdClusterizer.h.
Referenced by make_cluster(), and setup().
|
private |
Clustering-related quantities:
Definition at line 69 of file MTDThresholdClusterizer.h.
Referenced by copy_to_buffer(), and make_cluster().
|
private |
Definition at line 77 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
private |
Geometry-related information.
Definition at line 76 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
private |
Definition at line 73 of file MTDThresholdClusterizer.h.
Referenced by make_cluster().
|
private |
Definition at line 65 of file MTDThresholdClusterizer.h.
Referenced by clusterize(), and copy_to_buffer().
|
private |
Definition at line 70 of file MTDThresholdClusterizer.h.
Referenced by clusterize(), and copy_to_buffer().
|
private |
Definition at line 72 of file MTDThresholdClusterizer.h.
Referenced by make_cluster().