Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:24

0001 // -*- C++ -*-
0002 //
0003 // WaveFunctionBase.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef ThePEG_WaveFunctionBase_H
0010 #define ThePEG_WaveFunctionBase_H
0011 //
0012 // This is the declaration of the WaveFunctionBase class.
0013 
0014 #include <ThePEG/Vectors/Lorentz5Vector.h>
0015 #include <ThePEG/Vectors/LorentzVector.h>
0016 #include <ThePEG/PDT/ParticleData.h>
0017 #include <ThePEG/Helicity/HelicityDefinitions.h>
0018 
0019 namespace ThePEG {
0020 
0021 namespace Helicity {
0022 
0023 
0024 
0025 /** \ingroup Helicity
0026  *  Definition of the enumerated values used for the direction of the 
0027  *  particles in the calculation of the wavefunction.
0028  */
0029 enum Direction 
0030 {
0031   incoming, /**< An incoming particle. */
0032   outgoing, /**< An outgoing particle. */
0033   intermediate /**< An intermediate particle. */
0034 };
0035 
0036 /** \ingroup Helicity
0037  *  \author Peter Richardson
0038  *
0039  * This class is the base class for all wavefunctions for use in helicity amplitude
0040  * calculations. The general approach is to use a similar philosophy 
0041  * to the FORTRAN HELAS code but with additional structure.
0042  *
0043  * This class contains the storage of the particle type and 5-momentum 
0044  * and methods to set/access this information.
0045  *
0046  * The methods for the wavefunction itself will be implemented in the classes
0047  * derived from this one for the specific spin type, for example scalar, spinor,
0048  * vector and tensor. 
0049  *
0050  *  @see ScalarWaveFunction
0051  *  @see SpinorWaveFunction
0052  *  @see SpinorBarWaveFunction
0053  *  @see VectorWaveFunction
0054  *  @see RSSpinorWaveFunction
0055  *  @see RSSpinorBarWaveFunction
0056  *  @see TensorWaveFunction
0057  */
0058 class WaveFunctionBase{
0059 
0060 public:
0061 
0062   /// Constructors
0063   //@{
0064   /**
0065    * Default constructor
0066    */
0067   WaveFunctionBase() 
0068     : _particle(), _momentum(), _dir(intermediate) 
0069   {}
0070 
0071   /**
0072    * 
0073    */
0074   WaveFunctionBase(const Lorentz5Momentum & p,
0075            tcPDPtr pd, Direction dir = intermediate) 
0076     : _particle(pd), _momentum(p), _dir(dir) 
0077   {
0078     if(_dir==outgoing) _momentum *= -1.0; 
0079     if ( dir != outgoing ) {
0080       tcPDPtr anti = pd->CC();
0081       if ( anti ) _particle = anti;
0082     }
0083   }
0084   //@}
0085 
0086 
0087   /**
0088    * Access to the momentum components and mass
0089    */
0090   //@{
0091   /**
0092    * Get the x component of the momentum.
0093    */
0094   Energy px() const {return _momentum.x();}
0095 
0096   /**
0097    * Get the y component of the momentum.
0098    */
0099   Energy py() const {return _momentum.y();}
0100 
0101   /**
0102    * Get the z component of the momentum.
0103    */
0104   Energy pz() const {return _momentum.z();}
0105 
0106   /**
0107    * Get the energy.
0108    */
0109   Energy e()  const {return _momentum.e();}
0110 
0111   /**
0112    * Get the mass.
0113    */
0114   Energy mass() const {return _momentum.mass();}
0115 
0116   /**
0117    * Get off-shell mass squared.
0118    */
0119   Energy2 m2() const {return _momentum.m2();}
0120 
0121   /**
0122    *  Access to the 5-momentum
0123    */
0124   const Lorentz5Momentum & momentum() const {return _momentum;}
0125   //@}
0126 
0127   /**
0128    *  Access to the particle properties
0129    */
0130   //@{
0131   /** 
0132    * Get the particle id.
0133    */
0134   long id() const {return _particle->id();}
0135 
0136   /** 
0137    * Get 2s+1 for the particle.
0138    */
0139   PDT::Spin iSpin() const {return _particle->iSpin();}
0140 
0141   /**
0142    * Get the particle pointer.
0143    */
0144   tcPDPtr particle() const {return _particle;}
0145 
0146   /** 
0147    * Get the direction of particle.
0148    */
0149   ThePEG::Helicity::Direction direction() const {return _dir;}
0150 
0151   /** 
0152    * Set the direction of the particle 
0153    */ 
0154   void direction(ThePEG::Helicity::Direction in) {_dir=in;} 
0155   //@}
0156 
0157 protected:
0158   
0159   /**
0160    *  Perform the Lorentz transformation of the wave function
0161    */
0162   void transformMomentum(const LorentzRotation & r) {
0163     _momentum.transform(r);
0164   }
0165 
0166 private:
0167 
0168   /**
0169    * Constant pointer to the particle info.
0170    */
0171   tcPDPtr _particle;
0172 
0173   /**
0174    * Lorentz 5 momentum.
0175    */
0176   Lorentz5Momentum _momentum;
0177 
0178   /**
0179    * Incoming or outgoing.
0180    */
0181   Direction _dir;
0182 };
0183 }
0184 }
0185 
0186 #endif