Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-19 08:49:41

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/alongstep/detail/LinearPropagatorFactory.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "corecel/Macros.hh"
0010 #include "celeritas/Types.hh"
0011 #include "celeritas/field/LinearPropagator.hh"
0012 #include "celeritas/geo/GeoTrackView.hh"
0013 
0014 namespace celeritas
0015 {
0016 namespace detail
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Create a propagator for neutral particles or no fields.
0021  */
0022 struct LinearPropagatorFactory
0023 {
0024     CELER_FUNCTION decltype(auto) operator()(CoreTrackView const& track) const
0025     {
0026         return LinearPropagator{track.geometry()};
0027     }
0028 
0029     static CELER_CONSTEXPR_FUNCTION bool tracks_can_loop() { return false; }
0030 };
0031 
0032 //---------------------------------------------------------------------------//
0033 }  // namespace detail
0034 }  // namespace celeritas