cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonsCollinearPhaseSpaceGenerator.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2023-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/CollinearFluxes/CollinearFlux.h
"
20
#include "
CepGen/Core/Exception.h
"
21
#include "
CepGen/Modules/PartonFluxFactory.h
"
22
#include "
CepGen/Physics/Beam.h
"
23
#include "
CepGen/Physics/HeavyIon.h
"
24
#include "
CepGen/Physics/PDG.h
"
25
#include "
CepGen/Process/FactorisedProcess.h
"
26
#include "
CepGen/Process/PartonsCollinearPhaseSpaceGenerator.h
"
27
28
namespace
cepgen
{
29
PartonsCollinearPhaseSpaceGenerator::PartonsCollinearPhaseSpaceGenerator
(
const
ParametersList
& params)
30
:
PartonsPhaseSpaceGenerator
(params), log_part_virt_(steer<bool>(
"logPartonVirtuality"
)) {}
31
32
void
PartonsCollinearPhaseSpaceGenerator::initialise() {
33
const
auto
& kin =
process
().
kinematics
();
34
35
// pick a parton flux parameterisation for each beam
36
auto
set_flux_properties = [&kin](
const
Beam
& beam, std::unique_ptr<PartonFlux>& flux) {
37
auto
params = beam.
partonFluxParameters
();
38
const
auto
params_p_el = CollinearFluxFactory::get().describeParameters(
39
"EPAFlux"
,
ParametersList
().set(
"formFactors"
, beam.
formFactors
()));
40
const
auto
params_p_inel = CollinearFluxFactory::get().describeParameters(
41
"EPAFlux"
,
42
ParametersList
().set(
"formFactors"
,
43
ParametersList
()
44
.setName(
"InelasticNucleon"
)
45
.set(
"structureFunctions"
, kin.incomingBeams().structureFunctions())));
46
const
auto
params_hi_el = CollinearFluxFactory::get().describeParameters(
47
"EPAFlux"
,
ParametersList
().set(
"formFactors"
,
ParametersList
().setName(
"HeavyIonDipole"
)));
48
if
(params.name().empty()) {
49
if
(beam.
elastic
()) {
50
if
(
HeavyIon::isHI
(beam.
integerPdgId
()))
51
params = params_hi_el.validate(params);
52
else
53
params = params_p_el.validate(params);
54
}
else
55
params = params_p_inel.validate(params);
56
//TODO: fermions/pions
57
}
58
flux = CollinearFluxFactory::get().build(params);
59
if
(!flux)
60
throw
CG_FATAL
(
"PartonsCollinearPhaseSpaceGenerator:init"
)
61
<<
"Failed to initiate a parton flux object with properties: "
<< params <<
"."
;
62
if
(flux->ktFactorised())
63
throw
CG_FATAL
(
"PartonsCollinearPhaseSpaceGenerator:init"
)
64
<<
"Invalid incoming parton flux: "
<< flux->name() <<
"."
;
65
};
66
set_flux_properties(kin.incomingBeams().positive(),
pos_flux_
);
67
set_flux_properties(kin.incomingBeams().negative(),
neg_flux_
);
68
69
// register the incoming partons' virtuality
70
const
auto
lim_q2_1 = kin.cuts().initial.q2.at(0).truncate(Limits{1.e-10, 5.}),
71
lim_q2_2 = kin.cuts().initial.q2.at(1).truncate(Limits{1.e-10, 5.});
72
if
(log_part_virt_)
73
process
()
74
.
defineVariable
(
75
m_t1_,
proc::Process::Mapping::exponential
, lim_q2_1.compute(std::log),
"Positive-z parton virtuality"
)
76
.
defineVariable
(
77
m_t2_,
proc::Process::Mapping::exponential
, lim_q2_2.compute(std::log),
"Negative-z parton virtuality"
);
78
else
79
process
()
80
.
defineVariable
(m_t1_,
proc::Process::Mapping::linear
, lim_q2_1,
"Positive-z parton virtuality"
)
81
.
defineVariable
(m_t2_,
proc::Process::Mapping::linear
, lim_q2_2,
"Negative-z parton virtuality"
);
82
}
83
84
bool
PartonsCollinearPhaseSpaceGenerator::generatePartonKinematics
() {
85
// gaussian smearing of kt can be introduced here
86
process
().
q1
() =
Momentum::fromPtYPhiM
(0., 0., 0., std::sqrt(m_t1_));
87
process
().
q2
() =
Momentum::fromPtYPhiM
(0., 0., 0., std::sqrt(m_t2_));
88
return
true
;
89
}
90
91
double
PartonsCollinearPhaseSpaceGenerator::fluxes
()
const
{
92
return
positiveFlux<CollinearFlux>().fluxQ2(
process
().x1(), m_t1_) *
process
().
x1
() / m_t1_ *
93
negativeFlux<CollinearFlux>().fluxQ2(
process
().x2(), m_t2_) *
process
().
x2
() / m_t2_;
94
}
95
96
ParametersDescription
PartonsCollinearPhaseSpaceGenerator::description
() {
97
auto
desc =
PartonsPhaseSpaceGenerator::description
();
98
desc.setDescription(
"Collinear phase space mapper"
);
99
desc.add<
bool
>(
"logPartonVirtuality"
,
true
);
100
return
desc;
101
}
102
}
// namespace cepgen
Beam.h
CollinearFlux.h
Exception.h
CG_FATAL
#define CG_FATAL(mod)
Definition
Exception.h:61
FactorisedProcess.h
HeavyIon.h
PDG.h
PartonFluxFactory.h
PartonsCollinearPhaseSpaceGenerator.h
cepgen::Beam
Incoming beams characteristics.
Definition
Beam.h:30
cepgen::Beam::formFactors
const ParametersList & formFactors() const
Form factors parameters.
Definition
Beam.h:61
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::fromPtYPhiM
static Momentum fromPtYPhiM(double pt, double rap, double phi, double m)
Build a 4-momentum from its transverse momentum, azimuthal angle, rapidity and mass.
Definition
Momentum.cpp:93
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::PartonsCollinearPhaseSpaceGenerator::generatePartonKinematics
bool generatePartonKinematics() override
Generate the 4-momentum of incoming partons.
Definition
PartonsCollinearPhaseSpaceGenerator.cpp:84
cepgen::PartonsCollinearPhaseSpaceGenerator::fluxes
double fluxes() const override
Retrieve the event weight in the phase space.
Definition
PartonsCollinearPhaseSpaceGenerator.cpp:91
cepgen::PartonsCollinearPhaseSpaceGenerator::description
static ParametersDescription description()
Definition
PartonsCollinearPhaseSpaceGenerator.cpp:96
cepgen::PartonsCollinearPhaseSpaceGenerator::PartonsCollinearPhaseSpaceGenerator
PartonsCollinearPhaseSpaceGenerator(const ParametersList &)
Definition
PartonsCollinearPhaseSpaceGenerator.cpp:29
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::x2
double x2() const
Negative-z incoming parton's fractional momentum.
Definition
Process.h:83
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::x1
double x1() const
Positive-z incoming parton's fractional momentum.
Definition
Process.h:80
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
PartonsCollinearPhaseSpaceGenerator.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7