Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve event ID handling #1453

Open
sethrj opened this issue Oct 17, 2024 · 1 comment
Open

Improve event ID handling #1453

sethrj opened this issue Oct 17, 2024 · 1 comment
Labels
bug Something isn't working external Dependencies and framework-oriented features

Comments

@sethrj
Copy link
Member

sethrj commented Oct 17, 2024

We've always treated event IDs as "OpaqueId"s, indexed from zero onward. This didn't always match with the way Geant4/HepMC recorded event numbers but we ignored it and output warnings about nonconsecutive event IDs. With #1447 we really discovered that event "IDs" are arbitrary: they're more like integer labels, and we introduced UniqueEventId to denote this for integrating with Geant4.

I think we need a more consistent mapping across libraries and input files, injecting primaries one event at a time (primaries will no longer have an event ID, you just have to group them). Then the primary generator (or whatever) can keep a map of "numerical event label" to EventId (consecutive).

@sethrj sethrj added bug Something isn't working external Dependencies and framework-oriented features labels Oct 17, 2024
@sethrj
Copy link
Member Author

sethrj commented Nov 25, 2024

@wdconinc noticed that hepmc files don't work properly in the .mac input. This is related to this issue and #1390 and the refactoring of the hepmc3 generators. I think we should:

  1. Refactor PrimaryGenerator as a distribution and remove the EventId.
  2. Construct the primary generator in user action initialization for sharing among threads; and save number of requested events
  3. Move generator initialization code from GlobalSetup to RunAction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Dependencies and framework-oriented features
Projects
None yet
Development

No branches or pull requests

1 participant