Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/celeritas/phys/Secondary.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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/phys/Secondary.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Types.hh"
0010 
0011 #include "ParticleData.hh"
0012 
0013 namespace celeritas
0014 {
0015 //---------------------------------------------------------------------------//
0016 /*!
0017  * New particle created via an Interaction.
0018  *
0019  * It will be converted into a "track initializer" using the parent track's
0020  * information.
0021  */
0022 struct Secondary
0023 {
0024     ParticleId particle_id;  //!< New particle type
0025     units::MevEnergy energy;  //!< New kinetic energy
0026     Real3 direction;  //!< New direction
0027 
0028     //! Whether the secondary survived cutoffs
0029     explicit CELER_FUNCTION operator bool() const
0030     {
0031         return static_cast<bool>(this->particle_id);
0032     }
0033 };
0034 
0035 //---------------------------------------------------------------------------//
0036 }  // namespace celeritas