cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
ArringtonEtAl.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2019-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
23
24namespace cepgen {
25 namespace formfac {
27 class ArringtonEtAl final : public Parameterisation {
28 public:
29 explicit ArringtonEtAl(const ParametersList& params) : Parameterisation(params), mode_(steer<int>("mode")) {
30 switch (mode_) {
31 case 0: // original
32 a_e_ = {3.439, -1.602, 0.068};
33 b_e_ = {15.055, 48.061, 99.304, 0.012, 8.650};
34 a_m_ = {-1.465, 1.260, 0.262};
35 b_m_ = {9.627, 0., 0., 11.179, 13.245};
36 break;
37 case 1: // fit of quoted Ge+dGe values
38 a_e_ = {4.309, -1.108, -0.324};
39 b_e_ = {15.340, 58.321, 124.11, 3.927, 0.589};
40 a_m_ = {-1.472, 1.210, 0.334};
41 b_m_ = {9.486, 0., 0., 9.440, 15.416};
42 break;
43 case 2: // fit of quoted Ge-dGe values
44 a_e_ = {4.286, -1.281, -0.486};
45 b_e_ = {16.308, 54.535, 138.03, 7.005, 0.014};
46 a_m_ = {-1.374, 1.080, 0.124};
47 b_m_ = {10.003, 0., 0., 7.680, 9.009};
48 break;
49 case 3: // fit of quoted Ge values
50 a_e_ = {4.109, -1.052, -0.375};
51 b_e_ = {15.602, 55.519, 123.96, 11.403, 1.931};
52 a_m_ = {-1.436, 1.196, 0.210};
53 b_m_ = {9.721, 0., 0., 9.623, 11.817};
54 break;
55 }
56 }
57
60 desc.setDescription("Arrington et al.");
61 desc.add<int>("mode", 0)
62 .setDescription("Parameterisation mode")
63 .allow(0, "original")
64 .allow(1, "fit of quoted Ge+dGe values")
65 .allow(2, "fit of quoted Ge-dGe values")
66 .allow(3, "fit of quoted Ge values");
67 return desc;
68 }
69
70 private:
71 inline void eval() override {
72 const double tau_val = tau(q2_);
73
74 double num_e = 1., den_e = 1.;
75 for (size_t i = 0; i < a_e_.size(); ++i)
76 num_e += a_e_.at(i) * std::pow(tau_val, 1. + i);
77 for (size_t i = 0; i < b_e_.size(); ++i)
78 den_e += b_e_.at(i) * std::pow(tau_val, 1. + i);
79 const auto ge = num_e / den_e;
80
81 double num_m = 1., den_m = 1.;
82 for (size_t i = 0; i < a_m_.size(); ++i)
83 num_m += a_m_.at(i) * std::pow(tau_val, 1. + i);
84 for (size_t i = 0; i < b_m_.size(); ++i)
85 den_m += b_m_.at(i) * std::pow(tau_val, 1. + i);
86 const auto gm = MU * num_m / den_m;
87
88 setGEGM(ge, gm);
89 }
90
91 const int mode_;
92 std::vector<double> a_e_, b_e_;
93 std::vector<double> a_m_, b_m_;
94 };
95 } // namespace formfac
96} // namespace cepgen
#define REGISTER_FORMFACTORS(name, obj)
Add a form factors definition to the list of handled parameterisation.
A description object for parameters collection.
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
ArringtonEtAl(const ParametersList &params)
static ParametersDescription description()
Nucleon electromagnetic form factors parameterisation.
double tau(double q2) const
variable definition
static constexpr double MU
Proton magnetic moment.
void setGEGM(double ge, double gm)
Set the Sachs form factors.
static ParametersDescription description()
double q2_
Virtuality at which the form factors are evaluated.
Common namespace for this Monte Carlo generator.