File indexing completed on 2025-12-16 10:11:33
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Assert.hh"
0010 #include "corecel/Macros.hh"
0011 #include "corecel/random/engine/RngEngine.hh"
0012 #include "celeritas/em/data/MuBremsstrahlungData.hh"
0013 #include "celeritas/em/interactor/MuBremsstrahlungInteractor.hh"
0014 #include "celeritas/geo/GeoTrackView.hh"
0015 #include "celeritas/global/CoreTrackView.hh"
0016 #include "celeritas/mat/MaterialTrackView.hh"
0017 #include "celeritas/phys/Interaction.hh"
0018 #include "celeritas/phys/PhysicsStepView.hh"
0019
0020 namespace celeritas
0021 {
0022
0023 struct MuBremsstrahlungExecutor
0024 {
0025 inline CELER_FUNCTION Interaction
0026 operator()(celeritas::CoreTrackView const& track);
0027
0028 MuBremsstrahlungData params;
0029 };
0030
0031
0032
0033
0034
0035 CELER_FUNCTION Interaction
0036 MuBremsstrahlungExecutor::operator()(CoreTrackView const& track)
0037 {
0038 auto cutoff = track.cutoff();
0039 auto material = track.material().material_record();
0040 auto particle = track.particle();
0041
0042 auto elcomp_id = track.physics_step().element();
0043 CELER_ASSERT(elcomp_id);
0044 auto allocate_secondaries = track.physics_step().make_secondary_allocator();
0045 auto const& dir = track.geometry().dir();
0046
0047 MuBremsstrahlungInteractor interact(
0048 params, particle, dir, cutoff, allocate_secondaries, material, elcomp_id);
0049
0050 auto rng = track.rng();
0051 return interact(rng);
0052 }
0053
0054
0055 }