![]() |
|
|||
File indexing completed on 2025-02-22 10:31:15
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/data/MollerBhabhaData.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include "corecel/Macros.hh" 0011 #include "corecel/Types.hh" 0012 #include "celeritas/Quantities.hh" 0013 #include "celeritas/Types.hh" 0014 0015 namespace celeritas 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Model and particles IDs for Moller Bhabha. 0020 */ 0021 struct MollerBhabhaIds 0022 { 0023 ParticleId electron; 0024 ParticleId positron; 0025 0026 //! Whether the IDs are assigned 0027 explicit CELER_FUNCTION operator bool() const 0028 { 0029 return electron && positron; 0030 } 0031 }; 0032 0033 //---------------------------------------------------------------------------// 0034 /*! 0035 * Device data for creating an interactor. 0036 */ 0037 struct MollerBhabhaData 0038 { 0039 //! Model and particle IDs 0040 MollerBhabhaIds ids; 0041 0042 //! Electron mass * c^2 [MeV] 0043 units::MevMass electron_mass; 0044 0045 //! Model's maximum energy limit [MeV] 0046 static CELER_CONSTEXPR_FUNCTION units::MevEnergy max_valid_energy() 0047 { 0048 return units::MevEnergy{100e6}; 0049 } 0050 0051 //! Whether the data are assigned 0052 explicit CELER_FUNCTION operator bool() const 0053 { 0054 return ids && electron_mass > zero_quantity(); 0055 } 0056 }; 0057 0058 using MollerBhabhaHostRef = MollerBhabhaData; 0059 using MollerBhabhaDeviceRef = MollerBhabhaData; 0060 0061 //---------------------------------------------------------------------------// 0062 } // 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 |
![]() ![]() |