cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonicParameterisation.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2023 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#include "
CepGen/Core/Exception.h
"
20
#include "
CepGen/StructureFunctions/PartonicParameterisation.h
"
21
22
namespace
cepgen
{
23
namespace
strfun {
24
constexpr
std::array<short, 6>
PartonicParameterisation::Q_TIMES_3
,
PartonicParameterisation::QUARK_PDGS
;
25
26
PartonicParameterisation::PartonicParameterisation
(
const
ParametersList
& params)
27
:
Parameterisation
(params), num_flavours_(steer<int>(
"numFlavours"
)), mode_(steerAs<int,
Mode
>(
"mode"
)) {
28
if
(
num_flavours_
== 0 ||
num_flavours_
>
QUARK_PDGS
.size())
29
throw
CG_FATAL
(
"Partonic"
) <<
"Invalid number of flavours ("
<<
num_flavours_
<<
" selected."
;
30
}
31
32
ParametersDescription
PartonicParameterisation::description
() {
33
auto
desc =
Parameterisation::description
();
34
desc.setDescription(
"Partonic structure functions parameterisation"
);
35
desc.add<
int
>(
"numFlavours"
, 4).setDescription(
"Number of parton flavours to consider in summation"
);
36
desc.add<
int
>(
"mode"
, (int)
Mode::full
);
37
return
desc;
38
}
39
40
void
PartonicParameterisation::eval
() {
41
double
f2 = 0.;
42
for
(
int
i = 0; i <
num_flavours_
; ++i) {
43
const
double
prefactor = 1. / 9. *
Q_TIMES_3
.at(i) *
Q_TIMES_3
.at(i);
44
const
double
xq =
evalxQ2
(
QUARK_PDGS
.at(i),
args_
.
xbj
,
args_
.
q2
),
45
xqbar =
evalxQ2
(-
QUARK_PDGS
.at(i),
args_
.
xbj
,
args_
.
q2
);
46
switch
(
mode_
) {
47
case
Mode::full
:
48
f2 += prefactor * (xq + xqbar);
49
break
;
50
case
Mode::valence
:
51
f2 += prefactor * (xq - xqbar);
52
break
;
53
case
Mode::sea
:
54
f2 += prefactor * (2. * xqbar);
55
break
;
56
}
57
}
58
setF2
(f2);
59
}
60
61
std::ostream&
operator<<
(std::ostream& os,
const
strfun::PartonicParameterisation::Mode
& mode) {
62
switch
(mode) {
63
case
strfun::PartonicParameterisation::Mode::full
:
64
return
os <<
"all quarks"
;
65
case
strfun::PartonicParameterisation::Mode::valence
:
66
return
os <<
"valence quarks"
;
67
case
strfun::PartonicParameterisation::Mode::sea
:
68
return
os <<
"sea quarks"
;
69
}
70
return
os;
71
}
72
}
// namespace strfun
73
}
// namespace cepgen
Exception.h
CG_FATAL
#define CG_FATAL(mod)
Definition
Exception.h:61
PartonicParameterisation.h
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::strfun::Parameterisation
Base object for the parameterisation of nucleon structure functions.
Definition
Parameterisation.h:30
cepgen::strfun::Parameterisation::args_
Arguments args_
Last couple computed.
Definition
Parameterisation.h:109
cepgen::strfun::Parameterisation::setF2
Parameterisation & setF2(double f2)
Definition
Parameterisation.cpp:83
cepgen::strfun::Parameterisation::description
static ParametersDescription description()
Generic description for the structure functions.
Definition
Parameterisation.cpp:148
cepgen::strfun::PartonicParameterisation::eval
void eval() override final
Local structure functions evaluation method.
Definition
PartonicParameterisation.cpp:40
cepgen::strfun::PartonicParameterisation::PartonicParameterisation
PartonicParameterisation(const ParametersList &)
Definition
PartonicParameterisation.cpp:26
cepgen::strfun::PartonicParameterisation::Mode
Mode
Quarks types.
Definition
PartonicParameterisation.h:32
cepgen::strfun::PartonicParameterisation::Mode::valence
@ valence
cepgen::strfun::PartonicParameterisation::Mode::sea
@ sea
cepgen::strfun::PartonicParameterisation::Mode::full
@ full
cepgen::strfun::PartonicParameterisation::QUARK_PDGS
static constexpr std::array< short, 6 > QUARK_PDGS
Definition
PartonicParameterisation.h:45
cepgen::strfun::PartonicParameterisation::Q_TIMES_3
static constexpr std::array< short, 6 > Q_TIMES_3
Definition
PartonicParameterisation.h:46
cepgen::strfun::PartonicParameterisation::description
static ParametersDescription description()
Definition
PartonicParameterisation.cpp:32
cepgen::strfun::PartonicParameterisation::num_flavours_
const unsigned short num_flavours_
Number of quark flavours considered in the SF building.
Definition
PartonicParameterisation.h:41
cepgen::strfun::PartonicParameterisation::evalxQ2
virtual double evalxQ2(int flavour, double xbj, double q2)=0
cepgen::strfun::PartonicParameterisation::mode_
const Mode mode_
Quarks types considered in the SF building.
Definition
PartonicParameterisation.h:43
cepgen::strfun::operator<<
std::ostream & operator<<(std::ostream &os, const Parameterisation &sf)
Definition
Parameterisation.cpp:133
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::strfun::Parameterisation::Arguments::xbj
double xbj
Definition
Parameterisation.h:60
cepgen::strfun::Parameterisation::Arguments::q2
double q2
Definition
Parameterisation.h:60
CepGen
StructureFunctions
PartonicParameterisation.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7