cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
BrashEtAl.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2013-2021 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
24
25namespace cepgen {
26 namespace formfac {
28 class BrashEtAl final : public Parameterisation {
29 public:
30 explicit BrashEtAl(const ParametersList& params)
31 : Parameterisation(params),
32 coeff_gm_(steer<std::vector<double> >("coeffGM")),
33 coeff_r_(steer<std::vector<double> >("coeffR")),
34 max_q2_(steer<double>("q2max")) {
35 if (coeff_gm_.size() != 5)
36 throw CG_FATAL("BrashEtAl") << "Invalid coefficients multiplicity for the G_M functional form!";
37 if (coeff_r_.size() != 2)
38 throw CG_FATAL("BrashEtAl") << "Invalid coefficients multiplicity for the G_E/G_M ratio functional form!";
39 }
40
42
43 private:
44 void eval() override {
45 if (q2_ > max_q2_)
46 CG_WARNING("BrashEtAl") << "Q² = " << q2_ << " > " << max_q2_ << " GeV² = max(Q²).\n\t"
47 << "Brash et al. FF parameterisation not designed for high-Q² values.";
48 const double r = std::min(1., 1. - coeff_r_.at(0) * (q2_ - coeff_r_.at(1)));
49 if (r < 0.)
50 return;
51 const double q = sqrt(q2_),
52 gm = 1. / (1. + q * (coeff_gm_.at(0) +
53 q * (coeff_gm_.at(1) +
54 q * (coeff_gm_.at(2) + q * (coeff_gm_.at(3) + q * coeff_gm_.at(4))))));
55
56 setGEGM(r * gm, MU * gm);
57 }
58 const std::vector<double> coeff_gm_, coeff_r_;
59 const double max_q2_;
60 };
61
64 desc.setDescription("Brash et al.");
65 desc.add<std::vector<double> >("coeffGM", {0.116, 2.874, 0.241, 1.006, 0.345})
66 .setDescription("coefficients for the G_M functional form");
67 desc.add<std::vector<double> >("coeffR", {0.13, 0.04})
68 .setDescription("coefficients for the G_E/G_M ratio functional form");
69 desc.add<double>("q2max", 7.7).setDescription("maximal Q^2 supported (in GeV^2)");
70 return desc;
71 }
72 } // namespace formfac
73} // namespace cepgen
#define CG_FATAL(mod)
Definition Exception.h:61
#define REGISTER_FORMFACTORS(name, obj)
Add a form factors definition to the list of handled parameterisation.
#define CG_WARNING(mod)
Definition Message.h:228
A description object for parameters collection.
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
BrashEtAl(const ParametersList &params)
Definition BrashEtAl.cpp:30
static ParametersDescription description()
Definition BrashEtAl.cpp:62
Nucleon electromagnetic form factors parameterisation.
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.