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