00001 // -*- C++ -*- 00002 #ifndef RIVET_DISLepton_HH 00003 #define RIVET_DISLepton_HH 00004 00005 #include "Rivet/Projections/Beam.hh" 00006 #include "Rivet/Projections/FinalState.hh" 00007 #include "Rivet/Particle.hh" 00008 #include "Rivet/Event.hh" 00009 00010 namespace Rivet { 00011 00012 /// This class projects out the incoming and outgoing leptons in a DIS 00013 /// event. The incoming lepton is assumed to be along the positive z-axis. 00014 class DISLepton: public Projection { 00015 00016 public: 00017 00018 /// The default constructor. Must specify the incoming and 00019 /// outgoing PDG codes of the leptons to project. If \a inid is 00020 /// an anti-particle and \a outid a particle, or vice versa, 00021 /// either a scattered lepton or anti-lepton is searched for. Must 00022 /// also specify a Beam and FinalState projection object which is 00023 /// assumed to live thoughout the run. 00024 inline DISLepton(Beam& beam, FinalState& fsp, 00025 const ParticleName& inid, const ParticleName& outid) 00026 : _beamproj(beam), _fsproj(fsp), _idin(inid), _idout(outid) 00027 { 00028 _beamPairs.insert(BeamPair(inid, ANY)); 00029 addProjection(_beamproj); 00030 addProjection(fsp); 00031 } 00032 00033 00034 public: 00035 /// Return the name of the projection 00036 inline string getName() const { 00037 return "DISLepton"; 00038 } 00039 00040 protected: 00041 00042 /// Perform the projection operation on the supplied event. 00043 virtual void project(const Event& e); 00044 00045 /// Compare with other projections. 00046 virtual int compare(const Projection& p) const; 00047 00048 public: 00049 00050 /// The incoming lepton. 00051 inline const Particle& in() const { return _incoming; } 00052 00053 /// The outgoing lepton. 00054 inline const Particle& out() const { return _outgoing; } 00055 00056 private: 00057 00058 /// The Beam projector object defining the incoming beam particles. 00059 Beam _beamproj; 00060 00061 /// The FinalState projection used by this projection 00062 FinalState _fsproj; 00063 00064 /// The PDG id of the incoming lepton. 00065 long _idin; 00066 00067 /// The PDG id of the outcoming lepton. 00068 long _idout; 00069 00070 /// The incoming lepton. 00071 Particle _incoming; 00072 00073 /// The incoming lepton. 00074 Particle _outgoing; 00075 00076 }; 00077 00078 } 00079 00080 00081 #endif