Back to home page

EIC code displayed by LXR

 
 

    


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/Import.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <string>
0010 #include <vector>
0011 
0012 #include "celeritas/ext/GeantImporter.hh"
0013 
0014 #include "System.hh"
0015 
0016 namespace celeritas
0017 {
0018 namespace inp
0019 {
0020 //---------------------------------------------------------------------------//
0021 struct Problem;
0022 struct System;
0023 
0024 //---------------------------------------------------------------------------//
0025 /*!
0026  * Options for loading problem data from a ROOT/JSON file.
0027  *
0028  * This should be a serialized version of a \c celeritas::inp::Problem .
0029  */
0030 struct FileImport
0031 {
0032     //! Path to the problem input file
0033     std::string input;
0034 };
0035 
0036 //---------------------------------------------------------------------------//
0037 /*!
0038  * Options for importing data from in-memory Geant4.
0039  *
0040  * \todo Update \c GeantImportDataSelection to control what Celeritas
0041  * processes/particles are offloaded.
0042  */
0043 struct GeantImport
0044 {
0045     //! Do not use Celeritas physics for the given Geant4 process names
0046     std::vector<std::string> ignore_processes;
0047 
0048     //! Only import a subset of available Geant4 data
0049     GeantImportDataSelection data_selection;
0050 };
0051 
0052 //---------------------------------------------------------------------------//
0053 /*!
0054  * Options for loading cross section data from Geant4 data files.
0055  *
0056  * \todo This is not yet used, but it will call LivermorePEReader,
0057  * SeltzerBergerReader, AtomicRelaxationReader to fill cross section data.
0058  * Since Geant4 data structures don't provide access to these, we must read
0059  * them ourselves.
0060  *
0061  * Defaults:
0062  * - \c livermore_dir: uses the \c G4LEDATA environment variable
0063  * - \c particle_dir: uses the \c G4PARTICLEXS environment variable
0064  */
0065 struct GeantDataImport
0066 {
0067     //! Livermore photoelectric data directory (optional)
0068     std::string livermore_dir;
0069     //! Particle cross section data directory (optional)
0070     std::string particle_dir;
0071 };
0072 
0073 //---------------------------------------------------------------------------//
0074 /*!
0075  * Update control and diagnostic options from an external input file.
0076  *
0077  * This is used in concert with \c FileImport : the output from another code
0078  * can be used as input, but overlaid with diagnostic and control/tuning
0079  * information.
0080  */
0081 struct UpdateImport
0082 {
0083     //! Replace existing diagnostics
0084     bool diagnostics{true};
0085     //! Replace existing control parameters
0086     bool control{true};
0087 
0088     //! Path to the file
0089     std::string input;
0090 };
0091 
0092 //---------------------------------------------------------------------------//
0093 }  // namespace inp
0094 }  // namespace celeritas