9 #ifndef ThePEG_LorentzTensor_H 10 #define ThePEG_LorentzTensor_H 14 #include "ThePEG/Config/ThePEG.h" 15 #include "LorentzPolarizationVector.h" 36 template<
typename Value>
47 for(
unsigned int ix=0;ix<4;++ix)
48 for(
unsigned int iy=0;iy<4;++iy)
56 complex<Value>
xz, complex<Value>
xt,
57 complex<Value>
yx, complex<Value>
yy,
58 complex<Value>
yz, complex<Value>
yt,
59 complex<Value>
zx, complex<Value>
zy,
60 complex<Value>
zz, complex<Value>
zt,
61 complex<Value>
tx, complex<Value>
ty,
62 complex<Value>
tz, complex<Value>
tt){
250 assert( i>=0 && i<=3 && j>=0 && j<=3);
258 assert( i>=0 && i<=3 && j>=0 && j<=3);
274 return boost(b.x(), b.y(), b.z());
281 unsigned int ix,iy,ixa,iya;
284 for(ix=0;ix<4;++ix) {
285 for(iy=0;iy<4;++iy) {
286 temp=complex<Value>();
287 for(ixa=0;ixa<4;++ixa) {
288 for(iya=0;iya<4;++iya)
289 temp+=r(ix,ixa)*r(iy,iya)*(*this)(ixa,iya);
303 conj(
yx()), conj(
yy()), conj(
yz()), conj(
yt()),
304 conj(
zx()), conj(
zy()), conj(
zz()), conj(
zt()),
305 conj(
tx()), conj(
ty()), conj(
tz()), conj(
tt()));
316 for(
int ix=0;ix<4;++ix)
317 for(
int iy=0;iy<4;++iy)
_tensor[ix][iy]*=a;
324 template <
typename T,
typename U>
325 friend complex<typename BinaryOpTraits<T,U>::MulT>
438 template<
typename T,
typename U>
442 (a*t.
xx(), a*t.
xy(), a*t.
xz(), a*t.
xt(),
443 a*t.
yx(), a*t.
yy(), a*t.
yz(), a*t.
yt(),
444 a*t.
zx(), a*t.
zy(), a*t.
zz(), a*t.
zt(),
445 a*t.
tx(), a*t.
ty(), a*t.
tz(), a*t.
tt());
451 template<
typename T,
typename U>
455 LorentzVector<typename BinaryOpTraits<complex<T>,U>::MulT> outvec;
456 outvec.setX(invec.t()*inten(3,0)-invec.x()*inten(0,0)
457 -invec.y()*inten(1,0)-invec.z()*inten(2,0));
458 outvec.setY(invec.t()*inten(3,1)-invec.x()*inten(0,1)
459 -invec.y()*inten(1,1)-invec.z()*inten(2,1));
460 outvec.setZ(invec.t()*inten(3,2)-invec.x()*inten(0,2)
461 -invec.y()*inten(1,2)-invec.z()*inten(2,2));
462 outvec.setT(invec.t()*inten(3,3)-invec.x()*inten(0,3)
463 -invec.y()*inten(1,3)-invec.z()*inten(2,3));
470 template<
typename T,
typename U>
471 inline LorentzVector<typename BinaryOpTraits<complex<T>,U>::MulT>
473 LorentzVector<typename BinaryOpTraits<complex<T>,U>::MulT> outvec;
474 outvec.setX(invec.t()*inten(0,3)-invec.x()*inten(0,0)
475 -invec.y()*inten(0,1)-invec.z()*inten(0,2));
476 outvec.setY(invec.t()*inten(1,3)-invec.x()*inten(1,0)
477 -invec.y()*inten(1,1)-invec.z()*inten(1,2));
478 outvec.setZ(invec.t()*inten(2,3)-invec.x()*inten(2,0)
479 -invec.y()*inten(2,1)-invec.z()*inten(2,2));
480 outvec.setT(invec.t()*inten(3,3)-invec.x()*inten(3,0)
481 -invec.y()*inten(3,1)-invec.z()*inten(3,2));
488 template <
typename T,
typename U>
489 inline complex<typename BinaryOpTraits<T,U>::MulT>
491 typedef complex<typename BinaryOpTraits<T,U>::MulT> RetT;
492 RetT output=RetT(),temp;
493 for(
unsigned int ix=0;ix<4;++ix) {
495 for(
unsigned int iy=0;iy<3;++iy) {
498 if(ix<3) output-=temp;
507 #ifndef ThePEG_TEMPLATES_IN_CC_FILE 508 #include "LorentzTensor.tcc"
complex< Value > zt() const
Get z,t component.
LorentzTensor< Value > conjugate()
Return the complex conjugate.
complex< Value > xz() const
Get x,z component.
void setTY(complex< Value > a)
Set t,y component.
complex< Value > yy() const
Get y,y component.
LorentzVector< complex< typename BinaryOpTraits< Value, Energy >::MulT > > postDot(const Lorentz5Momentum &vec) const
Second index dot product with momentum.
void setYY(complex< Value > a)
Set y,y component.
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
complex< Value > ty() const
Get t,y component.
LorentzTensor< Value > operator-(const LorentzTensor< Value > &in) const
Subtraction.
void setZZ(complex< Value > a)
Set z,z component.
void setYX(complex< Value > a)
Set y,x component.
void setTZ(complex< Value > a)
Set t,z component.
complex< Value > operator()(int i, int j) const
Get components by indices.
complex< Value > zy() const
Get z,y component.
LorentzTensor(complex< Value > xx, complex< Value > xy, complex< Value > xz, complex< Value > xt, complex< Value > yx, complex< Value > yy, complex< Value > yz, complex< Value > yt, complex< Value > zx, complex< Value > zy, complex< Value > zz, complex< Value > zt, complex< Value > tx, complex< Value > ty, complex< Value > tz, complex< Value > tt)
Constructor specifyign all components.
This is the main namespace within which all identifiers in ThePEG are declared.
LorentzVector< complex< typename BinaryOpTraits< Value, Energy >::MulT > > preDot(const Lorentz5Momentum &vec) const
First index dot product with momentum.
complex< Value > yz() const
Get y,z component.
complex< Value > xy() const
Get x,y component.
complex< Value > tz() const
Get t,z component.
complex< Value > zz() const
Get z,z component.
void setTT(complex< Value > a)
Set t,t component.
void setXZ(complex< Value > a)
Set x,z component.
Value x() const
Component access.
friend complex< typename BinaryOpTraits< T, U >::MulT > operator*(const LorentzTensor< T > &t, const LorentzTensor< U > &u)
Scalar product with other tensor.
LorentzTensor< Value > operator+(const LorentzTensor< Value > &in) const
Addition.
complex< Value > yt() const
Get y,t component.
The SpinOneLorentzRotation class is ...
complex< Value > tx() const
Get t,x component.
LorentzTensor & boost(double, double, double)
Standard Lorentz boost specifying the components of the beta vector.
LorentzTensor()
Default zero constructor.
complex< Value > tt() const
Get t,t component.
complex< Value > zx() const
Get z,x component.
LorentzTensor< Value > & boost(const Boost &b)
Standard Lorentz boost specifying the beta vector.
complex< Value > xt() const
Get x,t component.
void setZT(complex< Value > a)
Set z,t component.
complex< Value > xx() const
Get x,x component.
void setZX(complex< Value > a)
Set z,x component.
The LorentzTensor class is designed to implement the storage of a complex tensor to be used to repres...
void setTX(complex< Value > a)
Set t,x component.
complex< Value > yx() const
Get y,x component.
LorentzTensor & transform(const SpinOneLorentzRotation &r)
General Lorentz transformation.
void setXX(complex< Value > a)
Set x,x component.
void setYZ(complex< Value > a)
Set y,z component.
void setXT(complex< Value > a)
Set x,t component.
LorentzTensor(const LorentzPolarizationVector &p, const LorentzPolarizationVector &q)
Constructor in terms of two polarization vectors.
void setXY(complex< Value > a)
Set x,y component.
void setZY(complex< Value > a)
Set z,y component.
complex< Value > _tensor[4][4]
The components.
LorentzVector< complex< Value > > postDot(const LorentzPolarizationVector &vec) const
Second index dot product with polarization vector.
LorentzVector< complex< Value > > preDot(const LorentzPolarizationVector &vec) const
Various dot products.
LorentzTensor< Value > operator*=(Complex a)
Scaling with a complex number.
void setYT(complex< Value > a)
Set y,t component.
complex< Value > trace() const
Trace.