DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 1 forks source link

Remove bar size hardcoding #147

Open jdkio opened 1 week ago

jdkio commented 1 week ago

If we run with any other size bar (like when we adjust the geometry), we get

width of scinBoxlvTMS_PV_13 not as expected!
xwidth: 30.2
ywidth: 3096
zwidth: 10
terminate called without an active exception

That comes from this hardcoded check here: https://github.com/DUNE/dune-tms/blob/5ab577fd4610fd1c5bb66abd4c7c2371cdde95c5/src/TMS_Bar.cpp#L78 That needs to be removed

LiamOS commented 6 days ago

Am adding myself and @AsaNehm on this, the Kalman filter will need a small modification to work with more general bar sizes. I imagine there are some numbers/indices/values in the reco code that assume bar geometry and/or angle that should be generalised.

Might be needed to allow TMS_Bar to present some necessary info to the code that needs it.

AsaNehm commented 5 days ago

Files that have a hard-coded 35.42 in are (only in src)

AsaNehm commented 5 days ago

The part in TMS_Bar.cpp is in addition inside a sanity check. So this could be taken out if we know that it works as it is supposed to or change the check from a throw to a message like width is not as in official design. Proceed at your own risk

jdkio commented 3 days ago

Yeah, TMS is far enough along that we don't need guardrails. We can let users use whatever values they want without any checks (we don't want constant warning messages in the logs)

We need to improve tms_geom so that it can return the right answer for any geometry questions. As a first step, we should at least replace all hard coded numbers to TMS geometry function calls. Then we can adjust the functions as needed. We need to think about how to best get the bar width out of the geometry manager