GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
genie::PDF Class Reference

A class to store PDFs. More...

#include <PDF.h>

Collaboration diagram for genie::PDF:
Collaboration graph
[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 cern.ch> University of Liverpool
Created:
May 04, 2004
License:
Copyright (c) 2003-2024, 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::PDF ( )

Definition at line 27 of file PDF.cxx.

References Init().

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

Definition at line 32 of file PDF.cxx.

References Copy().

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

Definition at line 37 of file PDF.cxx.

38 {
39 
40 }

Member Function Documentation

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

Definition at line 56 of file PDF.h.

References fBottom.

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

Definition at line 49 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::QPMDMDISStrucFuncBase::CalcPDFs(), main(), MakePlots(), genie::SlowRsclCharmDISPXSecLO::XSec(), and genie::AivazisCharmPXSecLO::XSec().

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 fDownValence
Definition: PDF.h:84
double fDownSea
Definition: PDF.h:86
virtual PDF_t AllPDFs(double x, double Q2) const =0
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fUpValence
Definition: PDF.h:83
double fBottom
Definition: PDF.h:89
A struct to hold PDF set data.
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
const PDFModelI * fModel
Definition: PDF.h:93
double fCharm
Definition: PDF.h:88
double genie::PDF::Charm ( void  ) const
inline

Definition at line 55 of file PDF.h.

References fCharm.

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

Definition at line 124 of file PDF.cxx.

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

Referenced by PDF().

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 }
double fDownValence
Definition: PDF.h:84
double fDownSea
Definition: PDF.h:86
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fUpValence
Definition: PDF.h:83
double fBottom
Definition: PDF.h:89
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
const PDFModelI * fModel
Definition: PDF.h:93
double fCharm
Definition: PDF.h:88
double genie::PDF::DownSea ( void  ) const
inline

Definition at line 53 of file PDF.h.

References fDownSea.

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

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

Definition at line 51 of file PDF.h.

References fDownValence.

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

51 { return fDownValence; }
double fDownValence
Definition: PDF.h:84
double genie::PDF::Gluon ( void  ) const
inline

Definition at line 58 of file PDF.h.

References fGluon.

Referenced by main(), and MakePlots().

58 { return fGluon; }
double fGluon
Definition: PDF.h:91
void PDF::Init ( void  )
protected

Definition at line 139 of file PDF.cxx.

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

Referenced by PDF(), and SetModel().

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 }
double fDownValence
Definition: PDF.h:84
double fDownSea
Definition: PDF.h:86
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fUpValence
Definition: PDF.h:83
double fBottom
Definition: PDF.h:89
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
const PDFModelI * fModel
Definition: PDF.h:93
double fCharm
Definition: PDF.h:88
void PDF::Print ( ostream &  stream) const

Definition at line 154 of file PDF.cxx.

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

Referenced by genie::operator<<().

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 }
double fDownValence
Definition: PDF.h:84
double fDownSea
Definition: PDF.h:86
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fUpValence
Definition: PDF.h:83
double fBottom
Definition: PDF.h:89
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
double fCharm
Definition: PDF.h:88
void PDF::Reset ( void  )

Definition at line 111 of file PDF.cxx.

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

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 }
double fDownValence
Definition: PDF.h:84
double fDownSea
Definition: PDF.h:86
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fUpValence
Definition: PDF.h:83
double fBottom
Definition: PDF.h:89
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
double fCharm
Definition: PDF.h:88
void PDF::ScaleCharm ( double  kscale)

Definition at line 106 of file PDF.cxx.

References fCharm.

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

107 {
108  fCharm *= kscale;
109 }
double fCharm
Definition: PDF.h:88
void PDF::ScaleDownSea ( double  kscale)

Definition at line 96 of file PDF.cxx.

References fDownSea.

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

97 {
98  fDownSea *= kscale;
99 }
double fDownSea
Definition: PDF.h:86
void PDF::ScaleDownValence ( double  kscale)

Definition at line 86 of file PDF.cxx.

References fDownValence.

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

87 {
88  fDownValence *= kscale;
89 }
double fDownValence
Definition: PDF.h:84
void PDF::ScaleSea ( double  kscale)

Definition at line 70 of file PDF.cxx.

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

71 {
72  fUpSea *= kscale;
73  fDownSea *= kscale;
74  fStrange *= kscale;
75  fCharm *= kscale;
76  fBottom *= kscale;
77  fTop *= kscale;
78  fGluon *= kscale;
79 }
double fDownSea
Definition: PDF.h:86
double fStrange
Definition: PDF.h:87
double fTop
Definition: PDF.h:90
double fBottom
Definition: PDF.h:89
double fUpSea
Definition: PDF.h:85
double fGluon
Definition: PDF.h:91
double fCharm
Definition: PDF.h:88
void PDF::ScaleStrange ( double  kscale)

Definition at line 101 of file PDF.cxx.

References fStrange.

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

102 {
103  fStrange *= kscale;
104 }
double fStrange
Definition: PDF.h:87
void PDF::ScaleUpSea ( double  kscale)

Definition at line 91 of file PDF.cxx.

References fUpSea.

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

92 {
93  fUpSea *= kscale;
94 }
double fUpSea
Definition: PDF.h:85
void PDF::ScaleUpValence ( double  kscale)

Definition at line 81 of file PDF.cxx.

References fUpValence.

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

82 {
83  fUpValence *= kscale;
84 }
double fUpValence
Definition: PDF.h:83
void PDF::ScaleValence ( double  kscale)

Definition at line 64 of file PDF.cxx.

References fDownValence, and fUpValence.

65 {
66  fUpValence *= kscale;
67  fDownValence *= kscale;
68 }
double fDownValence
Definition: PDF.h:84
double fUpValence
Definition: PDF.h:83
void PDF::SetModel ( const PDFModelI model)

Definition at line 42 of file PDF.cxx.

References fModel, and Init().

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

43 {
44  this->Init();
45 
46  fModel = model;
47 }
void Init(void)
Definition: PDF.cxx:139
const PDFModelI * fModel
Definition: PDF.h:93
double genie::PDF::Strange ( void  ) const
inline

Definition at line 54 of file PDF.h.

References fStrange.

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

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

Definition at line 57 of file PDF.h.

References fTop.

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

Definition at line 52 of file PDF.h.

References fUpSea.

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

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

Definition at line 50 of file PDF.h.

References fUpValence.

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

50 { return fUpValence; }
double fUpValence
Definition: PDF.h:83

Friends And Related Function Documentation

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

Member Data Documentation

double genie::PDF::fBottom
protected

Definition at line 89 of file PDF.h.

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

double genie::PDF::fCharm
protected

Definition at line 88 of file PDF.h.

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

double genie::PDF::fDownSea
protected

Definition at line 86 of file PDF.h.

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

double genie::PDF::fDownValence
protected

Definition at line 84 of file PDF.h.

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

double genie::PDF::fGluon
protected

Definition at line 91 of file PDF.h.

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

const PDFModelI* genie::PDF::fModel
protected

Definition at line 93 of file PDF.h.

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

double genie::PDF::fStrange
protected

Definition at line 87 of file PDF.h.

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

double genie::PDF::fTop
protected

Definition at line 90 of file PDF.h.

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

double genie::PDF::fUpSea
protected

Definition at line 85 of file PDF.h.

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

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: