Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:53:34

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