Conversation
This fixes unbounded 1 MeV neutron-equivalent weights outside the RD50 tables. - GetWeight evaluated the spline beyond the last table point, giving a pion weight of 541 at 10 GeV and 5e11 at 1 TeV. - The energy is now clamped to the table range, so weights beyond it use the value at the table edge. - Graphs read from CSV are sorted, since the clamp takes the range from the first and last point. - An empty graph returns 0, as before.
Collaborator
Author
|
This follows a discussion with @njacazio about ALICE3 developments. |
Collaborator
|
Many thanks tagging also @NNicassio99 |
Collaborator
This makes Geant4 command-line scoring usable with o2-sim running several workers. - Each worker writes its scoring meshes to <mesh>.worker<pid>.txt before finishing the Geant4 run. - The master worker shuts down before waiting for its forked workers, so its dump is not lost to the kill timer. - o2-sim waits for all workers to exit and sums the worker files into <mesh>.txt. - The merge fails if the number of dumps differs from the number of workers. - The tool o2-sim-merge-g4scoring does the same merge for a given directory. - The total column merges exactly; entries and total^2 count Geant4 events, which o2-sim splits into chunks per worker.
This extends the 1 MeV neutron equivalent fluence weighting to all hadrons and to e±, in line with FLUKA's SI1MEVNE. - Mesons use the pion weights and (anti)baryons other than the neutron use the proton weights. - e± use electron weights when the weight file provides pdg 11. - Near the beam pipe, kaons alone add 15% to the n_eq fluence.
sawenzel
force-pushed
the
g4scoring-merge-and-niel-clamp
branch
from
September 17, 2026 12:53
952d5fa to
492f6b1
Compare
Collaborator
|
@sawenzel |
Collaborator
|
Btw, if electrons make such a difference we have to include QED electrons in the primary event generation. Or is it already includes ? |
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.
This provides the possibility to run scoring studies (fluence, dose) with Geant4
in parallel simulation mode.
Also adding a numeric stability glamp to weights when they are used beyond the original range.
Left: damage weights before (dashed) and after the clamp. Right: 1 MeV n_eq fluence from
o2-sim-serialand fromo2-sim -j 8after merging, for the same pp events.1 MeV n_eq fluence near the beam pipe, Geant4 over FLUKA, for the same 200 pp events. Applying the damage weights to all hadrons, as FLUKA does, brings Geant4 to 0.98 ± 0.02 of FLUKA in the ITS3 layers (0.85 before). The remaining difference comes from FLUKA's damage tables, which stay flat above 1 GeV. FLUKA references: https://fluka.cern/documentation/references