1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
|
// -*- C++ -*-
//
// TensorWaveFunction.cc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the TensorWaveFunction class.
//
// Author: Peter Richardson
//
#include "TensorWaveFunction.h"
using namespace ThePEG;
using namespace ThePEG::Helicity;
// calculate the actual wavefunction
void TensorWaveFunction::calculateWaveFunction(unsigned int ihel, TensorPhase tphase) {
int jhel=ihel-2;
assert(direction()!=intermediate);
// check for a valid helicty combination
assert((jhel<=2 && jhel>=-2 && mass() >ZERO) ||
((jhel==2 || jhel==-2) && mass()==ZERO));
// extract the momentum components
double fact = direction()==outgoing ? -1. : 1;
Energy ppx=fact*px(),ppy=fact*py(),ppz=fact*pz(),pee=fact*e(),pmm=mass();
// calculate some kinematic quantites;
Energy2 pt2 = sqr(ppx)+sqr(ppy);
Energy pabs = sqrt(pt2+sqr(ppz));
Energy pt = sqrt(pt2);
// polarization vectors
complex<double> epsp[4],epsm[4],eps0[4];
// + helicity vector if needed
if(jhel>=0) {
// calculate the overall phase
complex<double>phase;
if(tphase==tensor_phase) {
phase = pt==ZERO ? 1. : complex<double>(ppx/pt,-fact*ppy/pt);
}
else phase = 1.;
phase = phase*sqrt(0.5);
// first the no pt case
if(pt==ZERO) {
double sgnz = ppz<ZERO ? -1. : 1.;
epsp[0]=-phase;
epsp[1]= sgnz*phase*complex<double>(0,-fact);
epsp[2]=0.;
epsp[3]=0.;
}
else {
InvEnergy opabs=1./pabs;
InvEnergy opt =1./pt;
epsp[0]=phase*complex<double>(-ppz*ppx*opabs*opt,
fact*ppy*opt);
epsp[1]=phase*complex<double>(-ppz*ppy*opabs*opt,
-fact*ppx*opt);
epsp[2]=pt*opabs*phase;
epsp[3]=0.;
}
}
// - helicity vector if needed
if(jhel<=0) {
// calculate the overall phase
complex<double> phase;
if(tphase==tensor_phase) {
phase = pt==ZERO ? 1. : complex<double>(ppx/pt,fact*ppy/pt);
}
else phase = 1.;
phase = phase*sqrt(0.5);
// first the no pt case
if(pt==ZERO) {
double sgnz;
if(ppz<ZERO){sgnz=-1.;}
else{sgnz=1.;}
epsm[0]= phase;
epsm[1]= sgnz*phase*complex<double>(0,-fact);
epsm[2]=0.;
epsm[3]=0.;
}
else {
InvEnergy opabs=1./pabs;
InvEnergy opt =1./pt;
epsm[0]=phase*complex<double>(ppz*ppx*opabs*opt,
fact*ppy*opt);
epsm[1]=phase*complex<double>(ppz*ppy*opabs*opt,
-fact*ppx*opt);
epsm[2]=-pt*opabs*phase;
epsm[3]=0.;
}
}
// 0 helicity vector if needed
if(jhel<=1 && jhel>=-1) {
if(pabs==ZERO) {
eps0[0] = 0.;
eps0[1] = 0.;
eps0[2] = 1.;
eps0[3] = 0.;
}
else {
InvEnergy empabs=pee/pmm/pabs;
eps0[0] = empabs*ppx;
eps0[1] = empabs*ppy;
eps0[2] = empabs*ppz;
eps0[3] = pabs/pmm;
}
}
// put the polarization vectors together to get the wavefunction
double ort;
switch (jhel) {
case 2:
for(int ix=0;ix<4;++ix)
for(int iy=0;iy<4;++iy) _wf(ix,iy)=epsp[ix]*epsp[iy];
break;
case 1:
ort = sqrt(0.5);
for(int ix=0;ix<4;++ix)
for(int iy=0;iy<4;++iy) _wf(ix,iy)=ort*( epsp[ix]*eps0[iy]+
eps0[ix]*epsp[iy]);
break;
case 0:
ort = 1./sqrt(6.);
for(int ix=0;ix<4;++ix)
for(int iy=0;iy<4;++iy) _wf(ix,iy)=ort*( epsp[ix]*epsm[iy]
+ epsm[ix]*epsp[iy]
+2.*eps0[ix]*eps0[iy]);
break;
case -1:
ort = 1./sqrt(2.);
for(int ix=0;ix<4;++ix)
for(int iy=0;iy<4;++iy) _wf(ix,iy)=ort*( epsm[ix]*eps0[iy]+
eps0[ix]*epsm[iy]);
break;
case -2:
for(int ix=0;ix<4;++ix)
for(int iy=0;iy<4;++iy) _wf(ix,iy)=epsm[ix]*epsm[iy];
break;
default:
ThePEG::Helicity::HelicityConsistencyError()
<< "Invalid Helicity = " << jhel << " requested for Tensor"
<< Exception::abortnow;
break;
}
}
void TensorWaveFunction::
calculateWaveFunctions(vector<LorentzTensor<double> > & waves,
tPPtr particle,Direction dir, bool massless,
TensorPhase phase) {
tTensorSpinPtr inspin = !particle->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(particle->spinInfo());
waves.resize(5);
if(inspin) {
if(dir==outgoing) {
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=inspin->getProductionBasisState(ix);
}
else {
inspin->decay();
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=inspin->getDecayBasisState(ix);
}
}
else {
assert(!particle->spinInfo());
TensorWaveFunction wave(particle->momentum(),particle->dataPtr(),0,
dir,phase);
for(unsigned int ix=0;ix<5;++ix) {
if(massless&&ix>0&&ix<5) {
waves[ix] = LorentzTensor<double>();
}
else {
if(ix!=0) wave.reset(ix);
waves[ix] = wave.wave();
}
}
}
}
void TensorWaveFunction::
calculateWaveFunctions(vector<TensorWaveFunction> & waves,
tPPtr particle, Direction dir, bool massless,
TensorPhase phase) {
tTensorSpinPtr inspin = !particle->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(particle->spinInfo());
waves.resize(5);
if(inspin) {
if(dir==outgoing) {
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=TensorWaveFunction(particle->momentum(),
particle->dataPtr(),
inspin->getProductionBasisState(ix),dir);
}
else {
inspin->decay();
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=TensorWaveFunction(particle->momentum(),
particle->dataPtr(),
inspin->getDecayBasisState(ix),dir);
}
}
else {
assert(!particle->spinInfo());
TensorWaveFunction wave(particle->momentum(),particle->dataPtr(),0,
dir,phase);
for(unsigned int ix=0;ix<5;++ix) {
if(massless&&ix>0&&ix<5) {
waves[ix] = TensorWaveFunction(particle->momentum(),particle->dataPtr(),dir);
}
else {
if(ix!=0) wave.reset(ix);
waves[ix] = wave;
}
}
}
}
void TensorWaveFunction::
calculateWaveFunctions(vector<LorentzTensor<double> > & waves,
RhoDMatrix & rho,
tPPtr particle,Direction dir,bool massless,
TensorPhase phase) {
tTensorSpinPtr inspin = !particle->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(particle->spinInfo());
waves.resize(5);
if(inspin) {
if(dir==outgoing) {
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=inspin->getProductionBasisState(ix);
rho = RhoDMatrix(PDT::Spin2);
}
else {
inspin->decay();
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=inspin->getDecayBasisState(ix);
rho = inspin->rhoMatrix();
}
}
else {
assert(!particle->spinInfo());
TensorWaveFunction wave(particle->momentum(),particle->dataPtr(),0,
dir,phase);
for(unsigned int ix=0;ix<5;++ix) {
if(massless&&ix>0&&ix<5) {
waves[ix] = LorentzTensor<double>();
}
else {
if(ix!=0) wave.reset(ix);
waves[ix] = wave.wave();
}
}
rho = RhoDMatrix(PDT::Spin2);
}
}
void TensorWaveFunction::
calculateWaveFunctions(vector<TensorWaveFunction> & waves,
RhoDMatrix & rho,
tPPtr particle, Direction dir, bool massless,
TensorPhase phase) {
tTensorSpinPtr inspin = !particle->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(particle->spinInfo());
waves.resize(5);
if(inspin) {
if(dir==outgoing) {
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=TensorWaveFunction(particle->momentum(),
particle->dataPtr(),
inspin->getProductionBasisState(ix),dir);
rho = RhoDMatrix(PDT::Spin2);
}
else {
inspin->decay();
for(unsigned int ix=0;ix<5;++ix)
waves[ix]=TensorWaveFunction(particle->momentum(),
particle->dataPtr(),
inspin->getDecayBasisState(ix),dir);
rho = inspin->rhoMatrix();
}
}
else {
assert(!particle->spinInfo());
TensorWaveFunction wave(particle->momentum(),particle->dataPtr(),0,
dir,phase);
for(unsigned int ix=0;ix<5;++ix) {
if(massless&&ix>0&&ix<5) {
waves[ix] = TensorWaveFunction(particle->momentum(),particle->dataPtr(),dir);
}
else {
if(ix!=0) wave.reset(ix);
waves[ix] = wave;
}
}
rho = RhoDMatrix(PDT::Spin2);
}
}
void TensorWaveFunction::
constructSpinInfo(const vector<LorentzTensor<double> > & waves,
tPPtr part,Direction dir, bool time,bool ) {
assert(waves.size()==5);
tTensorSpinPtr inspin = !part->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(part->spinInfo());
if(inspin) {
for(unsigned int ix=0;ix<5;++ix)
if(dir==outgoing) inspin->setBasisState(ix,waves[ix]);
else inspin->setDecayState(ix,waves[ix]);
}
else {
TensorSpinPtr temp = new_ptr(TensorSpinInfo(part->momentum(),time));
part->spinInfo(temp);
for(unsigned int ix=0;ix<5;++ix)
if(dir==outgoing) temp->setBasisState(ix,waves[ix]);
else temp->setDecayState(ix,waves[ix]);
}
}
void TensorWaveFunction::
constructSpinInfo(const vector<TensorWaveFunction> & waves,
tPPtr part,Direction dir, bool time,bool ) {
assert(waves.size()==5);
tTensorSpinPtr inspin = !part->spinInfo() ? tTensorSpinPtr() :
dynamic_ptr_cast<tTensorSpinPtr>(part->spinInfo());
if(inspin) {
for(unsigned int ix=0;ix<5;++ix)
if(dir==outgoing) inspin->setBasisState(ix,waves[ix].wave());
else inspin->setDecayState(ix,waves[ix].wave());
}
else {
TensorSpinPtr temp = new_ptr(TensorSpinInfo(part->momentum(),time));
part->spinInfo(temp);
for(unsigned int ix=0;ix<5;++ix)
if(dir==outgoing) temp->setBasisState(ix,waves[ix].wave());
else temp->setDecayState(ix,waves[ix].wave());
}
}
|