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
21
#include "
CepGen/Core/Exception.h
"
22
#include "
CepGen/FormFactors/Parameterisation.h
"
23
#include "
CepGen/Modules/FormFactorsFactory.h
"
24
25
namespace
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
41
static
ParametersDescription
description
();
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
62
ParametersDescription
BrashEtAl::description
() {
63
auto
desc =
Parameterisation::description
();
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
74
using
cepgen::formfac::BrashEtAl
;
75
REGISTER_FORMFACTORS
(
"Brash"
,
BrashEtAl
);
Exception.h
CG_FATAL
#define CG_FATAL(mod)
Definition
Exception.h:61
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
CG_WARNING
#define CG_WARNING(mod)
Definition
Message.h:228
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::BrashEtAl
Definition
BrashEtAl.cpp:28
cepgen::formfac::BrashEtAl::BrashEtAl
BrashEtAl(const ParametersList ¶ms)
Definition
BrashEtAl.cpp:30
cepgen::formfac::BrashEtAl::description
static ParametersDescription description()
Definition
BrashEtAl.cpp:62
cepgen::formfac::Parameterisation
Nucleon electromagnetic form factors parameterisation.
Definition
Parameterisation.h:29
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
BrashEtAl.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7