File indexing completed on 2025-02-22 10:31:22
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include <memory>
0011 #include <string>
0012
0013 #include "corecel/Assert.hh"
0014 #include "corecel/Macros.hh"
0015 #include "celeritas/Types.hh"
0016 #include "celeritas/em/data/FluctuationData.hh"
0017 #include "celeritas/em/data/UrbanMscData.hh"
0018 #include "celeritas/field/RZMapFieldData.hh"
0019 #include "celeritas/field/RZMapFieldParams.hh"
0020 #include "celeritas/global/ActionInterface.hh"
0021
0022 namespace celeritas
0023 {
0024 class UrbanMscParams;
0025 class FluctuationParams;
0026 class PhysicsParams;
0027 class MaterialParams;
0028 class ParticleParams;
0029 struct RZMapFieldInput;
0030
0031
0032
0033
0034
0035 class AlongStepRZMapFieldMscAction final : public CoreStepActionInterface
0036 {
0037 public:
0038
0039
0040 using SPConstFluctuations = std::shared_ptr<FluctuationParams const>;
0041 using SPConstMsc = std::shared_ptr<UrbanMscParams const>;
0042 using SPConstFieldParams = std::shared_ptr<RZMapFieldParams const>;
0043
0044
0045 public:
0046 static std::shared_ptr<AlongStepRZMapFieldMscAction>
0047 from_params(ActionId id,
0048 MaterialParams const& materials,
0049 ParticleParams const& particles,
0050 RZMapFieldInput const& field_input,
0051 SPConstMsc const& msc,
0052 bool eloss_fluctuation);
0053
0054
0055 AlongStepRZMapFieldMscAction(ActionId id,
0056 RZMapFieldInput const& input,
0057 SPConstFluctuations fluct,
0058 SPConstMsc msc);
0059
0060
0061 void step(CoreParams const&, CoreStateHost&) const final;
0062
0063
0064 void step(CoreParams const&, CoreStateDevice&) const final;
0065
0066
0067 ActionId action_id() const final { return id_; }
0068
0069
0070 std::string_view label() const final { return "along-step-rzmap-msc"; }
0071
0072
0073 std::string_view description() const final
0074 {
0075 return "apply along-step in a R-Z map field with Urban MSC";
0076 }
0077
0078
0079 StepActionOrder order() const final { return StepActionOrder::along; }
0080
0081
0082
0083
0084 bool has_fluct() const { return static_cast<bool>(fluct_); }
0085
0086
0087 bool has_msc() const { return static_cast<bool>(msc_); }
0088
0089
0090 SPConstFieldParams const& field() const { return field_; }
0091
0092 private:
0093 ActionId id_;
0094 SPConstFieldParams field_;
0095 SPConstFluctuations fluct_;
0096 SPConstMsc msc_;
0097 };
0098
0099
0100 }