cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
StandardDipole.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-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
#include "
CepGen/Physics/Constants.h
"
24
#include "
CepGen/Physics/PDG.h
"
25
26
namespace
cepgen
{
27
namespace
formfac {
28
class
StandardDipole
:
public
Parameterisation
{
29
public
:
30
explicit
StandardDipole
(
const
ParametersList
& params)
31
:
Parameterisation
(params), inv_sq_scale_param_(1. /
steer
<double>(
"scale"
)) {}
32
33
static
ParametersDescription
description
() {
34
auto
desc =
Parameterisation::description
();
35
desc.setDescription(
"Standard dipole"
);
36
desc.add<
pdgid_t
>(
"pdgId"
,
PDG::proton
);
37
desc.add<
double
>(
"scale"
, 0.71)
38
.setDescription(
"scaling (in GeV^2) (0.71 for r_p = 0.81 fm, 0.66 for r_p = 0.84 fm)"
);
39
return
desc;
40
}
41
42
protected
:
43
void
eval
()
override
{
44
const
auto
ge = pow(1. +
q2_
* inv_sq_scale_param_, -2.);
45
setGEGM
(ge,
MU
* ge);
46
}
47
48
private
:
49
const
double
inv_sq_scale_param_;
50
};
51
52
class
HeavyIonDipole
final :
public
StandardDipole
{
53
public
:
54
explicit
HeavyIonDipole
(
const
ParametersList
& params)
55
:
StandardDipole
(params),
56
hi_(
HeavyIon
::fromPdgId(
pdg_id_
)),
57
a2_(std::pow(hi_.radius() / constants::GEVM1_TO_M, 2)),
58
a02_(std::pow(
HeavyIon
::proton().radius() / constants::GEVM1_TO_M, 2)) {}
59
60
static
ParametersDescription
description
() {
61
auto
desc =
StandardDipole::description
();
62
desc.setDescription(
"Heavy ion dipole"
);
63
desc.addAs<
pdgid_t
,
HeavyIon
>(
"pdgId"
,
HeavyIon::Pb
());
64
return
desc;
65
}
66
67
private
:
68
void
eval()
override
{
69
if
(hi_ ==
HeavyIon::proton
()) {
70
StandardDipole::eval
();
71
return
;
72
}
73
const
auto
qr2 =
q2_
* a2_;
74
if
((
short
)hi_.
Z
<= (
short
)
Element::C
) {
// Gaussian form factor for light nuclei
75
const
auto
ge = std::exp(-qr2 / 6.);
76
setGEGM
(ge,
MU
* ge);
77
return
;
78
}
79
const
auto
qr = std::sqrt(qr2), inv_qr = 1. / qr;
80
const
auto
sph = (std::sin(qr) - qr * std::cos(qr)) * 3. * inv_qr * inv_qr;
81
const
auto
ge = sph / (1. +
q2_
* a02_);
82
setGEGM
(ge,
MU
* ge);
83
}
84
const
HeavyIon hi_;
85
const
double
a2_, a02_;
86
};
87
}
// namespace formfac
88
}
// namespace cepgen
89
using
cepgen::formfac::HeavyIonDipole
;
90
using
cepgen::formfac::StandardDipole
;
91
REGISTER_FORMFACTORS
(
cepgen::formfac::gFFStandardDipoleHandler
,
StandardDipole
);
92
REGISTER_FORMFACTORS
(
"HeavyIonDipole"
,
HeavyIonDipole
);
Constants.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
PDG.h
cepgen::PDG::proton
@ proton
Definition
PDG.h:50
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::HeavyIonDipole
Definition
StandardDipole.cpp:52
cepgen::formfac::HeavyIonDipole::description
static ParametersDescription description()
Definition
StandardDipole.cpp:60
cepgen::formfac::HeavyIonDipole::HeavyIonDipole
HeavyIonDipole(const ParametersList ¶ms)
Definition
StandardDipole.cpp:54
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::pdg_id_
const pdgid_t pdg_id_
Incoming beam.
Definition
Parameterisation.h:50
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::formfac::StandardDipole
Definition
StandardDipole.cpp:28
cepgen::formfac::StandardDipole::StandardDipole
StandardDipole(const ParametersList ¶ms)
Definition
StandardDipole.cpp:30
cepgen::formfac::StandardDipole::description
static ParametersDescription description()
Definition
StandardDipole.cpp:33
cepgen::formfac::StandardDipole::eval
void eval() override
Local form factors evaluation method.
Definition
StandardDipole.cpp:43
cepgen::formfac::gFFStandardDipoleHandler
static constexpr const char * gFFStandardDipoleHandler
Standard dipole handler name.
Definition
FormFactorsFactory.h:40
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::Element::C
@ C
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
cepgen::HeavyIon
Heavy ion container (Z+A)
Definition
HeavyIon.h:44
cepgen::HeavyIon::Pb
static HeavyIon Pb()
Standard lead.
Definition
HeavyIon.h:77
cepgen::HeavyIon::Z
Element Z
Atomic number.
Definition
HeavyIon.h:85
cepgen::HeavyIon::proton
static HeavyIon proton()
Simple proton.
Definition
HeavyIon.h:71
CepGen
FormFactors
StandardDipole.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7