Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:10: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/BremsstrahlungProcess.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <functional>
0010 #include <memory>
0011 
0012 #include "celeritas/ext/GeantPhysicsOptions.hh"
0013 #include "celeritas/io/ImportSBTable.hh"
0014 #include "celeritas/mat/MaterialParams.hh"
0015 #include "celeritas/phys/Applicability.hh"
0016 #include "celeritas/phys/AtomicNumber.hh"
0017 #include "celeritas/phys/ImportedProcessAdapter.hh"
0018 #include "celeritas/phys/ParticleParams.hh"
0019 #include "celeritas/phys/Process.hh"
0020 
0021 namespace celeritas
0022 {
0023 //---------------------------------------------------------------------------//
0024 /*!
0025  * Bremsstrahlung process for electrons and positrons.
0026  */
0027 class BremsstrahlungProcess : 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<ImportSBTable(AtomicNumber)>;
0036     //!@}
0037 
0038     // Options for the Bremsstrahlung process
0039     // TODO: update options based on ImportData
0040     struct Options
0041     {
0042         //! Use a unified relativistic/SB interactor
0043         bool combined_model{false};
0044         //! Account for LPM effect at very high energies
0045         bool enable_lpm{true};
0046     };
0047 
0048   public:
0049     // Construct from Bremsstrahlung data
0050     BremsstrahlungProcess(SPConstParticles particles,
0051                           SPConstMaterials materials,
0052                           SPConstImported process_data,
0053                           ReadData load_sb_table,
0054                           Options options);
0055 
0056     // Construct the models associated with this process
0057     VecModel build_models(ActionIdIter start_id) const final;
0058 
0059     // Get the interaction cross sections for the given energy range
0060     StepLimitBuilders step_limits(Applicability range) const final;
0061 
0062     //! Whether the integral method can be used to sample interaction length
0063     bool supports_integral_xs() const final { return true; }
0064 
0065     //! Whether the process applies when the particle is stopped
0066     bool applies_at_rest() const final { return imported_.applies_at_rest(); }
0067 
0068     // Name of the process
0069     std::string_view label() const final;
0070 
0071   private:
0072     SPConstParticles particles_;
0073     SPConstMaterials materials_;
0074     ImportedProcessAdapter imported_;
0075     ReadData load_sb_;
0076     Options options_;
0077 };
0078 
0079 //---------------------------------------------------------------------------//
0080 }  // namespace celeritas