9Physics variable metadata classes and unit definitions for alignment validation.
14 """Pair of display/residual unit strings and the conversion factor between them.
19 Unit label used on standard axes (e.g. ``" [cm]"``).
21 Unit label used on residual/difference axes, after applying the
22 conversion factor (e.g. ``r" [$\\mu$m]"``).
24 Factor to convert from ``name`` units to ``dname`` units
25 (e.g. ``1e4`` to go from cm to μm).
29 """Initialize a unit definition.
34 Unit label used on standard axes (e.g. ``" [cm]"``).
36 Unit label used on residual/difference axes.
38 Conversion factor from ``name`` units to ``dname`` units.
49 """Metadata for a scalar observable stored in a single ROOT branch per event.
56 LaTeX string for axis labels (e.g. ``r"$M_{inv}$"``).
58 Unit instance describing display and residual units.
60 Short plain-text identifier used for file names (e.g. ``"run"``).
63 def __init__(self, name, latex, unit, plaintext):
64 """Initialize a global variable description.
71 LaTeX string for axis labels.
73 Unit instance describing display and residual units.
75 Short plain-text identifier used for file names.
87 """Return a list containing the single ROOT branch name.
97 """Metadata for an observable with one ROOT branch per track.
99 Used for two-track events (cosmics, dimuons) where each track has its
105 ROOT branch name for the first track.
107 ROOT branch name for the second track.
109 LaTeX string for axis labels (e.g. ``r"d$_0$"``).
111 Unit instance describing display and residual units.
113 Short plain-text identifier used for file names (e.g. ``"d"``).
116 def __init__(self, name1, name2, latex, unit, plaintext):
117 """Initialize a two-track variable description.
122 ROOT branch name for the first track.
124 ROOT branch name for the second track.
126 LaTeX string for axis labels.
128 Unit instance describing display and residual units.
130 Short plain-text identifier used for file names.
144 """Return a list of both ROOT branch names (track 1 then track 2).
155s =
Unit(
" [s]",
"s", 1)
157cm =
Unit(
" [cm]",
r" [$\mu$m]", 1e4)
159rad =
Unit(
" [rad]",
" [mrad]", 1e3)
161unit =
Unit(
" [1]",
r" [$10^{-3}$]", 1e3)
163inverse_cm =
Unit(
" [1/cm]",
r" [1/cm $\cdot 10^{-4}$]", 1e4)
165gev =
Unit(
" [GeV/c]",
r" [GeV/c]", 1)
plaintext
Plain-text identifier for file naming.
unit
Unit descriptor for plotting and residuals.
latex
LaTeX string for axis labels.
__init__(self, name, latex, unit, plaintext)
plaintext
Plain-text identifier for file naming.
name1
ROOT branch name for the first track.
unit
Unit descriptor for plotting and residuals.
__init__(self, name1, name2, latex, unit, plaintext)
latex
LaTeX string for axis labels.
name2
ROOT branch name for the second track.
basf2 (Belle II Analysis Software Framework) # Author: The Belle II Collaboration # # See git log for...
convert
Conversion factor from name to dname units.
dname
Unit name used for residual axes.
__init__(self, name, dname, multiplier)
name
Unit name shown in plots.