ATLAS Offline Software
Loading...
Searching...
No Matches
UnitConstants.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3"""
4Wraps the ACTS unit constants loaded from a ROOT dictionary.
5To use these values please use
6
7```python
8from ActsInterop import UnitConstants
9value = 15*UnitConstants.mm
10```
11
12"""
13# pull in the dictionary/headers with Acts Units
14from ROOT.Acts.UnitConstants import mm # noqa: F401
15
16from ROOT import Acts
17import inspect
18
19# Pull in all named unit constants into this namespace to improve ergonomics
20for name, val in inspect.getmembers(Acts.UnitConstants):
21 if name.startswith("_"): continue
22 locals()[name] = val
23