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.
|
This follows a discussion with @njacazio about ALICE3 developments. |
|
Many thanks tagging also @NNicassio99 |
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.
952d5fa to
492f6b1
Compare
|
@sawenzel |
|
Btw, if electrons make such a difference we have to include QED electrons in the primary event generation. Or is it already includes ? |
|
Yes, all hadrons: mesons take the pion weights, baryons the proton weights. That closes most of the Geant4-FLUKA gap at small radius (kaons alone are 14.5%). QED background electrons are not included in these runs. Your effect at large radius shows up here too: at R 20-60 cm the n_eq ratio is 2.2 in front of the absorber against 1.5 on the A side, and the weights change nothing there. |
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