![]() |
|
|||
File indexing completed on 2025-02-22 10:31:24
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file celeritas/io/ImportPhysicsTable.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <vector> 0011 0012 #include "ImportPhysicsVector.hh" 0013 #include "ImportUnits.hh" 0014 0015 namespace celeritas 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Property being described by the physics table. 0020 * 0021 * These are named based on accessors in G4VEnergyLossProcess, with one 0022 * new table type, \c dedx_process, introduced to disambiguate the tables. In 0023 * Geant4, the \c dedx table belonging to the ionization process is actually 0024 * the sum of the de/dx for all processes that contribute to energy loss for 0025 * the given particle, while the \c dedx tables for the remaining processes are 0026 * the per-process energy loss. Here the tables are named to distinguish the 0027 * summed energy loss (\c dedx) from the energy loss for an individual process 0028 * (\c dedx_process). The \c ionization table is really just the \c 0029 * dedx_process table for ionization, so it is redundant. The \c range table is 0030 * calculated from the summed \c dedx table. 0031 */ 0032 enum class ImportTableType 0033 { 0034 lambda, //!< Macroscopic cross section 0035 lambda_prim, //!< Cross section scaled by energy 0036 dedx, //!< Energy loss summed over processes 0037 range, //!< Integrated inverse energy loss 0038 msc_xs, //!< Scaled transport cross section 0039 size_ 0040 }; 0041 0042 //---------------------------------------------------------------------------// 0043 /*! 0044 * Imported physics table. Each table stores physics vectors for all materials. 0045 */ 0046 struct ImportPhysicsTable 0047 { 0048 ImportTableType table_type{ImportTableType::size_}; 0049 ImportUnits x_units{ImportUnits::unitless}; 0050 ImportUnits y_units{ImportUnits::unitless}; 0051 std::vector<ImportPhysicsVector> physics_vectors; 0052 0053 explicit operator bool() const 0054 { 0055 return table_type != ImportTableType::size_ && !physics_vectors.empty(); 0056 } 0057 }; 0058 0059 //---------------------------------------------------------------------------// 0060 // FREE FUNCTIONS 0061 //---------------------------------------------------------------------------// 0062 0063 // Get the string value for a table type 0064 char const* to_cstring(ImportTableType value); 0065 0066 //---------------------------------------------------------------------------// 0067 } // 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 |
![]() ![]() |