Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:19

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/em/process/BremsstrahlungProcess.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <functional>
0011 #include <memory>
0012 
0013 #include "celeritas/ext/GeantPhysicsOptions.hh"
0014 #include "celeritas/io/ImportSBTable.hh"
0015 #include "celeritas/mat/MaterialParams.hh"
0016 #include "celeritas/phys/Applicability.hh"
0017 #include "celeritas/phys/AtomicNumber.hh"
0018 #include "celeritas/phys/ImportedProcessAdapter.hh"
0019 #include "celeritas/phys/ParticleParams.hh"
0020 #include "celeritas/phys/Process.hh"
0021 
0022 namespace celeritas
0023 {
0024 //---------------------------------------------------------------------------//
0025 /*!
0026  * Bremsstrahlung process for electrons and positrons.
0027  */
0028 class BremsstrahlungProcess : public Process
0029 {
0030   public:
0031     //!@{
0032     //! \name Type aliases
0033     using SPConstParticles = std::shared_ptr<ParticleParams const>;
0034     using SPConstMaterials = std::shared_ptr<MaterialParams const>;
0035     using SPConstImported = std::shared_ptr<ImportedProcesses const>;
0036     using ReadData = std::function<ImportSBTable(AtomicNumber)>;
0037     //!@}
0038 
0039     // Options for the Bremsstrahlung process
0040     // TODO: update options based on ImportData
0041     struct Options
0042     {
0043         BremsModelSelection selection{BremsModelSelection::all};  //!> Model
0044                                                                   //! selection
0045         bool combined_model{true};  //!> Use a unified relativistic/SB
0046                                     //! interactor
0047         bool enable_lpm{true};  //!> Account for LPM effect at very high
0048                                 //! energies
0049         bool use_integral_xs{true};  //!> Use integral method for sampling
0050                                      //! discrete interaction length
0051     };
0052 
0053   public:
0054     // Construct from Bremsstrahlung data
0055     BremsstrahlungProcess(SPConstParticles particles,
0056                           SPConstMaterials materials,
0057                           SPConstImported process_data,
0058                           ReadData load_sb_table,
0059                           Options options);
0060 
0061     // Construct the models associated with this process
0062     VecModel build_models(ActionIdIter start_id) const final;
0063 
0064     // Get the interaction cross sections for the given energy range
0065     StepLimitBuilders step_limits(Applicability range) const final;
0066 
0067     //! Whether to use the integral method to sample interaction length
0068     bool use_integral_xs() const final { return options_.use_integral_xs; }
0069 
0070     // Name of the process
0071     std::string_view label() const final;
0072 
0073   private:
0074     SPConstParticles particles_;
0075     SPConstMaterials materials_;
0076     ImportedProcessAdapter imported_;
0077     ReadData load_sb_;
0078     Options options_;
0079 };
0080 
0081 //---------------------------------------------------------------------------//
0082 }  // namespace celeritas