CMS 3D CMS Logo

Cluster1D.h
Go to the documentation of this file.
1 #ifndef _Cluster1D_H_
2 #define _Cluster1D_H_
3 
5 
6 #include <vector>
7 
12 template <class T>
13 class Cluster1D {
14 public:
15  Cluster1D(); // needed :-(
16  Cluster1D(const Measurement1D &meas, const std::vector<const T *> &tracks, double weight = 1.0);
17 
18  Measurement1D position() const;
19  std::vector<const T *> tracks() const;
20  double weight() const;
21  // bool operator== ( const Cluster1D<T> & other ) const;
22 
23 private:
25  std::vector<const T *> theTracks;
26  double theWeight;
27 };
28 
29 /*
30  * implementation
31  */
32 
33 template <class T>
34 Cluster1D<T>::Cluster1D(const Measurement1D &meas, const std::vector<const T *> &t, double weight)
35  : theMeasurement1D(meas), theTracks(t), theWeight(weight) {}
36 
37 template <class T>
38 Cluster1D<T>::Cluster1D() : theMeasurement1D(), theTracks(), theWeight(0.) {}
39 
40 template <class T>
41 std::vector<const T *> Cluster1D<T>::tracks() const {
42  return theTracks;
43 }
44 
45 template <class T>
47  return theMeasurement1D;
48 }
49 
50 template <class T>
51 double Cluster1D<T>::weight() const {
52  return theWeight;
53 }
54 
55 #endif
Measurement1D
Definition: Measurement1D.h:11
Cluster1D
Definition: Cluster1D.h:13
Measurement1D.h
Cluster1D::position
Measurement1D position() const
Definition: Cluster1D.h:46
Cluster1D::Cluster1D
Cluster1D()
Definition: Cluster1D.h:38
OrderedSet.t
t
Definition: OrderedSet.py:90
Cluster1D::weight
double weight() const
Definition: Cluster1D.h:51
Cluster1D::theMeasurement1D
Measurement1D theMeasurement1D
Definition: Cluster1D.h:24
Cluster1D::tracks
std::vector< const T * > tracks() const
Definition: Cluster1D.h:41
Cluster1D::theTracks
std::vector< const T * > theTracks
Definition: Cluster1D.h:25
Cluster1D::theWeight
double theWeight
Definition: Cluster1D.h:26
weight
Definition: weight.py:1