DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 2 forks source link

Remove bar size hardcoding #147

Open jdkio opened 2 months ago

jdkio commented 2 months 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 2 months 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 2 months ago

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

AsaNehm commented 2 months 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 2 months 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

AsaNehm commented 2 months ago

One additional thing is that the thickness of the scintillator bars is also in many places hardcoded to 10mm. With the new design having 17mm thickness this is going to be a problem as well. (edit: checked for this and it doesn't seem to be a problem in the reco so far)

AsaNehm commented 2 months ago

Took out the sanity check in TMS_Bar.cpp

jdkio commented 2 weeks ago

@AsaNehm, looks like the sanity check in TMS_Bar is still there. Did you forget to make a PR?

AsaNehm commented 2 weeks ago

Didn't forget it but wanted to leave it open for the Kalman filter stuff