cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PythonObjectsWrappers.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 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
#ifndef CepGenAddOns_BoostWrapper_PythonObjectsWrappers_h
20
#define CepGenAddOns_BoostWrapper_PythonObjectsWrappers_h
21
22
#include <boost/python/wrapper.hpp>
23
24
#include "
CepGen/CollinearFluxes/CollinearFlux.h
"
25
#include "
CepGen/KTFluxes/KTFlux.h
"
26
27
namespace
py = boost::python;
28
29
struct
PartonFluxWrap
:
cepgen::PartonFlux
, py::wrapper<cepgen::PartonFlux> {
30
bool
ktFactorised
()
const override
{
31
if
(py::override ov = this->get_override(
"ktFactorised"
))
32
return
ov();
33
return
cepgen::PartonFlux::ktFactorised
();
34
}
35
bool
fragmenting
()
const override
{
36
if
(py::override ov = this->get_override(
"fragmenting"
))
37
return
ov();
38
return
cepgen::PartonFlux::fragmenting
();
39
}
40
cepgen::pdgid_t
partonPdgId
()
const override
{
41
if
(py::override ov = this->get_override(
"partonPdgId"
))
42
return
ov();
43
return
cepgen::PartonFlux::partonPdgId
();
44
}
45
//double mass2() const override { return this->get_override("mass2")(); }
46
};
47
48
struct
KTFluxWrap
:
cepgen::KTFlux
, py::wrapper<cepgen::KTFlux> {
49
double
fluxMX2
(
double
x,
double
kt2,
double
mx2)
const override
{
50
if
(py::override ov = this->get_override(
"fluxMX2"
))
51
return
ov(x, kt2, mx2);
52
return
cepgen::KTFlux::fluxMX2
(x, kt2, mx2);
53
}
54
double
fluxQ2
(
double
x,
double
kt2,
double
q2)
const override
{
55
if
(py::override ov = this->get_override(
"fluxQ2"
))
56
return
ov(x, kt2, q2);
57
return
cepgen::KTFlux::fluxQ2
(x, kt2, q2);
58
}
59
};
60
61
struct
CollinearFluxWrap
:
cepgen::CollinearFlux
, py::wrapper<cepgen::CollinearFlux> {
62
double
fluxMX2
(
double
x,
double
mx2)
const override
{
63
if
(py::override ov = this->get_override(
"fluxMX2"
))
64
return
ov(x, mx2);
65
return
cepgen::CollinearFlux::fluxMX2
(x, mx2);
66
}
67
double
fluxQ2
(
double
x,
double
q2)
const override
{
68
if
(py::override ov = this->get_override(
"fluxQ2"
))
69
return
ov(x, q2);
70
return
cepgen::CollinearFlux::fluxQ2
(x, q2);
71
}
72
};
73
74
#endif
CollinearFlux.h
KTFlux.h
cepgen::CollinearFlux
Definition
CollinearFlux.h:25
cepgen::CollinearFlux::fluxQ2
virtual double fluxQ2(double x, double q2) const
Compute the collinear flux for this x value and virtuality.
Definition
CollinearFlux.cpp:31
cepgen::CollinearFlux::fluxMX2
virtual double fluxMX2(double x, double mf2=0.) const
Compute the collinear flux for this x value and remnant mass.
Definition
CollinearFlux.cpp:35
cepgen::KTFlux
Definition
KTFlux.h:25
cepgen::KTFlux::fluxMX2
virtual double fluxMX2(double x, double kt2, double mf2) const
Compute the kt-dependent flux for this x value and remnant mass.
Definition
KTFlux.cpp:36
cepgen::KTFlux::fluxQ2
virtual double fluxQ2(double x, double kt2, double q2) const
Compute the kt-dependent flux for this x value and virtuality.
Definition
KTFlux.cpp:32
cepgen::PartonFlux
Definition
PartonFlux.h:26
cepgen::PartonFlux::partonPdgId
virtual pdgid_t partonPdgId() const =0
Parton PDG identifier.
cepgen::PartonFlux::fragmenting
virtual bool fragmenting() const =0
Is initiator particle fragmenting after parton emission?
cepgen::PartonFlux::ktFactorised
virtual bool ktFactorised() const
Is the flux parton kT-dependent?
Definition
PartonFlux.h:32
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
CollinearFluxWrap
Definition
PythonObjectsWrappers.h:61
CollinearFluxWrap::fluxQ2
double fluxQ2(double x, double q2) const override
Compute the collinear flux for this x value and virtuality.
Definition
PythonObjectsWrappers.h:67
CollinearFluxWrap::fluxMX2
double fluxMX2(double x, double mx2) const override
Compute the collinear flux for this x value and remnant mass.
Definition
PythonObjectsWrappers.h:62
KTFluxWrap
Definition
PythonObjectsWrappers.h:48
KTFluxWrap::fluxQ2
double fluxQ2(double x, double kt2, double q2) const override
Compute the kt-dependent flux for this x value and virtuality.
Definition
PythonObjectsWrappers.h:54
KTFluxWrap::fluxMX2
double fluxMX2(double x, double kt2, double mx2) const override
Compute the kt-dependent flux for this x value and remnant mass.
Definition
PythonObjectsWrappers.h:49
PartonFluxWrap
Definition
PythonObjectsWrappers.h:29
PartonFluxWrap::fragmenting
bool fragmenting() const override
Is initiator particle fragmenting after parton emission?
Definition
PythonObjectsWrappers.h:35
PartonFluxWrap::partonPdgId
cepgen::pdgid_t partonPdgId() const override
Parton PDG identifier.
Definition
PythonObjectsWrappers.h:40
PartonFluxWrap::ktFactorised
bool ktFactorised() const override
Is the flux parton kT-dependent?
Definition
PythonObjectsWrappers.h:30
CepGenAddOns
BoostWrapper
PythonObjectsWrappers.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7