Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:19

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 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/em/params/detail/MscParamsHelper.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <vector>
0011 
0012 #include "corecel/Types.hh"
0013 #include "corecel/data/Collection.hh"
0014 #include "celeritas/Quantities.hh"
0015 #include "celeritas/em/data/CommonCoulombData.hh"
0016 #include "celeritas/io/ImportModel.hh"
0017 
0018 namespace celeritas
0019 {
0020 //---------------------------------------------------------------------------//
0021 class ParticleParams;
0022 struct XsGridData;
0023 
0024 namespace detail
0025 {
0026 //---------------------------------------------------------------------------//
0027 /*!
0028  * Helper class for constructing multiple scattering params.
0029  */
0030 class MscParamsHelper
0031 {
0032   public:
0033     //!@{
0034     //! \name Type aliases
0035     using Energy = units::MevEnergy;
0036     using EnergyBounds = Array<Energy, 2>;
0037     using VecImportMscModel = std::vector<ImportMscModel>;
0038     using XsValues = Collection<XsGridData, Ownership::value, MemSpace::host>;
0039     using Values = Collection<real_type, Ownership::value, MemSpace::host>;
0040     //!@}
0041 
0042     MscParamsHelper(ParticleParams const&,
0043                     VecImportMscModel const&,
0044                     ImportModelClass);
0045 
0046     void build_ids(CoulombIds* ids) const;
0047     void build_xs(XsValues*, Values*) const;
0048     EnergyBounds energy_grid_bounds() const;
0049 
0050   private:
0051     //// DATA ////
0052 
0053     ParticleParams const& particles_;
0054     ImportModelClass model_class_;
0055     Array<ParticleId, 2> par_ids_;
0056     Array<ImportPhysicsTable const*, 2> xs_tables_;
0057 };
0058 
0059 //---------------------------------------------------------------------------//
0060 }  // namespace detail
0061 }  // namespace celeritas