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