Class for "official" algorithm to be used in TTClusterBuilder. More...
#include <TTClusterAlgorithm_official.h>
Public Member Functions | |
template<> | |
void | Cluster (std::vector< std::vector< Ref_Phase2TrackerDigi_ > > &output, const std::vector< Ref_Phase2TrackerDigi_ > &input, bool isPS) const |
Clustering operations. More... | |
void | Cluster (std::vector< std::vector< T > > &output, const std::vector< T > &input, bool isPS) const override |
Clustering operations. More... | |
template<> | |
void | Cluster (std::vector< std::vector< Ref_Phase2TrackerDigi_ > > &output, const std::vector< Ref_Phase2TrackerDigi_ > &input, bool isPS) const |
Clustering operations. More... | |
TTClusterAlgorithm_official (int aWidthCut) | |
Constructor. More... | |
~TTClusterAlgorithm_official () 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) const |
Basic version common to all the algorithms but official. More... | |
TTClusterAlgorithm (std::string fName) | |
Constructors. More... | |
virtual | ~TTClusterAlgorithm () |
Destructor. More... | |
Private Member Functions | |
template<> | |
bool | CompareClusters (const Ref_Phase2TrackerDigi_ &a, const Ref_Phase2TrackerDigi_ &b) |
Implementation of methods of TTClusterAlgorithm_official. More... | |
template<> | |
bool | CompareClusters (const Ref_Phase2TrackerDigi_ &a, const Ref_Phase2TrackerDigi_ &b) |
Close class. More... | |
Static Private Member Functions | |
static bool | CompareClusters (const T &a, const T &b) |
Cluster max width. More... | |
Private Attributes | |
int | mWidthCut |
Data members. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TTClusterAlgorithm< T > | |
std::string | className_ |
Data members. More... | |
Class for "official" algorithm to be used in TTClusterBuilder.
2D clusters: make 1D and then attach them to each other if their pixels are close to each other, CW cut at the end 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 32 of file TTClusterAlgorithm_official.h.
|
inline |
Constructor.
Definition at line 44 of file TTClusterAlgorithm_official.h.
|
inlineoverride |
Destructor.
Definition at line 51 of file TTClusterAlgorithm_official.h.
References a, b, TTClusterAlgorithm_official< T >::Cluster(), TTClusterAlgorithm_official< T >::CompareClusters(), input, and convertSQLitetoXML_cfg::output.
void TTClusterAlgorithm_official< Ref_Phase2TrackerDigi_ >::Cluster | ( | std::vector< std::vector< Ref_Phase2TrackerDigi_ > > & | output, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input, | ||
bool | isPS | ||
) | const |
Clustering operations.
Prepare the output
Prepare a proper hit container
Map all the hits by column index
1D Clusters must be stored properly <column, first row index>
Loop over the mapped hits
Collect hits sharing column index and differing by 1 in row index
Loop over single column
Nested loop
Check col/row and add to the cluster
End of nested loop
Sort the vector elements by row index
Put the cluster in the map
End of loop over single column
End of loop over mapped hits
Cluster over the second dimension only in PS modules!
Add the hits
Loop over the other elements of the map
Skip same element
Skip non-contiguous column
Column is contiguous Update the "last column index" This should be safe as maps are sorted structures by construction
Check that the cluster is good to be clustered Get first row
Get the max row in the cluster
Check if they overlap
If so, add the hits to the cluster!
End of nested loop
Check output Sort the vector by row index
one should add 1 to use <=
End of isPS
Check output Sort the vector by row index
one should add 1 to use <=
End of non-PS case
End of loop over mapped 1D Clusters
Definition at line 21 of file TTClusterAlgorithm_official.cc.
References funct::abs(), convertSQLitetoXML_cfg::output, and groupFilesInBlocks::temp.
|
overridevirtual |
Clustering operations.
Reimplemented from TTClusterAlgorithm< T >.
Referenced by TTClusterAlgorithm_official< T >::~TTClusterAlgorithm_official().
void TTClusterAlgorithm_official< Ref_Phase2TrackerDigi_ >::Cluster | ( | std::vector< std::vector< Ref_Phase2TrackerDigi_ > > & | output, |
const std::vector< Ref_Phase2TrackerDigi_ > & | input, | ||
bool | isPS | ||
) | const |
Clustering operations.
|
private |
Implementation of methods of TTClusterAlgorithm_official.
Here, in the source file, the methods which do depend on the specific type <T> that can fit the template.
Definition at line 14 of file TTClusterAlgorithm_official.cc.
|
staticprivate |
Cluster max width.
Function to compare clusters and sort them by row
Referenced by TTClusterAlgorithm_official< T >::~TTClusterAlgorithm_official().
|
private |
Close class.
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.Function to compare clusters and sort them by row
|
private |
Data members.
Definition at line 36 of file TTClusterAlgorithm_official.h.
Referenced by ES_TTClusterAlgorithm_official< T >::produce().