cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonicStructureFunctions.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2023-2024 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 <APFEL/APFEL.h>
20
21
#include <cmath>
22
23
#include "
CepGen/Modules/StructureFunctionsFactory.h
"
24
#include "
CepGen/StructureFunctions/PartonicParameterisation.h
"
25
#include "
CepGen/Utils/Message.h
"
26
27
namespace
cepgen
{
28
namespace
apfel {
30
class
PartonicStructureFunctions
final :
public
strfun::PartonicParameterisation
{
31
public
:
33
enum class
Mode
{
full
= 0,
valence
= 1,
sea
= 2 };
35
explicit
PartonicStructureFunctions
(
const
ParametersList
& params)
36
:
PartonicParameterisation
(params), q_limits_(
steer
<
Limits
>(
"qrange"
)), xbj_min_(
steer
<double>(
"xBjmin"
)) {
37
const
auto
perturbative_order = steer<int>(
"perturbativeOrder"
);
38
APFEL::SetPerturbativeOrder(perturbative_order);
39
APFEL::InitializeAPFEL();
40
APFEL::EvolveAPFEL(q_limits_.
min
(), q_limits_.
max
());
41
APFEL::CachePDFsAPFEL(q_limits_.
min
());
42
CG_INFO
(
"apfel:PartonicStructureFunctions"
) <<
"Partonic structure functions evaluator successfully built.\n"
43
<<
" * APFEL version: "
<< APFEL::GetVersion() <<
"\n"
44
<<
" * number of flavours: "
<<
num_flavours_
<<
"\n"
45
<<
" * quarks mode: "
<<
mode_
<<
"\n"
46
<<
" * Q range: "
<< q_limits_ <<
", min xBj: "
<< xbj_min_ <<
"\n"
47
<<
" * perturbative order: "
<< perturbative_order <<
"."
;
48
}
49
50
static
ParametersDescription
description
() {
51
auto
desc = PartonicParameterisation::description();
52
desc.setDescription(
"APFEL (partonic)"
);
53
desc.add<
int
>(
"perturbativeOrder"
, 2);
54
desc.add<
Limits
>(
"qrange"
, {1., 100.});
55
desc.add<
double
>(
"xBjmin"
, 2.e-6).setDescription(
"minimum Bjorken-x reachable for this PDF set"
);
56
return
desc;
57
}
58
59
private
:
60
double
evalxQ2(
int
flavour,
double
xbj,
double
q2)
override
{
61
if
(xbj < xbj_min_)
62
return
0.;
63
const
auto
q = std::sqrt(q2);
64
if
(!q_limits_.
contains
(q))
65
return
0.;
66
return
APFEL::xPDFxQ(flavour, xbj, q);
67
}
68
const
Limits
q_limits_;
69
const
double
xbj_min_;
70
};
71
}
// namespace apfel
72
}
// namespace cepgen
73
using
PartonicStructureFunctionsAPFEL
=
cepgen::apfel::PartonicStructureFunctions
;
74
REGISTER_STRFUN
(
"apfel"
, 402,
PartonicStructureFunctionsAPFEL
);
Message.h
CG_INFO
#define CG_INFO(mod)
Definition
Message.h:216
PartonicParameterisation.h
StructureFunctionsFactory.h
REGISTER_STRFUN
#define REGISTER_STRFUN(name, id, obj)
Add a structure functions definition to the list of handled parameterisation.
Definition
StructureFunctionsFactory.h:25
cepgen::Limits
Validity interval for a variable.
Definition
Limits.h:28
cepgen::Limits::min
double min() const
Lower limit to apply on the variable.
Definition
Limits.h:52
cepgen::Limits::contains
bool contains(double val, bool exclude_boundaries=false) const
Check if value is inside limits' boundaries.
Definition
Limits.cpp:77
cepgen::Limits::max
double max() const
Upper limit to apply on the variable.
Definition
Limits.h:54
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::Steerable::steer
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition
Steerable.h:39
cepgen::apfel::PartonicStructureFunctions
Generic partonic level perturbative structure functions built from an external PDFs grid.
Definition
PartonicStructureFunctions.cpp:30
cepgen::apfel::PartonicStructureFunctions::PartonicStructureFunctions
PartonicStructureFunctions(const ParametersList ¶ms)
Build a calculator from its Parameters object.
Definition
PartonicStructureFunctions.cpp:35
cepgen::apfel::PartonicStructureFunctions::Mode
Mode
Quarks types.
Definition
PartonicStructureFunctions.cpp:33
cepgen::apfel::PartonicStructureFunctions::Mode::valence
@ valence
cepgen::apfel::PartonicStructureFunctions::Mode::sea
@ sea
cepgen::apfel::PartonicStructureFunctions::Mode::full
@ full
cepgen::apfel::PartonicStructureFunctions::description
static ParametersDescription description()
Definition
PartonicStructureFunctions.cpp:50
cepgen::strfun::PartonicParameterisation
Generic partonic level perturbative structure functions built from an external PDFs grid.
Definition
PartonicParameterisation.h:26
cepgen::strfun::PartonicParameterisation::PartonicParameterisation
PartonicParameterisation(const ParametersList &)
Definition
PartonicParameterisation.cpp:26
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::mode_
const Mode mode_
Quarks types considered in the SF building.
Definition
PartonicParameterisation.h:43
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGenAddOns
APFELWrapper
PartonicStructureFunctions.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7