Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-19 10:36:43

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