File indexing completed on 2025-01-18 09:59:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef G4TrasportationWithMsc_h
0036 #define G4TrasportationWithMsc_h 1
0037
0038 #include "G4Transportation.hh"
0039
0040 #include <vector>
0041
0042 class G4DataVector;
0043 class G4EmDataHandler;
0044 class G4EmModelManager;
0045 class G4LossTableManager;
0046 class G4ParticleChangeForGamma;
0047 class G4ParticleChangeForMSC;
0048 class G4ParticleDefinition;
0049 class G4PhysicsTable;
0050 class G4Region;
0051 class G4VEmModel;
0052 class G4VEnergyLossProcess;
0053 class G4VMscModel;
0054
0055
0056
0057 class G4TransportationWithMsc : public G4Transportation
0058 {
0059 public:
0060 enum class ScatteringType
0061 {
0062 MultipleScattering,
0063 SingleScattering,
0064 };
0065
0066 explicit G4TransportationWithMsc(ScatteringType type, G4int verbosity = 0);
0067
0068 ~G4TransportationWithMsc() override;
0069
0070 inline void SetMultipleSteps(G4bool val);
0071 inline G4bool MultipleSteps() const;
0072
0073 void AddMscModel(G4VMscModel* mscModel, G4int order = 0, const G4Region* region = nullptr);
0074
0075 void AddSSModel(G4VEmModel* model, G4int order = 0, const G4Region* region = nullptr);
0076
0077 public:
0078 void PreparePhysicsTable(const G4ParticleDefinition& part) override;
0079 void BuildPhysicsTable(const G4ParticleDefinition& part) override;
0080
0081 void StartTracking(G4Track* track) override;
0082
0083 G4double AlongStepGetPhysicalInteractionLength(const G4Track& track, G4double previousStepSize,
0084 G4double currentMinimumStep,
0085 G4double& proposedSafety,
0086 G4GPILSelection* selection) override;
0087
0088 private:
0089 const ScatteringType fType;
0090 G4bool fMultipleSteps = false;
0091
0092 G4LossTableManager* fEmManager;
0093 G4EmModelManager* fModelManager;
0094
0095
0096 const G4DataVector* fCuts = nullptr;
0097 const G4ParticleDefinition* fFirstParticle = nullptr;
0098 G4VEnergyLossProcess* fIonisation = nullptr;
0099
0100
0101 G4ParticleChangeForMSC* fParticleChangeForMSC = nullptr;
0102
0103
0104 G4EmDataHandler* fEmData = nullptr;
0105 G4PhysicsTable* fLambdaTable = nullptr;
0106 G4ParticleChangeForGamma* fParticleChangeForSS = nullptr;
0107 std::vector<G4DynamicParticle*>* fSecondariesSS = nullptr;
0108
0109 G4DynamicParticle* fSubStepDynamicParticle;
0110 G4Track* fSubStepTrack;
0111 G4Step* fSubStep;
0112 };
0113
0114
0115
0116 inline void G4TransportationWithMsc::SetMultipleSteps(G4bool val)
0117 {
0118 fMultipleSteps = val;
0119 }
0120
0121
0122
0123 inline G4bool G4TransportationWithMsc::MultipleSteps() const
0124 {
0125 return fMultipleSteps;
0126 }
0127
0128
0129
0130 #endif