Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ScalarWaveFunction.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_ScalarWaveFunction_H
0010 #define ThePEG_ScalarWaveFunction_H
0011 //
0012 // This is the declaration of the ScalarWaveFunction class.
0013 
0014 #include "WaveFunctionBase.h"
0015 #include <ThePEG/Helicity/ScalarSpinInfo.h>
0016 #include <ThePEG/EventRecord/Particle.h>
0017 #include <ThePEG/EventRecord/RhoDMatrix.h>
0018 
0019 namespace ThePEG {
0020 namespace Helicity {
0021 
0022 /** \ingroup Helicity
0023  *  \author Peter Richardson
0024  * 
0025  *  This class is the base class for scalar wavefunctions for use in 
0026  *  helicity amplitude calculations. The general approach 
0027  *  is to use a similar philosophy to the FORTRAN HELAS code but with 
0028  *  additional structure.
0029  *
0030  *  This class stores the scalar wavefunction as a complex number and inherits
0031  *  from the WaveFunctionBase class for the storage of the particles
0032  *  momentum and type.
0033  * 
0034  *  @see WaveFunctionBase
0035  */
0036 class ScalarWaveFunction : public WaveFunctionBase {
0037 
0038 public:
0039 
0040   /** @name Standard constructors and destructors. */
0041   //@{
0042 
0043   /**
0044    * Constructor, set the momentum, direction and Wavefunction.
0045    * @param p The momentum.
0046    * @param part The ParticleData pointer
0047    * @param wave The wavefunction.
0048    * @param dir The direction of the particle.
0049    */
0050   ScalarWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
0051              Complex wave,Direction dir=intermediate) 
0052     : WaveFunctionBase(p,part,dir), _wf(wave)
0053   {
0054     assert(iSpin()==1);
0055   }
0056 
0057   /**
0058    * Constructor,set the 5-momentum and zero the wavefunction.
0059    * @param p The 5-momentum.
0060    * @param part The ParticleData pointer.
0061    * @param dir The direction of the particle.
0062    */
0063   ScalarWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,Direction dir) 
0064     : WaveFunctionBase(p,part,dir), _wf(1.0)
0065   {
0066     assert(iSpin()==1);
0067   }
0068 
0069   static void calculateWaveFunctions(RhoDMatrix & rho,
0070                      tPPtr, Direction) {
0071     rho=RhoDMatrix(PDT::Spin0);
0072   }
0073 
0074   static void constructSpinInfo(tPPtr part,Direction, bool time) {
0075     tScalarSpinPtr inspin;
0076     if(part->spinInfo()) inspin=dynamic_ptr_cast<tScalarSpinPtr>(part->spinInfo());
0077     if(inspin) return;
0078     assert(!part->spinInfo());
0079     ScalarSpinPtr temp = new_ptr(ScalarSpinInfo(part->momentum(),time));
0080     part->spinInfo(temp);
0081   }
0082 
0083   /**
0084    * Default constructor.
0085    */
0086   ScalarWaveFunction() : WaveFunctionBase(), _wf(1.0) {}
0087 
0088   /**
0089    *  Special for spin correlations
0090    */
0091   ScalarWaveFunction(tPPtr p,Direction dir,bool time) 
0092     : WaveFunctionBase(p->momentum(), p->dataPtr(), dir), _wf(1.0)
0093   {
0094     assert(iSpin()==1);
0095     constructSpinInfo(p,dir,time);
0096   }
0097 
0098   /**
0099    * Return the wavefunction.
0100    */
0101   const Complex & wave() const {return _wf;}
0102 
0103 public:
0104 
0105   void transform(const LorentzRotation & r) {
0106     transformMomentum(r);
0107   }
0108 
0109 private:
0110 
0111   /**
0112    * Complex number to store the wavefunction.
0113    */
0114   Complex _wf;
0115 
0116 };
0117 }
0118 }
0119 
0120 #endif