Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-05-12 09:05:01

0001 // -*- C++ -*-
0002 #ifndef RIVET_Beam_HH
0003 #define RIVET_Beam_HH
0004 
0005 #include "Rivet/Projection.hh"
0006 #include "Rivet/Event.hh"
0007 #include "Rivet/Particle.hh"
0008 #include "Rivet/Tools/Beams.hh"
0009 #include "Rivet/Math/LorentzTrans.hh"
0010 
0011 namespace Rivet {
0012 
0013 
0014   /// @brief Project out the incoming beams
0015   class Beam : public Projection {
0016   public:
0017 
0018     /// Import to avoid warnings about overload-hiding
0019     using Projection::operator=;
0020 
0021     /// Default (and only) constructor
0022     Beam() { setName("Beam"); }
0023 
0024     /// Clone on the heap
0025     RIVET_DEFAULT_PROJ_CLONE(Beam);
0026 
0027 
0028     /// @name Beam particles and kinematics
0029     /// @{
0030 
0031     /// The pair of beam particles in the current collision
0032     const ParticlePair& beams() const { return _theBeams; }
0033 
0034     /// Get centre of mass energy, \f$ \sqrt{s} \f$
0035     double sqrtS() const { return Rivet::sqrtS(beams()); }
0036 
0037     /// Get the Lorentz boost to the beam centre-of-mass
0038     FourMomentum cmsBoostVec() const { return Rivet::cmsBoostVec(beams()); }
0039 
0040     /// Get the Lorentz transform to the beam centre-of-mass
0041     LorentzTransform cmsTransform() const { return Rivet::cmsTransform(beams()); }
0042 
0043     /// Get the beta factor vector for the Lorentz boost to the beam centre-of-mass
0044     Vector3 cmsBetaVec() const { return Rivet::cmsBetaVec(beams()); }
0045 
0046     /// Get the gamma factor vector for the Lorentz boost to the beam centre-of-mass
0047     Vector3 cmsGammaVec() const { return Rivet::cmsGammaVec(beams()); }
0048 
0049     /// @}
0050 
0051 
0052     /// @name Per-nucleon beam kinematics
0053     /// @{
0054 
0055     /// Get per-nucleon centre of mass energy, \f$ \sqrt{s}/(A_1 + A_2) \f$
0056     double asqrtS() const { return Rivet::asqrtS(beams()); }
0057 
0058     /// Get the Lorentz boost to the per-nucleon beam centre-of-mass
0059     Vector3 acmsBetaVec() const { return Rivet::acmsBetaVec(beams()); }
0060 
0061     /// Get the Lorentz boost to the per-nucleon beam centre-of-mass
0062     Vector3 acmsGammaVec() const { return Rivet::acmsGammaVec(beams()); }
0063 
0064     /// Get the Lorentz transform to the per-nucleon beam centre-of-mass
0065     LorentzTransform acmsTransform() const { return Rivet::acmsTransform(beams()); }
0066 
0067     /// @}
0068 
0069 
0070     /// Get the beam interaction primary vertex (PV) position
0071     FourVector pv() const;
0072 
0073 
0074     /// Project on to the Event
0075     virtual void project(const Event& e);
0076 
0077 
0078   protected:
0079 
0080     /// The beam particles in the current collision
0081     ParticlePair _theBeams;
0082 
0083 
0084   protected:
0085 
0086     /// Compare with other projections -- it's always the same, since there are no params
0087     virtual CmpState compare(const Projection&) const { return CmpState::EQ; }
0088 
0089   };
0090 
0091 
0092 }
0093 
0094 #endif