Skip to content

Fixing RADMAX Bug in VEGAS#251

Merged
matthew-w-lundy merged 3 commits into
mainfrom
bugfix/thetasquare
Feb 22, 2026
Merged

Fixing RADMAX Bug in VEGAS#251
matthew-w-lundy merged 3 commits into
mainfrom
bugfix/thetasquare

Conversation

@matthew-w-lundy
Copy link
Copy Markdown
Contributor

RADMAX was being improperly set in some VEGAS files. This appears to be due to an error where Model3DThetaSquareCut was always being read regardless of the reconstruction set by the user. I've now passed reco_type to the appropriate section and ensured that it matches.

I tested runlist and file type import and tried with improper and proper reco_type and it all appears to be working well.

Example test:
v2dl3-vegas -d --point-like -r 2 -f /homes/wang/lundym/debuggingforothers/bryan/20260218/103110.root /raid/reedbuck/lundym/irf_alloff/ea_ITMgeo_24s_CARE162d12_v259rc0v2p1GT_alloff_Z0-60_s700_W1p1_L1p3_MH7_ThSq0p005_4nsb.root out
gives:
RAD_MAX = 0.07071067811865475 / Direction cut applied [deg]

and the command (note -r 1):
v2dl3-vegas -d --point-like -r 1 -f /homes/wang/l undym/debuggingforothers/bryan/20260218/103110.root /raid/reedbuck/lundym/irf_alloff/ea_ITMgeo_24s_CAR E162d12_v259rc0v2p1GT_alloff_Z0-60_s700_W1p1_L1p3_MH7_ThSq0p005_4nsb.root out
and returns
RAD_MAX = 360.0 / Direction cut applied [deg]

The behavior now forces the user to correctly match the reconstruction to the right IRF. Currently there is no check that does this but it may be nice to include.

@matthew-w-lundy
Copy link
Copy Markdown
Contributor Author

@copilot , @njucarlchen comments?

@VERITAS-Observatory VERITAS-Observatory deleted a comment from Copilot AI Feb 18, 2026
@matthew-w-lundy
Copy link
Copy Markdown
Contributor Author

Ok lets ignore the copilot its doing a little too much for whats needed here .... maybe @njucarlchen you can download and run a run to see if it works for you and then we can merge. The failing of the CI is intended and it's all due to the correct RADMAX

@njucarlchen
Copy link
Copy Markdown

I ran two simple tests.

First, I converted a stage5 file using v2dl3-vegas -d --point-like -r 2 -f data/112774.St5ITMgeo.med.v2_6_1_1.root irfs/ea_ITMgeo_25s_CARE162d12_v259rc0v2p1GT_alloff_Z0-60_s700_W1p1_L1p3_MH7_ThSq0p005_4nsb.root . and found RAD_MAX = 0.07071067811865475

Then, I also tried converting the same file using a larger theta square v2dl3-vegas -d --point-like -r 2 -f data/112774.St5ITMgeo.med.v2_6_1_1.root irfs/ea_ITMgeo_25s_CARE162d12_v259rc0v2p1GT_alloff_Z0-60_s700_W1p1_L1p3_MH7_ThSq0p0625_4nsb.root . and found RAD_MAX = 0.25

So the fix seems to be working as expected!

@matthew-w-lundy matthew-w-lundy merged commit 367d786 into main Feb 22, 2026
2 of 3 checks passed
@matthew-w-lundy matthew-w-lundy deleted the bugfix/thetasquare branch February 22, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants