CMS 3D CMS Logo

TTClusterAlgorithm_neighbor.h
Go to the documentation of this file.
1 
19 #ifndef CLUSTERING_ALGORITHM_NEIGHBOR_H
20 #define CLUSTERING_ALGORITHM_NEIGHBOR_H
21 
26 
29 
30 #include <string>
31 #include <cstdlib>
32 #include <map>
33 
34 template< typename T >
36 {
37  private:
40 
41  public:
44  : TTClusterAlgorithm< T >( __func__ ){}
45 
48 
50  void Cluster( std::vector< std::vector< T > > &output,
51  const std::vector< T > &input) const override;
52 
54  bool isANeighbor( const T& center, const T& mayNeigh) const;
55  void addNeighbors( std::vector< T >& cluster, const std::vector< T >& input, unsigned int start, std::vector<bool> &masked ) const;
56 
57 };
58 
66 template< >
68 void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::Cluster( std::vector<std::vector< Ref_Phase2TrackerDigi_ > > &output,
69  const std::vector< Ref_Phase2TrackerDigi_ > &input ) const;
70 
72 template< >
74  const Ref_Phase2TrackerDigi_& mayNeigh ) const;
75 
77 template< >
78 void TTClusterAlgorithm_neighbor< Ref_Phase2TrackerDigi_ >::addNeighbors( std::vector< Ref_Phase2TrackerDigi_ >& cluster,
79  const std::vector< Ref_Phase2TrackerDigi_ >& input,
80  unsigned int startVal,
81  std::vector< bool >& used) const;
82 
83 
84 
85 
86 
87 
96 template< typename T >
98 {
99  private:
101 
102  public:
105  {
106  setWhatProduced( this );
107  }
108 
111 
113  std::unique_ptr< TTClusterAlgorithm< T > > produce( const TTClusterAlgorithmRecord & record )
114  {
115  TTClusterAlgorithm< T >* TTClusterAlgo =
117 
118  return std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
119  }
120 
121 };
122 
123 #endif
124 
Definition: start.py:1
bool isANeighbor(const T &center, const T &mayNeigh) const
Needed for neighbours.
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< TTClusterAlgorithm< T > > produce(const TTClusterAlgorithmRecord &record)
Implement the producer.
ES_TTClusterAlgorithm_neighbor(const edm::ParameterSet &p)
Data members.
static std::string const input
Definition: EdmProvDump.cc:48
void addNeighbors(std::vector< T > &cluster, const std::vector< T > &input, unsigned int start, std::vector< bool > &masked) const
Class to declare the algorithm to the framework.
Base class for any algorithm to be used in TTClusterBuilder.
void Cluster(std::vector< std::vector< T > > &output, const std::vector< T > &input) const override
Clustering operations.
~ES_TTClusterAlgorithm_neighbor() override
Destructor.
~TTClusterAlgorithm_neighbor() override
Destructor.
Class for "neighbor" algorithm to be used in TTClusterBuilder.
Class to store the TTClusterAlgorithm used in TTClusterBuilder.
long double T