Rivet  1.8.0
FParameter.hh
1 // -*- C++ -*-
2 #ifndef RIVET_Sphericity_HH
3 #define RIVET_FParameter_HH
4 
5 #include "Rivet/Projection.hh"
6 #include "Rivet/Projections/FinalState.hh"
7 #include "Rivet/Event.hh"
8 
9 
10 namespace Rivet {
11 
12  class FParameter : public Projection {
13 
14  public:
15 
17 
18 
20  FParameter(const FinalState& fsp);
21 
23  virtual const Projection* clone() const {
24  return new FParameter(*this);
25  }
26 
28 
29 
30  protected:
31 
33  void project(const Event& e);
34 
36  //int compare(const Projection& p) const;
37  // Taken from Thrust.hh
38  int compare(const Projection& p) const {
39  return mkNamedPCmp(p, "FS");
40  }
41  public:
42 
44  void clear();
45 
49  double F() const { return lambda1() >= lambda2() ? lambda2()/lambda1() : lambda1()/lambda2(); }
51 
54  double lambda1() const { return _lambdas[0]; }
55  double lambda2() const { return _lambdas[1]; }
57 
58 
61 
62 
64  void calc(const FinalState& fs);
65 
67  void calc(const vector<Particle>& fsparticles);
68 
70  void calc(const vector<FourMomentum>& fsmomenta);
71 
73  void calc(const vector<Vector3>& fsmomenta);
74 
76  private:
78  vector<double> _lambdas;
79 
80  private:
81 
83  void _calcFParameter(const vector<Vector3>& fsmomenta);
84 
85  };
86 }
87 
88 
89 #endif