Warning, /include/ThePEG/Helicity/LorentzRank3Tensor.tcc is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //
0003 // LorentzRank3Tensor.tcc is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 namespace ThePEG {
0010 namespace Helicity {
0011
0012 // general boost
0013 template <typename Value>
0014 LorentzRank3Tensor<Value> & LorentzRank3Tensor<Value>::boost(double bx, double by, double bz) {
0015 // basic definitions
0016 double boostm[4][4];
0017 double b2 = bx*bx+by*by+bz*bz;
0018 double gamma = 1.0/sqrt(1.0-b2);
0019 double gmmone = b2 >0 ? (gamma-1.)/b2 : 0.0;
0020 double vec[3]={bx,by,bz};
0021 // compute the lorentz boost matrix
0022 for(unsigned int ix=0;ix<3;++ix) {
0023 for(unsigned int iy=0;iy<3;++iy){boostm[ix][iy]=vec[ix]*vec[iy]*gmmone;}
0024 boostm[ix][ix]+=1;
0025 boostm[ix][3]=gamma*vec[ix];
0026 boostm[3][ix]=boostm[ix][3];
0027 }
0028 boostm[3][3]=gamma;
0029 // apply the boost
0030 LorentzRank3Tensor output;
0031 complex<Value> temp;
0032 unsigned int ix,iy,iz,ixa,iya,iza;
0033 for(ix=0;ix<4;++ix) {
0034 for(iy=0;iy<4;++iy) {
0035 for(iz=0;iz<4;++iz) {
0036 temp=0.;
0037 for(ixa=0;ixa<4;++ixa) {
0038 for(iya=0;iya<4;++iya) {
0039 for(iza=0;iza<4;++iza) {
0040 temp+=boostm[ix][ixa]*boostm[iy][iya]*boostm[iz][iza]*(*this)(ixa,iya,iza);
0041 }
0042 }
0043 }
0044 output(ix,iy)=temp;
0045 }
0046 }
0047 }
0048 *this=output;
0049 return *this;
0050 }
0051
0052 }
0053 }