File indexing completed on 2025-02-22 10:31:16
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include "corecel/Macros.hh"
0011 #include "celeritas/Types.hh"
0012 #include "celeritas/em/data/CombinedBremData.hh"
0013 #include "celeritas/em/interactor/CombinedBremInteractor.hh"
0014 #include "celeritas/geo/GeoTrackView.hh"
0015 #include "celeritas/global/CoreTrackView.hh"
0016 #include "celeritas/mat/MaterialTrackView.hh"
0017 #include "celeritas/mat/MaterialView.hh"
0018 #include "celeritas/phys/Interaction.hh"
0019 #include "celeritas/phys/PhysicsStepView.hh"
0020 #include "celeritas/random/RngEngine.hh"
0021
0022 namespace celeritas
0023 {
0024
0025 struct CombinedBremExecutor
0026 {
0027 inline CELER_FUNCTION Interaction
0028 operator()(celeritas::CoreTrackView const& track);
0029
0030 CombinedBremRef params;
0031 };
0032
0033
0034
0035
0036
0037 CELER_FUNCTION Interaction
0038 CombinedBremExecutor::operator()(CoreTrackView const& track)
0039 {
0040
0041 auto material = track.make_material_view().make_material_view();
0042
0043
0044 CELER_ASSERT(material.num_elements() == 1);
0045 ElementComponentId const selected_element{0};
0046
0047 auto particle = track.make_particle_view();
0048 auto const& dir = track.make_geo_view().dir();
0049 auto allocate_secondaries
0050 = track.make_physics_step_view().make_secondary_allocator();
0051 auto cutoff = track.make_cutoff_view();
0052
0053 CombinedBremInteractor interact(params,
0054 particle,
0055 dir,
0056 cutoff,
0057 allocate_secondaries,
0058 material,
0059 selected_element);
0060
0061 auto rng = track.make_rng_engine();
0062 return interact(rng);
0063 }
0064
0065
0066 }