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>

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 <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

May 04, 2004

Copyright (c) 2003-2020, 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.

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.

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.

56 { return fBottom; }
double fBottom
Definition: PDF.h:89
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 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
list x
Definition: train.py:276
double fCharm
Definition: PDF.h:88
double genie::PDF::Charm ( void  ) const
inline

Definition at line 55 of file PDF.h.

55 { return fCharm; }
double fCharm
Definition: PDF.h:88
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 }
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.

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

Definition at line 51 of file PDF.h.

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

Definition at line 58 of file PDF.h.

58 { return fGluon; }
double fGluon
Definition: PDF.h:91
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 }
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.

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
QTextStream & endl(QTextStream &s)
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 }
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.

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

Definition at line 96 of file PDF.cxx.

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

Definition at line 86 of file PDF.cxx.

87 {
88  fDownValence *= kscale;
89 }
double fDownValence
Definition: PDF.h:84
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 }
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.

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

Definition at line 91 of file PDF.cxx.

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

Definition at line 81 of file PDF.cxx.

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

Definition at line 64 of file PDF.cxx.

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.

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.

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

Definition at line 57 of file PDF.h.

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

Definition at line 52 of file PDF.h.

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

Definition at line 50 of file PDF.h.

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.

double genie::PDF::fCharm
protected

Definition at line 88 of file PDF.h.

double genie::PDF::fDownSea
protected

Definition at line 86 of file PDF.h.

double genie::PDF::fDownValence
protected

Definition at line 84 of file PDF.h.

double genie::PDF::fGluon
protected

Definition at line 91 of file PDF.h.

const PDFModelI* genie::PDF::fModel
protected

Definition at line 93 of file PDF.h.

double genie::PDF::fStrange
protected

Definition at line 87 of file PDF.h.

double genie::PDF::fTop
protected

Definition at line 90 of file PDF.h.

double genie::PDF::fUpSea
protected

Definition at line 85 of file PDF.h.

double genie::PDF::fUpValence
protected

Definition at line 83 of file PDF.h.


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