00001
00002
00003 #ifndef Beam_H
00004 #define Beam_H
00005
00006 #include <iostream>
00007 #include <vector>
00008 #include <cmath>
00009 #include <ctime>
00010 #include "Pythia7/Config/Pythia7.h"
00011 #include "ThePEG/PDF/PDFBase.h"
00012
00013 namespace Pythia7 {
00014 namespace Shower {
00015
00016 using namespace std;
00017
00018
00019
00024 class PDF {
00025
00026 public:
00028 PDF(long idBeamin = 2212)
00029 : idBeam(idBeamin), xSav(-1.0), Q2Sav(-1.0), xu(0.0), xd(0.0), xubar(0.0),
00030 xdbar(0.0), xs(0.0), xc(0.0), xb(0.0), xg(0.0), xlepton(0.0),
00031 xgamma(0.0) {}
00033 virtual ~PDF() {}
00035 double xfx(long, double, double);
00037 virtual bool isParton(long) const;
00039 virtual bool isValence(long) const;
00040
00041 protected:
00045 long idBeam;
00047 double xSav, Q2Sav;
00049 double xu, xd, xubar, xdbar, xs, xc, xb, xg, xlepton, xgamma;
00051 virtual void xfUpdate(double x, double Q2) = 0;
00052
00055 };
00056
00057
00058
00059
00065 class GRV94L : public PDF {
00066
00067 public:
00069 GRV94L(long idBeamin = 2212) : PDF(idBeamin) {;}
00070
00071 private:
00073 void xfUpdate(double x, double Q2);
00075 double grvv (double x, double n, double ak, double bk, double a,
00076 double b, double c, double d);
00078 double grvw (double x, double s, double al, double be, double ak,
00079 double bk, double a, double b, double c, double d, double e, double es);
00081 double grvs (double x, double s, double sth, double al, double be,
00082 double ak, double ag, double b, double d, double e, double es);
00083 };
00084
00085
00086
00087
00092 class Lepton : public PDF {
00093
00094 public:
00096 Lepton(long idBeamin = 11) : PDF(idBeamin) {;}
00097
00098 private:
00100 void xfUpdate(double x, double Q2);
00101 };
00102
00103
00104
00105
00110 class BeamParticle : public Particle {
00111
00112 public:
00116 BeamParticle() : Particle() {pdfbm = 0;}
00118 BeamParticle(long idin, Vec4 pin = Vec4(0.,0.,0.,0.), double min = 0.,
00119 PDF* pdfin = 0) : Particle(idin, -9, -1, -1, 0, 0, pin, min, 0.)
00120 {pdf(pdfin);}
00122 BeamParticle(const BeamParticle& pt) : Particle(pt) {pdfbm = pt.pdfbm;}
00124 BeamParticle& operator=(const BeamParticle& pt) {if (this != &pt) {
00125 pdfbm = pt.pdfbm; return *this;} }
00129 BeamParticle(const Particle& pt) : Particle(pt) {pdfbm = 0;}
00131 BeamParticle& operator=(const Particle& pt) {Particle::operator=(pt);
00132 pdfbm = 0; return *this; }
00133
00134
00138 double xfx(long id, double x, double Q2) {return pdfbm->xfx(id, x, Q2);}
00140 void pdf(PDF* pdfin) {pdfbm = pdfin;}
00142 PDF* pdf() const {return pdfbm;}
00144 bool isParton(long id) const {return pdfbm->isParton(id);}
00146 bool isValence(long id) const {return pdfbm->isValence(id);}
00148 bool isHadron() const {if (abs(id()) > 100) return true; return false;}
00150 bool isLepton() const {if (abs(id()) == 11 || abs(id()) == 13
00151 || abs(id()) == 15) return true; return false;}
00152
00153
00154 private:
00156 PDF* pdfbm;
00157 };
00158
00163 class ThePEGPDF: public PDF {
00164
00165 public:
00166
00171 ThePEGPDF(tcPDFPtr pdf, tcPDPtr parent);
00172
00176 virtual void xfUpdate(double x, double Q2);
00177
00179 void set(long id, double xf);
00180
00181 private:
00182
00184 tcPDFPtr thePDF;
00186 tcPDPtr theParent;
00188 map<long, tcPDPtr> thePartons;
00190 long theLeptonID;
00191
00192
00193 };
00194
00195
00196
00197
00198 }
00199 }
00200
00201 #endif // Beam_H