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/RZMapFieldPropagatorFactory.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "celeritas/field/DormandPrinceStepper.hh"
0011 #include "celeritas/field/MakeMagFieldPropagator.hh"
0012 #include "celeritas/field/RZMapField.hh"  // IWYU pragma: associated
0013 #include "celeritas/field/RZMapFieldData.hh"  // IWYU pragma: associated
0014 
0015 namespace celeritas
0016 {
0017 namespace detail
0018 {
0019 //---------------------------------------------------------------------------//
0020 /*!
0021  * Propagate a track in an RZ map magnetic field.
0022  */
0023 struct RZMapFieldPropagatorFactory
0024 {
0025     CELER_FUNCTION decltype(auto) operator()(CoreTrackView const& track) const
0026     {
0027         return make_mag_field_propagator<DormandPrinceStepper>(
0028             RZMapField{field},
0029             field.options,
0030             track.make_particle_view(),
0031             track.make_geo_view());
0032     }
0033 
0034     static CELER_CONSTEXPR_FUNCTION bool tracks_can_loop() { return true; }
0035 
0036     //// DATA ////
0037 
0038     NativeCRef<RZMapFieldParamsData> field;
0039 };
0040 
0041 //---------------------------------------------------------------------------//
0042 }  // namespace detail
0043 }  // namespace celeritas