Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-03 10:40:17

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