Beam.hh
// -*- C++ -*-
#ifndef RIVET_Beam_HH
#define RIVET_Beam_HH
#include "Rivet/Projection.hh"
#include "Rivet/Event.hh"
#include "Rivet/Particle.hh"
namespace Rivet {
ParticlePair beams(const Event& e);
PdgIdPair beamIds(const Event& e);
PdgIdPair beamIds(const ParticlePair& beams);
double sqrtS(const Event& e);
double sqrtS(const ParticlePair& beams);
double sqrtS(const FourMomentum& pa, const FourMomentum& pb);
class Beam : public Projection {
public:
Beam() {
setName("Beam");
}
virtual const Projection* clone() const {
return new Beam(*this);
}
public:
const ParticlePair& beams() const {
return _theBeams;
}
const PdgIdPair beamIds() const {
return Rivet::beamIds(beams());
}
double sqrtS() const;
public:
virtual void project(const Event& e);
protected:
virtual int compare(const Projection& UNUSED(p)) const {
return EQUIVALENT;
}
private:
ParticlePair _theBeams;
};
}
#endif
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Rivet::Beam::beams
const ParticlePair & beams() const
The pair of beam particles in the current collision.
Definition: Beam.hh:56
Rivet::beams
ParticlePair beams(const Event &e)
Function to get beam particles from an event.
Definition: Beam.cc:9
Rivet::Beam::project
virtual void project(const Event &e)
Project on to the Event.
Definition: Beam.cc:50
Rivet::Beam::Beam
Beam()
The default constructor.
Definition: Beam.hh:43
Rivet::Beam::compare
virtual int compare(const Projection &UNUSED(p)) const
Compare with other projections.
Definition: Beam.hh:78
Rivet::Beam::sqrtS
double sqrtS() const
Get centre of mass energy, .
Definition: Beam.cc:69
Rivet::Event
Definition: Event.hh:22
Rivet::ParticlePair
std::pair< Particle, Particle > ParticlePair
Typedef for a pair of Particle objects.
Definition: Particle.fhh:20
Rivet::PdgIdPair
std::pair< PdgId, PdgId > PdgIdPair
Typedef for a pair of particle names.
Definition: Particle.fhh:32
Rivet::sqrtS
double sqrtS(const Event &e)
Function to get beam centre of mass energy from an event.
Definition: Beam.cc:25
Rivet::beamIds
PdgIdPair beamIds(const Event &e)
Function to get beam particle IDs from an event.
Definition: Beam.cc:15
Rivet::Beam::clone
virtual const Projection * clone() const
Clone on the heap.
Definition: Beam.hh:48
Rivet::Beam
Project out the incoming beams.
Definition: Beam.hh:39
Rivet::Beam::beamIds
const PdgIdPair beamIds() const
The pair of beam particle PDG codes in the current collision.
Definition: Beam.hh:61
Rivet::Projection
Base class for all Rivet projections.
Definition: Projection.hh:28