DIRC: add bar lateral surface with UNIFIED model micro-facet roughness#1113
Open
wdconinc wants to merge 1 commit into
Open
DIRC: add bar lateral surface with UNIFIED model micro-facet roughness#1113wdconinc wants to merge 1 commit into
wdconinc wants to merge 1 commit into
Conversation
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>
Contributor
There was a problem hiding this comment.
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_BarOpticalSurfaceto the optical materials XML. - Looks up the new surface in
DIRC_geo.cpp, setssigma_alpha = 0.02, and attaches it tobar_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 on lines
+158
to
+159
| SkinSurface bar_skin(desc, det, Form("dirc_bar_optical_surface"), bar_surf, bar_vol); | ||
| bar_skin.isValid(); |
Contributor
Author
There was a problem hiding this comment.
While correct, this is the part of the implementation I'd rather leave to the DIRC experts to undertake.
Contributor
Author
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an explicit
G4LogicalSkinSurfaceonbar_vol(the quartz bars) using the UNIFIED optical model withgroundfinish andsigma_alpha = 0.02 rad.Physics motivation
Currently the bar lateral faces have no explicit optical surface, defaulting to perfect
glisur/polishedtotal 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
groundfinish andsigma_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 thesigma_alphaattribute for the UNIFIED model (onlyvalue→polishfor glisur is parsed inCompact2Objects.cpp). The value is therefore set programmatically viaTGeoOpticalSurface::SetSigmaAlpha(), whichDDG4::Geant4Converter::handleOpticalSurface()correctly forwards toG4OpticalSurface::SetSigmaAlpha().Files changed
compact/optical_materials.xml: addDIRC_BarOpticalSurfacedefinition (unified/ground/dielectric_dielectric)src/DIRC_geo.cpp: load bar surface, set sigma_alpha, apply as SkinSurface on bar_vol