rivet is hosted by Hepforge, IPPP Durham
Beam.hh
Go to the documentation of this file.
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 #include "Rivet/Math/LorentzTrans.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// @name Standalone beam kinematics functions
00014   //@{
00015 
00016   /// Get beam particles from an event
00017   ParticlePair beams(const Event& e);
00018 
00019   /// Get beam particle IDs from a pair of Particles
00020   /// @deprecated Use pids(beams)
00021   inline PdgIdPair beamIds(const ParticlePair& beams) { return pids(beams); }
00022 
00023   /// Get beam particle IDs from an event
00024   /// @deprecated Use pids(e.beams())
00025   inline PdgIdPair beamIds(const Event& e) { return pids(beams(e)); }
00026 
00027 
00028   /// Get beam centre-of-mass energy from a pair of beam momenta
00029   double sqrtS(const FourMomentum& pa, const FourMomentum& pb);
00030 
00031   /// Get beam centre-of-mass energy from a pair of Particles
00032   inline double sqrtS(const ParticlePair& beams) {
00033     return sqrtS(beams.first.momentum(), beams.second.momentum());
00034   }
00035 
00036   /// Get beam centre-of-mass energy from an Event
00037   inline double sqrtS(const Event& e) { return sqrtS(beams(e)); }
00038 
00039 
00040   /// Get per-nucleon beam centre-of-mass energy from a pair of beam momenta
00041   /// @note Uses a nominal nucleon mass of 0.939 GeV to convert masses to A
00042   double asqrtS(const FourMomentum& pa, const FourMomentum& pb);
00043 
00044   /// Get per-nucleon beam centre-of-mass energy from a pair of Particles
00045   /// @note Uses the sum of nuclear mass numbers A for each beam
00046   double asqrtS(const ParticlePair& beams);
00047 
00048   /// Get per-nucleon beam centre-of-mass energy from an Event
00049   /// @note Uses the sum of nuclear mass numbers A for each beam
00050   inline double asqrtS(const Event& e) { return asqrtS(beams(e)); }
00051 
00052 
00053   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta
00054   inline FourMomentum cmsBoostVec(const FourMomentum& pa, const FourMomentum& pb) {
00055     return pa + pb;
00056   }
00057 
00058   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles
00059   inline FourMomentum cmsBoostVec(const ParticlePair& beams) {
00060     return cmsBoostVec(beams.first, beams.second);
00061   }
00062 
00063   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta
00064   FourMomentum acmsBoostVec(const FourMomentum& pa, const FourMomentum& pb);
00065 
00066   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles
00067   FourMomentum acmsBoostVec(const ParticlePair& beams);
00068 
00069 
00070   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta
00071   Vector3 cmsBetaVec(const FourMomentum& pa, const FourMomentum& pb);
00072 
00073   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles
00074   inline Vector3 cmsBetaVec(const ParticlePair& beams) {
00075     return cmsBetaVec(beams.first, beams.second);
00076   }
00077 
00078 
00079   /// Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of beam momenta
00080   /// @note Uses a nominal nucleon mass of 0.939 GeV to convert masses to A
00081   Vector3 acmsBetaVec(const FourMomentum& pa, const FourMomentum& pb);
00082 
00083   /// Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of Particles
00084   /// @note Uses the sum of nuclear mass numbers A for each beam
00085   Vector3 acmsBetaVec(const ParticlePair& beams);
00086 
00087 
00088   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta
00089   Vector3 cmsGammaVec(const FourMomentum& pa, const FourMomentum& pb);
00090 
00091   /// Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles
00092   inline Vector3 cmsGammaVec(const ParticlePair& beams) {
00093     return cmsGammaVec(beams.first, beams.second);
00094   }
00095 
00096 
00097   /// Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of beam momenta
00098   /// @note Uses a nominal nucleon mass of 0.939 GeV to convert masses to A
00099   Vector3 acmsGammaVec(const FourMomentum& pa, const FourMomentum& pb);
00100 
00101   /// Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of Particles
00102   /// @note Uses the sum of nuclear mass numbers A for each beam
00103   Vector3 acmsGammaVec(const ParticlePair& beams);
00104 
00105 
00106   /// Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of beam momenta
00107   LorentzTransform cmsTransform(const FourMomentum& pa, const FourMomentum& pb);
00108 
00109   /// Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of Particles
00110   inline LorentzTransform cmsTransform(const ParticlePair& beams) {
00111     return cmsTransform(beams.first, beams.second);
00112   }
00113 
00114 
00115   /// Get the Lorentz transformation to the per-nucleon beam centre-of-mass system (CMS) from a pair of beam momenta
00116   /// @note Uses a nominal nucleon mass of 0.939 GeV to convert masses to A
00117   LorentzTransform acmsTransform(const FourMomentum& pa, const FourMomentum& pb);
00118 
00119   /// Get the Lorentz transformation to the per-nucleon beam centre-of-mass system (CMS) from a pair of Particles
00120   /// @note Uses the sum of nuclear mass numbers A for each beam
00121   LorentzTransform acmsTransform(const ParticlePair& beams);
00122 
00123   //@}
00124 
00125 
00126 
00127 
00128   /// @brief Project out the incoming beams
00129   class Beam : public Projection {
00130   public:
00131 
00132     /// Default (and only) constructor
00133     Beam() { setName("Beam"); }
00134 
00135     /// Clone on the heap
00136     DEFAULT_RIVET_PROJ_CLONE(Beam);
00137 
00138 
00139     /// @name Beam particles and kinematics
00140     //@{
00141 
00142     /// The pair of beam particles in the current collision
00143     const ParticlePair& beams() const { return _theBeams; }
00144 
00145     /// The pair of beam particle PDG codes in the current collision
00146     /// @deprecated Use pids(beams())
00147     PdgIdPair beamIds() const { return pids(beams()); }
00148 
00149     /// Get centre of mass energy, \f$ \sqrt{s} \f$
00150     double sqrtS() const { return Rivet::sqrtS(beams()); }
00151 
00152     /// Get the Lorentz boost to the beam centre-of-mass
00153     FourMomentum cmsBoostVec() const { return Rivet::cmsBoostVec(beams()); }
00154 
00155     /// Get the Lorentz transform to the beam centre-of-mass
00156     LorentzTransform cmsTransform() const { return Rivet::cmsTransform(beams()); }
00157 
00158     /// Get the beta factor vector for the Lorentz boost to the beam centre-of-mass
00159     Vector3 cmsBetaVec() const { return Rivet::cmsBetaVec(beams()); }
00160 
00161     /// Get the gamma factor vector for the Lorentz boost to the beam centre-of-mass
00162     Vector3 cmsGammaVec() const { return Rivet::cmsGammaVec(beams()); }
00163 
00164     //@}
00165 
00166 
00167     /// @name Per-nucleon beam kinematics
00168     //@{
00169 
00170     /// Get per-nucleon centre of mass energy, \f$ \sqrt{s}/(A_1 + A_2) \f$
00171     double asqrtS() const { return Rivet::asqrtS(beams()); }
00172 
00173     /// Get the Lorentz boost to the per-nucleon beam centre-of-mass
00174     Vector3 acmsBetaVec() const { return Rivet::acmsBetaVec(beams()); }
00175 
00176     /// Get the Lorentz boost to the per-nucleon beam centre-of-mass
00177     Vector3 acmsGammaVec() const { return Rivet::acmsGammaVec(beams()); }
00178 
00179     /// Get the Lorentz transform to the per-nucleon beam centre-of-mass
00180     LorentzTransform acmsTransform() const { return Rivet::acmsTransform(beams()); }
00181 
00182     //@}
00183 
00184 
00185     /// Get the beam interaction primary vertex (PV) position
00186     FourVector pv() const;
00187 
00188 
00189     /// Project on to the Event
00190     virtual void project(const Event& e);
00191 
00192 
00193   private:
00194 
00195     /// Compare with other projections -- it's always the same, since there are no params
00196     virtual int compare(const Projection& UNUSED(p)) const { return EQUIVALENT; }
00197 
00198     /// The beam particles in the current collision
00199     ParticlePair _theBeams;
00200 
00201   };
00202 
00203 
00204 }
00205 
00206 #endif