File indexing completed on 2025-09-17 08:53:34
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/MuPairProductionData.hh"
0013 #include "celeritas/em/interactor/MuPairProductionInteractor.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 MuPairProductionExecutor
0024 {
0025 inline CELER_FUNCTION Interaction
0026 operator()(celeritas::CoreTrackView const& track);
0027
0028 NativeCRef<MuPairProductionData> params;
0029 };
0030
0031
0032
0033
0034
0035 CELER_FUNCTION Interaction
0036 MuPairProductionExecutor::operator()(CoreTrackView const& track)
0037 {
0038 auto cutoff = track.cutoff();
0039 auto particle = track.particle();
0040 auto elcomp_id = track.physics_step().element();
0041 CELER_ASSERT(elcomp_id);
0042 auto element = track.material().material_record().element_record(elcomp_id);
0043 auto allocate_secondaries = track.physics_step().make_secondary_allocator();
0044 auto const& dir = track.geometry().dir();
0045
0046 MuPairProductionInteractor interact(
0047 params, particle, cutoff, element, dir, allocate_secondaries);
0048
0049 auto rng = track.rng();
0050 return interact(rng);
0051 }
0052
0053
0054 }