Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-08 10:08:53

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/process/CoulombScatteringProcess.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <memory>
0010 
0011 #include "celeritas/em/data/CoulombScatteringData.hh"
0012 #include "celeritas/em/model/CoulombScatteringModel.hh"
0013 #include "celeritas/io/ImportParameters.hh"
0014 #include "celeritas/mat/MaterialParams.hh"
0015 #include "celeritas/phys/Applicability.hh"
0016 #include "celeritas/phys/ImportedProcessAdapter.hh"
0017 #include "celeritas/phys/Process.hh"
0018 
0019 namespace celeritas
0020 {
0021 //---------------------------------------------------------------------------//
0022 /*!
0023  * Coulomb scattering process for electrons off of atoms.
0024  */
0025 class CoulombScatteringProcess : public Process
0026 {
0027   public:
0028     //!@{
0029     //! \name Type aliases
0030     using SPConstParticles = std::shared_ptr<ParticleParams const>;
0031     using SPConstMaterials = std::shared_ptr<MaterialParams const>;
0032     using SPConstImported = std::shared_ptr<ImportedProcesses const>;
0033     //!@}
0034 
0035   public:
0036     // Construct from Coulomb scattering data
0037     CoulombScatteringProcess(SPConstParticles particles,
0038                              SPConstMaterials materials,
0039                              SPConstImported process_data);
0040 
0041     // Construct the models associated with this process
0042     VecModel build_models(ActionIdIter start_id) const final;
0043 
0044     // Get the interaction cross sections for the given energy range
0045     XsGrid macro_xs(Applicability range) const final;
0046 
0047     // Get the energy loss for the given energy range
0048     EnergyLossGrid energy_loss(Applicability range) const final;
0049 
0050     //! Whether the integral method can be used to sample interaction length
0051     bool supports_integral_xs() const final { return true; }
0052 
0053     //! Whether the process applies when the particle is stopped
0054     bool applies_at_rest() const final { return imported_.applies_at_rest(); }
0055 
0056     // Name of the process
0057     std::string_view label() const final;
0058 
0059   private:
0060     SPConstParticles particles_;
0061     SPConstMaterials materials_;
0062     ImportedProcessAdapter imported_;
0063 };
0064 
0065 //---------------------------------------------------------------------------//
0066 }  // namespace celeritas