Rivet  1.8.0
Beam.hh
00001 // -*- C++ -*-
00002 #ifndef RIVET_Beam_HH
00003 #define RIVET_Beam_HH
00004 
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Event.hh"
00007 #include "Rivet/Particle.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00013 
00014 
00016   ParticlePair beams(const Event& e);
00017 
00019   PdgIdPair beamIds(const Event& e);
00020 
00022   PdgIdPair beamIds(const ParticlePair& beams);
00023 
00025   double sqrtS(const Event& e);
00026 
00028   double sqrtS(const ParticlePair& beams);
00029 
00031   double sqrtS(const FourMomentum& pa, const FourMomentum& pb);
00032 
00034 
00035 
00036 
00037 
00039   class Beam : public Projection {
00040   public:
00041 
00043     Beam() {
00044       setName("Beam");
00045     }
00046 
00048     virtual const Projection* clone() const {
00049       return new Beam(*this);
00050     }
00051 
00052 
00053   public:
00054 
00056     const ParticlePair& beams() const {
00057       return _theBeams;
00058     }
00059 
00061     const PdgIdPair beamIds() const {
00062       return Rivet::beamIds(beams());
00063     }
00064 
00066     double sqrtS() const;
00067 
00068 
00069   public:
00070 
00072     virtual void project(const Event& e);
00073 
00074 
00075   protected:
00076 
00078     virtual int compare(const Projection& UNUSED(p)) const {
00079       return EQUIVALENT;
00080     }
00081 
00082 
00083   private:
00084 
00086     ParticlePair _theBeams;
00087 
00088   };
00089 
00090 
00091 }
00092 
00093 #endif