Skip to content

Commit 5f021c6

Browse files
sawenzelclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 044fe2c commit 5f021c6

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

‎docs/scoring/README.md‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,24 @@ The trailing `true` is the `scoreweighted` flag. It only exists for `cellFlux`.
139139
Switch the weights on with:
140140

141141
```bash
142-
--configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$PWD/rd50_niel.csv;G4.configMacroFile=$PWD/g4scoring.in"
142+
--configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv;G4.configMacroFile=$PWD/g4scoring.in"
143143
```
144144

145+
**The `true` flag alone does nothing.** Without `G4.g4fluenceweight=true` the
146+
scorer falls back to a weight of one for every step, so the map looks perfectly
147+
healthy and is plain fluence. There is no warning. If a `neq` map comes out
148+
equal to the unweighted one, this is why.
149+
145150
The weight file is a CSV of PDG code, kinetic energy in MeV and damage weight:
146151

147152
```
148153
# pdg,ekin[MeV],weight
149154
2112,1.025000e-10,1.575000e-02
150155
```
151156

152-
The same curves ship with O2 as ROOT graphs in
153-
`$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.root`, under the names
154-
`neutronDW`, `protonDW`, `pionDW` and `electronDW`. If you do not have the text
155-
file, write it out from there — the loader only accepts CSV.
157+
The file ships with O2 as
158+
`$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv`, together with the same
159+
curves as ROOT graphs in `rd50_niel.root`. The loader only accepts CSV.
156160

157161
Only four tables are read — neutron (2112), proton (2212), pion (211) and
158162
electron (11) — and they are applied like this:
@@ -166,7 +170,9 @@ electron (11) — and they are applied like this:
166170
| everything else | zero |
167171

168172
Outside the tabulated energy range the weight is clamped to the first or last
169-
tabulated value.
173+
tabulated value. The file shipped with O2 has no electron table, so electrons
174+
and positrons carry no damage weight; against FLUKA, which weights them, this
175+
costs about half a percent in the inner tracker.
170176

171177
The consequence for a comparison: **do not filter the NIEL scorer down to
172178
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
184190
cat $O2_ROOT/share/Detectors/gconfig/g4config.in g4scoring_alice.in > g4full.in
185191

186192
o2-sim -e TGeant4 -g pythia8pp -n 1000 -j 8 \
187-
--configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$PWD/rd50_niel.csv;G4.configMacroFile=$PWD/g4full.in"
193+
--configKeyValues "G4.g4scoring=true;G4.g4fluenceweight=true;G4.fluenceWeightFile=$O2_ROOT/share/Detectors/gconfig/data/rd50_niel.csv;G4.configMacroFile=$PWD/g4full.in"
188194
```
189195

190196
{% include list.liquid all=true %}

‎docs/scoring/g4scoring_alice.in‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# ALICE radiation scoring: two cylindrical meshes, phi averaged.
2+
# The neq scorers need G4.g4fluenceweight=true and G4.fluenceWeightFile, otherwise
3+
# they silently score unweighted fluence.
24
# Append this to $O2_ROOT/share/Detectors/gconfig/g4config.in and pass the
35
# result as G4.configMacroFile. The scorers mirror the FLUKA USRBIN cards
46
# 201 (fluence), 236 (1 MeV n eq), 237 (hadrons > 20 MeV), 202 (charged)

0 commit comments

Comments
 (0)