Enforce units in YAML conditions
We should consider having (and enforcing) explicit units in the YAML condition files. Not every constant has a dimension so it must be clear somehow where a unit is required.
It might be heavy to add e.g. *mm
to every relevant number so some contractions might help. Some ideas can be:
VPLeft: !alignment
position: [0.0, 0.0, 0.0]*mm
rotation: [0.0, 0.0, 0.0]
units:
position: mm
VPLeft: !alignment
position: [0.0, 0.0, 0.0]
rotation: [0.0, 0.0, 0.0]
The motivation is to get rid of implicit conversions such as https://gitlab.cern.ch/lhcb/Detector/blob/c488d1e2aae7db3fd9eb15fb82c4deb807d663d3/Core/src/yaml_converters.cpp#L44
Edited by Rosen Matev