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/EPlusAnnihilationProcess.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <memory>
0011 
0012 #include "celeritas/Types.hh"
0013 #include "celeritas/phys/ParticleParams.hh"
0014 #include "celeritas/phys/Process.hh"
0015 
0016 namespace celeritas
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Annihiliation process for positrons.
0021  */
0022 class EPlusAnnihilationProcess final : public Process
0023 {
0024   public:
0025     //!@{
0026     //! \name Type aliases
0027     using SPConstParticles = std::shared_ptr<ParticleParams const>;
0028     //!@}
0029 
0030     // Options for electron-positron annihilation
0031     struct Options
0032     {
0033         bool use_integral_xs{true};  //!> Use integral method for sampling
0034                                      //! discrete interaction length
0035     };
0036 
0037   public:
0038     // Construct from particle data
0039     explicit EPlusAnnihilationProcess(SPConstParticles particles,
0040                                       Options options);
0041 
0042     // Construct the models associated with this process
0043     VecModel build_models(ActionIdIter start_id) const final;
0044 
0045     // Get the interaction cross sections for the given energy range
0046     StepLimitBuilders step_limits(Applicability range) const final;
0047 
0048     //! Whether to use the integral method to sample interaction length
0049     bool use_integral_xs() const final { return options_.use_integral_xs; }
0050 
0051     // Name of the process
0052     std::string_view label() const final;
0053 
0054   private:
0055     SPConstParticles particles_;
0056     ParticleId positron_id_;
0057     Options options_;
0058 };
0059 
0060 //---------------------------------------------------------------------------//
0061 }  // namespace celeritas