Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // RSSpinorBarWaveFunction.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_RSSpinorBarWaveFunction_H
0010 #define ThePEG_RSSpinorBarWaveFunction_H
0011 //
0012 // This is the declaration of the RSSpinorBarWaveFunction class.
0013 //
0014 #include "WaveFunctionBase.h"
0015 #include <ThePEG/Helicity/LorentzRSSpinorBar.h>
0016 #include <ThePEG/Helicity/RSFermionSpinInfo.h>
0017 #include <ThePEG/EventRecord/Particle.h>
0018 #include <ThePEG/EventRecord/RhoDMatrix.h>
0019 
0020 namespace ThePEG {
0021 
0022 namespace Helicity {
0023 
0024 /** \ingroup Helicity
0025  *
0026  *  The <code>RSSpinorBarWaveFunction</code> class is designed to
0027  *  store the wavefunction of a spin-\f$\frac32\f$ particle in a form
0028  *  suitable for use in helicity amplitude calculations of the matrix
0029  *  element using a similar philosophy to the FORTRAN HELAS code.
0030  *
0031  *  In addition to storing the barred spinor using the
0032  *  <code>LorentzRSSpinorBar</code> class it inherits from the
0033  *  <code>WaveFunctionBase</code> class to provide storage of the
0034  *  momentum and ParticleData for the fermion.
0035  *
0036  *  This class also contains the code which does the actually
0037  *  calculation of the barred spinor for an external particle
0038  *
0039  *  When calculating the wavefunction the direction of the particle is used,
0040  *
0041  *  \e i.e. 
0042  *  - incoming calculates a \f$\bar{v}\f$ spinor.
0043  *  - outgoing calculates a \f$\bar{u}\f$ spinor.
0044  *
0045  *  The barred spinors are calculated using a Clebsch-Gordon decomposition
0046  *  in the rest-frame for a massive particle and boosted to the lab-frame. 
0047  *  For massless particles the calculation is performed in the lab-frame
0048  *  (N.B. there are only two helicities \f$\pm\frac32\f$ in this case.)
0049  *
0050  *  N.B. In our convention 0 is the \f$-\frac32\f$ helicity state,
0051  *        1 is the \f$-\frac12\f$ helicity state,
0052  *        2 is the \f$+\frac12\f$ helicity state
0053  *        3 is the \f$+\frac32\f$ helicity state and 
0054  *
0055  * @see WaveFunctionBase
0056  * @see LorentzRSSpinorBar
0057  * @see HelicityDefinitions
0058  * 
0059  */
0060 class RSSpinorBarWaveFunction: public WaveFunctionBase {
0061 
0062 public:
0063 
0064   /** @name Standard constructors and destructors. */
0065   //@{
0066   /**
0067    * Constructor, set the momentum and the components of the spinor
0068    * @param p The momentum.
0069    * @param part The ParticleData pointer.
0070    * @param xs1 The first  spinor component of the \f$x\f$ vector.
0071    * @param xs2 The second spinor component of the \f$x\f$ vector.
0072    * @param xs3 The third  spinor component of the \f$x\f$ vector.
0073    * @param xs4 The fourth spinor component of the \f$x\f$ vector.
0074    * @param ys1 The first  spinor component of the \f$y\f$ vector.
0075    * @param ys2 The second spinor component of the \f$y\f$ vector.
0076    * @param ys3 The third  spinor component of the \f$y\f$ vector.
0077    * @param ys4 The fourth spinor component of the \f$y\f$ vector.
0078    * @param zs1 The first  spinor component of the \f$z\f$ vector.
0079    * @param zs2 The second spinor component of the \f$z\f$ vector.
0080    * @param zs3 The third  spinor component of the \f$z\f$ vector.
0081    * @param zs4 The fourth spinor component of the \f$z\f$ vector.
0082    * @param ts1 The first  spinor component of the \f$t\f$ vector.
0083    * @param ts2 The second spinor component of the \f$t\f$ vector.
0084    * @param ts3 The third  spinor component of the \f$t\f$ vector.
0085    * @param ts4 The fourth spinor component of the \f$t\f$ vector.
0086    */
0087   RSSpinorBarWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
0088               complex<double> xs1, complex<double> xs2,
0089               complex<double> xs3, complex<double> xs4,
0090               complex<double> ys1, complex<double> ys2,
0091               complex<double> ys3, complex<double> ys4,
0092               complex<double> zs1, complex<double> zs2,
0093               complex<double> zs3, complex<double> zs4,
0094               complex<double> ts1, complex<double> ts2,
0095               complex<double> ts3, complex<double> ts4)
0096     : WaveFunctionBase(p,part), _wf(xs1,xs2,xs3,xs4,
0097                     ys1,ys2,ys3,ys4,
0098                     zs1,zs2,zs3,zs4,
0099                     ts1,ts2,ts3,ts4)
0100   {
0101     assert(iSpin()==4);
0102   }
0103   
0104   /**
0105    * Constructor, set the momentum and the wavefunction.
0106    * @param p The momentum.
0107    * @param part The ParticleData pointer.
0108    * @param wave The wavefunction.
0109    */
0110   RSSpinorBarWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
0111               const LorentzRSSpinorBar<double> & wave,
0112               Direction dir=intermediate) 
0113     : WaveFunctionBase(p,part,dir), _wf(wave)
0114   {
0115     assert(iSpin()==4);
0116   }
0117   
0118   /**
0119    * Constructor, set the particle and the wavefunction.
0120    * @param p Particle
0121    * @param wave The wavefunction.
0122    * @param dir The direction of the particle
0123    */
0124   RSSpinorBarWaveFunction(const tPPtr & p,
0125               const LorentzRSSpinorBar<SqrtEnergy> & wave,
0126               Direction dir=intermediate) 
0127     : WaveFunctionBase(p->momentum(),p->dataPtr(),dir), _wf(wave.Type())
0128   {
0129     assert(iSpin()==4);
0130     for (unsigned int i=0; i<4; ++i)
0131       for(unsigned int j=0; j<4; ++j)
0132     _wf(i,j)=Complex(wave(i,j)*UnitRemoval::InvSqrtE);
0133   }
0134 
0135   /**
0136    * Constructor, set the momentum, helicity, direction.
0137    * @param p The momentum.
0138    * @param part The ParticleData pointer.
0139    * @param ihel The helicity (0,1,2,3 as described above.)
0140    * @param dir The direction.
0141    */
0142   RSSpinorBarWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
0143               unsigned int ihel,Direction dir)
0144     : WaveFunctionBase(p,part,dir)
0145   {
0146     assert(iSpin()==4);
0147     calculateWaveFunction(ihel);
0148   }
0149   
0150   /**
0151    * Constructor, set the momentum, direction, zero the 
0152    * wavefunction.
0153    * @param p The momentum.
0154    * @param part The ParticleData pointer.
0155    * @param dir The direction.
0156    */
0157   RSSpinorBarWaveFunction(Lorentz5Momentum p,tcPDPtr part,Direction dir)
0158     : WaveFunctionBase(p,part,dir), _wf()
0159   {
0160     assert(iSpin()==4);
0161   }
0162   
0163   /**
0164    * Default constructor
0165    */
0166   RSSpinorBarWaveFunction() 
0167     : WaveFunctionBase(), _wf()
0168   {}
0169 
0170   /**
0171    *  Special for spin correlations
0172    */
0173   RSSpinorBarWaveFunction(vector<RSSpinorBarWaveFunction> & wave,
0174               tPPtr part,Direction dir,bool time,bool=true) {
0175     calculateWaveFunctions(wave,part,dir);
0176     constructSpinInfo(wave,part,dir,time);
0177   }
0178   //@}
0179 
0180   /**
0181    *  Access to the wavefunction and its components.
0182    */
0183   //@{
0184   /**
0185    * subscript operator for the wavefunction
0186    * Set components by index.
0187    */
0188   complex<double> operator ()(int i, int j) const {
0189     assert( i>=0 && i<=3  && j>=0 && j<=3 );
0190     return _wf(i,j);
0191   }
0192     
0193   /**
0194    * return wavefunction as LorentzRSSpinorBar
0195    */
0196   const LorentzRSSpinorBar<double> & wave() const {return _wf;}
0197 
0198   /// Return wavefunction as LorentzRSSpinorBar<SqrtEnergy>
0199   LorentzRSSpinorBar<SqrtEnergy> dimensionedWf() const {
0200     LorentzRSSpinorBar<SqrtEnergy> temp(_wf.Type());
0201     for (unsigned int i=0; i<4; ++i)
0202       for (unsigned int j=0; j<4; ++j)
0203     temp(i,j) = _wf(i,j)*UnitRemoval::SqrtE;
0204     return temp;
0205   }
0206   
0207   /**
0208    * Get first spinor component for the x vector
0209    */
0210   complex<double> xs1() const {return _wf.xs1();}
0211 
0212   /**
0213    * Get second spinor component for the x vector
0214    */
0215   complex<double> xs2() const {return _wf.xs2();}
0216 
0217   /**
0218    * Get third  spinor component for the x vector
0219    */
0220   complex<double> xs3() const {return _wf.xs3();}
0221 
0222   /**
0223    * Get fourth  spinor component for the x vector
0224    */
0225   complex<double> xs4() const {return _wf.xs4();}
0226 
0227   /**
0228    * Get first spinor component for the y vector
0229    */
0230   complex<double> ys1() const {return _wf.ys1();}
0231 
0232   /**
0233    * Get second spinor component for the y vector
0234    */
0235   complex<double> ys2() const {return _wf.ys2();}
0236   
0237   /**
0238    * Get third spinor component for the y vector
0239    */
0240   complex<double> ys3() const {return _wf.ys3();}
0241   
0242   /**
0243    * Get fourth spinor component for the y vector
0244    */
0245   complex<double> ys4() const {return _wf.ys4();}
0246   
0247   /**
0248    * Get first spinor component for the z vector
0249    */
0250   complex<double> zs1() const {return _wf.zs1();}
0251   
0252   /**
0253    * Get second spinor component for the z vector
0254    */
0255   complex<double> zs2() const {return _wf.zs2();}
0256   
0257   /**
0258    * Get third spinor component for the z vector
0259    */
0260   complex<double> zs3() const {return _wf.zs3();}
0261   
0262   /**
0263    * Get fourth spinor component for the z vector
0264    */
0265   complex<double> zs4() const {return _wf.zs4();}
0266   
0267   /**
0268    * Get first spinor component for the t vector
0269    */
0270   complex<double> ts1() const {return _wf.ts1();}
0271   
0272   /**
0273    * Get second spinor component for the t vector
0274    */
0275   complex<double> ts2() const {return _wf.ts2();}
0276   
0277   /**
0278    * Get third spinor component for the t vector
0279    */
0280   complex<double> ts3() const {return _wf.ts3();}
0281   
0282   /**
0283    * Get fourth spinor component for the t vector
0284    */
0285   complex<double> ts4() const {return _wf.ts4();}
0286   //@}
0287 
0288   /**
0289    * reset functions
0290    */
0291   //@{
0292   /**
0293    * Reset the helicity (calculates the new spinor).
0294    * @param ihel The helicity (0,1,2,3 as described above.)
0295    */
0296   void reset(unsigned int ihel) {
0297     calculateWaveFunction(ihel);
0298   }
0299   //@}
0300 
0301 public:
0302 
0303   /**
0304    *  Perform the Lorentz transformation of the wave function
0305    */
0306   void transform(const LorentzRotation & r) {
0307     _wf.transform(r);
0308     transformMomentum(r);
0309   }
0310 
0311 public:
0312 
0313   /**
0314    *  Calculate the wavefunctions
0315    */
0316   static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
0317                      tPPtr particle,Direction);
0318 
0319   /**
0320    *  Calculate the wavefunctions
0321    */
0322   static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
0323                      tPPtr particle,Direction);
0324   
0325   /**
0326    *  Calculate the wavefunctions
0327    */
0328   static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
0329                      const Lorentz5Momentum & momentum,
0330                      tcPDPtr parton,Direction);
0331 
0332   /**
0333    *  Calculate the wavefunctions
0334    */
0335   static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
0336                      RhoDMatrix & rho,
0337                      tPPtr particle,Direction);
0338 
0339   /**
0340    *  Calculate the wavefunctions
0341    */
0342   static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
0343                      RhoDMatrix & rho,
0344                      tPPtr particle,Direction);
0345 
0346   /**
0347    *  Construct the SpinInfo object
0348    */
0349   static void constructSpinInfo(const vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
0350                 tPPtr part,Direction dir, bool time);
0351 
0352   /**
0353    *  Construct the SpinInfo object
0354    */
0355   static void constructSpinInfo(const vector<RSSpinorBarWaveFunction> & waves,
0356                 tPPtr part,Direction dir, bool time);
0357 
0358 private:
0359 
0360   /**
0361    * Calcuate the wavefunction.
0362    * @param ihel The helicity (0,1,2,3 as described above.)
0363    */
0364   void calculateWaveFunction(unsigned int ihel);
0365   
0366  private:
0367   
0368   /**
0369    * storage of the Lorentz RSSpinorBar
0370    */
0371   LorentzRSSpinorBar<double> _wf;
0372 };
0373 
0374 }
0375 }
0376 
0377 #endif /* ThePEG_RSSpinorBarWaveFunction_H */
0378