Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:09:01

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     StepLimitBuilders step_limits(Applicability range) const final;
0050 
0051     //! Whether the integral method can be used to sample interaction length
0052     bool supports_integral_xs() const final { return false; }
0053 
0054     //! Whether the process applies when the particle is stopped
0055     bool applies_at_rest() const final { return imported_.applies_at_rest(); }
0056 
0057     // Name of the process
0058     std::string_view label() const final;
0059 
0060   private:
0061     SPConstParticles particles_;
0062     SPConstMaterials materials_;
0063     ImportedProcessAdapter imported_;
0064     ReadData load_pe_;
0065 };
0066 
0067 //---------------------------------------------------------------------------//
0068 }  // namespace celeritas