Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:26

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/neutron/process/NeutronElasticProcess.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <functional>
0011 #include <memory>
0012 
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 struct ImportPhysicsVector;
0022 
0023 //---------------------------------------------------------------------------//
0024 /*!
0025  * Elastic scattering process for neutrons.
0026  */
0027 class NeutronElasticProcess : public Process
0028 {
0029   public:
0030     //!@{
0031     //! \name Type aliases
0032     using SPConstParticles = std::shared_ptr<ParticleParams const>;
0033     using SPConstMaterials = std::shared_ptr<MaterialParams const>;
0034     using ReadData = std::function<ImportPhysicsVector(AtomicNumber)>;
0035     //!@}
0036 
0037   public:
0038     // Construct from particle, material, and external cross section data
0039     NeutronElasticProcess(SPConstParticles particles,
0040                           SPConstMaterials materials,
0041                           ReadData load_data);
0042 
0043     // Construct the models associated with this process
0044     VecModel build_models(ActionIdIter start_id) const final;
0045 
0046     // Get the interaction cross sections for the given energy range
0047     StepLimitBuilders step_limits(Applicability range) const final;
0048 
0049     //! Whether to use the integral method to sample interaction length
0050     bool use_integral_xs() const final { return false; }
0051 
0052     // Name of the process
0053     std::string_view label() const final;
0054 
0055   private:
0056     SPConstParticles particles_;
0057     SPConstMaterials materials_;
0058     ReadData load_data_;
0059     ParticleId neutron_id_;
0060 };
0061 
0062 //---------------------------------------------------------------------------//
0063 }  // namespace celeritas