Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Physics
PartonDistributions
PDF.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2020, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7
University of Liverpool & STFC Rutherford Appleton Laboratory
8
*/
9
//____________________________________________________________________________
10
11
#include "
PDF.h
"
12
13
using namespace
genie
;
14
15
using
std::endl
;
16
17
//____________________________________________________________________________
18
namespace
genie
19
{
20
ostream &
operator <<
(ostream &
stream
,
const
PDF
& pdf_set)
21
{
22
pdf_set.
Print
(stream);
23
return
stream
;
24
}
25
}
26
//____________________________________________________________________________
27
PDF::PDF
()
28
{
29
this->
Init
();
30
}
31
//____________________________________________________________________________
32
PDF::PDF
(
const
PDF
& pdf_set)
33
{
34
this->
Copy
(pdf_set);
35
}
36
//____________________________________________________________________________
37
PDF::~PDF
()
38
{
39
40
}
41
//____________________________________________________________________________
42
void
PDF::SetModel
(
const
PDFModelI
*
model
)
43
{
44
this->
Init
();
45
46
fModel
=
model
;
47
}
48
//____________________________________________________________________________
49
void
PDF::Calculate
(
double
x
,
double
q2)
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
}
63
//____________________________________________________________________________
64
void
PDF::ScaleValence
(
double
kscale)
65
{
66
fUpValence
*= kscale;
67
fDownValence
*= kscale;
68
}
69
//____________________________________________________________________________
70
void
PDF::ScaleSea
(
double
kscale)
71
{
72
fUpSea
*= kscale;
73
fDownSea
*= kscale;
74
fStrange
*= kscale;
75
fCharm
*= kscale;
76
fBottom
*= kscale;
77
fTop
*= kscale;
78
fGluon
*= kscale;
79
}
80
//____________________________________________________________________________
81
void
PDF::ScaleUpValence
(
double
kscale)
82
{
83
fUpValence
*= kscale;
84
}
85
//____________________________________________________________________________
86
void
PDF::ScaleDownValence
(
double
kscale)
87
{
88
fDownValence
*= kscale;
89
}
90
//____________________________________________________________________________
91
void
PDF::ScaleUpSea
(
double
kscale)
92
{
93
fUpSea
*= kscale;
94
}
95
//____________________________________________________________________________
96
void
PDF::ScaleDownSea
(
double
kscale)
97
{
98
fDownSea
*= kscale;
99
}
100
//____________________________________________________________________________
101
void
PDF::ScaleStrange
(
double
kscale)
102
{
103
fStrange
*= kscale;
104
}
105
//____________________________________________________________________________
106
void
PDF::ScaleCharm
(
double
kscale)
107
{
108
fCharm
*= kscale;
109
}
110
//____________________________________________________________________________
111
void
PDF::Reset
(
void
)
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
}
123
//____________________________________________________________________________
124
void
PDF::Copy
(
const
PDF
& pdf_set)
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
}
138
//____________________________________________________________________________
139
void
PDF::Init
(
void
)
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
}
153
//____________________________________________________________________________
154
void
PDF::Print
(ostream &
stream
)
const
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
}
167
//____________________________________________________________________________
genie::PDF::fDownValence
double fDownValence
Definition:
PDF.h:84
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
genie::PDF::fDownSea
double fDownSea
Definition:
PDF.h:86
genie::PDFModelI::AllPDFs
virtual PDF_t AllPDFs(double x, double Q2) const =0
genie::PDF::Init
void Init(void)
Definition:
PDF.cxx:139
genie::PDF
A class to store PDFs.
Definition:
PDF.h:37
model
Definition:
model.py:1
genie::PDF::Copy
void Copy(const PDF &pdf_set)
Definition:
PDF.cxx:124
genie::PDFModelI
Pure abstract base class. Defines the PDFModelI interface to be implemented by wrapper classes to exi...
Definition:
PDFModelI.h:28
genie::PDF::Reset
void Reset(void)
Definition:
PDF.cxx:111
PDF.h
genie::PDF::fStrange
double fStrange
Definition:
PDF.h:87
genie::PDF::ScaleDownValence
void ScaleDownValence(double kscale)
Definition:
PDF.cxx:86
genie::PDF::fTop
double fTop
Definition:
PDF.h:90
genie::PDF::fUpValence
double fUpValence
Definition:
PDF.h:83
plot_model.model
model
Definition:
plot_model.py:61
genie::PDF::SetModel
void SetModel(const PDFModelI *model)
Definition:
PDF.cxx:42
make_THn_beam_input.pdfs
list pdfs
Definition:
make_THn_beam_input.py:52
genie::PDF::ScaleSea
void ScaleSea(double kscale)
Definition:
PDF.cxx:70
generate_datataset.stream
stream
Definition:
generate_datataset.py:30
genie::PDF::ScaleValence
void ScaleValence(double kscale)
Definition:
PDF.cxx:64
genie::PDF::Calculate
void Calculate(double x, double q2)
Definition:
PDF.cxx:49
genie::PDF::~PDF
virtual ~PDF()
Definition:
PDF.cxx:37
genie::PDF::fBottom
double fBottom
Definition:
PDF.h:89
genie::PDF::ScaleUpValence
void ScaleUpValence(double kscale)
Definition:
PDF.cxx:81
genie::PDF_t
A struct to hold PDF set data.
genie::PDF::fUpSea
double fUpSea
Definition:
PDF.h:85
genie::PDF::PDF
PDF()
Definition:
PDF.cxx:27
genie::operator<<
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
Definition:
AlgConfigPool.cxx:41
genie::PDF::fGluon
double fGluon
Definition:
PDF.h:91
genie::PDF::fModel
const PDFModelI * fModel
Definition:
PDF.h:93
train.x
list x
Definition:
train.py:276
genie::PDF::fCharm
double fCharm
Definition:
PDF.h:88
genie::PDF::ScaleUpSea
void ScaleUpSea(double kscale)
Definition:
PDF.cxx:91
genie::PDF::ScaleCharm
void ScaleCharm(double kscale)
Definition:
PDF.cxx:106
genie::PDF::ScaleDownSea
void ScaleDownSea(double kscale)
Definition:
PDF.cxx:96
genie::PDF::Print
void Print(ostream &stream) const
Definition:
PDF.cxx:154
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
genie::PDF::ScaleStrange
void ScaleStrange(double kscale)
Definition:
PDF.cxx:101
Generated by
1.8.11