CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
15 public:
16  Cluster1D (); // needed :-(
17  Cluster1D ( const Measurement1D & meas,
18  const std::vector < const T * > & tracks, double weight = 1.0 );
19 
20  Measurement1D position() const;
21  std::vector < const T * > tracks() const;
22  double weight() const;
23  // bool operator== ( const Cluster1D<T> & other ) const;
24 
25 private:
27  std::vector < const T *> theTracks;
28  double theWeight;
29 };
30 
31 /*
32  * implementation
33  */
34 
35 template <class T>
37  const std::vector < const T * > & t,
38  double weight ) :
39  theMeasurement1D(meas), theTracks(t), theWeight(weight)
40 {}
41 
42 template <class T>
44  theMeasurement1D(), theTracks(), theWeight(0.)
45 {}
46 
47 
48 template <class T>
49 std::vector < const T * > Cluster1D<T>::tracks() const
50 {
51  return theTracks;
52 }
53 
54 template <class T>
56 {
57  return theMeasurement1D;
58 }
59 
60 template <class T>
61 double Cluster1D<T>::weight() const
62 {
63  return theWeight;
64 }
65 
66 #endif
Cluster1D()
Definition: Cluster1D.h:43
double theWeight
Definition: Cluster1D.h:28
std::vector< const T * > theTracks
Definition: Cluster1D.h:27
std::vector< const T * > tracks() const
Definition: Cluster1D.h:49
Measurement1D position() const
Definition: Cluster1D.h:55
double weight() const
Definition: Cluster1D.h:61
Measurement1D theMeasurement1D
Definition: Cluster1D.h:26
int weight
Definition: histoStyle.py:50