Back to home page

EIC code displayed by LXR

 
 

    


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

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/model/EPlusGGModel.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "celeritas/em/data/EPlusGGData.hh"
0011 #include "celeritas/em/executor/EPlusGGExecutor.hh"  // IWYU pragma: associated
0012 #include "celeritas/phys/InteractionApplier.hh"  // IWYU pragma: associated
0013 #include "celeritas/phys/Model.hh"
0014 #include "celeritas/phys/ParticleParams.hh"
0015 
0016 namespace celeritas
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Set up and launch two-gamma positron annihiliation.
0021  */
0022 class EPlusGGModel final : public Model, public StaticConcreteAction
0023 {
0024   public:
0025     // Construct from model ID and other necessary data
0026     EPlusGGModel(ActionId id, ParticleParams const& particles);
0027 
0028     // Particle types and energy ranges that this model applies to
0029     SetApplicability applicability() const final;
0030 
0031     // Get the microscopic cross sections for the given particle and material
0032     MicroXsBuilders micro_xs(Applicability) const final;
0033 
0034     // Apply the interaction kernel on host
0035     void step(CoreParams const&, CoreStateHost&) const final;
0036 
0037     // Apply the interaction kernel on device
0038     void step(CoreParams const&, CoreStateDevice&) const final;
0039 
0040     //!@{
0041     //! Access model data
0042     EPlusGGData const& host_ref() const { return data_; }
0043     EPlusGGData const& device_ref() const { return data_; }
0044     //!@}
0045 
0046   private:
0047     EPlusGGData data_;
0048 };
0049 
0050 //---------------------------------------------------------------------------//
0051 }  // namespace celeritas