CommonTools
Clustering1D
interface
Cluster1D.h
Go to the documentation of this file.
1
#ifndef _Cluster1D_H_
2
#define _Cluster1D_H_
3
4
#include "
DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h
"
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
:
24
Measurement1D
theMeasurement1D
;
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>
46
Measurement1D
Cluster1D<T>::position
()
const
{
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
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
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
weight
Definition:
weight.py:1
Generated for CMSSW Reference Manual by
1.8.16