Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:02:04

0001 /**
0002  \file
0003  Declaration of class erhic::EventDis.
0004  
0005  \author    Thomas Burton 
0006  \date      2012-05-01
0007  \copyright 2012 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_ERHIC_EVENTDIS_H_
0011 #define INCLUDE_EICSMEAR_ERHIC_EVENTDIS_H_
0012 
0013 #include <cmath>  // For pow
0014 
0015 #include <Rtypes.h>  // For ClassDef
0016 
0017 #include "eicsmear/erhic/VirtualEvent.h"
0018 
0019 namespace erhic {
0020 
0021 struct DisKinematics;
0022 class VirtualParticle;
0023 
0024 /**
0025  A deeply inelastic scattering event.
0026  Stores kinematics computed by different methods:
0027  <ul>
0028  <li>Using the scattered electron</li>
0029  <li>Jacquet-Blondel method (uses hadrons)</li>
0030  <li>Double-angle method (uses both hadrons and the scattered electron)</li>
0031  </ul>
0032  This is an abstract class, as it does not implement track methods
0033  inherited from VirtualEvent.
0034  The user must implement the appropriate methods for their track type
0035  in an inheriting class.
0036  */
0037 class EventDis : public VirtualEvent {
0038  public:
0039   /**
0040    Destructor.
0041    */
0042   virtual ~EventDis();
0043 
0044   /**
0045    Default constructor.
0046    */
0047   EventDis();
0048 
0049   /**
0050    Constructor copying another event's kinematics.
0051    */
0052   EventDis(const EventDis&);
0053 
0054   /**
0055    Assign another event's kinematics to this EventDis.
0056    */
0057   EventDis& operator=(const EventDis&);
0058 
0059   /**
0060    Returns Bjorken-x of the event.
0061    x<sub>B</sub> = Q<sup>2</sup>/(2p.q)
0062    */
0063   virtual Double_t GetX() const;
0064 
0065   /**
0066    Returns the four-momentum transfer (exchange boson mass) Q<sup>2</sup>.
0067    Q<sup>2</sup> = 2EE`(1+cos(theta)) = (e-e`)<sup>2</sup>
0068    */
0069 
0070   virtual Double_t GetQ2() const;
0071   /**
0072    Returns the event inelasticity.
0073    y = (p.q)/(p.e)
0074    */
0075 
0076   virtual Double_t GetY() const;
0077   /**
0078    Returns Y+ = y<sup>2</sup> / (1 + (1-y)<sup>2</sup>)
0079    */
0080 
0081   virtual Double_t GetYPlus() const;
0082   /**
0083    Returns the invariant mass of the hadronic final state.
0084    W<sup>2</sup> = M<sup>2</sup> + Q<sup>2</sup>(1-x)/x
0085    */
0086 
0087   virtual Double_t GetW2() const;
0088   /**
0089    Returns the exchange boson energy in the beam hadron rest frame.
0090    nu = q.p/M
0091    */
0092 
0093   virtual Double_t GetNu() const;
0094   /**
0095    Returns Bjorken x computed via the double-angle method.
0096    */
0097   virtual double GetXDoubleAngle() const;
0098 
0099   /**
0100    Returns Q-squared computed via the double-angle method.
0101    */
0102   virtual double GetQ2DoubleAngle() const;
0103 
0104   /**
0105    Returns inelasticity computed via the double-angle method.
0106    */
0107   virtual double GetYDoubleAngle() const;
0108 
0109   /**
0110    Returns W-squared computed via the double-angle method.
0111    */
0112   virtual double GetW2DoubleAngle() const;
0113 
0114   /**
0115    Returns Bjorken x computed via the Jacquet-Blondel method.
0116    */
0117   virtual double GetXJacquetBlondel() const;
0118   /**
0119    Returns Q-squared computed via the Jacquet-Blondel method.
0120     */
0121   virtual double GetQ2JacquetBlondel() const;
0122 
0123   /**
0124    Returns inelasticity computed via the Jacquet-Blondel method.
0125    */
0126   virtual double GetYJacquetBlondel() const;
0127 
0128   /**
0129    Returns W-squared computed via the Jacquet-Blondel method.
0130    */
0131   virtual double GetW2JacquetBlondel() const;
0132 
0133   /**
0134    Set the kinematics computed from the scattered lepton.
0135    */
0136   virtual void SetLeptonKinematics(const DisKinematics&);
0137 
0138   /**
0139    Set the kinematics computed from the Jacquet-Blondel method.
0140    */
0141   virtual void SetJacquetBlondelKinematics(const DisKinematics&);
0142 
0143   /**
0144    Set the kinematics computed from the double-angle method.
0145    */
0146   virtual void SetDoubleAngleKinematics(const DisKinematics&);
0147 
0148   /**
0149    Returns a pointer to the incident lepton beam particle.
0150    Returns NULL if the particle cannot be located in the event.
0151    IMPORTANT - DO NOT DELETE THE POINTER OR BAD THINGS WILL HAPPEN!
0152    */
0153   virtual const VirtualParticle* BeamLepton() const = 0;
0154 
0155   /**
0156    Returns a pointer to the incident hadron beam particle.
0157    Returns NULL if the particle cannot be located in the event.
0158    IMPORTANT - DO NOT DELETE THE POINTER OR BAD THINGS WILL HAPPEN!
0159    */
0160   virtual const VirtualParticle* BeamHadron() const = 0;
0161 
0162   /**
0163    Returns a pointer to the exchanged boson.
0164    Returns NULL if the particle cannot be located in the event.
0165    IMPORTANT - DO NOT DELETE THE POINTER OR BAD THINGS WILL HAPPEN!
0166    */
0167   virtual const VirtualParticle* ExchangeBoson() const = 0;
0168 
0169   /**
0170    Returns a pointer to the lepton beam particle after scattering.
0171    Returns NULL if the particle cannot be located in the event.
0172    IMPORTANT - DO NOT DELETE THE POINTER OR BAD THINGS WILL HAPPEN!
0173    */
0174   virtual const VirtualParticle* ScatteredLepton() const = 0;
0175 
0176 // protected:
0177   /**
0178    Copy the kinematics from another event to this event.
0179    */
0180   virtual void CopyKinematics(const EventDis&);
0181   Double32_t x;  ///< Bjorken scaling variable
0182   Double32_t QSquared;  ///< Q<sup>2</sup> calculated from scattered electron
0183   Double32_t y;  ///< Inelasticity
0184   Double32_t WSquared;  ///< Invariant mass of the hadronic system
0185   Double32_t nu;  ///< Energy transfer from the electron
0186   Double32_t yJB;  ///< y calculated via the Jacquet-Blondel method
0187   Double32_t QSquaredJB;  ///< Q2 calculated via the Jacquet-Blondel method
0188   Double32_t xJB;  ///< x calculated via the Jacquet-Blondel method
0189   Double32_t WSquaredJB;  ///< W2 calculated via the Jacquet-Blondel method
0190   Double32_t yDA;  ///< y calculated via the double-angle method
0191   Double32_t QSquaredDA;  ///< Q2 calculated via the double-angle method
0192   Double32_t xDA;  ///< x calculated via the double-angle method
0193   Double32_t WSquaredDA;  ///< W2 calculated via the double-angle method
0194 
0195   ClassDef(erhic::EventDis, 1)
0196 };
0197 
0198 inline Double_t EventDis::GetX() const {
0199   return x;
0200 }
0201 
0202 inline Double_t EventDis::GetNu() const {
0203   return nu;
0204 }
0205 
0206 inline Double_t EventDis::GetQ2() const {
0207   return QSquared;
0208 }
0209 
0210 inline Double_t EventDis::GetW2() const {
0211   return WSquared;
0212 }
0213 
0214 inline Double_t EventDis::GetY() const {
0215   return y;
0216 }
0217 
0218 inline Double_t EventDis::GetYPlus() const {
0219   return pow(GetY(), 2.) / (1. + pow(1. - GetY(), 2.));
0220 }
0221 
0222 inline double EventDis::GetXDoubleAngle() const {
0223   return xDA;
0224 }
0225 
0226 inline double EventDis::GetQ2DoubleAngle() const {
0227   return QSquaredDA;
0228 }
0229 
0230 inline double EventDis::GetYDoubleAngle() const {
0231   return yDA;
0232 }
0233 
0234 inline double EventDis::GetW2DoubleAngle() const {
0235   return WSquaredDA;
0236 }
0237 
0238 inline double EventDis::GetXJacquetBlondel() const {
0239   return xJB;
0240 }
0241 
0242 inline double EventDis::GetQ2JacquetBlondel() const {
0243   return QSquaredJB;
0244 }
0245 
0246 inline double EventDis::GetYJacquetBlondel() const {
0247   return yJB;
0248 }
0249 
0250 inline double EventDis::GetW2JacquetBlondel() const {
0251   return WSquaredJB;
0252 }
0253 
0254 }  // namespace erhic
0255 
0256 #endif  // INCLUDE_EICSMEAR_ERHIC_EVENTDIS_H_