ThePEG  1.8.0
LorentzRSSpinor.h
1 // -*- C++ -*-
2 //
3 // LorentzRSSpinor.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_LorentzRSSpinor_H
10 #define ThePEG_LorentzRSSpinor_H
11 
12 #include "ThePEG/Config/ThePEG.h"
13 #include "ThePEG/Vectors/ThreeVector.h"
14 #include "HelicityDefinitions.h"
15 #include "LorentzRSSpinor.fh"
16 #include "LorentzRSSpinorBar.h"
17 #include "LorentzSpinorBar.h"
18 #include "LorentzSpinor.h"
19 #include "LorentzPolarizationVector.h"
20 
21 namespace ThePEG{
22 namespace Helicity{
23 
72 template<typename Value>
74 
75 public:
76 
83  for(unsigned int ix=0;ix<4;++ix)
84  for(unsigned int iy=0;iy<4;++iy)
85  _spin[ix][iy]=Value();
86  }
87 
92  LorentzRSSpinor(complex<Value> a1, complex<Value> b1,
93  complex<Value> c1, complex<Value> d1,
94  complex<Value> a2, complex<Value> b2,
95  complex<Value> c2, complex<Value> d2,
96  complex<Value> a3, complex<Value> b3,
97  complex<Value> c3, complex<Value> d3,
98  complex<Value> a4, complex<Value> b4,
99  complex<Value> c4, complex<Value> d4,
101  : _type(t) {
102  _spin[0][0]=a1;_spin[1][0]=a2;_spin[2][0]=a3;_spin[3][0]=a4;
103  _spin[0][1]=b1;_spin[1][1]=b2;_spin[2][1]=b3;_spin[3][1]=b4;
104  _spin[0][2]=c1;_spin[1][2]=c2;_spin[2][2]=c3;_spin[3][2]=c4;
105  _spin[0][3]=d1;_spin[1][3]=d2;_spin[2][3]=d3;_spin[3][3]=d4;
106  }
108 
114  complex<Value> operator()(int i, int j) const {
115  assert( i >= 0 && i <= 3 && j>=0 && j<=3);
116  return _spin[i][j];
117  }
118 
122  complex<Value> & operator () (int i, int j) {
123  assert( i >= 0 && i <= 3 && j>=0 && j<=3);
124  return _spin[i][j];
125  }
126 
130  complex<Value> xs1() const {return _spin[0][0];}
131 
135  complex<Value> xs2() const {return _spin[0][0];}
136 
140  complex<Value> xs3() const {return _spin[0][1];}
141 
145  complex<Value> xs4() const {return _spin[0][3];}
146 
150  complex<Value> ys1() const {return _spin[1][0];}
151 
155  complex<Value> ys2() const {return _spin[1][1];}
156 
160  complex<Value> ys3() const {return _spin[1][2];}
161 
165  complex<Value> ys4() const {return _spin[1][3];}
166 
170  complex<Value> zs1() const {return _spin[2][0];}
171 
175  complex<Value> zs2() const {return _spin[2][1];}
176 
180  complex<Value> zs3() const {return _spin[2][2];}
181 
185  complex<Value> zs4() const {return _spin[2][3];}
186 
190  complex<Value> ts1() const {return _spin[3][0];}
191 
195  complex<Value> ts2() const {return _spin[3][1];}
196 
200  complex<Value> ts3() const {return _spin[3][2];}
201 
205  complex<Value> ts4() const {return _spin[3][3];}
206 
210  void setXS1(complex<Value> in) {_spin[0][0]=in;}
211 
215  void setXS2(complex<Value> in) {_spin[0][1]=in;}
216 
220  void setXS3(complex<Value> in) {_spin[0][2]=in;}
221 
225  void setXS4(complex<Value> in) {_spin[0][3]=in;}
226 
230  void setYS1(complex<Value> in) {_spin[1][0]=in;}
231 
235  void setYS2(complex<Value> in) {_spin[1][1]=in;}
236 
240  void setYS3(complex<Value> in) {_spin[1][2]=in;}
241 
245  void setYS4(complex<Value> in) {_spin[1][3]=in;}
246 
250  void setZS1(complex<Value> in) {_spin[2][0]=in;}
251 
255  void setZS2(complex<Value> in) {_spin[2][1]=in;}
256 
260  void setZS3(complex<Value> in) {_spin[2][2]=in;}
261 
265  void setZS4(complex<Value> in) {_spin[2][3]=in;}
266 
270  void setTS1(complex<Value> in) {_spin[3][0]=in;}
271 
275  void setTS2(complex<Value> in) {_spin[3][1]=in;}
276 
280  void setTS3(complex<Value> in) {_spin[3][2]=in;}
281 
285  void setTS4(complex<Value> in) {_spin[3][3]=in;}
287 
294  LorentzSpinor<Value> output(_type);
295  complex<Value> temp;
296  unsigned int ix;
297  for(ix=0;ix<4;++ix) {
298  temp = _spin[3][ix]*vec.t();
299  temp -= _spin[0][ix]*vec.x();
300  temp -= _spin[1][ix]*vec.y();
301  temp -= _spin[2][ix]*vec.z();
302  output[ix]=temp;
303  }
304  return output;
305  }
306 
310  LorentzSpinor<Value> dot(const LorentzMomentum & invec) const {
311  LorentzSpinor<Value> output(_type);
312  complex<Value> temp;
313  LorentzVector<double> vec = UnitRemoval::InvE * invec;
314  unsigned int ix;
315  for(ix=0;ix<4;++ix) {
316  temp = - ( _spin[0][ix]*vec.x() + _spin[1][ix]*vec.y()+
317  _spin[2][ix]*vec.z() ) + _spin[3][ix]*vec.t();
318  output[ix]=temp;
319  }
320  return output;
321  }
323 
330 
334  LorentzRSSpinor & boost(double,double,double);
335 
339  LorentzRSSpinor & boost(const Boost &);
340 
346 
349 
353  SpinorType Type() const {return _type;}
355 
362  template <typename ValueB>
363  complex<typename BinaryOpTraits<Value,ValueB>::MulT>
365  complex<typename BinaryOpTraits<Value,ValueB>::MulT> output;
366  unsigned int iz;
367  output =
368  left*(fbar(3,0)*_spin[3][0]+fbar(3,1)*_spin[3][1])
369  +right*(fbar(3,2)*_spin[3][2]+fbar(3,3)*_spin[3][3]);
370  for(iz=0;iz<3;++iz) {
371  output -=
372  left*(fbar(iz,0)*_spin[iz][0]+fbar(iz,1)*_spin[iz][1])
373  +right*(fbar(iz,2)*_spin[iz][2]+fbar(iz,3)*_spin[iz][3]);
374  }
375  return output;
376  }
377 
384  template <typename ValueB>
387  typedef complex<typename BinaryOpTraits<Value,ValueB>::MulT> ResultT;
388  ResultT output[4];
389  for(size_t iz=0;iz<4;++iz)
390  output[iz]= left*(fbar.s1()*_spin[iz][0]+fbar.s2()*_spin[iz][1])
391  +right*(fbar.s3()*_spin[iz][2]+fbar.s4()*_spin[iz][3]);
392  return LorentzVector<ResultT>(output[0],output[1],output[2],output[3]);
393  }
394 
395 private:
396 
401 
405  complex<Value> _spin[4][4];
406 };
407 
408 }
409 }
410 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
411 #include "LorentzRSSpinor.tcc"
412 #endif
413 
414 #endif
void setTS1(complex< Value > in)
Set first spinor component for the t vector.
complex< Value > xs4() const
Get fourth spinor component for the x vector.
complex< Value > ts4() const
Get fourth spinor component for the t vector.
complex< Value > s4() const
Get fourth component.
LorentzRSSpinor(SpinorType t=unknown_spinortype)
Default zero constructor, optionally specifying t, the type.
complex< Value > ys4() const
Get fourth spinor component for the y vector.
complex< Value > ts3() const
Get third spinor component for the t vector.
void setYS2(complex< Value > in)
Set second spinor component for the y vector.
LorentzSpinor< Value > dot(const LorentzPolarizationVector &vec) const
dot product with a polarization vector
void setYS4(complex< Value > in)
Set fourth spinor component for the y vector.
LorentzRSSpinor(complex< Value > a1, complex< Value > b1, complex< Value > c1, complex< Value > d1, complex< Value > a2, complex< Value > b2, complex< Value > c2, complex< Value > d2, complex< Value > a3, complex< Value > b3, complex< Value > c3, complex< Value > d3, complex< Value > a4, complex< Value > b4, complex< Value > c4, complex< Value > d4, SpinorType t=unknown_spinortype)
Constructor with complex numbers specifying the components, optionally specifying t...
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
void setYS1(complex< Value > in)
Set first spinor component for the y vector.
complex< Value > ys3() const
Get third spinor component for the y vector.
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
complex< typename BinaryOpTraits< Value, ValueB >::MulT > generalScalar(LorentzRSSpinorBar< ValueB > &fbar, Complex left, Complex right)
Scalar product for general couplings.
A 3-component vector.
Definition: ThreeVector.h:33
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
void setXS4(complex< Value > in)
Set fourth spinor component for the x vector.
complex< Value > xs3() const
Get third spinor component for the x vector.
SpinorType _type
Type of spinor.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
ostream & left(ostream &os)
Stream manipulator setting an ostream to left-adjust its ouput.
Definition: std.h:152
complex< Value > s3() const
Get third component.
The LorentzSpinor class is designed to store a spinor.
Definition: LorentzSpinor.h:69
complex< Value > s1() const
Get first component.
complex< Value > xs2() const
Get second spinor component for the x vector.
complex< Value > zs2() const
Get second spinor component for the z vector.
complex< Value > operator()(int i, int j) const
Subscript operator to return spinor components.
complex< Value > s2() const
Get second component.
The LorentzRSSpinor class is designed to store a Rarita-Schwinger spinor for a spin-3/2 particle...
void setTS4(complex< Value > in)
Set fourth spinor component for the t vector.
complex< Value > zs1() const
Get first spinor component for the z vector.
void setXS1(complex< Value > in)
Set first spinor component for the x vector.
void setXS3(complex< Value > in)
Set third spinor component for the x vector.
LorentzVector< complex< typename BinaryOpTraits< Value, ValueB >::MulT > > generalCurrent(LorentzSpinorBar< ValueB > &fbar, Complex left, Complex right)
Current for general couplings.
SpinorType
Enumeration to specify spinor type.
complex< Value > ys2() const
Get second spinor component for the y vector.
void setZS1(complex< Value > in)
Set first spinor component for the z vector.
void setZS4(complex< Value > in)
Set fourth spinor component for the z vector.
void setYS3(complex< Value > in)
Set third spinor component for the y vector.
LorentzSpinor< Value > dot(const LorentzMomentum &invec) const
dot product with a 4-vector
complex< Value > _spin[4][4]
Storage of the components.
SpinorType Type() const
Return the type of the spinor.
complex< Value > zs4() const
Get fourth spinor component for the z vector.
void setXS2(complex< Value > in)
Set second spinor component for the x vector.
void setTS2(complex< Value > in)
Set second spinor component for the t vector.
LorentzRSSpinor & transform(const LorentzRotation &)
General transform.
ostream & right(ostream &os)
Stream manipulator setting an ostream to right-adjust its ouput.
Definition: std.h:158
complex< Value > ts1() const
Get first spinor component for the t vector.
The LorentzRSSpinorBar class implements the storage of a barred Lorentz Rarita-Schwinger Spinor for a...
complex< Value > xs1() const
Get first spinor component for the x vector.
LorentzRSSpinor & boost(double, double, double)
Standard Lorentz boost specifying the components of the beta vector.
LorentzRSSpinorBar< Value > bar() const
return the barred spinor
complex< Value > zs3() const
Get third spinor component for the z vector.
void setZS3(complex< Value > in)
Set third spinor component for the z vector.
complex< Value > ts2() const
Get second spinor component for the t vector.
The LorentzSpinorBar class implements the storage of a barred LorentzSpinor.
void setTS3(complex< Value > in)
Set third spinor component for the t vector.
complex< Value > ys1() const
Get first spinor component for the y vector.
void setZS2(complex< Value > in)
Set second spinor component for the z vector.