Skip to content

Allow use of units in alignment conditions

Marco Clemencic requested to merge allow-units-in-alignment-conditions into master

I opted for the easiest solution to #10: I added (only for alignments at the moment) the same units handling we have in LHCb, DD4hep and CLHEP, i.e. a bunch of predefined constants that we multiply/divide for.

The alignments now can optionally have units as in

MyAlignment: !alignment
   position: [1.0, 0.1 * cm, 1000 * um]

I do not like this approach as nobody prevents me to write

MyAlignment: !alignment
   position: [1.0 * s, 1.0 * MeV, 1.0 * pascal]

but let's assume this is fine for the moment.

This is not strictly a solution for #10 because it only covers alignments while we would like to have a similar feature for regular conditions too.

BTW, I also fixed what I think was a bug: the pivot was not scaled to take into account that ROOT and LHCb have different conventions for the length basic unit.

/cc @rmatev

Merge request reports