![]() |
|
|||
File indexing completed on 2025-09-16 08:52:16
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/data/KleinNishinaData.hh 0006 //---------------------------------------------------------------------------// 0007 #pragma once 0008 0009 #include "corecel/Macros.hh" 0010 #include "corecel/Types.hh" 0011 #include "celeritas/Quantities.hh" 0012 #include "celeritas/Types.hh" 0013 0014 namespace celeritas 0015 { 0016 //---------------------------------------------------------------------------// 0017 /*! 0018 * Model and particles IDs. 0019 */ 0020 struct KleinNishinaIds 0021 { 0022 ParticleId electron; 0023 ParticleId gamma; 0024 0025 //! Check whether the data is assigned 0026 explicit CELER_FUNCTION operator bool() const { return electron && gamma; } 0027 }; 0028 0029 //---------------------------------------------------------------------------// 0030 /*! 0031 * Device data for creating a KleinNishinaInteractor. 0032 */ 0033 struct KleinNishinaData 0034 { 0035 using Mass = units::MevMass; 0036 0037 //! Model and particle identifiers 0038 KleinNishinaIds ids; 0039 0040 //! 1 / electron mass [1 / MevMass] 0041 real_type inv_electron_mass; 0042 0043 //! Check whether the data is assigned 0044 explicit CELER_FUNCTION operator bool() const 0045 { 0046 return ids && inv_electron_mass > 0; 0047 } 0048 }; 0049 0050 using KleinNishinaDeviceRef = KleinNishinaData; 0051 using KleinNishinaHostRef = KleinNishinaData; 0052 0053 //---------------------------------------------------------------------------// 0054 } // 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 |
![]() ![]() |