CMS 3D CMS Logo

Clusterizer1DCommons.h
Go to the documentation of this file.
1 #ifndef _Clusterizer1DCommons_H_
2 #define _Clusterizer1DCommons_H_
3 
5 
7  // typedef Clusterizer1DCommons::Cluster1D Cluster1D;
8  inline double square(const double a) { return a * a; }
9 
10  template <class T>
11  struct ComparePairs {
12  bool operator()(const Cluster1D<T>& c1, const Cluster1D<T>& c2) {
13  return (c1.position().value() < c2.position().value());
14  };
15  };
16 
17  template <class T>
18  void add(const std::vector<const T*>& source, std::vector<const T*>& dest) {
19  for (typename std::vector<const T*>::const_iterator i = source.begin(); i != source.end(); ++i) {
20  dest.push_back(*i);
21  };
22  }
23 
24 } // namespace Clusterizer1DCommons
25 
26 #endif
Clusterizer1DCommons
Definition: Clusterizer1DCommons.h:6
mps_fire.i
i
Definition: mps_fire.py:355
Cluster1D
Definition: Cluster1D.h:13
Clusterizer1DCommons::add
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
Definition: Clusterizer1DCommons.h:18
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
Clusterizer1DCommons::square
double square(const double a)
Definition: Clusterizer1DCommons.h:8
Cluster1D::position
Measurement1D position() const
Definition: Cluster1D.h:46
Clusterizer1DCommons::ComparePairs
Definition: Clusterizer1DCommons.h:11
Clusterizer1DCommons::ComparePairs::operator()
bool operator()(const Cluster1D< T > &c1, const Cluster1D< T > &c2)
Definition: Clusterizer1DCommons.h:12
source
static const std::string source
Definition: EdmProvDump.cc:47
Cluster1D.h
a
double a
Definition: hdecay.h:119
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
mps_fire.dest
dest
Definition: mps_fire.py:179