Warning, /include/ThePEG/Helicity/LorentzRSSpinorBar.tcc is written in an unsupported language. File is not indexed.
0001
0002 // -*- C++ -*-
0003 //
0004 // LorentzRSSpinorBar.tcc is a part of ThePEG - Toolkit for HEP Event Generation
0005 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
0006 //
0007 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0008 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0009 //
0010 //
0011 // This is the implementation of the non-inlined, non-templated member
0012 // functions of the LorentzRSSpinorBar class.
0013 //
0014 // Author: Peter Richardson
0015 //
0016
0017 #include "LorentzRSSpinorBar.h"
0018 #include "LorentzRSSpinor.h"
0019
0020 using namespace ThePEG;
0021 using namespace ThePEG::Helicity;
0022
0023 // return the unbarred spinor
0024 template<typename Value> LorentzRSSpinor<Value>
0025 LorentzRSSpinorBar<Value>::bar() const {
0026 complex<Value> out[4][4]; 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 LorentzRSSpinor<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 template<typename Value> LorentzRSSpinorBar<Value> &
0041 LorentzRSSpinorBar<Value>::boost(double bx,double by,double bz) {
0042 // work out beta and chi
0043 double b2(bx*bx+by*by+bz*bz),beta(sqrt(b2)),chi(atanh(beta));
0044 double sinhchi(sinh(0.5*chi)/beta),coshchi(cosh(0.5*chi));
0045 // calculate the new spinor
0046 Complex out[4][4],ii(0.,1.),boosts[4][4];
0047 Complex nxminy(bx-ii*by),nxpiny(bx+ii*by);
0048 double gamma(1.0/sqrt(1.0-b2)),gmmone(b2 >0 ? (gamma-1.)/b2 : 0.0);
0049 double bvec[3]={bx,by,bz},boostv[4][4];
0050 unsigned int ix,iy,ixa,iya;
0051 // spin matrix
0052 boosts[0][0] = coshchi+sinhchi*bz;
0053 boosts[0][1] = sinhchi*nxminy;
0054 boosts[0][2] = 0.;
0055 boosts[0][3] = 0.;
0056 boosts[1][0] = sinhchi*nxpiny;
0057 boosts[1][1] = coshchi-sinhchi*bz;
0058 boosts[1][2] = 0.;
0059 boosts[1][3] = 0.;
0060 boosts[2][0] = 0.;
0061 boosts[2][1] = 0.;
0062 boosts[2][2] = coshchi-sinhchi*bz;
0063 boosts[2][3] =-sinhchi*nxminy;
0064 boosts[3][0] = 0.;
0065 boosts[3][1] = 0.;
0066 boosts[3][2] =-sinhchi*nxpiny;
0067 boosts[3][3] = coshchi+sinhchi*bz;
0068 // vector matrix
0069 for(ix=0;ix<3;++ix) {
0070 for(iy=0;iy<3;++iy)
0071 boostv[ix][iy]=bvec[ix]*bvec[iy]*gmmone;
0072 boostv[ix][ix]+=1;
0073 boostv[ix][3]=gamma*bvec[ix];
0074 boostv[3][ix]=boostv[ix][3];
0075 }
0076 boostv[3][3]=gamma;
0077 // apply the boost
0078 for(ix=0;ix<4;++ix) {
0079 for(iy=0;iy<4;++iy) {
0080 out[ix][iy]=0.;
0081 for(ixa=0;ixa<4;++ixa) {
0082 for(iya=0;iya<4;++iya) {
0083 out[ix][iy] += boostv[ix][ixa]*boosts[iya][iy]*_spin[ixa][iya];
0084 }
0085 }
0086 }
0087 }
0088 *this= LorentzRSSpinorBar<Value>(out[0][0],out[0][1],out[0][2],out[0][3],
0089 out[1][0],out[1][1],out[1][2],out[1][3],
0090 out[2][0],out[2][1],out[2][2],out[2][3],
0091 out[3][0],out[3][1],out[3][2],out[3][3],_type);
0092 return *this;
0093 }
0094
0095 template<typename Value> LorentzRSSpinorBar<Value> &
0096 LorentzRSSpinorBar<Value>::boost(const Boost & boostvec) {
0097 double beta = boostvec.mag(),b2(beta*beta);
0098 double bx(boostvec.x()),by(boostvec.y()),bz(boostvec.z());
0099 double boostvec1[3] = {bx, by, bz};
0100 double chi(atanh(beta)),sinhchi(sinh(0.5*chi)/beta),coshchi(cosh(0.5*chi));
0101 complex<Value> out[4][4];
0102 Complex ii(0.,1.);
0103 Complex nxminy(bx-ii*by),nxpiny(bx+ii*by),boosts[4][4];
0104 double gamma(1.0/sqrt(1.0-b2)),gmmone(b2 >0 ? (gamma-1.)/b2 : 0.0),boostv[4][4];
0105 unsigned int ix,iy,ixa,iya;
0106 // spin matrix
0107 boosts[0][0] = coshchi+sinhchi*bz;
0108 boosts[0][1] = sinhchi*nxminy;
0109 boosts[0][2] = 0.;
0110 boosts[0][3] = 0.;
0111 boosts[1][0] = sinhchi*nxpiny;
0112 boosts[1][1] = coshchi-sinhchi*bz;
0113 boosts[1][2] = 0.;
0114 boosts[1][3] = 0.;
0115 boosts[2][0] = 0.;
0116 boosts[2][1] = 0.;
0117 boosts[2][2] = coshchi-sinhchi*bz;
0118 boosts[2][3] =-sinhchi*nxminy;
0119 boosts[3][0] = 0.;
0120 boosts[3][1] = 0.;
0121 boosts[3][2] =-sinhchi*nxpiny;
0122 boosts[3][3] = coshchi+sinhchi*bz;
0123 // vector matrix
0124 for(ix=0;ix<3;++ix) {
0125 for(iy=0;iy<3;++iy)
0126 boostv[ix][iy]=boostvec1[ix]*boostvec1[iy]*gmmone;
0127 boostv[ix][ix]+=1;
0128 boostv[ix][3]=gamma*boostvec1[ix];
0129 boostv[3][ix]=boostv[ix][3];
0130 }
0131 boostv[3][3]=gamma;
0132 // apply the boost
0133 for(ix=0;ix<4;++ix) {
0134 for(iy=0;iy<4;++iy) {
0135 out[ix][iy]=complex<Value>();
0136 for(ixa=0;ixa<4;++ixa) {
0137 for(iya=0;iya<4;++iya) {
0138 out[ix][iy]+=boostv[ix][ixa]*boosts[iya][iy]*_spin[ixa][iya];
0139 }
0140 }
0141 }
0142 }
0143 *this= LorentzRSSpinorBar<Value>(out[0][0],out[0][1],out[0][2],out[0][3],
0144 out[1][0],out[1][1],out[1][2],out[1][3],
0145 out[2][0],out[2][1],out[2][2],out[2][3],
0146 out[3][0],out[3][1],out[3][2],out[3][3],_type);
0147 return *this;
0148 }
0149
0150 template<typename Value> LorentzRSSpinorBar<Value> &
0151 LorentzRSSpinorBar<Value>::transform(const LorentzRotation & r) {
0152 SpinHalfLorentzRotation t(r.half().inverse());
0153 unsigned int ix,iy,ixa,iya;
0154 LorentzRSSpinorBar<Value> out;
0155 for(ix=0;ix<4;++ix) {
0156 for(iy=0;iy<4;++iy) {
0157 out(ix,iy)=0.;
0158 for(ixa=0;ixa<4;++ixa) {
0159 for(iya=0;iya<4;++iya) {
0160 out(ix,iy)+=r.one()(ix,ixa)*t(iya,iy)*_spin[ixa][iya];
0161 }
0162 }
0163 }
0164 }
0165 *this=out;
0166 return *this;
0167 }