Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:11:41

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/neutron/process/NeutronElasticProcess.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <functional>
0010 #include <memory>
0011 
0012 #include "celeritas/inp/Grid.hh"
0013 #include "celeritas/mat/MaterialParams.hh"
0014 #include "celeritas/phys/Applicability.hh"
0015 #include "celeritas/phys/AtomicNumber.hh"
0016 #include "celeritas/phys/ParticleParams.hh"
0017 #include "celeritas/phys/Process.hh"
0018 
0019 namespace celeritas
0020 {
0021 //---------------------------------------------------------------------------//
0022 /*!
0023  * Elastic scattering process for neutrons.
0024  */
0025 class NeutronElasticProcess : 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 ReadData = std::function<inp::Grid(AtomicNumber)>;
0033     //!@}
0034 
0035   public:
0036     // Construct from particle, material, and external cross section data
0037     NeutronElasticProcess(SPConstParticles particles,
0038                           SPConstMaterials materials,
0039                           ReadData load_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     StepLimitBuilders step_limits(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     ReadData load_data_;
0060     ParticleId neutron_id_;
0061 };
0062 
0063 //---------------------------------------------------------------------------//
0064 }  // namespace celeritas