-
Notifications
You must be signed in to change notification settings - Fork 35
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
Define a "unique event ID" different from event counter #1447
Conversation
Experiment frameworks expect to have more than 4 billion globally unique event identifiers, and these aren't run sequentially in a single simulation. Define a "unique event ID" as UID-like integer only for reseeding and not for tracking.
We may want to rename our internal "event ID" to avoid confusion with the external ones. |
Test summary 3 279 files 5 076 suites 3m 30s ⏱️ Results for commit 4342e42. |
@@ -199,7 +198,7 @@ void LocalTransporter::Push(G4Track const& g4track) | |||
* back to Geant4. | |||
*/ | |||
track.track_id = TrackId{track_counter_++}; | |||
track.event_id = event_id_; | |||
track.event_id = EventId{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is just temporary, and the plan is to set the Celeritas event ID from a global counter and to reset the (single, local) sim data track counter at the start of a new event? And I guess until we do that our track IDs won't be meaningful...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the next PR will include a function to reset these at every event. Track IDs aren't currently very meaningful anyway since they're nondeterministic.
…oject#1447) * Use a longer integer for event reseeding Experiment frameworks expect to have more than 4 billion globally unique event identifiers, and these aren't run sequentially in a single simulation. Define a "unique event ID" as UID-like integer only for reseeding and not for tracking. * Force event ID to be zero
…oject#1447) * Use a longer integer for event reseeding Experiment frameworks expect to have more than 4 billion globally unique event identifiers, and these aren't run sequentially in a single simulation. Define a "unique event ID" as UID-like integer only for reseeding and not for tracking. * Force event ID to be zero
…oject#1447) * Use a longer integer for event reseeding Experiment frameworks expect to have more than 4 billion globally unique event identifiers, and these aren't run sequentially in a single simulation. Define a "unique event ID" as UID-like integer only for reseeding and not for tracking. * Force event ID to be zero
…oject#1447) * Use a longer integer for event reseeding Experiment frameworks expect to have more than 4 billion globally unique event identifiers, and these aren't run sequentially in a single simulation. Define a "unique event ID" as UID-like integer only for reseeding and not for tracking. * Force event ID to be zero
ATLAS integration is currently failing because the framework is now setting the Geant4 event ID based on the global event context, whose event number is a globally unique identifier. In contrast, Celeritas expected the event number to be a counter (and a thread-local one at that). Since there are far more than 4 billion total events simulated across all runs and all simulations, and each event should have a unique random sequence, we need to define a special long integer for seeding.
Since the unique event ID (aka the event ID from geant4) doesn't necessarily correlate to the event counter, I'm forcing the EventId that we use for the primary (used for track counting) to zero. This may hurt "debuggability" but means that we can eliminate the "max events" from Geant4 integration. A follow-on PR will add support a special mode for resetting the track counter at the beginning of each event (and having a single "global" event ID) rather than using a unique event-ID-based slot.
A follow-on pull request should map our internal "event ID" (which is consecutive from zero and local to a thread) to the external "event ID" (which is some arbitrary integer used to reference an event, whether from ATLAS or a HepMC3 file etc) for user output.
See #1144 , #1233