|
|
|||
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/ElectroNuclearInteractor.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "celeritas/em/data/ElectroNuclearData.hh" 0011 #include "celeritas/phys/Interaction.hh" 0012 #include "celeritas/phys/ParticleTrackView.hh" 0013 0014 namespace celeritas 0015 { 0016 //---------------------------------------------------------------------------// 0017 /*! 0018 * Handle the electro-nuclear interaction using G4ElectroVDNuclearModel. 0019 * 0020 * The electro-nuclear interaction requires hadronic models for the final 0021 * state generation, as described in section 45.2 of the Geant4 physics manual. 0022 * When the electro-nuclear process is selected, the electromagnetic vertex 0023 * of the electro-nucleus reaction is computed and the virtual photon is 0024 * generated. The status is set to onload::electro_nuclear and the post step 0025 * action of the converted real photon will be handled by Geant4, while the 0026 * primary electron or position continues to be tracked. 0027 */ 0028 class ElectroNuclearInteractor 0029 { 0030 public: 0031 // Construct from shared and state data 0032 inline CELER_FUNCTION ElectroNuclearInteractor( 0033 NativeCRef<ElectroNuclearData> const& shared, 0034 ParticleTrackView const& particle); 0035 0036 // Sample an interaction 0037 inline CELER_FUNCTION Interaction operator()(); 0038 }; 0039 0040 //---------------------------------------------------------------------------// 0041 // INLINE DEFINITIONS 0042 //---------------------------------------------------------------------------// 0043 /*! 0044 * Construct with shared and state data, and a target nucleus. 0045 */ 0046 CELER_FUNCTION ElectroNuclearInteractor::ElectroNuclearInteractor( 0047 NativeCRef<ElectroNuclearData> const& shared, 0048 ParticleTrackView const& particle) 0049 { 0050 CELER_EXPECT(particle.particle_id() == shared.scalars.electron_id 0051 || particle.particle_id() == shared.scalars.positron_id); 0052 } 0053 0054 //---------------------------------------------------------------------------// 0055 /*! 0056 * Onload the electro-nuclear interaction. 0057 */ 0058 CELER_FUNCTION Interaction ElectroNuclearInteractor::operator()() 0059 { 0060 return Interaction::from_onloaded(); 0061 } 0062 0063 //---------------------------------------------------------------------------// 0064 } // 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 |
|