Skip to content

geomGeant4: hadron-absorber and muon-shield field maps are mutually exclusive #1313

Description

@olantwin

In python/geomGeant4.py (~line 193), the hadron-absorber field map is added in an elif of the muon-shield field-map branch:

if not shipGeo.muShield.WithConstField:
    ... defineFieldMap("muonShieldField", ...)
    fieldsList.append("muonShieldField")
elif not shipGeo.hadronAbsorber.WithConstField:
    ... defineFieldMap("HadronAbsorberMap", ...)
    fieldsList.append("HadronAbsorberMap")

So if the muon shield uses a field map (not a constant field), the hadron-absorber map is never added — even when both are configured as non-constant. Changing elifif would make them independent, but this affects the composite global field, so a field/geometry expert should confirm whether the two maps are meant to coexist before changing the control flow. Flagged during a code review.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions