Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2023-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/model/CoulombScatteringModel.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <memory>
0011 
0012 #include "celeritas/Quantities.hh"
0013 #include "celeritas/em/data/CoulombScatteringData.hh"
0014 #include "celeritas/phys/ImportedModelAdapter.hh"
0015 #include "celeritas/phys/Model.hh"
0016 
0017 namespace celeritas
0018 {
0019 class MaterialParams;
0020 class ParticleParams;
0021 class IsotopeView;
0022 
0023 //---------------------------------------------------------------------------//
0024 /*!
0025  * Set up and launch the Wentzel Coulomb scattering model interaction.
0026  */
0027 class CoulombScatteringModel final : public Model, public StaticConcreteAction
0028 {
0029   public:
0030     //!@{
0031     //! \name Type aliases
0032     using SPConstImported = std::shared_ptr<ImportedProcesses const>;
0033     //!@}
0034 
0035   public:
0036     // Construct from model ID and other necessary data
0037     CoulombScatteringModel(ActionId id,
0038                            ParticleParams const& particles,
0039                            MaterialParams const& materials,
0040                            SPConstImported data);
0041 
0042     // Particle types and energy ranges that this model applies to
0043     SetApplicability applicability() const final;
0044 
0045     // Get the microscopic cross sections for the given particle and material
0046     MicroXsBuilders micro_xs(Applicability) const final;
0047 
0048     // Apply the interaction kernel on host
0049     void step(CoreParams const&, CoreStateHost&) const final;
0050 
0051     // Apply the interaction kernel on device
0052     void step(CoreParams const&, CoreStateDevice&) const final;
0053 
0054     //!@{
0055     //! Access model data
0056     CoulombScatteringData const& host_ref() const { return data_; }
0057     CoulombScatteringData const& device_ref() const { return data_; }
0058     //!@}
0059 
0060   private:
0061     CoulombScatteringData data_;
0062     ImportedModelAdapter imported_;
0063     ImportedModelAdapter::EnergyBounds energy_limit_;
0064 };
0065 
0066 //---------------------------------------------------------------------------//
0067 }  //  namespace celeritas