ThePEG  1.8.0
RSSpinorBarWaveFunction.h
1 // -*- C++ -*-
2 //
3 // RSSpinorBarWaveFunction.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_RSSpinorBarWaveFunction_H
10 #define ThePEG_RSSpinorBarWaveFunction_H
11 //
12 // This is the declaration of the RSSpinorBarWaveFunction class.
13 //
14 #include "WaveFunctionBase.h"
15 #include <ThePEG/Helicity/LorentzRSSpinorBar.h>
16 #include <ThePEG/Helicity/RSFermionSpinInfo.h>
17 #include <ThePEG/EventRecord/Particle.h>
18 #include <ThePEG/EventRecord/RhoDMatrix.h>
19 
20 namespace ThePEG {
21 
22 namespace Helicity {
23 
61 
62 public:
63 
88  complex<double> xs1, complex<double> xs2,
89  complex<double> xs3, complex<double> xs4,
90  complex<double> ys1, complex<double> ys2,
91  complex<double> ys3, complex<double> ys4,
92  complex<double> zs1, complex<double> zs2,
93  complex<double> zs3, complex<double> zs4,
94  complex<double> ts1, complex<double> ts2,
95  complex<double> ts3, complex<double> ts4)
96  : WaveFunctionBase(p,part), _wf(xs1,xs2,xs3,xs4,
97  ys1,ys2,ys3,ys4,
98  zs1,zs2,zs3,zs4,
99  ts1,ts2,ts3,ts4)
100  {
101  assert(iSpin()==4);
102  }
103 
112  : WaveFunctionBase(p,part), _wf(wave)
113  {
114  assert(iSpin()==4);
115  }
116 
125  Direction dir=intermediate)
126  : WaveFunctionBase(p->momentum(),p->dataPtr(),dir), _wf(wave.Type())
127  {
128  assert(iSpin()==4);
129  for (unsigned int i=0; i<4; ++i)
130  for(unsigned int j=0; j<4; ++j)
131  _wf(i,j)=wave(i,j)*UnitRemoval::InvSqrtE;
132  }
133 
142  unsigned int ihel,Direction dir)
143  : WaveFunctionBase(p,part,dir)
144  {
145  assert(iSpin()==4);
146  calculateWaveFunction(ihel);
147  }
148 
157  : WaveFunctionBase(p,part,dir), _wf()
158  {
159  assert(iSpin()==4);
160  }
161 
166  : WaveFunctionBase(), _wf()
167  {}
169 
178  complex<double> operator ()(int i, int j) const {
179  assert( i>=0 && i<=3 && j>=0 && j<=3 );
180  return _wf(i,j);
181  }
182 
186  const LorentzRSSpinorBar<double> & wave() const {return _wf;}
187 
191  complex<double> xs1() const {return _wf.xs1();}
192 
196  complex<double> xs2() const {return _wf.xs2();}
197 
201  complex<double> xs3() const {return _wf.xs3();}
202 
206  complex<double> xs4() const {return _wf.xs4();}
207 
211  complex<double> ys1() const {return _wf.ys1();}
212 
216  complex<double> ys2() const {return _wf.ys2();}
217 
221  complex<double> ys3() const {return _wf.ys3();}
222 
226  complex<double> ys4() const {return _wf.ys4();}
227 
231  complex<double> zs1() const {return _wf.zs1();}
232 
236  complex<double> zs2() const {return _wf.zs2();}
237 
241  complex<double> zs3() const {return _wf.zs3();}
242 
246  complex<double> zs4() const {return _wf.zs4();}
247 
251  complex<double> ts1() const {return _wf.ts1();}
252 
256  complex<double> ts2() const {return _wf.ts2();}
257 
261  complex<double> ts3() const {return _wf.ts3();}
262 
266  complex<double> ts4() const {return _wf.ts4();}
268 
277  void reset(unsigned int ihel) {
278  calculateWaveFunction(ihel);
279  }
281 
282 public:
283 
287  void transform(const LorentzRotation & r) {
288  _wf.transform(r);
290  }
291 
292 public:
293 
297  static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
299 
303  static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
305 
309  static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
310  RhoDMatrix & rho,
312 
316  static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
317  RhoDMatrix & rho,
319 
323  static void constructSpinInfo(const vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
324  tPPtr part,Direction dir, bool time);
325 
329  static void constructSpinInfo(const vector<RSSpinorBarWaveFunction> & waves,
330  tPPtr part,Direction dir, bool time);
331 
332 private:
333 
338  void calculateWaveFunction(unsigned int ihel);
339 
340  private:
341 
346 
350  for (unsigned int i=0; i<4; ++i)
351  for (unsigned int j=0; j<4; ++j)
352  temp(i,j) = _wf(i,j)*UnitRemoval::SqrtE;
353  return temp;
354  }
355 };
356 
357 }
358 }
359 
360 #endif /* ThePEG_RSSpinorBarWaveFunction_H */
361