Celeritas 0.7+d312559
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::optical::SurfacePhysicsView Class Reference

Access physics data for a local surface based on traversal orientation. More...

#include <SurfacePhysicsView.hh>

Public Types

Type aliases
using SurfaceParamsRef = NativeCRef< SurfacePhysicsParamsData >
 

Public Member Functions

 SurfacePhysicsView (SurfaceParamsRef const &, SurfaceId, LocalDirection)
 Construct from data, states, and a given track ID.
 
SurfaceId surface () const
 Get geometric surface ID the track is currently on.
 
LocalDirection orientation () const
 Get traversal orientation on the current surface.
 
OptMatId interstitial_material (LocalPositionId) const
 Return the interstitial material ID at the given track position.
 
PhysSurfaceId interface (LocalPositionId, LocalDirection) const
 Return the next physics surface at the given position along the direction.
 

Detailed Description

Access physics data for a local surface based on traversal orientation.

"Local" surfaces, which are boundaries between layers on a geometric surface, are ordered in storage between two volumes based on user input. These layers can be traversed based on the orientation, whether the track entered the surface crossing in forward order (e.g., out of the volume defining a boundary surface) or reverse (e.g., into that volume).

The surface physics record only stores the behavior on the surfaces and interstitial materials. Because one geometric surface can be surrounded by different pairs of pre/post materials (due to the physical volume adjacency), it cannot store the pre- and post-crossing materials. Those are managed by the SurfacePhysicsTrackView which has extra state.

A single geometric surface with N interstitial layers will have \( N + 2 \) "local materials" and \( N + 1 \) "local surfaces". Most geometric surfaces have no interstial layers, just a pre- and post- volume material with a single surface, and therefore have two local material regions surrounding a single local surface.

During crossing LocalSurfaceId{0} separates the pre-volume material (LocalPositionId{0} ) and the next. Physics surface IDs are contiguous by construction in the surface physics loader and optical physics input.

Example traversal

This surface record has two interstitial materials, implying three surfaces and a total of four materials during the crossing. The IDs and corresponding physics data, when traversing in the forward direction, are:

local surface ID        :       LS0   LS1    LS2
local material ID       :  LM0   | LM1 | LM2  |  LM3
interstitial materials  : (pre)  | IM0 | IM1  | (post)
optical materials       :  ----  | A   | B    | ----
physics surfaces        :        | X   | X+1  |

Only the two interstitial materials' optical material IDs can be accessed by the view. The orientation of the local surfaces and interstitial materials align with the SurfacePhysicsRecord storage only in the forward orientation. When traversing in reverse orientation, the data layout stays the same but the IDs are still relative to the pre/post volumes:

local surface ID        :       LS2   LS1    LS0
local material ID       :  LM3   | LM2 | LM1  |  LM0
interstitial materials  : (post) | IM1 | IM0  | (pre)
optical materials       :  ----  | A   | B    | ----
physics surfaces        :        | X   | X+1  |

Member Function Documentation

◆ interstitial_material()

OptMatId celeritas::optical::SurfacePhysicsView::interstitial_material ( LocalPositionId  pos) const
inline

Return the interstitial material ID at the given track position.

Position should be in the range [1,N] where N is the number of subsurface materials.


The documentation for this class was generated from the following file: