Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:09:00

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