Skip to content

feat: add -e flag to allow gen_amp_v2 to start at an arbitrary event number - #411

Merged
imoewi01 merged 1 commit into
masterfrom
dene-gen-amp-v2-event-input
Aug 25, 2026
Merged

feat: add -e flag to allow gen_amp_v2 to start at an arbitrary event number#411
imoewi01 merged 1 commit into
masterfrom
dene-gen-amp-v2-event-input

Conversation

@denehoffman

Copy link
Copy Markdown
Contributor

Right now, when a program like MCwrapper generates MC via gen_amp_v2 (or any other generator), it has no way to tell the generator what event number to start on. This is a problem because MCwrapper tends to produce multiple files per run number so event numbers are no longer unique to the combos they contain. This makes it additionally difficult to correctly do best-chi-squared rankings, since grouping by event number will incorrectly group unrelated combos. Right now this is hidden behavior which in my own tests contributes to errors of less than 1% if not manually corrected, but it should be simple to fix.

This PR just adds a -e flag to gen_amp_v2 that allows the caller to provide the starting event number. After this becomes part of the release, we can then have MCwrapper inject the proper event numbers, but this is necessary to do first. Because -e is optional as an argument and the constructor for the HDDMDataWriter just adds another optional argument, this should be backwards compatible with existing analysis code, but it also provides other generators with a pathway for doing this in the future.

@denehoffman

Copy link
Copy Markdown
Contributor Author

FYI it looks like my autoformatter has done some additional "work" on this file.

@imoewi01 imoewi01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that the -e flag modifies the event number in the hddm files and does not break things when running MCWrapper - all looks good.

@imoewi01
imoewi01 merged commit ea447df into master Aug 25, 2026
1 check passed
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