From 009e389770d63031e419d3cd1f5a4d261ea3b5b2 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Thu, 24 Sep 2026 22:39:56 +0200 Subject: [PATCH 1/3] Point at the NIEL weight file shipped with O2 This follows up the Geant4 scoring section with the file location and one trap. - The damage weights now ship as share/Detectors/gconfig/data/rd50_niel.csv. - Without G4.g4fluenceweight the weighted scorer silently returns plain fluence. - The shipped weights have no electron table. Co-Authored-By: Claude Opus 5 --- docs/scoring/README.md | 20 +++++++++++++------- docs/scoring/g4scoring_alice.in | 2 ++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/scoring/README.md b/docs/scoring/README.md index 3978b8b..3b643e3 100644 --- a/docs/scoring/README.md +++ b/docs/scoring/README.md @@ -139,9 +139,14 @@ The trailing `true` is the `scoreweighted` flag. It only exists for `cellFlux`. Switch the weights on with: ```bash ---configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$PWD/rd50_niel.csv;G4.configMacroFile=$PWD/g4scoring.in" +--configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv;G4.configMacroFile=$PWD/g4scoring.in" ``` +**The `true` flag alone does nothing.** Without `G4.g4fluenceweight=true` the +scorer falls back to a weight of one for every step, so the map looks perfectly +healthy and is plain fluence. There is no warning. If a `neq` map comes out +equal to the unweighted one, this is why. + The weight file is a CSV of PDG code, kinetic energy in MeV and damage weight: ``` @@ -149,10 +154,9 @@ The weight file is a CSV of PDG code, kinetic energy in MeV and damage weight: 2112,1.025000e-10,1.575000e-02 ``` -The same curves ship with O2 as ROOT graphs in -`$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.root`, under the names -`neutronDW`, `protonDW`, `pionDW` and `electronDW`. If you do not have the text -file, write it out from there — the loader only accepts CSV. +The file ships with O2 as +`$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv`, together with the same +curves as ROOT graphs in `rd50_niel.root`. The loader only accepts CSV. Only four tables are read — neutron (2112), proton (2212), pion (211) and electron (11) — and they are applied like this: @@ -166,7 +170,9 @@ electron (11) — and they are applied like this: | everything else | zero | Outside the tabulated energy range the weight is clamped to the first or last -tabulated value. +tabulated value. The file shipped with O2 has no electron table, so electrons +and positrons carry no damage weight; against FLUKA, which weights them, this +costs about half a percent in the inner tracker. The consequence for a comparison: **do not filter the NIEL scorer down to neutrons, protons and pions.** FLUKA's `SI1MEVNE` weights every hadron and @@ -184,7 +190,7 @@ coarse one over the cavern, each with fluence, 1 MeV n eq, hadrons above cat $O2_ROOT/share/Detectors/gconfig/g4config.in g4scoring_alice.in > g4full.in o2-sim -e TGeant4 -g pythia8pp -n 1000 -j 8 \ - --configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$PWD/rd50_niel.csv;G4.configMacroFile=$PWD/g4full.in" + --configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv;G4.configMacroFile=$PWD/g4full.in" ``` {% include list.liquid all=true %} diff --git a/docs/scoring/g4scoring_alice.in b/docs/scoring/g4scoring_alice.in index 3a22904..195f085 100644 --- a/docs/scoring/g4scoring_alice.in +++ b/docs/scoring/g4scoring_alice.in @@ -1,4 +1,6 @@ # ALICE radiation scoring: two cylindrical meshes, phi averaged. +# The neq scorers need G4.g4fluenceweight=true and G4.fluenceWeightFile, otherwise +# they silently score unweighted fluence. # Append this to $O2_ROOT/share/Detectors/gconfig/g4config.in and pass the # result as G4.configMacroFile. The scorers mirror the FLUKA USRBIN cards # 201 (fluence), 236 (1 MeV n eq), 237 (hadrons > 20 MeV), 202 (charged) From 00d4d48a7dec3b22cfc388333f94810a4bda4f18 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 29 Sep 2026 09:45:59 +0200 Subject: [PATCH 2/3] Clarify the scope of the FLUKA black-hole pitfall and add the electron weights This updates the scoring pages after review by the FLUKA expert. - The MFT black-hole paragraph now states which O2 versions are affected, and that the official ALICE FLUKA and FoCal A-side calculations are not. - FLUKA low-energy neutron transport needs FlukaParam.lowNeutron=true, which is off by default in o2-sim. - The NIEL weight file now carries the RD50 electron table; its source is cited. https://rd50.web.cern.ch/NIEL/ https://github.com/AliceO2Group/AliceO2/pull/2877 Co-Authored-By: Claude Opus 5.5 --- docs/scoring/README.md | 11 ++++++++--- docs/scoring/flukacomparison.md | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/scoring/README.md b/docs/scoring/README.md index 3b643e3..364b7cc 100644 --- a/docs/scoring/README.md +++ b/docs/scoring/README.md @@ -170,9 +170,14 @@ electron (11) — and they are applied like this: | everything else | zero | Outside the tabulated energy range the weight is clamped to the first or last -tabulated value. The file shipped with O2 has no electron table, so electrons -and positrons carry no damage weight; against FLUKA, which weights them, this -costs about half a percent in the inner tracker. +tabulated value. The electron table covers 0.3 to 200 MeV (Summers et al., +IEEE Trans. Nucl. Sci. 40 (1993) 1372, as compiled by RD50), so electrons below +0.3 MeV get the lowest tabulated weight. O2 versions from before October 2026 +ship the file without the electron table; there e± weigh nothing, which is +about half a percent of the inner-tracker n eq. + +The four tables are the RD50 compilation by A. Vasilescu and G. Lindström, +https://rd50.web.cern.ch/NIEL/. The consequence for a comparison: **do not filter the NIEL scorer down to neutrons, protons and pions.** FLUKA's `SI1MEVNE` weights every hadron and diff --git a/docs/scoring/flukacomparison.md b/docs/scoring/flukacomparison.md index 19090a0..0edffce 100644 --- a/docs/scoring/flukacomparison.md +++ b/docs/scoring/flukacomparison.md @@ -82,9 +82,11 @@ So per event: `fluka_value * total_weight / nevents` against - **Same kinematics.** Generate once with `--noGeant`, then replay the same file in both engines with `-g extkinO2 --extKinFile o2sim_Kine.root`. Otherwise the comparison also contains the generator. -- **Low-energy neutrons.** FLUKA transports neutrons down to thermal energies - by default. Geant4 does not, unless an HP physics list is used and the - neutron cut is lowered: +- **Low-energy neutrons.** Whenever neutrons below 20 MeV matter, which is the + case for any 1 MeV n eq map, switch low-energy neutron transport on in both + engines. In FLUKA this is `FlukaParam.lowNeutron=true`; it is off by default + in `o2-sim`, and setting `FlukaParam.scoringFile` also switches it on. In + Geant4 use an HP physics list and lower the neutron cut: `G4.physicsmode=kFTFP_BERT_HP_optical;SimCutParams.lowneut=true;GlobalSimProcs.CUTNEU=5.e-12`. - **Optical photons.** Geant4 produces and transports Cherenkov photons in the FT0; FLUKA in the ALICE setup does not. They show up in any unfiltered @@ -107,8 +109,10 @@ Check this in every FLUKA run directory before you trust a map: grep -c "ASSIGNMAT -1.0" flukaMat.inp # 0 when healthy ``` -This affected the ten MFT PEEK support disks in ALICE 2 and pulled the FLUKA -fluence in the barrel down by up to a factor two — for a long time this was read -as a physics disagreement between the two codes. The geometry is fixed by -giving the support volume a name of its own; make sure your O2 version has that -fix. +In ALICE 2 this happened to the ten MFT PEEK support disks, which lowered the +FLUKA fluence in the barrel by up to a factor two. The name clash exists in O2 +from February 2020 ([AliceO2 PR 2877](https://github.com/AliceO2Group/AliceO2/pull/2877)) until September 2026, when the support +volume got a name of its own (`4f9072579a`). It concerns only TFluka runs with +an O2 version from that period and the MFT in the geometry. The official ALICE +FLUKA calculations predate it and are not affected, and neither are the FoCal +calculations on the A side. From 0a13e9530f0dc800b5df8ce8046ad1d719634928 Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 29 Sep 2026 10:42:27 +0200 Subject: [PATCH 3/3] Correct the optical-photon note in the scoring pages This fixes the description of optical photons in the FLUKA/Geant4 comparison. - The pages said FLUKA does not produce Cherenkov photons in the FT0, whereas both engines do. - FLUKA does not receive the FT0 optical properties, so about six times more photons leave the detector than in Geant4. - This doubles the unfiltered total fluence near the FT0 planes; dose, 1 MeV n eq and hadron fluence are unaffected. Co-Authored-By: Claude Opus 5.5 --- docs/scoring/README.md | 8 +++++--- docs/scoring/flukacomparison.md | 15 +++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/scoring/README.md b/docs/scoring/README.md index 364b7cc..8159734 100644 --- a/docs/scoring/README.md +++ b/docs/scoring/README.md @@ -88,9 +88,11 @@ Particle names are the Geant4 ones: `neutron`, `proton`, `anti_proton`, `pi+`, `pi-`, `kaon0L`, `gamma`, `e-`, `opticalphoton`, and so on. A scorer without a filter counts everything, **including optical photons**. -Those dominate the total fluence around the FT0 and are not transported by -FLUKA at all, so an unfiltered `cellFlux` is not a quantity you can compare -between the two engines. Filter, or read the filtered scorers instead. +Those come from the FT0 radiator and dominate the total fluence around it. FLUKA +produces them too, but in different numbers (see +[the same scoring in FLUKA](flukacomparison.md)), so an unfiltered `cellFlux` is +not a quantity you can compare between the two engines. Filter, or read the +filtered scorers instead. ## Output diff --git a/docs/scoring/flukacomparison.md b/docs/scoring/flukacomparison.md index 0edffce..09043f5 100644 --- a/docs/scoring/flukacomparison.md +++ b/docs/scoring/flukacomparison.md @@ -88,10 +88,17 @@ So per event: `fluka_value * total_weight / nevents` against in `o2-sim`, and setting `FlukaParam.scoringFile` also switches it on. In Geant4 use an HP physics list and lower the neutron cut: `G4.physicsmode=kFTFP_BERT_HP_optical;SimCutParams.lowneut=true;GlobalSimProcs.CUTNEU=5.e-12`. -- **Optical photons.** Geant4 produces and transports Cherenkov photons in the - FT0; FLUKA in the ALICE setup does not. They show up in any unfiltered - fluence scorer and swamp it locally. Dose, 1 MeV n eq and hadron fluence are - unaffected. +- **Optical photons.** O2 switches on Cherenkov production in the FT0 radiator + in both engines, and both count these photons in an unfiltered fluence + scorer (`ALL-PART` in FLUKA, a `cellFlux` without filter in Geant4). The + engines do not produce the same number: the absorption length and mirror + surfaces O2 defines for the FT0 are passed to Geant4 but not to FLUKA, so + FLUKA's photons are not absorbed and about six times more of them leave the + detector. In ALICE 2, with the MFT fix below applied, this makes the total + fluence differ by a factor two at R = 5–20 cm near the FT0 planes + (z = +335 cm and z = −84 cm). The photons carry a few eV, so dose, + 1 MeV n eq and hadron fluence are unaffected. + Compare the species you need, never unfiltered total fluence. - **Same geometry.** `--detectorList` and `--skipModules` have to match, and hit creation should be switched off or on in both.