Skip to content

DIRC: add bar lateral surface with UNIFIED model micro-facet roughness#1113

Open
wdconinc wants to merge 1 commit into
mainfrom
dirc-bar-surface-roughness
Open

DIRC: add bar lateral surface with UNIFIED model micro-facet roughness#1113
wdconinc wants to merge 1 commit into
mainfrom
dirc-bar-surface-roughness

Conversation

@wdconinc

Copy link
Copy Markdown
Contributor

Summary

Add an explicit G4LogicalSkinSurface on bar_vol (the quartz bars) using the UNIFIED optical model with ground finish and sigma_alpha = 0.02 rad.

Physics motivation

Currently the bar lateral faces have no explicit optical surface, defaulting to perfect glisur/polished total internal reflection. This causes an unphysical simulation pathology: optical photons can bounce indefinitely (up to 690 m / 113,000 steps in profiling runs), limited only by the bulk absorption length.

In a real polished quartz bar, surface micro-roughness causes photons near the TIR critical angle to be deflected onto micro-facets at slightly different angles. A fraction of these exceed the critical angle and refract out of the bar instead of reflecting. The UNIFIED model with ground finish and sigma_alpha (Gaussian std-dev of micro-facet normal angle) correctly models this physics.

sigma_alpha = 0.02 rad (≈ 1.1°) is the standard value for polished quartz used in hpDIRC simulations (BaBar DIRC, Belle II iTOP papers).

Implementation note

DD4hep compact XML <opticalsurface> does not currently support the sigma_alpha attribute for the UNIFIED model (only valuepolish for glisur is parsed in Compact2Objects.cpp). The value is therefore set programmatically via TGeoOpticalSurface::SetSigmaAlpha(), which DDG4::Geant4Converter::handleOpticalSurface() correctly forwards to G4OpticalSurface::SetSigmaAlpha().

Files changed

  • compact/optical_materials.xml: add DIRC_BarOpticalSurface definition (unified/ground/dielectric_dielectric)
  • src/DIRC_geo.cpp: load bar surface, set sigma_alpha, apply as SkinSurface on bar_vol

Add an explicit G4LogicalSkinSurface on bar_vol using the UNIFIED optical
model with ground finish and sigma_alpha = 0.02 rad. This models the
micro-facet roughness of polished quartz surfaces: photons that would
otherwise undergo perfect total internal reflection at the lateral faces
are deflected by randomly-oriented micro-facets, and a fraction whose
angles exceed the critical angle refract out of the bar instead. This
physically eliminates the unphysically long photon paths (up to 690 m /
113,000 steps with perfect TIR) without any artificial hard cutoffs.

The sigma_alpha = 0.02 rad (≈ 1.1°) is the standard value for polished
quartz used in hpDIRC simulations (BaBar DIRC, Belle II iTOP).

Note: the DD4hep compact XML opticalsurface parser does not currently
support the sigma_alpha attribute for the unified model. The value is
therefore set programmatically via TGeoOpticalSurface::SetSigmaAlpha(),
which the DDG4 Geant4Converter forwards to G4OpticalSurface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 16:35
@github-actions github-actions Bot added topic: PID Particle identification topic: materials labels May 28, 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 adds a DIRC quartz bar optical surface intended to model micro-facet roughness with Geant4’s UNIFIED ground surface behavior, reducing unphysical long photon paths from idealized total internal reflection.

Changes:

  • Adds DIRC_BarOpticalSurface to the optical materials XML.
  • Looks up the new surface in DIRC_geo.cpp, sets sigma_alpha = 0.02, and attaches it to bar_vol.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/DIRC_geo.cpp Applies the new DIRC bar optical surface programmatically with SetSigmaAlpha(0.02).
compact/optical_materials.xml Defines the new UNIFIED/ground dielectric optical surface for DIRC bars.

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

Comment thread src/DIRC_geo.cpp
Comment on lines +158 to +159
SkinSurface bar_skin(desc, det, Form("dirc_bar_optical_surface"), bar_surf, bar_vol);
bar_skin.isValid();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

While correct, this is the part of the implementation I'd rather leave to the DIRC experts to undertake.

@wdconinc wdconinc changed the title dirc: add bar lateral surface with UNIFIED model micro-facet roughness DIRC: add bar lateral surface with UNIFIED model micro-facet roughness May 28, 2026
@wdconinc wdconinc requested a review from wjllope May 28, 2026 16:40
@wdconinc

Copy link
Copy Markdown
Contributor Author
  ┌─────────────────────┬───────────────┬────────────────┬───────────────┐
  │ Metric              │ Pre-roughness │ Post-roughness │ Change        │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ Avg steps/photon    │ 3,647         │ 690            │ −81% (5×)     │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ Max steps/photon    │ 113,083       │ 11,953         │ −89%          │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ DIRC step time      │ 3.55 s        │ 939 ms         │ −74%          │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ DIRC % of step time │ 57.7%         │ 22.2%          │ −35 pp        │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ Total event time    │ 7.00 s        │ 5.19 s         │ −26%          │
  ├─────────────────────┼───────────────┼────────────────┼───────────────┤
  │ Photons > 10k steps │ 14            │ 2              │ −86%          │
  └─────────────────────┴───────────────┴────────────────┴───────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: materials topic: PID Particle identification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants