Skip to content

Update UT beampipe interface for 2024

Hangyi Wu requested to merge upgrade/UT-bp-interface into upgrade/master

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",
  • 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:

  1. Compile a master stack and specify Detector project to the ut/bp-interface branch
  2. Run Detector/build.${BINARY_TAG}/bin/run geoPluginRun -interactive -input Detector/compact/run3/trunk/debug/UT_debug.xml -plugin DD4hep_GeometryDisplay -option "e" and use gGeoManager->Export("DD4hep.gdml") in the opened ROOT session to save UT DD4hep geometry to GDML file.
  3. Run following commands to change lvBeforeMagnetRegion XML tag from a volume to assembly, 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
  1. Run lb-run -c best Gauss/v56r7 with to obtain DetDesc.gdml
  2. Run the following commands using
lb-conda geometryvalidation python 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

Merge request reports