Warning, /include/ThePEG/Helicity/LorentzTensor.tcc is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //
0003 // LorentzTensor.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 LorentzTensor<Value> & LorentzTensor<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 LorentzTensor output;
0031 complex<Value> temp;
0032 unsigned int ix,iy,ixa,iya;
0033 for(ix=0;ix<4;++ix) {
0034 for(iy=0;iy<4;++iy) {
0035 temp=0.;
0036 for(ixa=0;ixa<4;++ixa) {
0037 for(iya=0;iya<4;++iya)
0038 {temp+=boostm[ix][ixa]*boostm[iy][iya]*(*this)(ixa,iya);}
0039 }
0040 output(ix,iy)=temp;
0041 }
0042 }
0043 *this=output;
0044 return *this;
0045 }
0046
0047 }
0048 }