cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonsKTPhaseSpaceGenerator.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2016-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 "
CepGen/Core/Exception.h
"
20
#include "
CepGen/KTFluxes/KTFlux.h
"
21
#include "
CepGen/Modules/PartonFluxFactory.h
"
22
#include "
CepGen/Physics/Beam.h
"
23
#include "
CepGen/Physics/HeavyIon.h
"
24
#include "
CepGen/Process/FactorisedProcess.h
"
25
#include "
CepGen/Process/PartonsKTPhaseSpaceGenerator.h
"
26
27
namespace
cepgen
{
28
PartonsKTPhaseSpaceGenerator::PartonsKTPhaseSpaceGenerator
(
const
ParametersList
& params)
29
:
PartonsPhaseSpaceGenerator
(params), log_part_virt_(steer<bool>(
"logPartonVirtuality"
)) {}
30
31
void
PartonsKTPhaseSpaceGenerator::initialise() {
32
const
auto
& kin =
process
().
kinematics
();
33
34
// pick a parton flux parameterisation for each beam
35
auto
set_flux_properties = [](
const
Beam
& beam, std::unique_ptr<PartonFlux>& flux) {
36
auto
params = beam.
partonFluxParameters
();
37
const
auto
params_p_el = KTFluxFactory::get().describeParameters(
"BudnevElastic"
);
38
const
auto
params_p_inel = KTFluxFactory::get().describeParameters(
"BudnevInelastic"
);
39
const
auto
params_hi_el = KTFluxFactory::get().describeParameters(
"ElasticHeavyIon"
);
40
if
(params.name().empty()) {
41
if
(beam.
elastic
()) {
42
if
(
HeavyIon::isHI
(beam.
integerPdgId
()))
43
params = params_hi_el.validate(params);
44
else
45
params = params_p_el.validate(params);
46
}
else
47
params = params_p_inel.validate(params);
48
//TODO: fermions/pions
49
}
50
flux = KTFluxFactory::get().build(params);
51
if
(!flux)
52
throw
CG_FATAL
(
"PartonsKTPhaseSpaceGenerator:init"
)
53
<<
"Failed to initiate a parton flux object with properties: "
<< params <<
"."
;
54
if
(!flux->ktFactorised())
55
throw
CG_FATAL
(
"PartonsKTPhaseSpaceGenerator:init"
)
56
<<
"Invalid incoming parton flux modelling: "
<< flux->name() <<
"."
;
57
};
58
set_flux_properties(kin.incomingBeams().positive(),
pos_flux_
);
59
set_flux_properties(kin.incomingBeams().negative(),
neg_flux_
);
60
61
// register the incoming partons' transverse virtualities range
62
if
(log_part_virt_) {
63
const
auto
log_lim_kt = kin.cuts().initial.qt.compute(std::log).truncate(Limits{-10., 10.});
64
process
()
65
.
defineVariable
(
66
m_qt1_,
proc::Process::Mapping::exponential
, log_lim_kt,
"qt1"
,
"Positive-z parton virtuality"
)
67
.
defineVariable
(
68
m_qt2_,
proc::Process::Mapping::exponential
, log_lim_kt,
"qt2"
,
"Negative-z parton virtuality"
);
69
}
else
{
70
const
auto
lim_kt = kin.cuts().initial.qt.truncate(Limits{1.e-5, 1.e3});
71
process
()
72
.
defineVariable
(m_qt1_,
proc::Process::Mapping::linear
, lim_kt,
"qt1"
,
"Positive-z parton virtuality"
)
73
.
defineVariable
(m_qt2_,
proc::Process::Mapping::linear
, lim_kt,
"qt2"
,
"Negative-z parton virtuality"
);
74
}
75
76
// register the incoming partons' azimuthal angles range
77
const
auto
lim_phi = kin.cuts().initial.phi.truncate(Limits{0., 2. * M_PI});
78
process
()
79
.
defineVariable
(
80
m_phi_qt1_,
proc::Process::Mapping::linear
, lim_phi,
"phi_qt1"
,
"Positive-z parton azimuthal angle"
)
81
.
defineVariable
(
82
m_phi_qt2_,
proc::Process::Mapping::linear
, lim_phi,
"phi_qt2"
,
"Negative-z parton azimuthal angle"
);
83
}
84
85
bool
PartonsKTPhaseSpaceGenerator::generatePartonKinematics
() {
86
// set the fully transverse kinematics (eta = 0) of initial partons
87
process
().
q1
() =
Momentum::fromPtEtaPhiE
(m_qt1_, 0., m_phi_qt1_);
88
process
().
q2
() =
Momentum::fromPtEtaPhiE
(m_qt2_, 0., m_phi_qt2_);
89
return
true
;
90
}
91
92
double
PartonsKTPhaseSpaceGenerator::fluxes
()
const
{
93
// factors 1/pi due to integration over d^2(kt1) d^2(kt2) instead of d(kt1^2) d(kt2^2)
94
return
(positiveFlux<KTFlux>().fluxMX2(
process
().x1(), m_qt1_ * m_qt1_,
process
().mX2()) * M_1_PI * m_qt1_) *
95
(negativeFlux<KTFlux>().fluxMX2(
process
().x2(), m_qt2_ * m_qt2_,
process
().mY2()) * M_1_PI * m_qt2_);
96
}
97
98
ParametersDescription
PartonsKTPhaseSpaceGenerator::description
() {
99
auto
desc =
PartonsPhaseSpaceGenerator::description
();
100
desc.setDescription(
"KT-dependent phase space mapper"
);
101
desc.add<
bool
>(
"logPartonVirtuality"
,
true
);
102
return
desc;
103
}
104
}
// namespace cepgen
Beam.h
Exception.h
CG_FATAL
#define CG_FATAL(mod)
Definition
Exception.h:61
FactorisedProcess.h
HeavyIon.h
KTFlux.h
PartonFluxFactory.h
PartonsKTPhaseSpaceGenerator.h
cepgen::Beam
Incoming beams characteristics.
Definition
Beam.h:30
cepgen::Beam::integerPdgId
spdgid_t integerPdgId() const
Beam particle PDG id Set the beam particle PDG id.
Definition
Beam.h:47
cepgen::Beam::elastic
bool elastic() const
Does the beam remain on-shell after parton emission? Specify if the beam remains on-shell after parto...
Definition
Beam.h:40
cepgen::Beam::partonFluxParameters
const ParametersList & partonFluxParameters() const
Parton flux modelling.
Definition
Beam.h:62
cepgen::Momentum::fromPtEtaPhiE
static Momentum fromPtEtaPhiE(double pt, double eta, double phi, double e=-1.)
Build a 3-momentum from its three pseudo-cylindrical coordinates.
Definition
Momentum.cpp:69
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::PartonsKTPhaseSpaceGenerator::generatePartonKinematics
bool generatePartonKinematics() override
Generate the 4-momentum of incoming partons.
Definition
PartonsKTPhaseSpaceGenerator.cpp:85
cepgen::PartonsKTPhaseSpaceGenerator::fluxes
double fluxes() const override
Retrieve the event weight in the phase space.
Definition
PartonsKTPhaseSpaceGenerator.cpp:92
cepgen::PartonsKTPhaseSpaceGenerator::PartonsKTPhaseSpaceGenerator
PartonsKTPhaseSpaceGenerator(const ParametersList &)
Definition
PartonsKTPhaseSpaceGenerator.cpp:28
cepgen::PartonsKTPhaseSpaceGenerator::description
static ParametersDescription description()
Definition
PartonsKTPhaseSpaceGenerator.cpp:98
cepgen::PartonsPhaseSpaceGenerator
A generic phase space integration wrapper.
Definition
PartonsPhaseSpaceGenerator.h:37
cepgen::PartonsPhaseSpaceGenerator::pos_flux_
std::unique_ptr< PartonFlux > pos_flux_
Definition
PartonsPhaseSpaceGenerator.h:66
cepgen::PartonsPhaseSpaceGenerator::process
proc::FactorisedProcess & process()
Consumer process object Const-qualified consumer process object.
Definition
PartonsPhaseSpaceGenerator.h:63
cepgen::PartonsPhaseSpaceGenerator::neg_flux_
std::unique_ptr< PartonFlux > neg_flux_
Definition
PartonsPhaseSpaceGenerator.h:66
cepgen::Steerable::description
static ParametersDescription description()
Description of all object parameters.
Definition
Steerable.cpp:42
cepgen::proc::Process::kinematics
const Kinematics & kinematics() const
Constant reference to the process kinematics.
Definition
Process.h:50
cepgen::proc::Process::q2
const Momentum & q2() const
Negative-z incoming parton's 4-momentum.
Definition
Process.cpp:111
cepgen::proc::Process::defineVariable
Process & defineVariable(double &out, const Mapping &type, const Limits &lim, const std::string &name, const std::string &description="")
Register a variable to be handled and populated whenever a new phase space point weight is to be calc...
Definition
Process.cpp:149
cepgen::proc::Process::Mapping::linear
@ linear
a linear mapping
cepgen::proc::Process::Mapping::exponential
@ exponential
an exponential mapping
cepgen::proc::Process::q1
const Momentum & q1() const
Positive-z incoming parton's 4-momentum.
Definition
Process.cpp:107
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::HeavyIon::isHI
static bool isHI(const spdgid_t &)
Check if the PDG id is compatible with a HI.
Definition
HeavyIon.cpp:54
CepGen
Process
PartonsKTPhaseSpaceGenerator.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7