Back to home page

EIC code displayed by LXR

 
 

    


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

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