Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef RIVET_DISKinematics_HH
0003 #define RIVET_DISKinematics_HH
0004 
0005 #include "Rivet/Particle.hh"
0006 #include "Rivet/Event.hh"
0007 #include "Rivet/Projection.hh"
0008 #include "Rivet/Projections/DISLepton.hh"
0009 #include "Rivet/Projections/Beam.hh"
0010 
0011 namespace Rivet {
0012 
0013 
0014   /// Type of DIS boost to apply
0015   enum class DISFrame { HCM, XCM, BREIT, LAB };
0016 
0017   
0018   /// @brief Get the DIS kinematic variables and relevant boosts for an event.
0019   class DISKinematics : public Projection {
0020   public:
0021 
0022     /// The default constructor.
0023     DISKinematics(const DISLepton& lepton=DISLepton())
0024       : _theQ2(-1.0), _theW2(-1.0), _theX(-1.0), _theY(-1.0), _theS(-1.0), _theGH(-1.0)
0025     {
0026       setName("DISKinematics");
0027       //addPdgIdPair(ANY, hadid);
0028       declare(Beam(), "Beam");
0029       declare(lepton, "Lepton");
0030     }
0031 
0032     /// Clone on the heap.
0033     RIVET_DEFAULT_PROJ_CLONE(DISKinematics);
0034 
0035     /// Import to avoid warnings about overload-hiding
0036     using Projection::operator =;
0037 
0038 
0039   protected:
0040 
0041     /// Perform the projection operation on the supplied event.
0042     virtual void project(const Event& e);
0043 
0044     /// Compare with other projections.
0045     virtual CmpState compare(const Projection& p) const;
0046 
0047 
0048   public:
0049 
0050     /// @brief The \f$Q^2\f$, i.e. the virtuality of the DIS photon.
0051     ///
0052     /// Calculated by identifying the virtual photon momentum as the
0053     /// difference between incoming and outgoing scattered-lepton momenta.
0054     double Q2() const { return _theQ2; }
0055 
0056     /// The \f$W^2\f$, i.e. the squared CoM energy of the DIS-photon+hadron system.
0057     double W2() const { return _theW2; }
0058 
0059     /// The Bjorken \f$x\f$.
0060     double x() const { return _theX; }
0061 
0062     /// The inelasticity \f$y\f$
0063     double y() const { return _theY; }
0064 
0065     /// The centre of mass energy \f$s\f$
0066     double s() const { return _theS; }
0067 
0068     /// The angle \f$\gamma_{had}\f$
0069     double gammahad() const { return _theGH; }
0070 
0071 
0072 
0073     /// The LorentzRotation needed to boost a particle to the hadronic CM frame.
0074     const LorentzTransform& boostHCM() const {
0075       return _hcm;
0076     }
0077 
0078     /// The LorentzRotation needed to boost a particle to the hadronic Breit frame.
0079     const LorentzTransform& boostBreit() const {
0080       return _breit;
0081     }
0082 
0083     /// The incoming hadron beam particle
0084     const Particle& beamHadron() const {
0085       return _inHadron;
0086     }
0087 
0088     /// The incoming lepton beam particle
0089     const Particle& beamLepton() const {
0090       return _inLepton;
0091     }
0092 
0093     /// The scattered DIS lepton
0094     const Particle& scatteredLepton() const {
0095       return _outLepton;
0096     }
0097 
0098     /// @brief 1/-1 multiplier indicating (respectively) whether the event has conventional orientation or not
0099     ///
0100     /// Conventional DIS orientation has the hadron travelling in the +z direction
0101     int orientation() const {
0102       return sign(_inHadron.pz());
0103     }
0104 
0105 
0106   protected:
0107 
0108     /// The \f$Q^2\f$.
0109     double _theQ2;
0110 
0111     /// The \f$W^2\f$.
0112     double _theW2;
0113 
0114     /// The Bjorken \f$x\f$.
0115     double _theX;
0116 
0117     /// The Inelasticity \f$y\f$
0118     double _theY;
0119 
0120     /// The centre of mass energy \f$s\f$
0121     double _theS;
0122    /// The angle \f$\gamma_{had}\f$
0123     double _theGH;
0124 
0125 
0126     /// Incoming and outgoing DIS particles
0127     Particle _inHadron, _inLepton, _outLepton;
0128 
0129     /// The LorentzRotation needed to boost a particle to the hadronic CM frame.
0130     LorentzTransform _hcm;
0131 
0132     /// The LorentzRotation needed to boost a particle to the hadronic Breit frame.
0133     LorentzTransform _breit;
0134 
0135   };
0136 
0137 
0138 }
0139 
0140 #endif