thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ScalarWaveFunction.h
1 // -*- C++ -*-
2 //
3 // ScalarWaveFunction.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_ScalarWaveFunction_H
10 #define ThePEG_ScalarWaveFunction_H
11 //
12 // This is the declaration of the ScalarWaveFunction class.
13 
14 #include "WaveFunctionBase.h"
15 #include <ThePEG/Helicity/ScalarSpinInfo.h>
16 #include <ThePEG/EventRecord/Particle.h>
17 #include <ThePEG/EventRecord/RhoDMatrix.h>
18 
19 namespace ThePEG {
20 namespace Helicity {
21 
37 
38 public:
39 
42 
52  : WaveFunctionBase(p,part,dir), _wf(wave)
53  {
54  assert(iSpin()==1);
55  }
56 
64  : WaveFunctionBase(p,part,dir), _wf(1.0)
65  {
66  assert(iSpin()==1);
67  }
68 
69  static void calculateWaveFunctions(RhoDMatrix & rho,
70  tPPtr, Direction) {
72  }
73 
74  static void constructSpinInfo(tPPtr part,Direction, bool time) {
75  tScalarSpinPtr inspin;
76  if(part->spinInfo()) inspin=dynamic_ptr_cast<tScalarSpinPtr>(part->spinInfo());
77  if(inspin) return;
78  assert(!part->spinInfo());
79  ScalarSpinPtr temp = new_ptr(ScalarSpinInfo(part->momentum(),time));
80  part->spinInfo(temp);
81  }
82 
87 
92  : WaveFunctionBase(p->momentum(), p->dataPtr(), dir), _wf(1.0)
93  {
94  assert(iSpin()==1);
95  constructSpinInfo(p,dir,time);
96  }
97 
101  const Complex & wave() const {return _wf;}
102 
103 public:
104 
105  void transform(const LorentzRotation & r) {
107  }
108 
109 private:
110 
115 
116 };
117 }
118 }
119 
120 #endif
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
const Complex & wave() const
Return the wavefunction.
Spin zero.
Definition: PDT.h:36
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
ScalarWaveFunction()
Default constructor.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
An intermediate particle.
ScalarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, Direction dir)
Constructor,set the 5-momentum and zero the wavefunction.
PDT::Spin iSpin() const
Get 2s+1 for the particle.
ScalarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, Complex wave, Direction dir=intermediate)
Constructor, set the momentum, direction and Wavefunction.
const Lorentz5Momentum & momentum() const
Access to the 5-momentum.
A Direction object can be used to specify that some following operations should be assumed to be perf...
Definition: Direction.h:41
ScalarWaveFunction(tPPtr p, Direction dir, bool time)
Special for spin correlations.
The ScalarSpinInfo class is designed to be the implementation of the spin information for a scalar pa...
The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are require...
Definition: RhoDMatrix.h:28
Complex _wf
Complex number to store the wavefunction.
void transformMomentum(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.