Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/ThePEG/Helicity/LorentzSpinorBar.tcc is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //
0003 // LorentzSpinorBar.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 member
0011 // functions of the LorentzSpinorBar class.
0012 //
0013 // Author: Peter Richardson
0014 //
0015 
0016 #include "LorentzSpinorBar.h"
0017 #include "LorentzSpinor.h"
0018 
0019 using namespace ThePEG;
0020 using namespace ThePEG::Helicity;
0021 
0022 // return the unbarred spinor
0023 template <typename Value>
0024 LorentzSpinor<Value> LorentzSpinorBar<Value>::bar() const
0025 {
0026   complex<Value> output[4];
0027   // HELAS
0028   output[0] = conj(_spin[2]);
0029   output[1] = conj(_spin[3]);
0030   output[2] = conj(_spin[0]);
0031   output[3] = conj(_spin[1]);
0032   return LorentzSpinor<Value>(output[0],output[1],output[2],output[3],_type);
0033 }
0034 
0035 template <typename Value>
0036 LorentzSpinorBar<Value> & LorentzSpinorBar<Value>::boost(double bx,double by,double bz)
0037 {
0038   // work out beta and chi
0039   double beta=sqrt(bx*bx+by*by+bz*bz);
0040   double chi = atanh(beta);
0041   double sinhchi = sinh(0.5*chi)/beta, coshchi = cosh(0.5*chi);
0042   // calculate the new spinor
0043   complex<Value> out[4];
0044   Complex ii(0.,1.);
0045   Complex nxminy=bx-ii*by;
0046   Complex nxpiny=bx+ii*by;
0047   out[0] = coshchi*_spin[0]+sinhchi*(-bz*_spin[0]-nxpiny*_spin[1]);
0048   out[1] = coshchi*_spin[1]+sinhchi*(+bz*_spin[1]-nxminy*_spin[0]);
0049   out[2] = coshchi*_spin[2]+sinhchi*(+bz*_spin[2]+nxpiny*_spin[3]);
0050   out[3] = coshchi*_spin[3]+sinhchi*(-bz*_spin[3]+nxminy*_spin[2]);
0051   for(unsigned int ix=0;ix<4;++ix){_spin[ix]=out[ix];}
0052   return *this;
0053 }
0054 
0055 template <typename Value>
0056 LorentzSpinorBar<Value> & LorentzSpinorBar<Value>::boost(const Boost & boostv)
0057 {
0058   double beta = boostv.mag();
0059   double bx=boostv.x(),by=boostv.y(),bz=boostv.z();
0060   double chi = atanh(beta);
0061   double sinhchi = sinh(0.5*chi)/beta, coshchi = cosh(0.5*chi);
0062   complex<Value> out[4];
0063   Complex ii(0.,1.);
0064   Complex nxminy=bx-ii*by;
0065   Complex nxpiny=bx+ii*by;
0066   out[0] = coshchi*_spin[0]+sinhchi*(-bz*_spin[0]-nxpiny*_spin[1]);
0067   out[1] = coshchi*_spin[1]+sinhchi*(+bz*_spin[1]-nxminy*_spin[0]);
0068   out[2] = coshchi*_spin[2]+sinhchi*(+bz*_spin[2]+nxpiny*_spin[3]);
0069   out[3] = coshchi*_spin[3]+sinhchi*(-bz*_spin[3]+nxminy*_spin[2]);
0070   for(unsigned int ix=0;ix<4;++ix){_spin[ix]=out[ix];}
0071   return *this;
0072 }
0073 
0074 // general transform
0075 template <typename Value>
0076 LorentzSpinorBar<Value> & LorentzSpinorBar<Value>::transform(const SpinHalfLorentzRotation & r)
0077 {
0078   unsigned int ix,iy;
0079   SpinHalfLorentzRotation t(r.inverse());
0080   complex<Value> out[4];
0081   for(ix=0;ix<4;++ix)
0082     {
0083       out[ix]=complex<Value>();
0084       for(iy=0;iy<4;++iy){out[ix]+=_spin[iy]*t(iy,ix);}
0085     }
0086   for(ix=0;ix<4;++ix){_spin[ix]=out[ix];}
0087   return *this;
0088 }
0089 
0090 
0091 // conjugation
0092 template <typename Value>
0093 LorentzSpinorBar<Value> LorentzSpinorBar<Value>::conjugate() const {
0094   SpinorType new_type;
0095   switch(_type) {
0096   case SpinorType::u:
0097     new_type=SpinorType::v;
0098     break;
0099   case SpinorType::v:
0100     new_type=SpinorType::u;
0101     break;
0102   case SpinorType::unknown:
0103   default:
0104     new_type=SpinorType::unknown;
0105     break;
0106   }
0107   return LorentzSpinorBar<Value>(-conj(_spin[3]),+conj(_spin[2]),
0108                          +conj(_spin[1]),-conj(_spin[0]),new_type);
0109 }