Back to home page

EIC code displayed by LXR

 
 

    


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

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