DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 1 forks source link

Adding changes to scale geometry within dune-tms in the case of larsoft #30

Closed jdkio closed 1 year ago

jdkio commented 1 year ago

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.

ast0815 commented 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.

jdkio commented 1 year ago

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.