ThePEG  1.8.0
LorentzRSSpinorBar.h
1 // -*- C++ -*-
2 //
3 // LorentzRSSpinorBar.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_LorentzRSSpinorBar_H
10 #define ThePEG_LorentzRSSpinorBar_H
11 // This is the declaration of the LorentzRSSpinorBar class.
12 
13 #include "ThePEG/Config/ThePEG.h"
14 #include "ThePEG/Vectors/ThreeVector.h"
15 #include "HelicityDefinitions.h"
16 #include "LorentzRSSpinor.fh"
17 #include "LorentzRSSpinorBar.fh"
18 #include "LorentzSpinorBar.h"
19 #include "LorentzSpinor.h"
20 #include "LorentzPolarizationVector.h"
21 
22 namespace ThePEG {
23 namespace Helicity {
24 
37 template <typename Value>
39 
40 public:
41 
48  for(unsigned int ix=0;ix<4;++ix)
49  for(unsigned int iy=0;iy<4;++iy)
50  _spin[ix][iy]=Value();
51  }
52 
57  LorentzRSSpinorBar(complex<Value> a1,complex<Value> b1,
58  complex<Value> c1,complex<Value> d1,
59  complex<Value> a2,complex<Value> b2,
60  complex<Value> c2,complex<Value> d2,
61  complex<Value> a3,complex<Value> b3,
62  complex<Value> c3,complex<Value> d3,
63  complex<Value> a4,complex<Value> b4,
64  complex<Value> c4,complex<Value> d4,
66  : _type(t) {
67  _spin[0][0]=a1;_spin[1][0]=a2;_spin[2][0]=a3;_spin[3][0]=a4;
68  _spin[0][1]=b1;_spin[1][1]=b2;_spin[2][1]=b3;_spin[3][1]=b4;
69  _spin[0][2]=c1;_spin[1][2]=c2;_spin[2][2]=c3;_spin[3][2]=c4;
70  _spin[0][3]=d1;_spin[1][3]=d2;_spin[2][3]=d3;_spin[3][3]=d4;
71  }
73 
79  complex<Value> operator()(int i, int j) const {
80  assert( i >= 0 && i <= 3 && j>=0 && j<=3 );
81  return _spin[i][j];
82  }
83 
87  complex<Value> & operator () (int i, int j) {
88  assert( i >= 0 && i <= 3 && j>=0 && j<=3 );
89  return _spin[i][j];
90  }
91 
95  complex<Value> xs1() const {return _spin[0][0];}
96 
100  complex<Value> xs2() const {return _spin[0][1];}
101 
105  complex<Value> xs3() const {return _spin[0][2];}
106 
110  complex<Value> xs4() const {return _spin[0][3];}
111 
115  complex<Value> ys1() const {return _spin[1][0];}
116 
120  complex<Value> ys2() const {return _spin[1][1];}
121 
125  complex<Value> ys3() const {return _spin[1][2];}
126 
130  complex<Value> ys4() const {return _spin[1][3];}
131 
135  complex<Value> zs1() const {return _spin[2][0];}
136 
140  complex<Value> zs2() const {return _spin[2][1];}
141 
145  complex<Value> zs3() const {return _spin[2][2];}
146 
150  complex<Value> zs4() const {return _spin[2][3];}
151 
155  complex<Value> ts1() const {return _spin[3][0];}
156 
160  complex<Value> ts2() const {return _spin[3][1];}
161 
165  complex<Value> ts3() const {return _spin[3][2];}
166 
170  complex<Value> ts4() const {return _spin[3][3];}
171 
175  void setXS1(complex<Value> in) {_spin[0][0]=in;}
176 
180  void setXS2(complex<Value> in) {_spin[0][1]=in;}
181 
185  void setXS3(complex<Value> in) {_spin[0][2]=in;}
186 
190  void setXS4(complex<Value> in) {_spin[0][3]=in;}
191 
195  void setYS1(complex<Value> in) {_spin[1][0]=in;}
196 
200  void setYS2(complex<Value> in) {_spin[1][1]=in;}
201 
205  void setYS3(complex<Value> in) {_spin[1][2]=in;}
206 
210  void setYS4(complex<Value> in) {_spin[1][3]=in;}
211 
215  void setZS1(complex<Value> in) {_spin[2][0]=in;}
216 
220  void setZS2(complex<Value> in) {_spin[2][1]=in;}
221 
225  void setZS3(complex<Value> in) {_spin[2][2]=in;}
226 
230  void setZS4(complex<Value> in) {_spin[2][3]=in;}
231 
235  void setTS1(complex<Value> in) {_spin[3][0]=in;}
236 
240  void setTS2(complex<Value> in) {_spin[3][1]=in;}
241 
245  void setTS3(complex<Value> in) {_spin[3][2]=in;}
246 
250  void setTS4(complex<Value> in ) {_spin[3][3]=in;}
252 
260  for(unsigned int ix=0;ix<4;++ix) {
261  output[ix]=_spin[3][ix]*vec.t()-_spin[0][ix]*vec.x()
262  -_spin[1][ix]*vec.y()-_spin[2][ix]*vec.z();
263  }
264  return output;
265  }
266 
272  LorentzVector<double> vec = UnitRemoval::InvE * invec;
273  unsigned int ix;
274  for(ix=0;ix<4;++ix) {
275  output[ix]=_spin[3][ix]*vec.t()-_spin[0][ix]*vec.x()
276  -_spin[1][ix]*vec.y()-_spin[2][ix]*vec.z();
277  }
278  return output;
279  }
281 
287  LorentzRSSpinor<Value> bar() const;
288 
292  LorentzRSSpinorBar & boost(double,double,double);
293 
297  LorentzRSSpinorBar & boost(const Boost &);
298 
304 
310  SpinorType Type() const {return _type;}
312 
319  template <typename ValueB>
320  LorentzVector<complex<
323  typedef complex<typename BinaryOpTraits<Value,ValueB>::MulT> ResultT;
324  ResultT output[4];
325  unsigned int iz;
326  for(iz=0;iz<4;++iz){
327  output[iz]= left*(_spin[iz][0]*f.s1()+_spin[iz][1]*f.s2())
328  +right*(_spin[iz][2]*f.s3()+_spin[iz][3]*f.s4());
329  }
330  return LorentzVector<ResultT>(output[0],output[1],
331  output[2],output[3]);
332  }
333 
334 private:
339 
343  complex<Value> _spin[4][4];
344 };
345 }
346 }
347 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
348 #include "LorentzRSSpinorBar.tcc"
349 #endif
350 
351 #endif
void setTS2(complex< Value > in)
Set second spinor component for the t vector.
complex< Value > zs4() const
Get fourth spinor component for the z vector.
LorentzVector< complex< typename BinaryOpTraits< Value, ValueB >::MulT > > generalCurrent(LorentzSpinor< ValueB > &f, Complex left, Complex right)
Current for general couplings.
complex< Value > ys4() const
Get fourth spinor component for the y vector.
complex< Value > s3() const
Get third component.
complex< Value > ys3() const
Get third spinor component for the y vector.
void setXS1(complex< Value > in)
Set first spinor component for the x vector.
void setXS4(complex< Value > in)
Set fourth spinor component for the x vector.
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
void setZS2(complex< Value > in)
Set second spinor component for the z vector.
void setZS4(complex< Value > in)
Set fourth spinor component for the z vector.
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
void setTS1(complex< Value > in)
Set first spinor component for the t vector.
A 3-component vector.
Definition: ThreeVector.h:33
void setTS4(complex< Value > in)
Set fourth spinor component for the t vector.
complex< Value > ys1() const
Get first spinor component for the y vector.
void setYS2(complex< Value > in)
Set second spinor component for the y vector.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
void setXS2(complex< Value > in)
Set second spinor component for the x vector.
complex< Value > zs3() const
Get third spinor component for the z vector.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
void setTS3(complex< Value > in)
Set third spinor component for the t vector.
ostream & left(ostream &os)
Stream manipulator setting an ostream to left-adjust its ouput.
Definition: std.h:152
complex< Value > _spin[4][4]
Storage of the components.
The LorentzSpinor class is designed to store a spinor.
Definition: LorentzSpinor.h:69
complex< Value > ts1() const
Get first spinor component for the t vector.
complex< Value > xs2() const
Get second spinor component for the x vector.
void setYS3(complex< Value > in)
Set third spinor component for the y vector.
complex< Value > operator()(int i, int j) const
Subscript operator to return spinor components.
The LorentzRSSpinor class is designed to store a Rarita-Schwinger spinor for a spin-3/2 particle...
complex< Value > xs3() const
Get third spinor component for the x vector.
LorentzRSSpinorBar & boost(double, double, double)
Standard Lorentz boost specifying the components of the beta vector.
complex< Value > xs4() const
Get fourth spinor component for the x vector.
complex< Value > zs1() const
Get first spinor component for the z vector.
SpinorType
Enumeration to specify spinor type.
void setYS4(complex< Value > in)
Set fourth spinor component for the y vector.
complex< Value > s1() const
Get first component.
complex< Value > ys2() const
Get second spinor component for the y vector.
LorentzSpinorBar< Value > dot(const LorentzPolarizationVector &vec) const
dot product with a polarization vector
LorentzRSSpinorBar & transform(const LorentzRotation &)
General transform.
LorentzRSSpinorBar(SpinorType t=unknown_spinortype)
Default zero constructor, optionally specifying t, the type.
LorentzRSSpinor< Value > bar() const
return the barred spinor
void setXS3(complex< Value > in)
Set third spinor component for the x vector.
LorentzSpinorBar< Value > dot(const LorentzMomentum &invec) const
dot product with a 4-momentum
complex< Value > zs2() const
Get second spinor component for the z vector.
ostream & right(ostream &os)
Stream manipulator setting an ostream to right-adjust its ouput.
Definition: std.h:158
complex< Value > ts4() const
Get fourth spinor component for the t vector.
The LorentzRSSpinorBar class implements the storage of a barred Lorentz Rarita-Schwinger Spinor for a...
LorentzRSSpinorBar(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...
complex< Value > s4() const
Get fourth component.
SpinorType Type() const
Return the type of the spinor.
complex< Value > ts2() const
Get second spinor component for the t vector.
void setZS3(complex< Value > in)
Set third spinor component for the z vector.
BinaryOpTraits should be specialized with typdefs called MulT and DivT which gives the type resulting...
Definition: PhysicalQty.h:239
void setYS1(complex< Value > in)
Set first spinor component for the y vector.
complex< Value > ts3() const
Get third spinor component for the t vector.
The LorentzSpinorBar class implements the storage of a barred LorentzSpinor.
complex< Value > xs1() const
Get first spinor component for the x vector.
void setZS1(complex< Value > in)
Set first spinor component for the z vector.
complex< Value > s2() const
Get second component.