Rivet  1.8.3
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(double rparam=2.0): _regparam(rparam){}
60 
61  Sphericity(const FinalState& fsp, double rparam=2.0);
62 
64  virtual const Projection* clone() const {
65  return new Sphericity(*this);
66  }
67 
69 
70 
71  protected:
72 
74  void project(const Event& e);
75 
77  int compare(const Projection& p) const;
78 
79  public:
80 
82  void clear();
83 
87  double sphericity() const { return 3.0 / 2.0 * (lambda2() + lambda3()); }
89  double transSphericity() const { return 2.0 * lambda2() / ( lambda1() + lambda2() ); }
91  double planarity() const { return 2 * (sphericity() - 2 * aplanarity()) / 3.0; }
93  double aplanarity() const { return 3 / 2.0 * lambda3(); }
95 
99  const Vector3& sphericityAxis() const { return _sphAxes[0]; }
101  const Vector3& sphericityMajorAxis() const { return _sphAxes[1]; }
103  const Vector3& sphericityMinorAxis() const { return _sphAxes[2]; }
105 
107  const Vector3& axis1() const { return sphericityAxis(); }
108  const Vector3& axis2() const { return sphericityMajorAxis(); }
109  const Vector3& axis3() const { return sphericityMinorAxis(); }
111 
112 
115  double lambda1() const { return _lambdas[0]; }
116  double lambda2() const { return _lambdas[1]; }
117  double lambda3() const { return _lambdas[2]; }
119 
120 
123 
124 
126  void calc(const FinalState& fs);
127 
129  void calc(const vector<Particle>& fsparticles);
130 
132  void calc(const vector<FourMomentum>& fsmomenta);
133 
135  void calc(const vector<Vector3>& fsmomenta);
136 
138 
139 
140 
141  private:
143  vector<double> _lambdas;
144 
146  vector<Vector3> _sphAxes;
147 
149  const double _regparam;
150 
151  private:
152 
154  void _calcSphericity(const vector<Vector3>& fsmomenta);
155 
156  };
157 
158 }
159 
160 
161 #endif