BeamThrust.hh
// -*- C++ -*-
#ifndef RIVET_BeamThrust_HH
#define RIVET_BeamThrust_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Event.hh"
namespace Rivet {
class BeamThrust : public Projection {
public:
BeamThrust() {}
BeamThrust(const FinalState& fsp) {
setName("BeamThrust");
addProjection(fsp, "FS");
}
virtual const Projection* clone() const {
return new BeamThrust(*this);
}
protected:
void project(const Event& e) {
const vector<Particle> ps
= applyProjection<FinalState>(e, "FS").particles();
calc(ps);
}
int compare(const Projection& p) const {
return mkNamedPCmp(p, "FS");
}
public:
double beamthrust() const { return _beamthrust; }
public:
void calc(const FinalState& fs);
void calc(const vector<Particle>& fsparticles);
void calc(const vector<FourMomentum>& fsmomenta);
private:
double _beamthrust;
private:
void _calcBeamThrust(const vector<FourMomentum>& fsmomenta);
};
}
#endif
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::BeamThrust::BeamThrust
BeamThrust()
Constructor.
Definition: BeamThrust.hh:15
Rivet::BeamThrust::compare
int compare(const Projection &p) const
Compare projections.
Definition: BeamThrust.hh:37
Rivet::Event
Definition: Event.hh:22
Rivet::BeamThrust
Definition: BeamThrust.hh:11
Rivet::Projection::mkNamedPCmp
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
Rivet::ProjectionApplier::addProjection
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
Rivet::BeamThrust::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: BeamThrust.hh:23
Rivet::BeamThrust::project
void project(const Event &e)
Perform the projection on the Event.
Definition: BeamThrust.hh:30
Rivet::BeamThrust::calc
void calc(const FinalState &fs)
Manually calculate the beamthrust, without engaging the caching system.
Definition: BeamThrust.cc:10
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28