GENIEGenerator
Loading...
Searching...
No Matches
genie::PDF Class Reference

A class to store PDFs. More...

#include <PDF.h>

Collaboration diagram for genie::PDF:
[legend]

Public Member Functions

 PDF ()
 PDF (const PDF &pdf_set)
virtual ~PDF ()
void SetModel (const PDFModelI *model)
void Calculate (double x, double q2)
double UpValence (void) const
double DownValence (void) const
double UpSea (void) const
double DownSea (void) const
double Strange (void) const
double Charm (void) const
double Bottom (void) const
double Top (void) const
double Gluon (void) const
void ScaleValence (double kscale)
void ScaleSea (double kscale)
void ScaleUpValence (double kscale)
void ScaleDownValence (double kscale)
void ScaleUpSea (double kscale)
void ScaleDownSea (double kscale)
void ScaleStrange (double kscale)
void ScaleCharm (double kscale)
void Reset (void)
void Copy (const PDF &pdf_set)
void Print (ostream &stream) const

Protected Member Functions

void Init (void)

Protected Attributes

double fUpValence
double fDownValence
double fUpSea
double fDownSea
double fStrange
double fCharm
double fBottom
double fTop
double fGluon
const PDFModelIfModel

Friends

ostream & operator<< (ostream &stream, const PDF &pdf_set)

Detailed Description

A class to store PDFs.

     This class is using the \b Strategy Pattern. \n
     It can accept requests to calculate itself, for a given (x,q^2) pair,
     that it then delegates to the algorithmic object, implementing the
     PDFModelI interface, that it finds attached to itself.
Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n May 04, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 37 of file PDF.h.

Constructor & Destructor Documentation

◆ PDF() [1/2]

PDF::PDF ( )

Definition at line 27 of file PDF.cxx.

28{
29 this->Init();
30}
void Init(void)
Definition PDF.cxx:139

References Init().

Referenced by Copy(), operator<<, and PDF().

◆ PDF() [2/2]

PDF::PDF ( const PDF & pdf_set)

Definition at line 32 of file PDF.cxx.

33{
34 this->Copy(pdf_set);
35}
void Copy(const PDF &pdf_set)
Definition PDF.cxx:124

References Copy(), and PDF().

◆ ~PDF()

PDF::~PDF ( )
virtual

Definition at line 37 of file PDF.cxx.

38{
39
40}

Member Function Documentation

◆ Bottom()

double genie::PDF::Bottom ( void ) const
inline

Definition at line 56 of file PDF.h.

56{ return fBottom; }
double fBottom
Definition PDF.h:89

References fBottom.

◆ Calculate()

void PDF::Calculate ( double x,
double q2 )

Definition at line 49 of file PDF.cxx.

50{
51 PDF_t pdfs = fModel->AllPDFs(x, q2);
52
53 fUpValence = pdfs.uval;
54 fDownValence = pdfs.dval;
55 fUpSea = pdfs.usea;
56 fDownSea = pdfs.dsea;
57 fStrange = pdfs.str;
58 fCharm = pdfs.chm;
59 fBottom = pdfs.bot;
60 fTop = pdfs.top;
61 fGluon = pdfs.gl;
62}
double fUpSea
Definition PDF.h:85
double fGluon
Definition PDF.h:91
const PDFModelI * fModel
Definition PDF.h:93
double fDownSea
Definition PDF.h:86
double fStrange
Definition PDF.h:87
double fUpValence
Definition PDF.h:83
double fCharm
Definition PDF.h:88
double fDownValence
Definition PDF.h:84
double fTop
Definition PDF.h:90
struct genie::EPDF PDF_t

References genie::EPDF::bot, genie::EPDF::chm, genie::EPDF::dsea, genie::EPDF::dval, fBottom, fCharm, fDownSea, fDownValence, fGluon, fModel, fStrange, fTop, fUpSea, fUpValence, genie::EPDF::gl, genie::EPDF::str, genie::EPDF::top, genie::EPDF::usea, and genie::EPDF::uval.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ Charm()

double genie::PDF::Charm ( void ) const
inline

Definition at line 55 of file PDF.h.

55{ return fCharm; }

References fCharm.

◆ Copy()

void PDF::Copy ( const PDF & pdf_set)

Definition at line 124 of file PDF.cxx.

125{
126 fModel = pdf_set.fModel;
127
128 fUpValence = pdf_set.fUpValence;
129 fDownValence = pdf_set.fDownValence;
130 fUpSea = pdf_set.fUpSea;
131 fDownSea = pdf_set.fDownSea;
132 fStrange = pdf_set.fStrange;
133 fCharm = pdf_set.fCharm;
134 fBottom = pdf_set.fBottom;
135 fTop = pdf_set.fTop;
136 fGluon = pdf_set.fGluon;
137}

References fBottom, fCharm, fDownSea, fDownValence, fGluon, fModel, fStrange, fTop, fUpSea, fUpValence, and PDF().

Referenced by PDF().

◆ DownSea()

double genie::PDF::DownSea ( void ) const
inline

Definition at line 53 of file PDF.h.

53{ return fDownSea; }

References fDownSea.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ DownValence()

double genie::PDF::DownValence ( void ) const
inline

Definition at line 51 of file PDF.h.

51{ return fDownValence; }

References fDownValence.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ Gluon()

double genie::PDF::Gluon ( void ) const
inline

Definition at line 58 of file PDF.h.

58{ return fGluon; }

References fGluon.

Referenced by main(), and MakePlots().

◆ Init()

void PDF::Init ( void )
protected

Definition at line 139 of file PDF.cxx.

140{
141 fModel = 0;
142
143 fUpValence = 0.0;
144 fDownValence = 0.0;
145 fUpSea = 0.0;
146 fDownSea = 0.0;
147 fStrange = 0.0;
148 fCharm = 0.0;
149 fBottom = 0.0;
150 fTop = 0.0;
151 fGluon = 0.0;
152}

References fBottom, fCharm, fDownSea, fDownValence, fGluon, fModel, fStrange, fTop, fUpSea, and fUpValence.

Referenced by PDF(), and SetModel().

◆ Print()

void PDF::Print ( ostream & stream) const

Definition at line 154 of file PDF.cxx.

155{
156 stream << endl;
157 stream << "UP-VAL....... " << fUpValence << endl;
158 stream << "DOWN-VAL..... " << fDownValence << endl;
159 stream << "UP-SEA....... " << fUpSea << endl;
160 stream << "DOWN-SEA..... " << fDownSea << endl;
161 stream << "STRANGE...... " << fStrange << endl;
162 stream << "CHARM........ " << fCharm << endl;
163 stream << "BOTTOM....... " << fBottom << endl;
164 stream << "TOP.......... " << fTop << endl;
165 stream << "GLUON........ " << fGluon << endl;
166}

References fBottom, fCharm, fDownSea, fDownValence, fGluon, fStrange, fTop, fUpSea, and fUpValence.

Referenced by operator<<.

◆ Reset()

void PDF::Reset ( void )

Definition at line 111 of file PDF.cxx.

112{
113 fUpValence = 0.0;
114 fDownValence = 0.0;
115 fUpSea = 0.0;
116 fDownSea = 0.0;
117 fStrange = 0.0;
118 fCharm = 0.0;
119 fBottom = 0.0;
120 fTop = 0.0;
121 fGluon = 0.0;
122}

References fBottom, fCharm, fDownSea, fDownValence, fGluon, fStrange, fTop, fUpSea, and fUpValence.

◆ ScaleCharm()

void PDF::ScaleCharm ( double kscale)

Definition at line 106 of file PDF.cxx.

107{
108 fCharm *= kscale;
109}

References fCharm.

◆ ScaleDownSea()

void PDF::ScaleDownSea ( double kscale)

Definition at line 96 of file PDF.cxx.

97{
98 fDownSea *= kscale;
99}

References fDownSea.

◆ ScaleDownValence()

void PDF::ScaleDownValence ( double kscale)

Definition at line 86 of file PDF.cxx.

87{
88 fDownValence *= kscale;
89}

References fDownValence.

◆ ScaleSea()

void PDF::ScaleSea ( double kscale)

Definition at line 70 of file PDF.cxx.

71{
72 fUpSea *= kscale;
73 fDownSea *= kscale;
74 fStrange *= kscale;
75 fCharm *= kscale;
76 fBottom *= kscale;
77 fTop *= kscale;
78 fGluon *= kscale;
79}

References fBottom, fCharm, fDownSea, fGluon, fStrange, fTop, and fUpSea.

◆ ScaleStrange()

void PDF::ScaleStrange ( double kscale)

Definition at line 101 of file PDF.cxx.

102{
103 fStrange *= kscale;
104}

References fStrange.

◆ ScaleUpSea()

void PDF::ScaleUpSea ( double kscale)

Definition at line 91 of file PDF.cxx.

92{
93 fUpSea *= kscale;
94}

References fUpSea.

◆ ScaleUpValence()

void PDF::ScaleUpValence ( double kscale)

Definition at line 81 of file PDF.cxx.

82{
83 fUpValence *= kscale;
84}

References fUpValence.

◆ ScaleValence()

void PDF::ScaleValence ( double kscale)

Definition at line 64 of file PDF.cxx.

65{
66 fUpValence *= kscale;
67 fDownValence *= kscale;
68}

References fDownValence, and fUpValence.

◆ SetModel()

void PDF::SetModel ( const PDFModelI * model)

Definition at line 42 of file PDF.cxx.

43{
44 this->Init();
45
46 fModel = model;
47}

References fModel, and Init().

Referenced by genie::KovalenkoQELCharmPXSec::DR(), main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ Strange()

double genie::PDF::Strange ( void ) const
inline

Definition at line 54 of file PDF.h.

54{ return fStrange; }

References fStrange.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ Top()

double genie::PDF::Top ( void ) const
inline

Definition at line 57 of file PDF.h.

57{ return fTop; }

References fTop.

◆ UpSea()

double genie::PDF::UpSea ( void ) const
inline

Definition at line 52 of file PDF.h.

52{ return fUpSea; }

References fUpSea.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ UpValence()

double genie::PDF::UpValence ( void ) const
inline

Definition at line 50 of file PDF.h.

50{ return fUpValence; }

References fUpValence.

Referenced by main(), MakePlots(), genie::AivazisCharmPXSecLO::XSec(), and genie::SlowRsclCharmDISPXSecLO::XSec().

◆ operator<<

ostream & operator<< ( ostream & stream,
const PDF & pdf_set )
friend

Definition at line 20 of file PDF.cxx.

21 {
22 pdf_set.Print(stream);
23 return stream;
24 }
void Print(ostream &stream) const
Definition PDF.cxx:154

References PDF(), and Print().

Member Data Documentation

◆ fBottom

double genie::PDF::fBottom
protected

Definition at line 89 of file PDF.h.

Referenced by Bottom(), Calculate(), Copy(), Init(), Print(), Reset(), and ScaleSea().

◆ fCharm

double genie::PDF::fCharm
protected

Definition at line 88 of file PDF.h.

Referenced by Calculate(), Charm(), Copy(), Init(), Print(), Reset(), ScaleCharm(), and ScaleSea().

◆ fDownSea

double genie::PDF::fDownSea
protected

Definition at line 86 of file PDF.h.

Referenced by Calculate(), Copy(), DownSea(), Init(), Print(), Reset(), ScaleDownSea(), and ScaleSea().

◆ fDownValence

double genie::PDF::fDownValence
protected

Definition at line 84 of file PDF.h.

Referenced by Calculate(), Copy(), DownValence(), Init(), Print(), Reset(), ScaleDownValence(), and ScaleValence().

◆ fGluon

double genie::PDF::fGluon
protected

Definition at line 91 of file PDF.h.

Referenced by Calculate(), Copy(), Gluon(), Init(), Print(), Reset(), and ScaleSea().

◆ fModel

const PDFModelI* genie::PDF::fModel
protected

Definition at line 93 of file PDF.h.

Referenced by Calculate(), Copy(), Init(), and SetModel().

◆ fStrange

double genie::PDF::fStrange
protected

Definition at line 87 of file PDF.h.

Referenced by Calculate(), Copy(), Init(), Print(), Reset(), ScaleSea(), ScaleStrange(), and Strange().

◆ fTop

double genie::PDF::fTop
protected

Definition at line 90 of file PDF.h.

Referenced by Calculate(), Copy(), Init(), Print(), Reset(), ScaleSea(), and Top().

◆ fUpSea

double genie::PDF::fUpSea
protected

Definition at line 85 of file PDF.h.

Referenced by Calculate(), Copy(), Init(), Print(), Reset(), ScaleSea(), ScaleUpSea(), and UpSea().

◆ fUpValence

double genie::PDF::fUpValence
protected

Definition at line 83 of file PDF.h.

Referenced by Calculate(), Copy(), Init(), Print(), Reset(), ScaleUpValence(), ScaleValence(), and UpValence().


The documentation for this class was generated from the following files: