Belle II Software development
Unit Class Reference

basf2 (Belle II Analysis Software Framework) # Author: The Belle II Collaboration # # See git log for contributors and copyright holders. More...

Public Member Functions

 __init__ (self, name, dname, multiplier)
 

Public Attributes

 name = name
 Unit name shown in plots.
 
 dname = dname
 Unit name used for residual axes.
 
 convert = multiplier
 Conversion factor from name to dname units.
 

Detailed Description

basf2 (Belle II Analysis Software Framework) # Author: The Belle II Collaboration # # See git log for contributors and copyright holders.

# This file is licensed under LGPL-3.0, see LICENSE.md. #

Pair of display/residual unit strings and the conversion factor between them.

Parameters
----------
name : str
    Unit label used on standard axes (e.g. ``" [cm]"``).
dname : str
    Unit label used on residual/difference axes, after applying the
    conversion factor (e.g. ``r" [$\\mu$m]"``).
multiplier : float
    Factor to convert from ``name`` units to ``dname`` units
    (e.g. ``1e4`` to go from cm to μm).

Definition at line 13 of file variables.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
name,
dname,
multiplier )
Initialize a unit definition.

Parameters
----------
name : str
    Unit label used on standard axes (e.g. ``" [cm]"``).
dname : str
    Unit label used on residual/difference axes.
multiplier : float
    Conversion factor from ``name`` units to ``dname`` units.

Definition at line 28 of file variables.py.

28 def __init__(self, name, dname, multiplier):
29 """Initialize a unit definition.
30
31 Parameters
32 ----------
33 name : str
34 Unit label used on standard axes (e.g. ``" [cm]"``).
35 dname : str
36 Unit label used on residual/difference axes.
37 multiplier : float
38 Conversion factor from ``name`` units to ``dname`` units.
39 """
40
41 self.name = name
42
43 self.dname = dname
44
45 self.convert = multiplier
46
47

Member Data Documentation

◆ convert

convert = multiplier

Conversion factor from name to dname units.

Definition at line 45 of file variables.py.

◆ dname

dname = dname

Unit name used for residual axes.

Definition at line 43 of file variables.py.

◆ name

name = name

Unit name shown in plots.

Definition at line 41 of file variables.py.


The documentation for this class was generated from the following file: