|
|
|||
File indexing completed on 2026-11-18 10:26:29
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/em/interactor/GammaNuclearInteractor.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "celeritas/em/data/GammaNuclearData.hh" 0011 #include "celeritas/phys/Interaction.hh" 0012 #include "celeritas/phys/ParticleTrackView.hh" 0013 0014 namespace celeritas 0015 { 0016 //---------------------------------------------------------------------------// 0017 /*! 0018 * Handle the gamma-nuclear interaction. 0019 * 0020 * The gamma-nuclear interaction requires hadronic models for the final state 0021 * generation in Geant4 physics manual section 44.2. When the gamma-nuclear 0022 * process is selected, the status is set to onload::gamma_nuclear and the 0023 * post step action will be handled by Geant4. 0024 */ 0025 class GammaNuclearInteractor 0026 { 0027 public: 0028 // Construct from shared and state data 0029 inline CELER_FUNCTION GammaNuclearInteractor( 0030 NativeCRef<GammaNuclearData> const& shared, 0031 ParticleTrackView const& particle); 0032 0033 // Sample an interaction 0034 inline CELER_FUNCTION Interaction operator()(); 0035 }; 0036 0037 //---------------------------------------------------------------------------// 0038 // INLINE DEFINITIONS 0039 //---------------------------------------------------------------------------// 0040 /*! 0041 * Construct with shared and state data, and a target nucleus. 0042 */ 0043 CELER_FUNCTION GammaNuclearInteractor::GammaNuclearInteractor( 0044 NativeCRef<GammaNuclearData> const& shared, 0045 ParticleTrackView const& particle) 0046 { 0047 CELER_EXPECT(particle.particle_id() == shared.scalars.gamma_id); 0048 } 0049 0050 //---------------------------------------------------------------------------// 0051 /*! 0052 * Onload the gamma-nuclear interaction. 0053 */ 0054 CELER_FUNCTION Interaction GammaNuclearInteractor::operator()() 0055 { 0056 return Interaction::from_onloaded(); 0057 } 0058 0059 //---------------------------------------------------------------------------// 0060 } // namespace celeritas
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|