Warning, /include/ThePEG/Helicity/LorentzRSSpinor.tcc is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //
0003 // LorentzRSSpinor.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 //
0010 // This is the implementation of the non-inlined, non-templated member
0011 // functions of the LorentzRSSpinor class.
0012 //
0013 // Author: Peter Richardson
0014 //
0015
0016 #include "LorentzRSSpinor.h"
0017 #include "LorentzRSSpinorBar.h"
0018
0019 using namespace ThePEG;
0020 using namespace ThePEG::Helicity;
0021
0022 // return the barred spinor
0023 template<typename Value> LorentzRSSpinorBar<Value>
0024 LorentzRSSpinor<Value>::bar() const {
0025 complex<Value> out[4][4];
0026 unsigned int ix;
0027 // HELAS
0028 for(ix=0;ix<4;++ix) {
0029 out[ix][0] = conj(_spin[ix][2]);
0030 out[ix][1] = conj(_spin[ix][3]);
0031 out[ix][2] = conj(_spin[ix][0]);
0032 out[ix][3] = conj(_spin[ix][1]);
0033 }
0034 return LorentzRSSpinorBar<Value>(out[0][0],out[0][1],out[0][2],out[0][3],
0035 out[1][0],out[1][1],out[1][2],out[1][3],
0036 out[2][0],out[2][1],out[2][2],out[2][3],
0037 out[3][0],out[3][1],out[3][2],out[3][3],_type);
0038 }
0039
0040 // boost the spinor
0041 template<typename Value> LorentzRSSpinor<Value> &
0042 LorentzRSSpinor<Value>::boost(double bx,double by,double bz) {
0043 // work out beta and chi
0044 double b2(bx*bx+by*by+bz*bz),beta(sqrt(b2)),chi(atanh(beta));
0045 double sinhchi(sinh(0.5*chi)/beta),coshchi(cosh(0.5*chi));
0046 double gamma = 1.0/sqrt(1.0-b2);
0047 double gmmone = b2 >0 ? (gamma-1.)/b2 : 0.0;
0048 double bvec[3]={bx,by,bz};
0049 unsigned int ix,iy,ixa,iya;
0050 // vector boost matrix
0051 double boostv[4][4];
0052 for(ix=0;ix<3;++ix)
0053 {
0054 for(iy=0;iy<3;++iy){boostv[ix][iy]=bvec[ix]*bvec[iy]*gmmone;}
0055 boostv[ix][ix]+=1;
0056 boostv[ix][3]=gamma*bvec[ix];
0057 boostv[3][ix]=boostv[ix][3];
0058 }
0059 boostv[3][3]=gamma;
0060 // spinor boost matrix
0061 Complex boosts[4][4],ii(0.,1.),nxminy(bx-ii*by),nxpiny(bx+ii*by);
0062 boosts[0][0] = coshchi-sinhchi*bz;
0063 boosts[0][1] = -sinhchi*nxminy;
0064 boosts[0][2] = 0.;
0065 boosts[0][3] = 0.;
0066 boosts[1][0] = -sinhchi*nxpiny;
0067 boosts[1][1] = coshchi+sinhchi*bz;
0068 boosts[1][2] = 0.;
0069 boosts[1][3] = 0.;
0070 boosts[2][0] = 0.;
0071 boosts[2][1] = 0.;
0072 boosts[2][2] = coshchi+sinhchi*bz;
0073 boosts[2][3] = +sinhchi*nxminy;
0074 boosts[3][0] = 0.;
0075 boosts[3][1] = 0.;
0076 boosts[3][2] = +sinhchi*nxpiny;
0077 boosts[3][3] = coshchi-sinhchi*bz;
0078 Complex out[4][4];
0079 // apply the boost
0080 for(ix=0;ix<4;++ix)
0081 {
0082 for(iy=0;iy<4;++iy)
0083 {
0084 out[ix][iy]=0.;
0085 for(ixa=0;ixa<4;++ixa)
0086 {
0087 for(iya=0;iya<4;++iya)
0088 {out[ix][iy]+=boostv[ix][ixa]*boosts[iy][iya]*_spin[ixa][iya];}
0089 }
0090 }
0091 }
0092 *this=LorentzRSSpinor<Value>(out[0][0],out[0][1],out[0][2],out[0][3],
0093 out[1][0],out[1][1],out[1][2],out[1][3],
0094 out[2][0],out[2][1],out[2][2],out[2][3],
0095 out[3][0],out[3][1],out[3][2],out[3][3],_type);
0096 return *this;
0097 }
0098
0099 // boost the spinor
0100 template<typename Value> LorentzRSSpinor<Value> & LorentzRSSpinor<Value>::boost(const Boost & boostvec)
0101 {
0102 const double beta = boostvec.mag(),b2=beta*beta;
0103 const double bx=boostvec.x(),by=boostvec.y(),bz=boostvec.z();
0104 const double boostvec1[3] = {bx, by, bz};
0105 const double gamma = 1.0/sqrt(1.0-b2);
0106 const double gmmone = b2 >0 ? (gamma-1.)/b2 : 0.0;
0107 const double chi = atanh(beta);
0108 const double sinhchi = sinh(0.5*chi)/beta, coshchi = cosh(0.5*chi);
0109 complex<Value> out[4][4];
0110 Complex ii(0.,1.);
0111 const Complex nxminy=bx-ii*by;
0112 const Complex nxpiny=bx+ii*by;
0113 unsigned int ix,iy,ixa,iya;
0114 // vector boost matrix
0115 double boostv[4][4];
0116 for(ix=0;ix<3;++ix)
0117 {
0118 for(iy=0;iy<3;++iy){boostv[ix][iy]=boostvec1[ix]*boostvec1[iy]*gmmone;}
0119 boostv[ix][ix]+=1;
0120 boostv[ix][3]=gamma*boostvec1[ix];
0121 boostv[3][ix]=boostv[ix][3];
0122 }
0123 boostv[3][3]=gamma;
0124 // spinor boost matrix
0125 Complex boosts[4][4];
0126 boosts[0][0] = coshchi-sinhchi*bz;
0127 boosts[0][1] = -sinhchi*nxminy;
0128 boosts[0][2] = 0.;
0129 boosts[0][3] = 0.;
0130 boosts[1][0] = -sinhchi*nxpiny;
0131 boosts[1][1] = coshchi+sinhchi*bz;
0132 boosts[1][2] = 0.;
0133 boosts[1][3] = 0.;
0134 boosts[2][0] = 0.;
0135 boosts[2][1] = 0.;
0136 boosts[2][2] = coshchi+sinhchi*bz;
0137 boosts[2][3] = +sinhchi*nxminy;
0138 boosts[3][0] = 0.;
0139 boosts[3][1] = 0.;
0140 boosts[3][2] = +sinhchi*nxpiny;
0141 boosts[3][3] = coshchi-sinhchi*bz;
0142 // apply the boost
0143 for(ix=0;ix<4;++ix)
0144 {
0145 for(iy=0;iy<4;++iy)
0146 {
0147 out[ix][iy]=complex<Value>();
0148 for(ixa=0;ixa<4;++ixa)
0149 {
0150 for(iya=0;iya<4;++iya)
0151 {out[ix][iy]+=boostv[ix][ixa]*boosts[iy][iya]*_spin[ixa][iya];}
0152 }
0153 }
0154 }
0155 *this= LorentzRSSpinor<Value>(out[0][0],out[0][1],out[0][2],out[0][3],
0156 out[1][0],out[1][1],out[1][2],out[1][3],
0157 out[2][0],out[2][1],out[2][2],out[2][3],
0158 out[3][0],out[3][1],out[3][2],out[3][3],_type);
0159 return *this;
0160 }
0161
0162 //general lorentz tranformation
0163 template<typename Value> LorentzRSSpinor<Value> & LorentzRSSpinor<Value>::transform(const LorentzRotation & r)
0164 {
0165 unsigned int ix,iy,ixa,iya;
0166 LorentzRSSpinor<Value> out;
0167 for(ix=0;ix<4;++ix)
0168 {
0169 for(iy=0;iy<4;++iy)
0170 {
0171 out(ix,iy)=complex<Value>();
0172 for(ixa=0;ixa<4;++ixa)
0173 {
0174 for(iya=0;iya<4;++iya)
0175 {out(ix,iy)+=r.one()(ix,ixa)*r.half()(iy,iya)*_spin[ixa][iya];}
0176 }
0177 }
0178 }
0179 *this=out;
0180 return *this;
0181 }