Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:11:35

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/mucf/executor/detail/MuonicMoleculeSpinSelector.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Assert.hh"
0010 #include "celeritas/Types.hh"
0011 
0012 namespace celeritas
0013 {
0014 namespace detail
0015 {
0016 //---------------------------------------------------------------------------//
0017 /*!
0018  * Select muonic molecule spin, in units of \f$ \frac{\hbar}{2} \f$.
0019  *
0020  * Applicable to \f$ (dd)_\mu \f$, * \f$ (dt)_\mu \f$ , and \f$ (tt)_\mu \f$.
0021  */
0022 class MuonicMoleculeSpinSelector
0023 {
0024   public:
0025     // Construct with muonic molecule type
0026     inline CELER_FUNCTION MuonicMoleculeSpinSelector(
0027         MucfMuonicMolecule molecule);
0028 
0029     // Sample and return a spin value in units of hbar / 2
0030     template<class Engine>
0031     inline CELER_FUNCTION size_type operator()(Engine&);
0032 
0033   private:
0034     MucfMuonicMolecule molecule_;
0035 };
0036 
0037 //---------------------------------------------------------------------------//
0038 // INLINE DEFINITIONS
0039 //---------------------------------------------------------------------------//
0040 /*!
0041  * Construct with muonic molecule.
0042  */
0043 CELER_FUNCTION MuonicMoleculeSpinSelector::MuonicMoleculeSpinSelector(
0044     MucfMuonicMolecule molecule)
0045     : molecule_(molecule)
0046 {
0047     CELER_EXPECT(molecule_ < MucfMuonicMolecule::size_);
0048     CELER_NOT_IMPLEMENTED("Mucf muonic molecule spin selection");
0049 }
0050 
0051 //---------------------------------------------------------------------------//
0052 /*!
0053  * Return selected spin, in units of \f$ \hbar / 2 \f$.
0054  */
0055 template<class Engine>
0056 CELER_FUNCTION size_type MuonicMoleculeSpinSelector::operator()(Engine&)
0057 {
0058     //! \todo switch on molecule_
0059     CELER_ASSERT_UNREACHABLE();
0060 }
0061 
0062 //---------------------------------------------------------------------------//
0063 }  // namespace detail
0064 }  // namespace celeritas