9 #ifndef ThePEG_LorentzTensor_H
10 #define ThePEG_LorentzTensor_H
14 #include "ThePEG/Config/ThePEG.h"
15 #include "LorentzPolarizationVector.h"
21 template<
typename Value>
class LorentzTensor;
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>
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>
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"