Update UT beampipe interface for 2024
Corresponds to lhcb/Detector!516
-
Backporting -
Overlap check with
GaussSimulation().G4BeginRunCommand += [
"/geometry/test/verbosity false", # increase verbosity
"/geometry/test/tolerance 0 mm", # tolerance of overlaps
"/geometry/test/recursion_start 0", # 0 - > beginning of the hierarchy
"/geometry/test/recursion_depth -1", # -1 -> will scan the whole tree
"/geometry/test/maximum_errors 1",
"/geometry/test/run",
]
- Ignored overlaps within other sub-detectors, and between UT pvSectorD2 and pvGuardRingD. The latter is something we have to bear with for now; it's not critical as long as UT monitoring in Gauss shows no missing hits around the type D sensor.
- No overlaps between UT structures
- Overlaps with BP seem to be DetDesc specific - does not see in Detector!516
-
GDML comparison check with Detector!516: diff-formatted.txt.
The detailed steps of obtaining the comparison results:
- Compile a
master
stack and specify Detector project to theut/bp-interface
branch - Run
Detector/build.${BINARY_TAG}/bin/run geoPluginRun -interactive -input Detector/compact/run3/trunk/debug/UT_debug.xml -plugin DD4hep_GeometryDisplay -option "e"
and usegGeoManager->Export("DD4hep.gdml")
in the opened ROOT session to save UT DD4hep geometry to GDML file. - Run following commands to change
lvBeforeMagnetRegion
XML tag from avolume
toassembly
, otherwise pyg4ometry will not recognize its daughters.
sed -i 's/ <volume name="lvBeforeMagnetRegion">/ <assembly name="lvBeforeMagnetRegion">/g' DD4hep.gdml
awk -v line_number=$(($(awk '/<volume name="lvMagnetRegion">/ {print NR; exit}' DD4hep.gdml) - 1)) 'NR==line_number {gsub("volume", "assembly", $0);} {print}' > DD4hep-fix-lvBeforeMagnetRegion.gdml
- Run
lb-run -c best Gauss/v56r7 gaudirun.py Gauss-SaveGDML.py
with Gauss-SaveGDML.py to obtainDetDesc.gdml
- Run the following commands using compareGeoms.py
lb-conda geometryvalidation python compareGeoms.py DD4hep-fix-lvBeforeMagnetRegion.gdml DetDesc.gdml |& tee diff.txt
sed 's/, /,\n/g' diff.txt | sed '/NotTested/d' > diff-formatted.txt
Edited by Hangyi Wu