Rivet  1.8.0
Sphericity.hh
1 // -*- C++ -*-
2 #ifndef RIVET_Sphericity_HH
3 #define RIVET_Sphericity_HH
4 
5 #include "Rivet/Projection.hh"
6 #include "Rivet/Projections/AxesDefinition.hh"
7 #include "Rivet/Projections/FinalState.hh"
8 #include "Rivet/Event.hh"
9 
10 
11 namespace Rivet {
12 
51  class Sphericity : public AxesDefinition {
52 
53  public:
54 
56 
57 
59  Sphericity(const FinalState& fsp, double rparam=2.0);
60 
62  virtual const Projection* clone() const {
63  return new Sphericity(*this);
64  }
65 
67 
68 
69  protected:
70 
72  void project(const Event& e);
73 
75  int compare(const Projection& p) const;
76 
77  public:
78 
80  void clear();
81 
85  double sphericity() const { return 3.0 / 2.0 * (lambda2() + lambda3()); }
87  double transSphericity() const { return 2.0 * lambda2() / ( lambda1() + lambda2() ); }
89  double planarity() const { return 2 * (sphericity() - 2 * aplanarity()) / 3.0; }
91  double aplanarity() const { return 3 / 2.0 * lambda3(); }
93 
97  const Vector3& sphericityAxis() const { return _sphAxes[0]; }
99  const Vector3& sphericityMajorAxis() const { return _sphAxes[1]; }
101  const Vector3& sphericityMinorAxis() const { return _sphAxes[2]; }
103 
105  const Vector3& axis1() const { return sphericityAxis(); }
106  const Vector3& axis2() const { return sphericityMajorAxis(); }
107  const Vector3& axis3() const { return sphericityMinorAxis(); }
109 
110 
113  double lambda1() const { return _lambdas[0]; }
114  double lambda2() const { return _lambdas[1]; }
115  double lambda3() const { return _lambdas[2]; }
117 
118 
121 
122 
124  void calc(const FinalState& fs);
125 
127  void calc(const vector<Particle>& fsparticles);
128 
130  void calc(const vector<FourMomentum>& fsmomenta);
131 
133  void calc(const vector<Vector3>& fsmomenta);
134 
136 
137 
138 
139  private:
141  vector<double> _lambdas;
142 
144  vector<Vector3> _sphAxes;
145 
147  const double _regparam;
148 
149  private:
150 
152  void _calcSphericity(const vector<Vector3>& fsmomenta);
153 
154  };
155 
156 }
157 
158 
159 #endif