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 | fillDescriptions (edm::ParameterSetDescription &desc) |
Private Member Functions | |
void | clear_buffer (RecHitIterator itr) |
Clear the internal buffer array. More... | |
void | copy_to_buffer (RecHitIterator itr) |
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 |
float | theClusterThreshold |
DetId | theCurrentId |
float | theHitThreshold |
Clustering-related quantities: More... | |
int | theNumOfCols |
int | theNumOfRows |
Geometry-related information. More... | |
std::vector< FTLCluster::FTLHitPos > | theSeeds |
float | theSeedThreshold |
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 31 of file MTDThresholdClusterizer.cc.
|
override |
Definition at line 43 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 93 of file MTDThresholdClusterizer.cc.
References begin, edm::SortedCollection< T, SORT >::begin(), MTDDetId::BTL, clear_buffer(), copy_to_buffer(), DEBUG, TauDecayModes::dec, edmNew::DetSetVector< T >::empty(), end, edm::SortedCollection< T, SORT >::end(), MTDArrayBuffer::energy(), FTLCluster::energy(), MTDDetId::ETL, Exception, MTDDetId::FastTime, MTDTopology::getMTDTopologyMode(), mps_fire::i, make_cluster(), MTDDetId::mtdSubDetector(), edmNew::DetSetVector< T >::FastFiller::push_back(), FastTimerService_cff::range, DetId::rawId(), setup(), edm::SortedCollection< T, SORT >::size(), FTLCluster::size(), MTDDetId::subDetector(), theBuffer, theClusterThreshold, theSeeds, theSeedThreshold, FTLCluster::time(), FTLCluster::x(), and FTLCluster::y().
|
private |
Copy FTLRecHit into the buffer, identify seeds.
Definition at line 194 of file MTDThresholdClusterizer.cc.
References cuy::col, DEBUG, HCALHighEnergyHPDFilter_cfi::energy, MTDArrayBuffer::set(), theBuffer, theHitThreshold, theSeeds, theSeedThreshold, and ntuplemaker::time.
Referenced by clusterize().
|
static |
Definition at line 46 of file MTDThresholdClusterizer.cc.
References edm::ParameterSetDescription::add().
Referenced by MTDClusterProducer::fillDescriptions().
|
private |
The actual clustering algorithm: group the neighboring hits around the seed.
Definition at line 213 of file MTDThresholdClusterizer.cc.
References funct::abs(), MTDClusterizerBase::AccretionCluster::add(), HltBtagPostValidation_cff::c, MTDArrayBuffer::clear(), FTLCluster::FTLHitPos::col(), MTDArrayBuffer::columns(), MTDClusterizerBase::AccretionCluster::empty(), MTDArrayBuffer::energy(), MTDClusterizerBase::AccretionCluster::energy, MTDClusterizerBase::AccretionCluster::isize, SiStripPI::max, min(), MTDClusterizerBase::AccretionCluster::pop(), alignCSCRings::r, FTLCluster::FTLHitPos::row(), MTDArrayBuffer::rows(), mathSSE::sqrt(), theBuffer, theCurrentId, theHitThreshold, theTimeThreshold, MTDArrayBuffer::time(), MTDClusterizerBase::AccretionCluster::time, MTDArrayBuffer::time_error(), MTDClusterizerBase::AccretionCluster::timeError, MTDClusterizerBase::AccretionCluster::top(), MTDClusterizerBase::AccretionCluster::x, MTDClusterizerBase::AccretionCluster::xmin, MTDClusterizerBase::AccretionCluster::y, and MTDClusterizerBase::AccretionCluster::ymin.
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 57 of file MTDThresholdClusterizer.cc.
References bufferAlreadySet, MTDArrayBuffer::columns(), DEBUG, TauDecayModes::dec, Exception, triggerObjects_cff::id, MTDGeometry::idToDet(), hgcalPlots::ncols, RectangularMTDTopology::ncolumns(), RectangularMTDTopology::nrows(), MTDArrayBuffer::rows(), MTDArrayBuffer::setSize(), ProxyMTDTopology::specificTopology(), theBuffer, theCurrentId, theNumOfCols, and theNumOfRows.
Referenced by clusterize().
|
private |
Definition at line 82 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
private |
Data storage.
Definition at line 81 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 78 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 76 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
private |
Geometry-related information.
Definition at line 75 of file MTDThresholdClusterizer.h.
Referenced by setup().
|
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().