Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
QCDConstants.py
Go to the documentation of this file.
1"""Python wrapper for immutable QCD constants exposed by the C++ core.
2
3This module provides a small read-only facade over the bound C++
4``QCDConstants`` object. The object is usually obtained through
5:class:`pyhyperiso.core.Core.QCDProvider.QCDProvider` and contains standard
6color factors and perturbative coefficients used by the QCD running routines.
7
8Example:
9 >>> provider = QCDProvider()
10 >>> constants = provider.get_qcd_constants()
11 >>> constants.Nc
12 3
13"""
14
15from pyhyperiso.phyperiso.pyhyperiso.core import QCDConstants as _CppQCDConstants
16
17
19 """Read-only view of QCD color factors and perturbative coefficients.
20
21 The wrapped C++ object is not constructed directly from Python. It is
22 returned by ``QCDProvider.get_qcd_constants()`` after the Hyperiso core has
23 been initialized.
24
25 Args:
26 cpp_obj: Bound C++ ``QCDConstants`` instance.
27
28 Attributes:
29 Nc: Number of colors, usually ``3``.
30 C_F: Fundamental Casimir color factor.
31 C_A: Adjoint Casimir color factor.
32 beta: Beta-function coefficients used by the QCD running backend.
33 gamma: Anomalous-dimension coefficients used by the QCD running backend.
34 """
35
36 def __init__(self, cpp_obj: _CppQCDConstants):
37 self._cpp_obj = cpp_obj
38
39 @property
40 def Nc(self):
41 """Number of QCD colors.
42
43 Returns:
44 int | float: Value stored by the C++ backend.
45 """
46 return self._cpp_obj.Nc
47
48 @property
49 def C_F(self):
50 """Fundamental Casimir color factor.
51
52 Returns:
53 float: The coefficient commonly denoted :math:`C_F`.
54 """
55 return self._cpp_obj.C_F
56
57 @property
58 def C_A(self):
59 """Adjoint Casimir color factor.
60
61 Returns:
62 float: The coefficient commonly denoted :math:`C_A`.
63 """
64 return self._cpp_obj.C_A
65
66 @property
67 def beta(self):
68 """QCD beta-function coefficients.
69
70 Returns:
71 Sequence[float]: Coefficients exposed by the C++ QCD provider.
72 """
73 return self._cpp_obj.beta
74
75 @property
76 def gamma(self):
77 """QCD anomalous-dimension coefficients.
78
79 Returns:
80 Sequence[float]: Coefficients exposed by the C++ QCD provider.
81 """
82 return self._cpp_obj.gamma
83
84 def __repr__(self):
85 """Return a compact developer-oriented representation."""
86 return (
87 f"QCDConstants(Nc={self.Nc}, C_F={self.C_F}, C_A={self.C_A}, "
88 f"beta={self.beta}, gamma={self.gamma})"
89 )
90
91
92__all__ = ["QCDConstants"]
__init__(self, _CppQCDConstants cpp_obj)