Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-05 08:17:14

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