00001 // -*- C++ -*- 00002 #ifndef RIVET_DISKinematics_HH 00003 #define RIVET_DISKinematics_HH 00004 00005 #include "Rivet/Particle.hh" 00006 #include "Rivet/Event.hh" 00007 #include "Rivet/Projection.hh" 00008 #include "Rivet/Projections/DISLepton.hh" 00009 #include "Rivet/Projections/Beam.hh" 00010 #include "Rivet/RivetCLHEP.hh" 00011 00012 namespace Rivet { 00013 00014 /// This class projects out the DIS kinematic variables and relevant 00015 /// boosts for an event. 00016 class DISKinematics: public Projection { 00017 00018 public: 00019 00020 /// The default constructor. Must specify Beam and DISLepton 00021 /// projection objects which are guaranteed to live throughout the 00022 /// run. Also the PDG code of the incoming hadron (\a hadid) must be 00023 /// specified. 00024 inline DISKinematics(Beam& beamp, DISLepton& leptonp, const ParticleName& hadid) 00025 : _beams(&beamp), _lepton(&leptonp), _idhad(hadid), 00026 _theQ2(-1.0), _theW2(-1.0), _theX(-1.0) 00027 { 00028 addBeamPair(ANY, hadid); 00029 addProjection(beamp); 00030 addProjection(leptonp); 00031 } 00032 00033 public: 00034 /// Return the name of the projection 00035 inline string getName() const { 00036 return "DISKinematics"; 00037 } 00038 00039 protected: 00040 00041 /// Perform the projection operation on the supplied event. 00042 virtual void project(const Event& e); 00043 00044 /// Compare with other projections. 00045 virtual int compare(const Projection& p) const; 00046 00047 public: 00048 00049 /// The \f$Q^2\f$. 00050 inline double Q2() const { return _theQ2; } 00051 00052 /// The \f$W^2\f$. 00053 inline double W2() const { return _theW2; } 00054 00055 /// The Bjorken \f$x\f$. 00056 inline double x() const { return _theX; } 00057 00058 /// The LorentzRotation needed to boost a particle to the hadronic CM frame. 00059 inline const LorentzRotation& boostHCM() const { 00060 return _hcm; 00061 } 00062 00063 /// The LorentzRotation needed to boost a particle to the hadronic Breit frame. 00064 inline const LorentzRotation& boostBreit() const { 00065 return _breit; 00066 } 00067 00068 private: 00069 00070 /// The Beam projector object defining the incoming beam particles. 00071 Beam* _beams; 00072 00073 /// The projector for the scattered lepton. 00074 DISLepton* _lepton; 00075 00076 /// The PDG id of the incoming hadron. 00077 long _idhad; 00078 00079 /// The \f$Q^2\f$. 00080 double _theQ2; 00081 00082 /// The \f$W^2\f$. 00083 double _theW2; 00084 00085 /// The Bjorken \f$x\f$. 00086 double _theX; 00087 00088 /// The LorentzRotation needed to boost a particle to the hadronic CM frame. 00089 LorentzRotation _hcm; 00090 00091 /// The LorentzRotation needed to boost a particle to the hadronic Breit frame. 00092 LorentzRotation _breit; 00093 00094 }; 00095 00096 } 00097 00098 #endif