stablejet is hosted by Hepforge, IPPP Durham
StableJet
PtPartitioningIndex.h
1 #ifndef PtPartitioningIndex_h
2 #define PtPartitioningIndex_h
3 
4 #include <vector>
5 
6 #include "ClusteringComparisonIndex.h"
7 
8 namespace stab {
14  {
15  public:
16  inline virtual ~PtPartitioningIndex() {}
17 
19  double index(const PseudoJet* inputParticles,
20  const unsigned* clustering1,
21  const unsigned* clustering2,
22  unsigned size) const;
23  private:
25  virtual double processInterClusterMatrix(const double* data,
26  unsigned nrows,
27  unsigned ncols,
28  double ptSum,
29  double ptSumsq) const = 0;
30 
31  unsigned max_element( const unsigned * clu, unsigned size ) const;
32 
33  mutable std::vector<double> storage_;
34  };
35 
40  {
41  double processInterClusterMatrix(const double* data,
42  unsigned nrows,
43  unsigned ncols,
44  double ptSum,
45  double ptSumsq) const;
46  struct ElementSort
47  {
48  double ptsum;
49  unsigned row;
50  unsigned col;
51 
52  inline bool operator<(const ElementSort& r) const
53  {
54  return ptsum > r.ptsum;
55  }
56  };
57 
58  mutable std::vector<ElementSort> storage_;
59  mutable std::vector<int> intstorage_;
60  };
61 
62 
68  {
69  double processInterClusterMatrix(const double* data,
70  unsigned nrows,
71  unsigned ncols,
72  double ptSum,
73  double ptSumsq) const;
74  mutable std::vector<long double> storage_;
75  };
76 }
77 
78 #endif // PtPartitioningIndex_h
Implementation of Minimal Matching Distance stabiltiy index.
double index(const PseudoJet *inputParticles, const unsigned *clustering1, const unsigned *clustering2, unsigned size) const
Calculate the stability index.