Skip to content

DRICH: move PDU placements into per-sector sensorbox subvolumes#1115

Open
wdconinc wants to merge 1 commit into
mainfrom
drich-sensorbox-nav
Open

DRICH: move PDU placements into per-sector sensorbox subvolumes#1115
wdconinc wants to merge 1 commit into
mainfrom
drich-sensorbox-nav

Conversation

@wdconinc

Copy link
Copy Markdown
Contributor

Summary

Group the 210 PDU assemblies per sector into dedicated per-sector gas subvolumes (DRICH_sensorbox_sec{N}) to reduce the number of direct daughters of DRICH_gas from 1,269 to 15. This improves TGeo voxelisation and navigation performance for optical photon tracking in Geant4.

Motivation

Perfetto-traced forward-θ simulation (θ ∈ [3°, 25°], 2 events) showed:

  • DRICH_gas had 1,269 daughters (6 × 210 PDU assemblies + aerogel + airgap + filter + 6 mirrors)
  • Navigation cost: 3 µs/call (3× higher than other volumes), totalling 61 ms = 49% of all navigation time
  • Root cause: TGeo must voxelise and search 1,269 irregularly-placed children at every optical photon step

Geometry change

Before:

DRICH_gas: 1,269 daughters
  aerogel, airgap, filter  (3)
  mirror_sec0..5            (6)
  pdu_sec0[0..209]         (210)
  pdu_sec1[0..209]         (210)
  ...
  pdu_sec5[0..209]         (210)

After:

DRICH_gas: 15 daughters
  aerogel, airgap, filter  (3)
  mirror_sec0..5            (6)
  sensorbox_sec0..5         (6)  ← new per-sector subvolumes
    each: 210 PDU assemblies

Implementation

The gasvolSensorboxTube solid was already defined (and used in the gas union solid). Per-sector Volume objects are created using this solid with the same gas material, placed in gasvolVol at the same position as the union contribution. PDU placement transforms are adjusted to the sensorbox local coordinate frame via the composed inverse transform.

No changes to:

  • physVolIDs (sector, pdu, sipm) — still set at the same levels
  • Optical skin surfaces (on pssVol, unaffected by hierarchy)
  • IRT2 reconstruction (uses pduAssemblyPlacement in gas coordinates for position calculations)
  • Compact XML / detector constants

Copilot AI review requested due to automatic review settings May 29, 2026 13:36
@github-actions github-actions Bot added the topic: PID Particle identification label May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the dRICH geometry so that the 210 PDU assemblies in each sector are placed inside a dedicated per-sector “sensorbox” gas subvolume, reducing the number of direct daughters under DRICH_gas and improving TGeo voxelisation/navigation performance for optical photon tracking.

Changes:

  • Add per-sector sensorbox gas subvolumes (DRICH_sensorbox_sec{N}) placed into DRICH_gas using the existing gasvolSensorboxTube solid.
  • Move PDU placements from direct children of DRICH_gas to children of the corresponding per-sector sensorbox, transforming placements into the sensorbox local frame via sensorboxGasPlacement.Inverse() * pduAssemblyPlacement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wdconinc

Copy link
Copy Markdown
Contributor Author

As in #1051, this introduces changes in the number of steps (boundary injected) so hits are in general going to be different.

@wdconinc

wdconinc commented May 29, 2026

Copy link
Copy Markdown
Contributor Author
    ┌────────────────────┬──────────────────────────┬──────────────────────┬─────────────────┐
    │ Metric             │ Before (1,269 daughters) │ After (15 daughters) │ Improvement     │
    ├────────────────────┼──────────────────────────┼──────────────────────┼─────────────────┤
    │ DRICH nav time     │ 61.1 ms                  │ 38.8 ms              │ −36%            │
    ├────────────────────┼──────────────────────────┼──────────────────────┼─────────────────┤
    │ DRICH nav/call     │ 3 µs                     │ 2 µs                 │ −33%            │
    ├────────────────────┼──────────────────────────┼──────────────────────┼─────────────────┤
    │ DRICH % of all nav │ 49%                      │ 30%                  │ —               │
    ├────────────────────┼──────────────────────────┼──────────────────────┼─────────────────┤
    │ fEcalWScFi nav     │ 44.7 ms                  │ 35.4 ms              │ −21% (paramvol) │
    ├────────────────────┼──────────────────────────┼──────────────────────┼─────────────────┤
    │ Total s/event      │ ~27 s                    │ ~20 s                │ −26%            │
    └────────────────────┴──────────────────────────┴──────────────────────┴─────────────────┘

(ignore the fEcalWScFi line which is the impact from #1051 in this forward region; also, time per event is inflated due to profiling instrumentation)

Group the 210 PDU assemblies per sector into dedicated per-sector gas
subvolumes (DRICH_sensorbox_sec{N}) to reduce the number of direct
daughters of DRICH_gas from 1,269 to 15. This improves TGeo voxelisation
and navigation performance for optical photon tracking.

Structure before:
  DRICH_gas: 1,269 daughters (aerogel + airgap + filter + 6 mirrors + 6×210 PDUs)

Structure after:
  DRICH_gas: 15 daughters (aerogel + airgap + filter + 6 mirrors + 6 sensorboxes)
  DRICH_sensorbox_sec{N}: 210 PDU daughters each

The gasvolSensorboxTube solid was already defined for inclusion in the
gasvolUnion. The per-sector gas volumes use the same solid and are placed
at the same position as the union contribution. PDU placements are adjusted
to be in the sensorbox local coordinate frame via the composed inverse
transform. physVolIDs (sector, pdu, sipm) and optical skin surfaces are
unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wdconinc wdconinc force-pushed the drich-sensorbox-nav branch from ad29451 to df2bf72 Compare June 6, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: PID Particle identification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants