CMS 3D CMS Logo

TTClusterAlgorithm_official.h
Go to the documentation of this file.
1 
16 #ifndef L1_TRACK_TRIGGER_CLUSTER_ALGO_official_H
17 #define L1_TRACK_TRIGGER_CLUSTER_ALGO_official_H
18 
23 
26 
27 #include <memory>
28 #include <string>
29 #include <map>
30 
31 template< typename T >
33 {
34  private:
36  int mWidthCut;
37 
39  static bool CompareClusters( const T& a, const T& b );
40 
41  public:
43 
44  TTClusterAlgorithm_official( int aWidthCut )
45  : TTClusterAlgorithm< T >( __func__ )
46  {
47  mWidthCut = aWidthCut;
48  }
49 
52 
54  void Cluster( std::vector< std::vector< T > > &output,
55  const std::vector< T > &input,
56  bool isPS ) const;
57 
58 };
59 
67 template< >
70 
72 template< >
73 void TTClusterAlgorithm_official< Ref_Phase2TrackerDigi_ >::Cluster( std::vector< std::vector< Ref_Phase2TrackerDigi_ > > &output,
74  const std::vector< Ref_Phase2TrackerDigi_ > &input,
75  bool isPS ) const;
76 
77 
78 
79 
80 
89 template< typename T >
91 {
92  private:
94  std::shared_ptr< TTClusterAlgorithm< T > > _theAlgo;
95  int mWidthCut;
96 
97  public:
100  : mWidthCut( p.getParameter< int >("WidthCut") )
101  {
102  setWhatProduced( this );
103  }
104 
107 
109  std::shared_ptr< TTClusterAlgorithm< T > > produce( const TTClusterAlgorithmRecord & record )
110  {
111  TTClusterAlgorithm< T >* TTClusterAlgo =
113 
114  _theAlgo = std::shared_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
115  return _theAlgo;
116  }
117 
118 };
119 
120 #endif
121 
static bool CompareClusters(const T &a, const T &b)
Cluster max width.
std::shared_ptr< TTClusterAlgorithm< T > > produce(const TTClusterAlgorithmRecord &record)
Implement the producer.
JetCorrectorParameters::Record record
Definition: classes.h:7
Class to declare the algorithm to the framework.
ES_TTClusterAlgorithm_official(const edm::ParameterSet &p)
Constructor.
static std::string const input
Definition: EdmProvDump.cc:44
Base class for any algorithm to be used in TTClusterBuilder.
std::shared_ptr< TTClusterAlgorithm< T > > _theAlgo
Data members.
virtual ~ES_TTClusterAlgorithm_official()
Destructor.
void Cluster(std::vector< std::vector< T > > &output, const std::vector< T > &input, bool isPS) const
Clustering operations.
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
Class for "official" algorithm to be used in TTClusterBuilder.
TTClusterAlgorithm_official(int aWidthCut)
Constructor.
Class to store the TTClusterAlgorithm used in TTClusterBuilder.
long double T