Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:11:36

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/mucf/model/DTMixMucfModel.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "celeritas/mucf/data/DTMixMucfData.hh"
0010 #include "celeritas/phys/Model.hh"
0011 
0012 namespace celeritas
0013 {
0014 class MaterialParams;
0015 class ParticleParams;
0016 
0017 //---------------------------------------------------------------------------//
0018 /*!
0019  * Muon-catalyzed fusion model for dd, dt, and tt molecules.
0020  *
0021  * In this model the executor performs the full muon-catalyzed fusion workflow.
0022  * It forms a muonic d or t atom, samples which muonic molecule will be
0023  * produced, selects the channel, and calls the appropriate interactor.
0024  *
0025  * The full set of "actions" is as follows, and in this ordering:
0026  * - Define muon decay time to compete with the rest of the execution
0027  * - Form muonic atom and select its spin
0028  * - May execute atom spin flip or atom transfer
0029  * - Form muonic molecule and select its spin
0030  * - Calculate mean cycle time (time it takes from atom formation to fusion)
0031  * - Confirm if fusion happens or the if the muon should decay
0032  * - Call appropriate Interactor: Muon decay, or one of the muCF interactors
0033  *
0034  * \note This is an at-rest model.
0035  */
0036 class DTMixMucfModel final : public Model, public StaticConcreteAction
0037 {
0038   public:
0039     //!@{
0040     //! \name Type aliases
0041     using HostRef = HostCRef<DTMixMucfData>;
0042     using DeviceRef = DeviceCRef<DTMixMucfData>;
0043     //!@}
0044 
0045     // Construct from model ID and other necessary data
0046     DTMixMucfModel(ActionId id,
0047                    ParticleParams const& particles,
0048                    MaterialParams const& materials);
0049 
0050     // Particle types and energy ranges that this model applies to
0051     SetApplicability applicability() const final;
0052 
0053     // Get the microscopic cross sections for the given particle and material
0054     XsTable micro_xs(Applicability) const final;
0055 
0056     // Apply the interaction kernel on host
0057     void step(CoreParams const&, CoreStateHost&) const final;
0058 
0059     // Apply the interaction kernel on device
0060     void step(CoreParams const&, CoreStateDevice&) const final;
0061 
0062     //!@{
0063     //! Access model data
0064     HostRef const& host_ref() const { return data_.host_ref(); }
0065     DeviceRef const& device_ref() const { return data_.device_ref(); }
0066     //!@}
0067 
0068   private:
0069     // Host/device storage and reference
0070     ParamsDataStore<DTMixMucfData> data_;
0071 };
0072 
0073 //---------------------------------------------------------------------------//
0074 }  // namespace celeritas