Celeritas 0.7.0-dev.356+develop.6a0c715
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::GeoOpticalIdMap Class Reference

Construct optical material IDs and map from a geometry material ID. More...

#include <GeoOpticalIdMap.hh>

Public Member Functions

 GeoOpticalIdMap ()=default
 Construct without optical materials.
 
 GeoOpticalIdMap (G4MaterialTable const &)
 Construct from underlying Geant4 objects.
 
OptMatId operator[] (GeoMatId) const
 Return the optical ID corresponding to a geo ID.
 
bool empty () const
 True if no optical materials are present.
 
GeoMatId::size_type num_geo () const
 Number of geometry materials.
 
OptMatId::size_type num_optical () const
 Number of optical materials.
 

Detailed Description

Construct optical material IDs and map from a geometry material ID.

This construct a material -> optical material mapping based on whether the RINDEX table is present on a Geant4 material.

As a reminder, geometry materials correspond to G4Material and physics materials correspond to G4MaterialCutsCouple .

Todo:
Use GeantGeoParams (or an upcoming GeantModel) to translate geometry IDs: the G4Material's "index" can be offset from the GeantGeoParams material if the geometry has been reloaded.

Member Function Documentation

◆ operator[]()

OptMatId celeritas::GeoOpticalIdMap::operator[] ( GeoMatId  m) const
inline

Return the optical ID corresponding to a geo ID.

The result may be a "null" ID if there's no associated optical physics.


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