Label run headers with the GEMC run number, not Geant4's internal run ID#151
Open
zhaozhiwen wants to merge 1 commit into
Open
Label run headers with the GEMC run number, not Geant4's internal run ID#151zhaozhiwen wants to merge 1 commit into
zhaozhiwen wants to merge 1 commit into
Conversation
GRunHeader is built from aRun->GetRunID(), which is Geant4's internal counter starting at 0 and incrementing per /run/beamOn. It has no relation to the GEMC conditions run number the user requested (the key of runEvents in EventDispenser), so run-level output and per-run logging were mislabeled — e.g. run weights dispatching runs 11/12/13 produced headers reporting 0/1/2. Seed Geant4's run-ID counter with the GEMC run number before each beamOn via G4RunManager::SetRunIDCounter, so aRun->GetRunID() returns the intended run number. Under MT the master manager propagates the ID to the worker runs of that beamOn, keeping master and worker headers consistent. GetRunID() is only consumed by the run header (two sites in gRunAction.cc), so seeding the counter has no other side effects. Fixes gemc#104 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GRunHeaderis built fromaRun->GetRunID(), Geant4's internal counter (0, 1, 2, … per/run/beamOn). It is unrelated to the GEMC conditions run number the user requested (the key ofrunEventsinEventDispenser), so run-level output and per-run logging were mislabeled — run weights dispatching runs 11/12/13 produced headers reporting 0/1/2.Seed Geant4's run-ID counter with the GEMC run number before each
beamOnviaG4RunManager::SetRunIDCounter, soaRun->GetRunID()returns the intended number. Under MT the master manager propagates the ID to the worker runs of that beamOn, keeping master and worker headers consistent.GetRunID()is consumed only by the run header (two sites ingRunAction.cc), so seeding the counter has no other side effects.Validation:
eventDispenser.cccompiles clean (Geant4 11.4.1 dev container).Fixes #104