rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
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 
12  class BeamThrust : public Projection {
13  public:
14 
17 
18  BeamThrust(const FinalState& fsp) {
19  setName("BeamThrust");
20  addProjection(fsp, "FS");
21  }
22 
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:133
Definition: ALICE_2010_I880049.cc:13
DEFAULT_RIVET_PROJ_CLONE(BeamThrust)
Clone on the heap.
BeamThrust()
Constructor.
Definition: BeamThrust.hh:16
std::vector< GenParticle const * > particles(const GenEvent *ge)
Definition: RivetHepMC.hh:36
int compare(const Projection &p) const
Compare projections.
Definition: BeamThrust.hh:37
Definition: Event.hh:22
Definition: BeamThrust.hh:12
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:12
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
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:29