cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
ResonanceObject.cpp
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2022-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
21#include "CepGen/Physics/PDG.h"
25
26namespace cepgen {
29 : SteeredObject(params),
30 br_(steer<ParametersList>("branchingRatios")),
31 ang_mom_(steer<int>("angularMomentum")),
32 x0_(steer<double>("x0")),
33 mass_(steer<double>("mass")),
34 width_(steer<double>("width")),
35 mp_(PDG::get().mass(PDG::proton)),
36 mp2_(mp_ * mp_),
37 mpi2_(std::pow(PDG::get().mass(PDG::piZero), 2)),
38 meta2_(std::pow(PDG::get().mass(PDG::eta), 2)),
39 x02_(x0_ * x0_) {}
40
42 auto desc = ParametersDescription();
43 desc.setDescription("Set of physical properties for one resonance");
44 desc.add<ParametersDescription>("branchingRatios", BranchingRatios::description());
45 desc.add<int>("angularMomentum", 0).setDescription("meson angular momentum");
46 desc.add<double>("x0", 0.).setDescription("damping parameter");
47 desc.add<double>("mass", 0.).setDescription("mass, in GeV/c^2");
48 desc.add<double>("width", 0.).setDescription("full width, in GeV");
49 return desc;
50 }
51
52 double ResonanceObject::ecmr(double m2) const { return mass_ == 0 ? 0. : utils::energyFromW(mass_, mp2_, m2); }
53
55 double par_width = 0.;
56 if (br_.singlepi > 0.) {
57 //----- 1-pion decay mode
58 const double pcmrpi = pcmr(mpi2_);
59 par_width += br_.singlepi * (std::pow(kin.ppicm / pcmrpi, 2. * ang_mom_ + 1.) *
60 std::pow((pcmrpi * pcmrpi + x02_) / (kin.ppicm * kin.ppicm + x02_), ang_mom_));
61 }
62 if (br_.doublepi > 0.) {
63 //----- 2-pion decay mode
64 const double pcmrpi2 = pcmr(4. * mpi2_);
65 par_width +=
67 (std::pow(kin.ppi2cm / pcmrpi2, 2. * (ang_mom_ + 2.)) *
68 std::pow((pcmrpi2 * pcmrpi2 + x02_) / (kin.ppi2cm * kin.ppi2cm + x02_), ang_mom_ + 2) * kin.w / mass_);
69 }
70 if (br_.eta > 0.) {
71 //----- eta decay mode
72 const double pcmreta = pcmr(meta2_);
73 par_width += br_.eta * (std::pow(kin.petacm / pcmreta, 2. * ang_mom_ + 1.) *
74 std::pow((pcmreta * pcmreta + x02_) / (kin.petacm * kin.petacm + x02_), ang_mom_));
75 }
76 return width_ * par_width;
77 }
78
80 const double kcm2 = kin.kcm * kin.kcm;
81 const double kcmr2 = std::pow(kcmr(), 2);
82 return width_ * kcm2 / kcmr2 * (kcmr2 + x02_) / (kcm2 + x02_);
83 }
84
86 ResonanceObject::KinematicsBlock::KinematicsBlock(double w2, double q2, double mp2, double mpi2, double meta2)
87 : w2(w2),
88 w(std::sqrt(w2)),
89 q2(q2),
90 k(0.5 * (w2 - mp2) / std::sqrt(mp2)),
91 kcm(utils::energyFromW(w, mp2, 0.)),
92 ppicm(mom(utils::energyFromW(w, mp2, mpi2), mpi2)),
93 ppi2cm(mom(utils::energyFromW(w, mp2, 4. * mpi2), 4. * mpi2)),
94 petacm(mom(utils::energyFromW(w, mp2, meta2), meta2)) {}
95
97 : SteeredObject(params),
98 singlepi(steer<double>("singlePi")),
99 doublepi(steer<double>("doublePi")),
100 eta(steer<double>("eta")) {
101 if (!valid())
102 CG_WARNING("ResonanceObject:BranchingRatios")
103 << "Invalid branching fractions. Sum = " << (singlepi + doublepi + eta) << " != 1.";
104 }
105
107 auto desc = ParametersDescription();
108 desc.add<double>("singlePi", 0.).setDescription("branching fraction for a resonance decay into a single pion");
109 desc.add<double>("doublePi", 0.).setDescription("branching fraction for a resonance decay into a pion pair");
110 desc.add<double>("eta", 0.).setDescription("branching fraction for a resonance decay into an eta");
111 return desc;
112 }
113} // namespace cepgen
#define CG_WARNING(mod)
Definition Message.h:228
A singleton holding all physics constants associated to particles.
Definition PDG.h:28
A description object for parameters collection.
ParametersDescription & add(const std::string &name, const T &def)
Add the description to a new parameter.
double partialWidth(const KinematicsBlock &) const
partial widths for all decays
const double width_
full width, in GeV
const double meta2_
eta meson squared mass, in GeV^2/c^4
const double mp2_
proton squared mass, in GeV^2/c^4
ResonanceObject(const ParametersList &)
General definition for a resonance.
cepgen::ResonanceObject::BranchingRatios br_
double photonWidth(const KinematicsBlock &) const
virtual photon width
const double x02_
squared damping parameter
double pcmr(double m2) const
static ParametersDescription description()
const double mass_
mass, in GeV/c2
const double mpi2_
pion squared mass, in GeV^2/c^4
const int ang_mom_
meson angular momentum
double ecmr(double m2) const
T steer(const std::string &key) const
Retrieve a parameters as previously steered.
Definition Steerable.h:39
Base user-steerable object.
double energyFromW(double w, double mp2, double m2)
Compute energy from mass and emitted mass.
Definition Utils.cpp:47
Common namespace for this Monte Carlo generator.
bool valid() const
Sanity check to ensure only three decay channels are opened.
double doublepi
double pion branching ratio
static ParametersDescription description()
double eta
eta meson branching ratio
double singlepi
single pion branching ratio
Kinematics needed for threshold relativistic B-W.
KinematicsBlock(double w2, double q2, double mp2, double mpi2, double meta2)
kinematics needed for threshold relativistic B-W
const double ppi2cm
two-pion momentum
const double petacm
eta meson momentum