Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4TransportationWithMsc 26 // G4TransportationWithMsc 27 // 27 // 28 // Class Description: 28 // Class Description: 29 // 29 // 30 // It is a generic process of transportation w 30 // It is a generic process of transportation with multiple scattering included 31 // in the step limitation and propagation. 31 // in the step limitation and propagation. 32 // 32 // 33 // Original author: Jonas Hahnfeld, 2022 33 // Original author: Jonas Hahnfeld, 2022 34 34 35 #ifndef G4TrasportationWithMsc_h 35 #ifndef G4TrasportationWithMsc_h 36 #define G4TrasportationWithMsc_h 1 36 #define G4TrasportationWithMsc_h 1 37 37 38 #include "G4Transportation.hh" 38 #include "G4Transportation.hh" 39 39 40 #include <vector> 40 #include <vector> 41 41 42 class G4DataVector; << 43 class G4EmDataHandler; << 44 class G4EmModelManager; 42 class G4EmModelManager; 45 class G4LossTableManager; 43 class G4LossTableManager; 46 class G4ParticleChangeForGamma; << 47 class G4ParticleChangeForMSC; << 48 class G4ParticleDefinition; 44 class G4ParticleDefinition; 49 class G4PhysicsTable; << 50 class G4Region; 45 class G4Region; 51 class G4VEmModel; << 52 class G4VEnergyLossProcess; << 53 class G4VMscModel; 46 class G4VMscModel; 54 47 55 //....oooOO0OOooo........oooOO0OOooo........oo 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 56 49 57 class G4TransportationWithMsc : public G4Trans 50 class G4TransportationWithMsc : public G4Transportation 58 { 51 { 59 public: << 52 public: 60 enum class ScatteringType << 53 enum class ScatteringType 61 { << 54 { 62 MultipleScattering, << 55 MultipleScattering, 63 SingleScattering, << 56 }; 64 }; << 65 57 66 explicit G4TransportationWithMsc(Scatterin << 58 explicit G4TransportationWithMsc(ScatteringType type, G4int verbosity = 0); 67 59 68 ~G4TransportationWithMsc() override; << 60 ~G4TransportationWithMsc() override; 69 61 70 inline void SetMultipleSteps(G4bool val); << 62 inline void SetMultipleSteps(G4bool val); 71 inline G4bool MultipleSteps() const; << 63 inline G4bool MultipleSteps() const; 72 64 73 void AddMscModel(G4VMscModel* mscModel, G4 << 65 void AddMscModel(G4VMscModel* mscModel, G4int order = 0, >> 66 const G4Region* region = nullptr); 74 67 75 void AddSSModel(G4VEmModel* model, G4int o << 68 public: >> 69 void PreparePhysicsTable(const G4ParticleDefinition& part) override; >> 70 void BuildPhysicsTable(const G4ParticleDefinition& part) override; 76 71 77 public: << 72 void StartTracking(G4Track* track) override; 78 void PreparePhysicsTable(const G4ParticleD << 79 void BuildPhysicsTable(const G4ParticleDef << 80 73 81 void StartTracking(G4Track* track) overrid << 74 G4double AlongStepGetPhysicalInteractionLength( >> 75 const G4Track& track, G4double previousStepSize, >> 76 G4double currentMinimumStep, G4double& proposedSafety, >> 77 G4GPILSelection* selection) override; 82 78 83 G4double AlongStepGetPhysicalInteractionLe << 79 private: 84 << 80 const ScatteringType fType; 85 << 81 G4bool fMultipleSteps = false; 86 << 87 82 88 private: << 83 G4LossTableManager* fEmManager; 89 const ScatteringType fType; << 84 G4EmModelManager* fModelManager; 90 G4bool fMultipleSteps = false; << 85 const G4ParticleDefinition* fFirstParticle = nullptr; 91 86 92 G4LossTableManager* fEmManager; << 87 G4DynamicParticle* fSubStepDynamicParticle; 93 G4EmModelManager* fModelManager; << 88 G4Track* fSubStepTrack; 94 << 89 G4Step* fSubStep; 95 // Not initialized in the constructor, but << 96 const G4DataVector* fCuts = nullptr; << 97 const G4ParticleDefinition* fFirstParticle << 98 G4VEnergyLossProcess* fIonisation = nullpt << 99 << 100 // For ScatteringType::MultipleScattering << 101 G4ParticleChangeForMSC* fParticleChangeFor << 102 << 103 // For ScatteringType::SingleScattering << 104 G4EmDataHandler* fEmData = nullptr; << 105 G4PhysicsTable* fLambdaTable = nullptr; << 106 G4ParticleChangeForGamma* fParticleChangeF << 107 std::vector<G4DynamicParticle*>* fSecondar << 108 << 109 G4DynamicParticle* fSubStepDynamicParticle << 110 G4Track* fSubStepTrack; << 111 G4Step* fSubStep; << 112 }; 90 }; 113 91 114 //....oooOO0OOooo........oooOO0OOooo........oo 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 115 93 116 inline void G4TransportationWithMsc::SetMultip 94 inline void G4TransportationWithMsc::SetMultipleSteps(G4bool val) 117 { 95 { 118 fMultipleSteps = val; 96 fMultipleSteps = val; 119 } 97 } 120 98 121 //....oooOO0OOooo........oooOO0OOooo........oo 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 122 100 123 inline G4bool G4TransportationWithMsc::Multipl 101 inline G4bool G4TransportationWithMsc::MultipleSteps() const 124 { 102 { 125 return fMultipleSteps; 103 return fMultipleSteps; 126 } 104 } 127 105 128 //....oooOO0OOooo........oooOO0OOooo........oo 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 129 107 130 #endif 108 #endif 131 109