![]() |
|
|||
File indexing completed on 2025-09-18 09:09:02
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/ext/detail/GeantOpticalModelImporter.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include <optional> 0010 #include <string> 0011 #include <vector> 0012 0013 #include "corecel/OpaqueId.hh" 0014 #include "celeritas/Types.hh" 0015 #include "celeritas/io/ImportOpticalModel.hh" 0016 0017 #include "GeoOpticalIdMap.hh" 0018 0019 class G4VProcess; 0020 class G4MaterialPropertiesTable; 0021 0022 namespace celeritas 0023 { 0024 namespace detail 0025 { 0026 //---------------------------------------------------------------------------// 0027 /*! 0028 * Imports optical model MFP tables from Geant4 material property tables. 0029 */ 0030 class GeantOpticalModelImporter 0031 { 0032 public: 0033 //!@{ 0034 //! \name Type aliases 0035 using IMC = optical::ImportModelClass; 0036 //!@} 0037 0038 public: 0039 // Construct model importer with given optical material mapping 0040 GeantOpticalModelImporter(GeoOpticalIdMap const& geo_to_opt); 0041 0042 // Import model MFP table for given model class 0043 ImportOpticalModel operator()(IMC imc) const; 0044 0045 //! True if any optical materials are present 0046 explicit operator bool() const { return !opt_to_mat_.empty(); } 0047 0048 private: 0049 std::vector<G4MaterialPropertiesTable const*> opt_to_mat_; 0050 0051 // Import MFP table for the given property name 0052 std::vector<inp::Grid> 0053 import_mfps(std::string const& mfp_property_name) const; 0054 }; 0055 0056 //---------------------------------------------------------------------------// 0057 } // namespace detail 0058 } // 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 |
![]() ![]() |