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
24#include "CepGen/Physics/PDG.h"
25
26namespace cepgen {
27 namespace formfac {
29 public:
30 explicit StandardDipole(const ParametersList& params)
31 : Parameterisation(params), inv_sq_scale_param_(1. / steer<double>("scale")) {}
32
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
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()) {
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
#define REGISTER_FORMFACTORS(name, obj)
Add a form factors definition to the list of handled parameterisation.
@ proton
Definition PDG.h:50
A description object for parameters collection.
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
static ParametersDescription description()
HeavyIonDipole(const ParametersList &params)
Nucleon electromagnetic form factors parameterisation.
static constexpr double MU
Proton magnetic moment.
void setGEGM(double ge, double gm)
Set the Sachs form factors.
const pdgid_t pdg_id_
Incoming beam.
static ParametersDescription description()
double q2_
Virtuality at which the form factors are evaluated.
StandardDipole(const ParametersList &params)
static ParametersDescription description()
void eval() override
Local form factors evaluation method.
static constexpr const char * gFFStandardDipoleHandler
Standard dipole handler name.
Common namespace for this Monte Carlo generator.
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Heavy ion container (Z+A)
Definition HeavyIon.h:44
static HeavyIon Pb()
Standard lead.
Definition HeavyIon.h:77
Element Z
Atomic number.
Definition HeavyIon.h:85
static HeavyIon proton()
Simple proton.
Definition HeavyIon.h:71