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
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
BeamThrust()
Constructor.
Definition: BeamThrust.hh:15
int compare(const Projection &p) const
Compare projections.
Definition: BeamThrust.hh:37
Definition: Event.hh:22
Definition: BeamThrust.hh:11
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
virtual const Projection * clone() const
Clone on the heap.
Definition: BeamThrust.hh:23
void project(const Event &e)
Perform the projection on the Event.
Definition: BeamThrust.hh:30
void calc(const FinalState &fs)
Manually calculate the beamthrust, without engaging the caching system.
Definition: BeamThrust.cc:10
Base class for all Rivet projections.
Definition: Projection.hh:28