Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2021-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/em/executor/RelativisticBremExecutor.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include "corecel/Assert.hh"
0011 #include "corecel/Macros.hh"
0012 #include "celeritas/em/data/RelativisticBremData.hh"
0013 #include "celeritas/em/interactor/RelativisticBremInteractor.hh"
0014 #include "celeritas/global/CoreTrackView.hh"
0015 
0016 namespace celeritas
0017 {
0018 //---------------------------------------------------------------------------//
0019 struct RelativisticBremExecutor
0020 {
0021     inline CELER_FUNCTION Interaction
0022     operator()(celeritas::CoreTrackView const& track);
0023 
0024     RelativisticBremRef params;
0025 };
0026 
0027 //---------------------------------------------------------------------------//
0028 /*!
0029  * Apply RelativisticBrem to the current track.
0030  */
0031 CELER_FUNCTION Interaction
0032 RelativisticBremExecutor::operator()(CoreTrackView const& track)
0033 {
0034     auto cutoff = track.make_cutoff_view();
0035     auto material = track.make_material_view().make_material_view();
0036     auto particle = track.make_particle_view();
0037 
0038     auto elcomp_id = track.make_physics_step_view().element();
0039     CELER_ASSERT(elcomp_id);
0040     auto allocate_secondaries
0041         = track.make_physics_step_view().make_secondary_allocator();
0042     auto const& dir = track.make_geo_view().dir();
0043 
0044     RelativisticBremInteractor interact(
0045         params, particle, dir, cutoff, allocate_secondaries, material, elcomp_id);
0046 
0047     auto rng = track.make_rng_engine();
0048     return interact(rng);
0049 }
0050 
0051 //---------------------------------------------------------------------------//
0052 }  // namespace celeritas