![]() |
|
|||
File indexing completed on 2025-09-15 08:54:44
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/inp/StandaloneInput.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include <optional> 0010 0011 #include "celeritas/ext/GeantPhysicsOptions.hh" 0012 0013 #include "Events.hh" 0014 #include "Import.hh" 0015 #include "Problem.hh" 0016 0017 namespace celeritas 0018 { 0019 namespace inp 0020 { 0021 //---------------------------------------------------------------------------// 0022 /*! 0023 * Set up a Geant4 run manager and problem. 0024 * 0025 * \note We should change celer-g4 so it just uses \c GeantSetup as an outer 0026 * wrapper, rather than trying to be a Geant4 example. 0027 * 0028 * \note Most of the "physics options" will be deleted. Only a few options 0029 * specific to Geant4, such as \c gamma_general , will be left. 0030 */ 0031 using GeantSetup = GeantPhysicsOptions; 0032 0033 //---------------------------------------------------------------------------// 0034 /*! 0035 * Celeritas setup for standalone apps. 0036 * 0037 * The order of initialization and loading follows the member declarations: 0038 * - System attributes (GPU activation etc.) are set first 0039 * - Problem info is loaded 0040 * - Geant4 is initialized (if not using full ROOT data) 0041 * - Geant4 data is loaded (also if not using full ROOT) 0042 * - External Geant4 data files (such as EM LOW) are loaded 0043 * - Optional control/diagnostic overrides are loaded 0044 * - Events are loaded 0045 * 0046 * The input \c Problem can be an embedded struct or a path to a file to 0047 * import. 0048 * 0049 * \todo physics_import will be a `std::optional<GeantImport>` after all the 0050 * \c ImportData is merged into \c Problem . 0051 */ 0052 struct StandaloneInput 0053 { 0054 //! System attributes 0055 System system; 0056 //! Base problem options and input data 0057 std::variant<FileImport, Problem> problem; 0058 //! Set up Geant4 (if all the data isn't serialized) 0059 std::optional<GeantSetup> geant_setup; 0060 0061 //! Whether using Geant4 or loading from ROOT 0062 std::variant<GeantImport, FileImport> physics_import; 0063 //! If using Geant4 or overriding or sparse input (NOT YET IMPLEMENTED) 0064 std::optional<GeantDataImport> geant_data; 0065 //! If loading from an existing input, option to update data 0066 std::optional<UpdateImport> update; 0067 0068 //! Primary particles 0069 Events events; 0070 }; 0071 0072 //---------------------------------------------------------------------------// 0073 } // namespace inp 0074 } // 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 |
![]() ![]() |