Class for "neighbor" algorithm to be used in TTClusterBuilder. More...
#include <TTClusterAlgorithm_neighbor.h>
Public Member Functions | |
template<> | |
void | addNeighbors (std::vector< Ref_Phase2TrackerDigi_ > &cluster, const std::vector< Ref_Phase2TrackerDigi_ > &input, unsigned int startVal, std::vector< bool > &used) const |
void | addNeighbors (std::vector< T > &cluster, const std::vector< T > &input, unsigned int start, std::vector< bool > &masked) const |
template<> | |
void | addNeighbors (std::vector< Ref_Phase2TrackerDigi_ > &cluster, const std::vector< Ref_Phase2TrackerDigi_ > &input, unsigned int startVal, std::vector< bool > &used) const |
template<> | |
void | Cluster (std::vector< std::vector< Ref_Phase2TrackerDigi_ > > &output, const std::vector< Ref_Phase2TrackerDigi_ > &input) const |
void | Cluster (std::vector< std::vector< T > > &output, const std::vector< T > &input) const override |
Clustering operations. More... | |
template<> | |
void | Cluster (std::vector< std::vector< Ref_Phase2TrackerDigi_ > > &output, const std::vector< Ref_Phase2TrackerDigi_ > &input) const |
template<> | |
bool | isANeighbor (const Ref_Phase2TrackerDigi_ ¢er, const Ref_Phase2TrackerDigi_ &mayNeigh) const |
bool | isANeighbor (const T ¢er, const T &mayNeigh) const |
Needed for neighbours. More... | |
template<> | |
bool | isANeighbor (const Ref_Phase2TrackerDigi_ ¢er, const Ref_Phase2TrackerDigi_ &mayNeigh) const |
TTClusterAlgorithm_neighbor () | |
Constructor. More... | |
~TTClusterAlgorithm_neighbor () override | |
Destructor. More... | |
Public Member Functions inherited from TTClusterAlgorithm< T > | |
virtual std::string | AlgorithmName () const |
Algorithm name. More... | |
virtual void | Cluster (std::vector< std::vector< T > > &output, const std::vector< T > &input, bool module) const |
TTClusterAlgorithm (std::string fName) | |
Constructors. More... | |
virtual | ~TTClusterAlgorithm () |
Destructor. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TTClusterAlgorithm< T > | |
std::string | className_ |
Data members. More... | |
Class for "neighbor" algorithm to be used in TTClusterBuilder.
This is a greedy clustering to be used for diagnostic purposes, which will make clusters as large as possible by including all contiguous hits in a single cluster. After moving from SimDataFormats to DataFormats, the template structure of the class was maintained in order to accomodate any types other than PixelDigis in case there is such a need in the future.
Definition at line 35 of file TTClusterAlgorithm_neighbor.h.
|
inline |
Constructor.
Data members Other stuff
Definition at line 42 of file TTClusterAlgorithm_neighbor.h.
|
inlineoverride |
void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::addNeighbors | ( | std::vector< Ref_Phase2TrackerDigi_ > & | cluster, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input, | ||
unsigned int | startVal, | ||
std::vector< bool > & | used | ||
) | const |
Add neighbours to the cluster Specialize template for Phase2TrackerDigis
This following line is necessary to ensure the iterators afterward remain valid.
Loop over hits
Loop over candidate neighbours
Is it really a neighbour?
End of loop over candidate neighbours
End of loop over hits
Definition at line 51 of file TTClusterAlgorithm_neighbor.cc.
References mps_fire::i.
void TTClusterAlgorithm_neighbor< T >::addNeighbors | ( | std::vector< T > & | cluster, |
const std::vector< T > & | input, | ||
unsigned int | start, | ||
std::vector< bool > & | masked | ||
) | const |
void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::addNeighbors | ( | std::vector< Ref_Phase2TrackerDigi_ > & | cluster, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input, | ||
unsigned int | startVal, | ||
std::vector< bool > & | used | ||
) | const |
void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::Cluster | ( | std::vector< std::vector< Ref_Phase2TrackerDigi_ > > & | output, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input | ||
) | const |
Here, in the source file, the methods which do depend on the specific type <T> that can fit the template.
Prepare output
Loop over all input hits and delete them once clustered
End of iteration
Definition at line 15 of file TTClusterAlgorithm_neighbor.cc.
References mps_fire::i, and convertSQLitetoXML_cfg::output.
|
overridevirtual |
Clustering operations.
Reimplemented from TTClusterAlgorithm< T >.
void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::Cluster | ( | std::vector< std::vector< Ref_Phase2TrackerDigi_ > > & | output, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input | ||
) | const |
Implementation of methods
Here, in the header file, the methods which do not depend on the specific type <T> that can fit the template. Other methods, with type-specific features, are implemented in the source file.Clustering operations
bool TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::isANeighbor | ( | const Ref_Phase2TrackerDigi_ & | center, |
const Ref_Phase2TrackerDigi_ & | mayNeigh | ||
) | const |
Check if the hit is a neighbour Specialize template for Phase2TrackerDigis
Definition at line 41 of file TTClusterAlgorithm_neighbor.cc.
References funct::abs().
bool TTClusterAlgorithm_neighbor< T >::isANeighbor | ( | const T & | center, |
const T & | mayNeigh | ||
) | const |
Needed for neighbours.
bool TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::isANeighbor | ( | const Ref_Phase2TrackerDigi_ & | center, |
const Ref_Phase2TrackerDigi_ & | mayNeigh | ||
) | const |