cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
CollinearFlux.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/CollinearFluxes/CollinearFlux.h
"
24
#include "
CepGen/Modules/PartonFluxFactory.h
"
25
#include "
CepGen/Physics/PDG.h
"
26
#include "
CepGen/Utils/Message.h
"
27
28
namespace
cepgen
{
29
namespace
apfel {
31
class
CollinearFlux
final :
public
cepgen::CollinearFlux
{
32
public
:
34
explicit
CollinearFlux
(
const
ParametersList
& params)
35
:
cepgen
::
CollinearFlux
(params), pdgid_(
steer
<
pdgid_t
>(
"partonPdgId"
)), q_range_(
steer
<
Limits
>(
"qrange"
)) {
36
APFEL::SetPerturbativeOrder(steer<int>(
"perturbativeOrder"
));
37
const
auto
pdfset = steer<std::string>(
"set"
);
38
if
(!pdfset.empty())
39
APFEL::SetPDFSet(pdfset);
40
//APFEL::SetMaxFlavourPDFs(7);
41
APFEL::SetFastEvolution(steer<bool>(
"fastEvolution"
));
42
APFEL::InitializeAPFEL();
43
APFEL::EvolveAPFEL(q_range_.
min
(), q_range_.
max
());
44
APFEL::CachePDFsAPFEL(q_range_.
min
());
45
CG_INFO
(
"apfel:CollinearFlux"
) <<
"Partonic collinear parton flux evaluator successfully built.\n"
46
<<
" * APFEL version: "
<< APFEL::GetVersion() <<
"\n"
47
<<
" * Parton PDG identifier: "
<< pdgid_
48
<<
", max flavours: "
<< APFEL::GetMaxFlavourPDFs() <<
"\n"
49
<<
" * Q range: "
<< q_range_ <<
" ("
50
<<
Limits
{APFEL::GetMuF0(), APFEL::GetMuF()} <<
") GeV\n"
51
<<
" * perturbative order: "
<< APFEL::GetPerturbativeOrder() <<
"."
;
52
}
53
54
cepgen::pdgid_t
partonPdgId
()
const override
{
return
pdgid_; }
55
bool
fragmenting
()
const override
{
return
true
; }
56
double
mass2
()
const override
{
return
mp2_
; }
57
58
double
fluxQ2
(
double
x,
double
q2)
const override
{
59
if
(!
x_range_
.
contains
(x,
true
))
60
return
0.;
61
const
auto
q = std::sqrt(q2);
62
if
(!q_range_.
contains
(q))
63
return
0.;
64
return
prefactor_
* APFEL::xPDFxQ(pdgid_, x, q) / x;
65
}
66
67
static
ParametersDescription
description
() {
68
auto
desc =
cepgen::CollinearFlux::description
();
69
desc.setDescription(
"APFEL coll.flux"
);
70
desc.add<std::string>(
"set"
,
""
).setDescription(
"LHAPDF set to use at the initial scale"
);
71
desc.add<
pdgid_t
>(
"partonPdgId"
,
PDG::photon
).setDescription(
"parton PDG identifier"
);
72
desc.add<
Limits
>(
"qrange"
, {1., 100.});
73
desc.add<
int
>(
"perturbativeOrder"
, 2);
74
desc.add<
bool
>(
"fastEvolution"
,
false
);
75
return
desc;
76
}
77
78
private
:
79
const
pdgid_t
pdgid_;
80
const
Limits
q_range_;
81
};
82
}
// namespace apfel
83
}
// namespace cepgen
84
using
CollinearFluxAPFEL
=
cepgen::apfel::CollinearFlux
;
85
REGISTER_COLLINEAR_FLUX
(
"apfel"
,
CollinearFluxAPFEL
);
CollinearFlux.h
Message.h
CG_INFO
#define CG_INFO(mod)
Definition
Message.h:216
PDG.h
PartonFluxFactory.h
REGISTER_COLLINEAR_FLUX
#define REGISTER_COLLINEAR_FLUX(name, obj)
Add a generic collinear parton flux evaluator builder definition.
Definition
PartonFluxFactory.h:25
cepgen::CollinearFlux
Definition
CollinearFlux.h:25
cepgen::CollinearFlux::description
static ParametersDescription description()
Definition
CollinearFlux.cpp: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::PDG::photon
@ photon
Definition
PDG.h:41
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::PartonFlux::prefactor_
const double prefactor_
Definition
PartonFlux.h:38
cepgen::PartonFlux::mp2_
const double mp2_
Definition
PartonFlux.h:39
cepgen::PartonFlux::x_range_
const Limits x_range_
Definition
PartonFlux.h:40
cepgen::Steerable::steer
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition
Steerable.h:39
cepgen::apfel::CollinearFlux
Generic partonic level perturbative structure functions built from an external PDFs grid.
Definition
CollinearFlux.cpp:31
cepgen::apfel::CollinearFlux::fragmenting
bool fragmenting() const override
Is initiator particle fragmenting after parton emission?
Definition
CollinearFlux.cpp:55
cepgen::apfel::CollinearFlux::fluxQ2
double fluxQ2(double x, double q2) const override
Compute the collinear flux for this x value and virtuality.
Definition
CollinearFlux.cpp:58
cepgen::apfel::CollinearFlux::partonPdgId
cepgen::pdgid_t partonPdgId() const override
Parton PDG identifier.
Definition
CollinearFlux.cpp:54
cepgen::apfel::CollinearFlux::description
static ParametersDescription description()
Definition
CollinearFlux.cpp:67
cepgen::apfel::CollinearFlux::CollinearFlux
CollinearFlux(const ParametersList ¶ms)
Build a calculator from its Parameters object.
Definition
CollinearFlux.cpp:34
cepgen::apfel::CollinearFlux::mass2
double mass2() const override
Initiator particle squared mass (in )
Definition
CollinearFlux.cpp:56
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
CepGenAddOns
APFELWrapper
CollinearFlux.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7