cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
InelasticNucleon.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 <cmath>
20
21
#include "
CepGen/FormFactors/Parameterisation.h
"
22
#include "
CepGen/Integration/AnalyticIntegrator.h
"
23
#include "
CepGen/Modules/AnalyticIntegratorFactory.h
"
24
#include "
CepGen/Modules/FormFactorsFactory.h
"
25
#include "
CepGen/Modules/StructureFunctionsFactory.h
"
26
#include "
CepGen/Physics/Utils.h
"
27
#include "
CepGen/StructureFunctions/Parameterisation.h
"
28
#include "
CepGen/Utils/Message.h
"
29
30
namespace
cepgen
{
31
namespace
formfac {
32
class
InelasticNucleon
:
public
Parameterisation
{
33
public
:
34
explicit
InelasticNucleon
(
const
ParametersList
& params)
35
:
Parameterisation
(params),
36
sf_(StructureFunctionsFactory::get().build(
steer
<
ParametersList
>(
"structureFunctions"
))),
37
integr_(AnalyticIntegratorFactory::get().build(
steer
<
ParametersList
>(
"integrator"
))),
38
compute_fm_(
steer
<bool>(
"computeFM"
)),
39
mx_range_(
steer
<
Limits
>(
"mxRange"
)),
40
mx2_range_{mx_range_.min() * mx_range_.min(), mx_range_.max() * mx_range_.max()},
41
dm2_range_{mx2_range_.min() -
mp2_
, mx2_range_.max() -
mp2_
},
42
eval_fe_([this](double mx2) {
43
const
auto
xbj =
utils::xBj
(
q2_
,
mp2_
, mx2);
44
return
sf_->F2(xbj,
q2_
) * xbj;
45
}),
46
eval_fm_([
this
](
double
mx2) {
47
const
auto
xbj =
utils::xBj
(
q2_
,
mp2_
, mx2);
48
return
sf_->F2(xbj,
q2_
) / xbj;
49
}) {
50
CG_INFO
(
"InelasticNucleon"
) <<
"Inelastic nucleon form factors parameterisation built with:\n"
51
<<
" * structure functions modelling: "
52
<< steer<ParametersList>(
"structureFunctions"
) <<
"\n"
53
<<
" * integrator algorithm: "
<< steer<ParametersList>(
"integrator"
) <<
"\n"
54
<<
" * diffractive mass range: "
<< steer<Limits>(
"mxRange"
) <<
" GeV^2."
;
55
}
56
57
static
ParametersDescription
description
() {
58
auto
desc =
Parameterisation::description
();
59
desc.setDescription(
"Proton inelastic (SF)"
);
60
desc.add<
ParametersDescription
>(
"structureFunctions"
,
61
StructureFunctionsFactory::get().describeParameters(
"LUXLike"
))
62
.setDescription(
"type of structure functions parameterisation for the dissociative emission"
);
63
desc.add<
ParametersDescription
>(
"integrator"
, AnalyticIntegratorFactory::get().describeParameters(
"gsl"
))
64
.setDescription(
"type of numerical integrator algorithm to use"
);
65
desc.add<
bool
>(
"computeFM"
,
false
).setDescription(
"compute, or neglect the F2/xbj^3 term"
);
66
desc.add<
Limits
>(
"mxRange"
,
Limits
{1.0732
/* mp + mpi0 */
, 20.})
67
.setDescription(
"diffractive mass range (in GeV/c^2)"
);
68
return
desc;
69
}
70
71
protected
:
72
void
eval
()
override
{
73
const
auto
inv_q2 = 1. /
q2_
;
74
const
auto
fe = integr_->integrate(eval_fe_, mx2_range_) * inv_q2;
75
const
auto
fm = compute_fm_ ? integr_->integrate(eval_fm_, mx2_range_) * inv_q2 : 0.;
76
setFEFM
(fe, fm);
77
}
78
bool
fragmenting
()
const override
{
return
true
; }
79
80
private
:
81
const
std::unique_ptr<strfun::Parameterisation> sf_;
82
const
std::unique_ptr<AnalyticIntegrator> integr_;
83
const
double
compute_fm_;
84
const
Limits
mx_range_, mx2_range_, dm2_range_;
85
const
std::function<double(
double
)> eval_fe_, eval_fm_;
86
};
87
}
// namespace formfac
88
}
// namespace cepgen
89
using
cepgen::formfac::InelasticNucleon
;
90
REGISTER_FORMFACTORS
(
"InelasticNucleon"
,
InelasticNucleon
);
AnalyticIntegratorFactory.h
AnalyticIntegrator.h
FormFactorsFactory.h
REGISTER_FORMFACTORS
#define REGISTER_FORMFACTORS(name, obj)
Add a form factors definition to the list of handled parameterisation.
Definition
FormFactorsFactory.h:25
Parameterisation.h
Message.h
CG_INFO
#define CG_INFO(mod)
Definition
Message.h:216
Utils.h
StructureFunctionsFactory.h
Parameterisation.h
cepgen::Limits
Validity interval for a variable.
Definition
Limits.h:28
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::formfac::InelasticNucleon
Definition
InelasticNucleon.cpp:32
cepgen::formfac::InelasticNucleon::fragmenting
bool fragmenting() const override
Is the nucleon surviving the exchange?
Definition
InelasticNucleon.cpp:78
cepgen::formfac::InelasticNucleon::InelasticNucleon
InelasticNucleon(const ParametersList ¶ms)
Definition
InelasticNucleon.cpp:34
cepgen::formfac::InelasticNucleon::description
static ParametersDescription description()
Definition
InelasticNucleon.cpp:57
cepgen::formfac::InelasticNucleon::eval
void eval() override
Local form factors evaluation method.
Definition
InelasticNucleon.cpp:72
cepgen::formfac::Parameterisation
Nucleon electromagnetic form factors parameterisation.
Definition
Parameterisation.h:29
cepgen::formfac::Parameterisation::mp2_
const double mp2_
Squared proton mass, in GeV /c .
Definition
Parameterisation.h:53
cepgen::formfac::Parameterisation::setFEFM
void setFEFM(double fe, double fm)
Set the electromagnetic form factors.
Definition
Parameterisation.cpp:52
cepgen::formfac::Parameterisation::description
static ParametersDescription description()
Definition
Parameterisation.cpp:45
cepgen::formfac::Parameterisation::q2_
double q2_
Virtuality at which the form factors are evaluated.
Definition
Parameterisation.h:55
cepgen::utils::xBj
double xBj(double q2, double mp2, double mx2)
Compute Bjorken x from virtuality/diffractive mass.
Definition
Utils.cpp:41
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
FormFactors
InelasticNucleon.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7