cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
Kelly.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 <cmath>
20
21
#include "
CepGen/FormFactors/Parameterisation.h
"
22
#include "
CepGen/Modules/FormFactorsFactory.h
"
23
24
namespace
cepgen
{
25
namespace
formfac {
27
class
Kelly
final :
public
Parameterisation
{
28
public
:
29
explicit
Kelly
(
const
ParametersList
& params)
30
:
Parameterisation
(params),
31
ae_(
steer
<std::vector<double> >(
"aE"
)),
32
be_(
steer
<std::vector<double> >(
"bE"
)),
33
am_(
steer
<std::vector<double> >(
"aM"
)),
34
bm_(
steer
<std::vector<double> >(
"bM"
)) {}
35
36
static
ParametersDescription
description
() {
37
auto
desc =
Parameterisation::description
();
38
desc.setDescription(
"Kelly"
);
39
desc.add<std::vector<double> >(
"aE"
, {1., -0.24});
40
desc.add<std::vector<double> >(
"bE"
, {10.98, 12.82, 21.97});
41
desc.add<std::vector<double> >(
"aM"
, {1., 0.12});
42
desc.add<std::vector<double> >(
"bM"
, {10.97, 18.86, 6.55});
43
return
desc;
44
}
45
46
private
:
47
double
computeFF(
double
tau
,
const
std::vector<double>& as,
const
std::vector<double>& bs)
const
{
48
double
num{0.}, den{1.};
49
for
(
size_t
i = 0; i < as.size(); ++i)
50
num += as.at(i) * std::pow(
tau
, i);
51
for
(
size_t
i = 0; i < bs.size(); ++i)
52
den += bs.at(i) * std::pow(
tau
, i + 1);
53
return
num / den;
54
}
55
void
eval()
override
{
56
const
auto
ta =
tau
(
q2_
);
57
setGEGM
(computeFF(ta, ae_, be_),
MU
* computeFF(ta, am_, bm_));
58
}
59
60
const
std::vector<double> ae_, be_, am_, bm_;
61
};
62
}
// namespace formfac
63
}
// namespace cepgen
64
using
cepgen::formfac::Kelly
;
65
REGISTER_FORMFACTORS
(
"Kelly"
,
Kelly
);
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
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::Kelly
Definition
Kelly.cpp:27
cepgen::formfac::Kelly::description
static ParametersDescription description()
Definition
Kelly.cpp:36
cepgen::formfac::Kelly::Kelly
Kelly(const ParametersList ¶ms)
Definition
Kelly.cpp:29
cepgen::formfac::Parameterisation
Nucleon electromagnetic form factors parameterisation.
Definition
Parameterisation.h:29
cepgen::formfac::Parameterisation::tau
double tau(double q2) const
variable definition
Definition
Parameterisation.cpp:33
cepgen::formfac::Parameterisation::MU
static constexpr double MU
Proton magnetic moment.
Definition
Parameterisation.h:43
cepgen::formfac::Parameterisation::setGEGM
void setGEGM(double ge, double gm)
Set the Sachs form factors.
Definition
Parameterisation.cpp:60
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
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
FormFactors
Kelly.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7