00001 // -*- C++ -*- 00002 // 00003 // WaveFunctionBase.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 2003-2007 Peter Richardson, Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_WaveFunctionBase_H 00010 #define ThePEG_WaveFunctionBase_H 00011 // 00012 // This is the declaration of the WaveFunctionBase class. 00013 00014 #include <ThePEG/Vectors/Lorentz5Vector.h> 00015 #include <ThePEG/Vectors/LorentzVector.h> 00016 #include <ThePEG/PDT/ParticleData.h> 00017 #include <ThePEG/Helicity/HelicityDefinitions.h> 00018 00019 namespace ThePEG { 00020 00021 namespace Helicity { 00022 00023 00024 00029 enum Direction 00030 { 00031 incoming, 00032 outgoing, 00033 intermediate 00034 }; 00035 00058 class WaveFunctionBase{ 00059 00060 public: 00061 00063 00064 00067 WaveFunctionBase() 00068 : _particle(), _momentum(), _dir(intermediate) 00069 {} 00070 00074 WaveFunctionBase(const Lorentz5Momentum & p, 00075 tcPDPtr pd, Direction dir = intermediate) 00076 : _particle(pd), _momentum(p), _dir(dir) 00077 { 00078 if(_dir==outgoing) _momentum *= -1.0; 00079 if ( dir != outgoing ) { 00080 tcPDPtr anti = pd->CC(); 00081 if ( anti ) _particle = anti; 00082 } 00083 } 00085 00086 00094 Energy px() const {return _momentum.x();} 00095 00099 Energy py() const {return _momentum.y();} 00100 00104 Energy pz() const {return _momentum.z();} 00105 00109 Energy e() const {return _momentum.e();} 00110 00114 Energy mass() const {return _momentum.mass();} 00115 00119 Energy2 m2() const {return _momentum.m2();} 00120 00124 const Lorentz5Momentum & momentum() const {return _momentum;} 00126 00134 long id() const {return _particle->id();} 00135 00139 PDT::Spin iSpin() const {return _particle->iSpin();} 00140 00144 tcPDPtr particle() const {return _particle;} 00145 00149 ThePEG::Helicity::Direction direction() const {return _dir;} 00150 00154 void direction(ThePEG::Helicity::Direction in) {_dir=in;} 00156 00157 protected: 00158 00162 void transformMomentum(const LorentzRotation & r) { 00163 _momentum.transform(r); 00164 } 00165 00166 private: 00167 00171 tcPDPtr _particle; 00172 00176 Lorentz5Momentum _momentum; 00177 00181 Direction _dir; 00182 }; 00183 } 00184 } 00185 00186 #endif