Rivet  1.8.3
BeamThrust.hh
1 // -*- C++ -*-
2 #ifndef RIVET_BeamThrust_HH
3 #define RIVET_BeamThrust_HH
4 
5 #include "Rivet/Projection.hh"
6 #include "Rivet/Projections/FinalState.hh"
7 #include "Rivet/Event.hh"
8 
9 namespace Rivet {
10 
11  class BeamThrust : public Projection {
12  public:
13 
16 
17  BeamThrust(const FinalState& fsp) {
18  setName("BeamThrust");
19  addProjection(fsp, "FS");
20  }
21 
23  virtual const Projection* clone() const {
24  return new BeamThrust(*this);
25  }
26 
27  protected:
28 
30  void project(const Event& e) {
31  const vector<Particle> ps
32  = applyProjection<FinalState>(e, "FS").particles();
33  calc(ps);
34  }
35 
37  int compare(const Projection& p) const {
38  return mkNamedPCmp(p, "FS");
39  }
40 
41 
42  public:
43 
44  double beamthrust() const { return _beamthrust; }
45 
46  public:
47 
50 
51 
53  void calc(const FinalState& fs);
54 
56  void calc(const vector<Particle>& fsparticles);
57 
59  void calc(const vector<FourMomentum>& fsmomenta);
60 
62 
63 
64  private:
65 
67  double _beamthrust;
68 
69  private:
70 
72  void _calcBeamThrust(const vector<FourMomentum>& fsmomenta);
73 
74  };
75 
76 }
77 
78 #endif