|
|
|||
Warning, file /include/celeritas/optical/Types.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 //------------------------------- -*- C++ -*- -------------------------------// 0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details 0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0004 //---------------------------------------------------------------------------// 0005 //! \file celeritas/optical/Types.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "celeritas/Types.hh" 0011 0012 namespace celeritas 0013 { 0014 //---------------------------------------------------------------------------// 0015 // TYPE ALIASES 0016 //---------------------------------------------------------------------------// 0017 namespace optical 0018 { 0019 0020 //! Opaque index of sub-surface interface 0021 using LocalSurfaceId = OpaqueId<struct LocalSurface_, unsigned short int>; 0022 0023 //! Opaque index of sub-surface material region 0024 using LocalPositionId = OpaqueId<struct LocalMat_, unsigned short int>; 0025 0026 } // namespace optical 0027 0028 using ScintComponentId = OpaqueId<struct ScintDistributionRecord>; 0029 0030 using ScintSpectrumId = OpaqueId<struct ScintSpectrumRecord>; 0031 0032 //---------------------------------------------------------------------------// 0033 // ENUMERATIONS 0034 //---------------------------------------------------------------------------// 0035 0036 //! Process used to generate optical photons 0037 enum class GeneratorType 0038 { 0039 cherenkov, 0040 scintillation, 0041 wls, 0042 wls2, 0043 size_ 0044 }; 0045 0046 namespace optical 0047 { 0048 0049 //! Ordering of surface physics boundary crossing models 0050 enum class SurfacePhysicsOrder 0051 { 0052 roughness, //!< Sample a facet normal 0053 reflectivity, //!< Select physics override 0054 interaction, //!< Apply reflection and refraction 0055 size_ 0056 }; 0057 0058 //! Traversal direction of a sub-subsurface 0059 enum class LocalDirection : bool 0060 { 0061 reverse = false, 0062 forward = true 0063 }; 0064 0065 //! Possible reflection moes for UNIFIED reflection model. 0066 enum class ReflectionMode 0067 { 0068 specular_spike, 0069 specular_lobe, 0070 backscatter, 0071 diffuse_lobe, 0072 size_ = diffuse_lobe, 0073 }; 0074 0075 //! Trivial interaction modes 0076 enum class TrivialInteractionMode 0077 { 0078 absorb, //!< absorb on surface 0079 transmit, //!< transmit with no change 0080 backscatter, //!< back scatter 0081 }; 0082 0083 //! Results of a reflectivity substep 0084 enum class ReflectivityAction 0085 { 0086 transmit, //!< transmit with no change 0087 interact, //!< continue to sample surface interaction 0088 absorb, //!< absorb on surface 0089 size_ = absorb, 0090 }; 0091 0092 //! Optical photon wavelength shifting time model 0093 //! \todo replace with OnedDistributionType 0094 enum class WlsDistribution 0095 { 0096 delta, //!< Delta function 0097 exponential, //!< Exponential decay 0098 size_ 0099 }; 0100 0101 //---------------------------------------------------------------------------// 0102 // FREE FUNCTIONS 0103 //---------------------------------------------------------------------------// 0104 0105 char const* to_cstring(GeneratorType); 0106 char const* to_cstring(SurfacePhysicsOrder); 0107 char const* to_cstring(ReflectionMode); 0108 char const* to_cstring(WlsDistribution); 0109 0110 //! Convert sub-surface direction to a sign (+1/-1 for forward/reverse resp.) 0111 CELER_CONSTEXPR_FUNCTION int to_signed_offset(LocalDirection d) 0112 { 0113 return 2 * static_cast<int>(d) - 1; 0114 } 0115 0116 //---------------------------------------------------------------------------// 0117 } // namespace optical 0118 } // namespace celeritas
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|