Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:22

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