Closed jdkio closed 1 year ago
Oh, and as a general comment: I think we should introduce a CHANGELOG.md file for this repo, to keep track of changes. See https://keepachangelog.com/en/1.1.0/ or how it is done in dunendggd.
I've added CHANGELOG.md based on dunendggd's version. There aren't any tags from any recent changes so I left them as Unreleased.
dune-tms loads its geometry from the edep sim or larsoft root file. The geometry from larsoft is scaled to cm instead of mm. So x=123 means x=123cm. There's no way to fix this within root. While we could load a geometry from gdml with the correct units, this could lead to version skew. The only solution is to make dune tms agnostic to the overall scaling.
This fix moves FindNode into TMS_Geom. There it can handle the scaling to the correct units before making the geometry manager's FindNode call and returning the result. It also automatically tries to guess which unit convention is used based on the geometry's size after loading it.
While ideally we'd move everything to TMS_Geom, it's not practical. So added scaling in the relavant locations of the code.