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/em/data/FluctuationData.hh"
0016 #include "celeritas/em/data/UrbanMscData.hh"
0017 #include "celeritas/field/UniformFieldData.hh"
0018 #include "celeritas/global/ActionInterface.hh"
0019
0020 namespace celeritas
0021 {
0022 class UrbanMscParams;
0023 class FluctuationParams;
0024 class PhysicsParams;
0025 class MaterialParams;
0026 class ParticleParams;
0027
0028
0029
0030
0031
0032 class AlongStepUniformMscAction final : public CoreStepActionInterface
0033 {
0034 public:
0035
0036
0037 using SPConstFluctuations = std::shared_ptr<FluctuationParams const>;
0038 using SPConstMsc = std::shared_ptr<UrbanMscParams const>;
0039
0040
0041 public:
0042
0043 static std::shared_ptr<AlongStepUniformMscAction>
0044 from_params(ActionId id,
0045 MaterialParams const& materials,
0046 ParticleParams const& particles,
0047 UniformFieldParams const& field_params,
0048 SPConstMsc msc,
0049 bool eloss_fluctuation);
0050
0051
0052 AlongStepUniformMscAction(ActionId id,
0053 UniformFieldParams const& field_params,
0054 SPConstFluctuations fluct,
0055 SPConstMsc msc);
0056
0057
0058 ~AlongStepUniformMscAction();
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-uniform-msc"; }
0071
0072
0073 std::string_view description() const final
0074 {
0075 return "apply along-step in a uniform 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 Real3 const& field() const { return field_params_.field; }
0091
0092 private:
0093 ActionId id_;
0094 SPConstFluctuations fluct_;
0095 SPConstMsc msc_;
0096 UniformFieldParams field_params_;
0097 };
0098
0099
0100 }