Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-08 10:11:15

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/GeantScintillationLoader.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <optional>
0010 #include <string>
0011 
0012 #include "corecel/inp/Distributions.hh"
0013 #include "celeritas/inp/OpticalPhysics.hh"
0014 
0015 namespace celeritas
0016 {
0017 namespace detail
0018 {
0019 class GeantMaterialPropertyGetter;
0020 class GeantOpticalMatHelper;
0021 //---------------------------------------------------------------------------//
0022 /*!
0023  * Populate \c inp::ScintillationProcess data for one optical material.
0024  *
0025  * Construct with a reference to the process data to be filled. Call
0026  * \c operator() for each optical material.
0027  */
0028 class GeantScintillationLoader
0029 {
0030   public:
0031     //! Construct with scintillation process to populate
0032     explicit GeantScintillationLoader(inp::ScintillationProcess& process);
0033 
0034     //! Load scintillation data for one optical material
0035     void operator()(GeantOpticalMatHelper const& helper);
0036 
0037   private:
0038     inp::ScintillationProcess& process_;
0039 
0040     //// HELPER FUNCTIONS ////
0041 
0042     // Load scintillation data for one optical material (implementation)
0043     void load_one(GeantOpticalMatHelper const& helper);
0044 
0045     static std::optional<inp::NormalDistribution> load_gaussian(
0046         GeantMaterialPropertyGetter const& get,
0047         std::string const& prefix,
0048         std::string const& suffix);
0049 
0050     static std::optional<inp::ScintillationSpectrum> load_spectrum(
0051         GeantMaterialPropertyGetter const& get,
0052         std::string const& prefix,
0053         std::string const& suffix);
0054 };
0055 
0056 //---------------------------------------------------------------------------//
0057 }  // namespace detail
0058 }  // namespace celeritas