Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
genie::PDF Class Reference

A class to store PDFs. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01a/Linux64bit+3.10-2.17-e19-debug/GENIE-Generator/src/Physics/PartonDistributions/PDF.h"

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 Strategy Pattern.
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 <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

May 04, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 38 of file PDF.h.

Constructor & Destructor Documentation

PDF::PDF ( )

Definition at line 33 of file PDF.cxx.

References Init().

34 {
35  this->Init();
36 }
void Init(void)
Definition: PDF.cxx:145
PDF::PDF ( const PDF pdf_set)

Definition at line 38 of file PDF.cxx.

References Copy().

39 {
40  this->Copy(pdf_set);
41 }
void Copy(const PDF &pdf_set)
Definition: PDF.cxx:130
PDF::~PDF ( )
virtual

Definition at line 43 of file PDF.cxx.

44 {
45 
46 }

Member Function Documentation

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

Definition at line 57 of file PDF.h.

References fBottom.

57 { return fBottom; }
double fBottom
Definition: PDF.h:90
void PDF::Calculate ( double  x,
double  q2 
)

Definition at line 55 of file PDF.cxx.

References genie::PDFModelI::AllPDFs(), fBottom, fCharm, fDownSea, fDownValence, fGluon, fModel, fStrange, fTop, fUpSea, and fUpValence.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), genie::utils::gsl::wrap::KovQELCharmIntegrand::DoEval(), main(), MakePlots(), genie::SlowRsclCharmDISPXSecLO::XSec(), and genie::AivazisCharmPXSecLO::XSec().

56 {
57  PDF_t pdfs = fModel->AllPDFs(x, q2);
58 
59  fUpValence = pdfs.uval;
60  fDownValence = pdfs.dval;
61  fUpSea = pdfs.usea;
62  fDownSea = pdfs.dsea;
63  fStrange = pdfs.str;
64  fCharm = pdfs.chm;
65  fBottom = pdfs.bot;
66  fTop = pdfs.top;
67  fGluon = pdfs.gl;
68 }
double fDownValence
Definition: PDF.h:85
double fDownSea
Definition: PDF.h:87
virtual PDF_t AllPDFs(double x, double Q2) const =0
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
Double_t q2[12][num]
Definition: f2_nu.C:137
double fUpValence
Definition: PDF.h:84
double fBottom
Definition: PDF.h:90
A struct to hold PDF set data.
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
const PDFModelI * fModel
Definition: PDF.h:94
double fCharm
Definition: PDF.h:89
double genie::PDF::Charm ( void  ) const
inline

Definition at line 56 of file PDF.h.

References fCharm.

56 { return fCharm; }
double fCharm
Definition: PDF.h:89
void PDF::Copy ( const PDF pdf_set)

Definition at line 130 of file PDF.cxx.

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

Referenced by Gluon(), and PDF().

131 {
132  fModel = pdf_set.fModel;
133 
134  fUpValence = pdf_set.fUpValence;
135  fDownValence = pdf_set.fDownValence;
136  fUpSea = pdf_set.fUpSea;
137  fDownSea = pdf_set.fDownSea;
138  fStrange = pdf_set.fStrange;
139  fCharm = pdf_set.fCharm;
140  fBottom = pdf_set.fBottom;
141  fTop = pdf_set.fTop;
142  fGluon = pdf_set.fGluon;
143 }
double fDownValence
Definition: PDF.h:85
double fDownSea
Definition: PDF.h:87
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
double fUpValence
Definition: PDF.h:84
double fBottom
Definition: PDF.h:90
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
const PDFModelI * fModel
Definition: PDF.h:94
double fCharm
Definition: PDF.h:89
double genie::PDF::DownSea ( void  ) const
inline

Definition at line 54 of file PDF.h.

References fDownSea.

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

54 { return fDownSea; }
double fDownSea
Definition: PDF.h:87
double genie::PDF::DownValence ( void  ) const
inline
double genie::PDF::Gluon ( void  ) const
inline
void PDF::Init ( void  )
protected

Definition at line 145 of file PDF.cxx.

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

Referenced by Gluon(), PDF(), and SetModel().

146 {
147  fModel = 0;
148 
149  fUpValence = 0.0;
150  fDownValence = 0.0;
151  fUpSea = 0.0;
152  fDownSea = 0.0;
153  fStrange = 0.0;
154  fCharm = 0.0;
155  fBottom = 0.0;
156  fTop = 0.0;
157  fGluon = 0.0;
158 }
double fDownValence
Definition: PDF.h:85
double fDownSea
Definition: PDF.h:87
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
double fUpValence
Definition: PDF.h:84
double fBottom
Definition: PDF.h:90
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
const PDFModelI * fModel
Definition: PDF.h:94
double fCharm
Definition: PDF.h:89
void PDF::Print ( ostream &  stream) const

Definition at line 160 of file PDF.cxx.

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

Referenced by Gluon(), and genie::operator<<().

161 {
162  stream << endl;
163  stream << "UP-VAL....... " << fUpValence << endl;
164  stream << "DOWN-VAL..... " << fDownValence << endl;
165  stream << "UP-SEA....... " << fUpSea << endl;
166  stream << "DOWN-SEA..... " << fDownSea << endl;
167  stream << "STRANGE...... " << fStrange << endl;
168  stream << "CHARM........ " << fCharm << endl;
169  stream << "BOTTOM....... " << fBottom << endl;
170  stream << "TOP.......... " << fTop << endl;
171  stream << "GLUON........ " << fGluon << endl;
172 }
double fDownValence
Definition: PDF.h:85
double fDownSea
Definition: PDF.h:87
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
double fUpValence
Definition: PDF.h:84
double fBottom
Definition: PDF.h:90
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
double fCharm
Definition: PDF.h:89
void PDF::Reset ( void  )

Definition at line 117 of file PDF.cxx.

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

Referenced by Gluon().

118 {
119  fUpValence = 0.0;
120  fDownValence = 0.0;
121  fUpSea = 0.0;
122  fDownSea = 0.0;
123  fStrange = 0.0;
124  fCharm = 0.0;
125  fBottom = 0.0;
126  fTop = 0.0;
127  fGluon = 0.0;
128 }
double fDownValence
Definition: PDF.h:85
double fDownSea
Definition: PDF.h:87
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
double fUpValence
Definition: PDF.h:84
double fBottom
Definition: PDF.h:90
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
double fCharm
Definition: PDF.h:89
void PDF::ScaleCharm ( double  kscale)

Definition at line 112 of file PDF.cxx.

References fCharm.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

113 {
114  fCharm *= kscale;
115 }
double fCharm
Definition: PDF.h:89
void PDF::ScaleDownSea ( double  kscale)

Definition at line 102 of file PDF.cxx.

References fDownSea.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

103 {
104  fDownSea *= kscale;
105 }
double fDownSea
Definition: PDF.h:87
void PDF::ScaleDownValence ( double  kscale)

Definition at line 92 of file PDF.cxx.

References fDownValence.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

93 {
94  fDownValence *= kscale;
95 }
double fDownValence
Definition: PDF.h:85
void PDF::ScaleSea ( double  kscale)

Definition at line 76 of file PDF.cxx.

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

Referenced by Gluon().

77 {
78  fUpSea *= kscale;
79  fDownSea *= kscale;
80  fStrange *= kscale;
81  fCharm *= kscale;
82  fBottom *= kscale;
83  fTop *= kscale;
84  fGluon *= kscale;
85 }
double fDownSea
Definition: PDF.h:87
double fStrange
Definition: PDF.h:88
double fTop
Definition: PDF.h:91
double fBottom
Definition: PDF.h:90
double fUpSea
Definition: PDF.h:86
double fGluon
Definition: PDF.h:92
double fCharm
Definition: PDF.h:89
void PDF::ScaleStrange ( double  kscale)

Definition at line 107 of file PDF.cxx.

References fStrange.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

108 {
109  fStrange *= kscale;
110 }
double fStrange
Definition: PDF.h:88
void PDF::ScaleUpSea ( double  kscale)

Definition at line 97 of file PDF.cxx.

References fUpSea.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

98 {
99  fUpSea *= kscale;
100 }
double fUpSea
Definition: PDF.h:86
void PDF::ScaleUpValence ( double  kscale)

Definition at line 87 of file PDF.cxx.

References fUpValence.

Referenced by genie::QPMDISStrucFuncBase::CalcPDFs(), and Gluon().

88 {
89  fUpValence *= kscale;
90 }
double fUpValence
Definition: PDF.h:84
void PDF::ScaleValence ( double  kscale)

Definition at line 70 of file PDF.cxx.

References fDownValence, and fUpValence.

Referenced by Gluon().

71 {
72  fUpValence *= kscale;
73  fDownValence *= kscale;
74 }
double fDownValence
Definition: PDF.h:85
double fUpValence
Definition: PDF.h:84
void PDF::SetModel ( const PDFModelI model)

Definition at line 48 of file PDF.cxx.

References fModel, and Init().

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

49 {
50  this->Init();
51 
52  fModel = model;
53 }
void Init(void)
Definition: PDF.cxx:145
const PDFModelI * fModel
Definition: PDF.h:94
const XML_Char XML_Content * model
Definition: expat.h:151
double genie::PDF::Strange ( void  ) const
inline

Definition at line 55 of file PDF.h.

References fStrange.

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

55 { return fStrange; }
double fStrange
Definition: PDF.h:88
double genie::PDF::Top ( void  ) const
inline

Definition at line 58 of file PDF.h.

References fTop.

58 { return fTop; }
double fTop
Definition: PDF.h:91
double genie::PDF::UpSea ( void  ) const
inline

Definition at line 53 of file PDF.h.

References fUpSea.

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

53 { return fUpSea; }
double fUpSea
Definition: PDF.h:86
double genie::PDF::UpValence ( void  ) const
inline

Friends And Related Function Documentation

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

Definition at line 26 of file PDF.cxx.

Referenced by Gluon().

27  {
28  pdf_set.Print(stream);
29  return stream;
30  }
void Print(ostream &stream) const
Definition: PDF.cxx:160

Member Data Documentation

double genie::PDF::fBottom
protected

Definition at line 90 of file PDF.h.

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

double genie::PDF::fCharm
protected

Definition at line 89 of file PDF.h.

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

double genie::PDF::fDownSea
protected

Definition at line 87 of file PDF.h.

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

double genie::PDF::fDownValence
protected

Definition at line 85 of file PDF.h.

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

double genie::PDF::fGluon
protected

Definition at line 92 of file PDF.h.

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

const PDFModelI* genie::PDF::fModel
protected

Definition at line 94 of file PDF.h.

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

double genie::PDF::fStrange
protected

Definition at line 88 of file PDF.h.

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

double genie::PDF::fTop
protected

Definition at line 91 of file PDF.h.

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

double genie::PDF::fUpSea
protected

Definition at line 86 of file PDF.h.

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

double genie::PDF::fUpValence
protected

Definition at line 84 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: