Back to home page

EIC code displayed by LXR

 
 

    


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/BetheHeitlerData.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  * Particle IDs used in Bethe-Heitler.
0019  */
0020 struct BetheHeitlerIds
0021 {
0022     //! ID of an electron
0023     ParticleId electron;
0024     //! ID of an positron
0025     ParticleId positron;
0026     //! ID of a gamma
0027     ParticleId gamma;
0028 
0029     //! Check whether the IDs are assigned
0030     explicit CELER_FUNCTION operator bool() const
0031     {
0032         return electron && positron && gamma;
0033     }
0034 };
0035 
0036 //---------------------------------------------------------------------------//
0037 /*!
0038  * Device data for creating a BetheHeitlerInteractor.
0039  */
0040 struct BetheHeitlerData
0041 {
0042     //! Model/particle IDs
0043     BetheHeitlerIds ids;
0044     //! Electron mass [MevMass]
0045     units::MevMass electron_mass;
0046     //! LPM flag
0047     bool enable_lpm{false};
0048 
0049     //! Include a dielectric suppression effect in LPM functions
0050     static CELER_CONSTEXPR_FUNCTION bool dielectric_suppression()
0051     {
0052         return false;
0053     }
0054 
0055     //! Check whether the data is assigned
0056     explicit CELER_FUNCTION operator bool() const
0057     {
0058         return ids && electron_mass > zero_quantity();
0059     }
0060 };
0061 
0062 using BetheHeitlerHostRef = BetheHeitlerData;
0063 using BetheHeitlerDeviceRef = BetheHeitlerData;
0064 
0065 //---------------------------------------------------------------------------//
0066 }  // namespace celeritas