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 // 26 // 27 // ------------------------------------------- 27 // ------------------------------------------------------------------- 28 // 28 // 29 // GEANT4 Class header file 29 // GEANT4 Class header file 30 // 30 // 31 // 31 // 32 // File name: G4VMultipleScattering 32 // File name: G4VMultipleScattering 33 // 33 // 34 // Author: Vladimir Ivanchenko on base 34 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 35 // 36 // Creation date: 12.03.2002 36 // Creation date: 12.03.2002 37 // 37 // 38 // Modifications: 38 // Modifications: 39 // 39 // 40 // 16-07-03 Update GetRange interface (V.Ivanc 40 // 16-07-03 Update GetRange interface (V.Ivanchenko) >> 41 // >> 42 // >> 43 // Class Description: >> 44 // >> 45 // It is the generic process of multiple scattering it includes common >> 46 // part of calculations for all charged particles >> 47 // 41 // 26-11-03 bugfix in AlongStepDoIt (L.Urban) 48 // 26-11-03 bugfix in AlongStepDoIt (L.Urban) 42 // 25-05-04 add protection against case when r 49 // 25-05-04 add protection against case when range is less than steplimit (VI) >> 50 // 30-06-04 make destructor virtual (V.Ivanchenko) 43 // 27-08-04 Add InitialiseForRun method (V.Iva 51 // 27-08-04 Add InitialiseForRun method (V.Ivanchneko) 44 // 08-11-04 Migration to new interface of Stor 52 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko) >> 53 // 15-04-05 optimize internal interfaces (V.Ivanchenko) 45 // 15-04-05 remove boundary flag (V.Ivanchenko 54 // 15-04-05 remove boundary flag (V.Ivanchenko) 46 // 07-10-05 error in a protection in GetContin 55 // 07-10-05 error in a protection in GetContinuousStepLimit corrected (L.Urban) 47 // 27-10-05 introduce virtual function MscStep 56 // 27-10-05 introduce virtual function MscStepLimitation() (V.Ivanchenko) 48 // 26-01-06 Rename GetRange -> GetRangeFromRes 57 // 26-01-06 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko) 49 // 17-02-06 Save table of transport cross sect 58 // 17-02-06 Save table of transport cross sections not mfp (V.Ivanchenko) 50 // 07-03-06 Move step limit calculation to mod 59 // 07-03-06 Move step limit calculation to model (V.Ivanchenko) 51 // 13-05-06 Add method to access model by inde 60 // 13-05-06 Add method to access model by index (V.Ivanchenko) 52 // 12-02-07 Add get/set skin (V.Ivanchenko) 61 // 12-02-07 Add get/set skin (V.Ivanchenko) 53 // 27-10-07 Virtual functions moved to source 62 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) 54 // 15-07-08 Reorder class members for further 63 // 15-07-08 Reorder class members for further multi-thread development (VI) 55 // 07-04-09 Moved msc methods from G4VEmModel 64 // 07-04-09 Moved msc methods from G4VEmModel to G4VMscModel (VI) 56 // 65 // 57 // Class Description: << 58 // << 59 // It is the generic process of multiple scatt << 60 // part of calculations for all charged partic << 61 66 62 // ------------------------------------------- 67 // ------------------------------------------------------------------- 63 // 68 // 64 69 65 #ifndef G4VMultipleScattering_h 70 #ifndef G4VMultipleScattering_h 66 #define G4VMultipleScattering_h 1 71 #define G4VMultipleScattering_h 1 67 72 68 #include "G4VContinuousDiscreteProcess.hh" 73 #include "G4VContinuousDiscreteProcess.hh" 69 #include "globals.hh" 74 #include "globals.hh" 70 #include "G4Material.hh" 75 #include "G4Material.hh" 71 #include "G4ParticleChangeForMSC.hh" 76 #include "G4ParticleChangeForMSC.hh" 72 #include "G4Track.hh" 77 #include "G4Track.hh" 73 #include "G4Step.hh" 78 #include "G4Step.hh" 74 #include "G4EmModelManager.hh" 79 #include "G4EmModelManager.hh" 75 #include "G4VMscModel.hh" 80 #include "G4VMscModel.hh" 76 #include "G4EmParameters.hh" 81 #include "G4EmParameters.hh" 77 #include "G4MscStepLimitType.hh" 82 #include "G4MscStepLimitType.hh" 78 83 79 class G4ParticleDefinition; 84 class G4ParticleDefinition; 80 class G4VEnergyLossProcess; 85 class G4VEnergyLossProcess; 81 class G4LossTableManager; 86 class G4LossTableManager; 82 class G4SafetyHelper; 87 class G4SafetyHelper; 83 88 84 //....oooOO0OOooo........oooOO0OOooo........oo 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 90 86 class G4VMultipleScattering : public G4VContin 91 class G4VMultipleScattering : public G4VContinuousDiscreteProcess 87 { 92 { 88 public: 93 public: 89 94 90 explicit G4VMultipleScattering(const G4Strin << 95 G4VMultipleScattering(const G4String& name = "msc", 91 G4ProcessType << 96 G4ProcessType type = fElectromagnetic); 92 97 93 ~G4VMultipleScattering() override; << 98 virtual ~G4VMultipleScattering(); 94 99 95 //------------------------------------------ 100 //------------------------------------------------------------------------ 96 // Virtual methods to be implemented for the 101 // Virtual methods to be implemented for the concrete model 97 //------------------------------------------ 102 //------------------------------------------------------------------------ 98 103 99 void ProcessDescription(std::ostream& outFil << 104 virtual G4bool IsApplicable(const G4ParticleDefinition& p) override = 0; 100 105 101 virtual void InitialiseProcess(const G4Parti << 106 // obsolete >> 107 virtual void PrintInfo() {}; 102 108 103 // Print out of generic class parameters << 109 virtual void ProcessDescription(std::ostream& outFile) const override; 104 void StreamInfo(std::ostream& outFile, const << 105 G4bool rst = false) const; << 106 110 107 protected: 111 protected: 108 112 >> 113 virtual void InitialiseProcess(const G4ParticleDefinition*) = 0; >> 114 109 virtual void StreamProcessInfo(std::ostream& 115 virtual void StreamProcessInfo(std::ostream&) const {}; 110 116 111 public: 117 public: 112 118 113 //------------------------------------------ 119 //------------------------------------------------------------------------ 114 // Generic methods common to all ContinuousD 120 // Generic methods common to all ContinuousDiscrete processes 115 //------------------------------------------ 121 //------------------------------------------------------------------------ 116 122 117 // Initialise for build of tables 123 // Initialise for build of tables 118 void PreparePhysicsTable(const G4ParticleDef 124 void PreparePhysicsTable(const G4ParticleDefinition&) override; 119 125 120 // Build physics table during initialisation 126 // Build physics table during initialisation 121 void BuildPhysicsTable(const G4ParticleDefin 127 void BuildPhysicsTable(const G4ParticleDefinition&) override; 122 128 123 // Store PhysicsTable in a file. 129 // Store PhysicsTable in a file. 124 // Return false in case of failure at I/O 130 // Return false in case of failure at I/O 125 G4bool StorePhysicsTable(const G4ParticleDef 131 G4bool StorePhysicsTable(const G4ParticleDefinition*, 126 const G4String& dir 132 const G4String& directory, 127 G4bool ascii = fals 133 G4bool ascii = false) override; 128 134 129 // Retrieve Physics from a file. 135 // Retrieve Physics from a file. 130 // (return true if the Physics Table can be 136 // (return true if the Physics Table can be build by using file) 131 // (return false if the process has no funct 137 // (return false if the process has no functionality or in case of failure) 132 // File name should is constructed as proces 138 // File name should is constructed as processName+particleName and the 133 // should be placed under the directory spec 139 // should be placed under the directory specified by the argument. 134 G4bool RetrievePhysicsTable(const G4Particle 140 G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 135 const G4String& 141 const G4String& directory, 136 G4bool ascii) ov 142 G4bool ascii) override; 137 143 138 // This is called in the beginning of tracki 144 // This is called in the beginning of tracking for a new track 139 void StartTracking(G4Track*) override; 145 void StartTracking(G4Track*) override; 140 146 141 // The function overloads the corresponding 147 // The function overloads the corresponding function of the base 142 // class.It limits the step near to boundari 148 // class.It limits the step near to boundaries only 143 // and invokes the method GetMscContinuousSt 149 // and invokes the method GetMscContinuousStepLimit at every step. 144 G4double AlongStepGetPhysicalInteractionLeng 150 G4double AlongStepGetPhysicalInteractionLength( 145 const 151 const G4Track&, 146 G4doub 152 G4double previousStepSize, 147 G4doub 153 G4double currentMinimalStep, 148 G4doub 154 G4double& currentSafety, 149 G4GPIL 155 G4GPILSelection* selection) override; 150 156 151 // The function overloads the corresponding 157 // The function overloads the corresponding function of the base 152 // class. 158 // class. 153 G4double PostStepGetPhysicalInteractionLengt 159 G4double PostStepGetPhysicalInteractionLength( 154 const G4 160 const G4Track&, 155 G4double 161 G4double previousStepSize, 156 G4ForceC 162 G4ForceCondition* condition) override; 157 163 158 // Along step actions 164 // Along step actions 159 G4VParticleChange* AlongStepDoIt(const G4Tra 165 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&) override; 160 166 >> 167 // Post step actions >> 168 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override; >> 169 161 // This method does not used for tracking, i 170 // This method does not used for tracking, it is intended only for tests 162 G4double ContinuousStepLimit(const G4Track& 171 G4double ContinuousStepLimit(const G4Track& track, 163 G4double previo 172 G4double previousStepSize, 164 G4double curren 173 G4double currentMinimalStep, 165 G4double& curre 174 G4double& currentSafety); 166 175 167 // hide assignment operator << 168 G4VMultipleScattering(G4VMultipleScattering << 169 G4VMultipleScattering & operator=(const G4VM << 170 << 171 //------------------------------------------ 176 //------------------------------------------------------------------------ 172 // Specific methods to set, access, modify m 177 // Specific methods to set, access, modify models 173 //------------------------------------------ 178 //------------------------------------------------------------------------ 174 179 175 // Select model in run time 180 // Select model in run time 176 inline G4VEmModel* SelectModel(G4double kinE 181 inline G4VEmModel* SelectModel(G4double kinEnergy, size_t idx); 177 182 178 public: 183 public: 179 184 180 // Add model for region, smaller value of or 185 // Add model for region, smaller value of order defines which 181 // model will be selected for a given energy 186 // model will be selected for a given energy interval 182 void AddEmModel(G4int order, G4VMscModel*, c << 187 void AddEmModel(G4int order, G4VEmModel*, const G4Region* region = nullptr); 183 188 184 // Assign a model to a process local list, t 189 // Assign a model to a process local list, to enable the list in run time 185 // the derived process should execute AddEmM 190 // the derived process should execute AddEmModel(..) for all such models 186 void SetEmModel(G4VMscModel*, G4int idx = 0) << 191 void SetEmModel(G4VMscModel*, size_t index = 0); 187 192 188 // return a model from the local list 193 // return a model from the local list 189 inline G4VMscModel* EmModel(size_t index = 0 << 194 G4VMscModel* EmModel(size_t index = 0) const; 190 << 191 // Access to run time models << 192 inline G4int NumberOfModels() const; << 193 195 194 inline G4VMscModel* GetModelByIndex(G4int id << 196 // Access to run time models by index >> 197 inline G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false) const; 195 198 196 //------------------------------------------ 199 //------------------------------------------------------------------------ 197 // Get/Set parameters for simulation of mult 200 // Get/Set parameters for simulation of multiple scattering 198 //------------------------------------------ 201 //------------------------------------------------------------------------ 199 202 200 inline G4bool LateralDisplasmentFlag() const << 203 void SetIonisation(G4VEnergyLossProcess*); 201 204 >> 205 inline G4bool LateralDisplasmentFlag() const; >> 206 inline void SetLateralDisplasmentFlag(G4bool val); >> 207 202 inline G4double Skin() const; 208 inline G4double Skin() const; >> 209 inline void SetSkin(G4double val); 203 210 204 inline G4double RangeFactor() const; 211 inline G4double RangeFactor() const; >> 212 inline void SetRangeFactor(G4double val); 205 213 206 inline G4double GeomFactor() const; 214 inline G4double GeomFactor() const; 207 215 208 inline G4double PolarAngleLimit() const; 216 inline G4double PolarAngleLimit() const; 209 << 210 inline G4bool UseBaseMaterial() const; << 211 217 212 inline G4MscStepLimitType StepLimitType() co 218 inline G4MscStepLimitType StepLimitType() const; 213 inline void SetStepLimitType(G4MscStepLimitT 219 inline void SetStepLimitType(G4MscStepLimitType val); 214 220 215 inline G4double LowestKinEnergy() const; 221 inline G4double LowestKinEnergy() const; 216 inline void SetLowestKinEnergy(G4double val) 222 inline void SetLowestKinEnergy(G4double val); 217 223 218 inline const G4ParticleDefinition* FirstPart 224 inline const G4ParticleDefinition* FirstParticle() const; 219 225 220 //------------------------------------------ 226 //------------------------------------------------------------------------ 221 // Run time methods 227 // Run time methods 222 //------------------------------------------ 228 //------------------------------------------------------------------------ 223 229 224 protected: 230 protected: 225 231 226 // This method is not used for tracking, it 232 // This method is not used for tracking, it returns mean free path value 227 G4double GetMeanFreePath(const G4Track& trac 233 G4double GetMeanFreePath(const G4Track& track, 228 G4double, 234 G4double, 229 G4ForceCondition* c 235 G4ForceCondition* condition) override; 230 236 231 // This method is not used for tracking, it 237 // This method is not used for tracking, it returns step limit 232 G4double GetContinuousStepLimit(const G4Trac 238 G4double GetContinuousStepLimit(const G4Track& track, 233 G4double pre 239 G4double previousStepSize, 234 G4double cur 240 G4double currentMinimalStep, 235 G4double& cu << 241 G4double& currentSafety) override ; >> 242 >> 243 // return number of already added models >> 244 inline G4int NumberOfModels() const; 236 245 237 private: 246 private: 238 247 >> 248 // hide assignment operator >> 249 G4VMultipleScattering(G4VMultipleScattering &) = delete; >> 250 G4VMultipleScattering & >> 251 operator=(const G4VMultipleScattering &right) = delete; >> 252 >> 253 // Print out of generic class parameters >> 254 void StreamInfo(std::ostream& outFile, const G4ParticleDefinition&, >> 255 G4bool rst=false) const; >> 256 239 // ======== Parameters of the class fixed at 257 // ======== Parameters of the class fixed at construction ========= 240 258 241 G4EmModelManager* modelManager; 259 G4EmModelManager* modelManager; 242 G4LossTableManager* emManager; 260 G4LossTableManager* emManager; 243 G4EmParameters* theParameters; 261 G4EmParameters* theParameters; 244 262 245 // ======== Parameters of the class fixed at 263 // ======== Parameters of the class fixed at initialisation ======= 246 264 247 G4SafetyHelper* safetyHelper = n << 265 G4SafetyHelper* safetyHelper; 248 const G4ParticleDefinition* firstParticle = << 266 249 const G4ParticleDefinition* currParticle = n << 250 << 251 std::vector<G4VMscModel*> mscModels; 267 std::vector<G4VMscModel*> mscModels; >> 268 G4int numberOfModels; >> 269 >> 270 const G4ParticleDefinition* firstParticle; >> 271 const G4ParticleDefinition* currParticle; 252 272 253 G4double facrange = 0.04; << 273 G4MscStepLimitType stepLimit; >> 274 >> 275 G4double facrange; 254 G4double lowestKinEnergy; 276 G4double lowestKinEnergy; 255 277 >> 278 G4bool latDisplacement; >> 279 G4bool isIon; >> 280 256 // ======== Cached values - may be state dep 281 // ======== Cached values - may be state dependent ================ 257 282 258 protected: 283 protected: 259 284 260 G4ParticleChangeForMSC fParticleChange; 285 G4ParticleChangeForMSC fParticleChange; 261 286 262 private: 287 private: 263 288 264 G4ThreeVector fNewPosition; << 289 // cache 265 G4ThreeVector fNewDirection; << 290 G4VMscModel* currentModel; 266 << 291 G4VEnergyLossProcess* fIonisation; 267 G4VMscModel* currentModel = n << 268 G4VEnergyLossProcess* fIonisation = nu << 269 292 270 G4double geomMin; 293 G4double geomMin; 271 G4double minDisplacement2 294 G4double minDisplacement2; 272 G4double physStepLimit = << 295 G4double physStepLimit; 273 G4double tPathLength = 0. << 296 G4double tPathLength; 274 G4double gPathLength = 0. << 297 G4double gPathLength; 275 << 298 276 G4MscStepLimitType stepLimit = fUse << 299 G4ThreeVector fNewPosition; 277 G4int numberOfModels = << 300 G4ThreeVector fNewDirection; 278 << 301 G4bool fPositionChanged; 279 G4bool latDisplacement << 302 G4bool isActive; 280 G4bool isIon = false; << 281 G4bool fPositionChanged << 282 G4bool isActive = false << 283 G4bool baseMat = false; << 284 }; 303 }; 285 304 286 // ======== Run time inline methods ========== 305 // ======== Run time inline methods ================ 287 306 288 //....oooOO0OOooo........oooOO0OOooo........oo 307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 289 308 290 inline G4VEmModel* 309 inline G4VEmModel* 291 G4VMultipleScattering::SelectModel(G4double ki 310 G4VMultipleScattering::SelectModel(G4double kinEnergy, size_t coupleIndex) 292 { 311 { 293 return modelManager->SelectModel(kinEnergy, 312 return modelManager->SelectModel(kinEnergy, coupleIndex); 294 } 313 } 295 314 296 //....oooOO0OOooo........oooOO0OOooo........oo 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 297 316 298 inline G4bool G4VMultipleScattering::LateralD 317 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 299 { 318 { 300 return latDisplacement; 319 return latDisplacement; 301 } 320 } 302 321 303 //....oooOO0OOooo........oooOO0OOooo........oo 322 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 304 323 >> 324 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) >> 325 { >> 326 latDisplacement = val; >> 327 } >> 328 >> 329 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 330 305 inline G4double G4VMultipleScattering::Skin() 331 inline G4double G4VMultipleScattering::Skin() const 306 { 332 { 307 return theParameters->MscSkin(); 333 return theParameters->MscSkin(); 308 } 334 } 309 335 310 //....oooOO0OOooo........oooOO0OOooo........oo 336 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 311 337 >> 338 inline void G4VMultipleScattering::SetSkin(G4double val) >> 339 { >> 340 theParameters->SetMscSkin(val); >> 341 } >> 342 >> 343 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 344 312 inline G4double G4VMultipleScattering::RangeF 345 inline G4double G4VMultipleScattering::RangeFactor() const 313 { 346 { 314 return facrange; 347 return facrange; 315 } 348 } 316 349 317 //....oooOO0OOooo........oooOO0OOooo........oo 350 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 318 351 >> 352 inline void G4VMultipleScattering::SetRangeFactor(G4double val) >> 353 { >> 354 if(val > 0.0 && val < 1.0) { >> 355 facrange = val; >> 356 theParameters->SetMscRangeFactor(val); >> 357 } >> 358 } >> 359 >> 360 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 361 319 inline G4double G4VMultipleScattering::GeomFa 362 inline G4double G4VMultipleScattering::GeomFactor() const 320 { 363 { 321 return theParameters->MscGeomFactor(); 364 return theParameters->MscGeomFactor(); 322 } 365 } 323 366 324 //....oooOO0OOooo........oooOO0OOooo........oo 367 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 325 368 326 inline G4double G4VMultipleScattering::PolarA 369 inline G4double G4VMultipleScattering::PolarAngleLimit() const 327 { 370 { 328 return theParameters->MscThetaLimit(); 371 return theParameters->MscThetaLimit(); 329 } 372 } 330 373 331 //....oooOO0OOooo........oooOO0OOooo........oo 374 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 332 375 333 inline G4MscStepLimitType G4VMultipleScatterin 376 inline G4MscStepLimitType G4VMultipleScattering::StepLimitType() const 334 { 377 { 335 return stepLimit; 378 return stepLimit; 336 } 379 } 337 380 338 //....oooOO0OOooo........oooOO0OOooo........oo 381 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 339 382 340 inline void G4VMultipleScattering::SetStepLimi 383 inline void G4VMultipleScattering::SetStepLimitType(G4MscStepLimitType val) 341 { 384 { >> 385 stepLimit = val; >> 386 if(val == fMinimal) { SetRangeFactor(0.2); } 342 theParameters->SetMscStepLimitType(val); 387 theParameters->SetMscStepLimitType(val); 343 } 388 } 344 389 345 //....oooOO0OOooo........oooOO0OOooo........oo 390 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 346 391 347 inline G4double G4VMultipleScattering::LowestK 392 inline G4double G4VMultipleScattering::LowestKinEnergy() const 348 { 393 { 349 return lowestKinEnergy; 394 return lowestKinEnergy; 350 } 395 } 351 396 352 //....oooOO0OOooo........oooOO0OOooo........oo 397 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 353 398 354 inline void G4VMultipleScattering::SetLowestKi 399 inline void G4VMultipleScattering::SetLowestKinEnergy(G4double val) 355 { 400 { 356 lowestKinEnergy = val; 401 lowestKinEnergy = val; 357 } 402 } 358 403 359 //....oooOO0OOooo........oooOO0OOooo........oo 404 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 360 405 361 inline const G4ParticleDefinition* G4VMultiple 406 inline const G4ParticleDefinition* G4VMultipleScattering::FirstParticle() const 362 { 407 { 363 return firstParticle; 408 return firstParticle; 364 } 409 } 365 410 366 //....oooOO0OOooo........oooOO0OOooo........oo 411 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 367 412 368 inline G4VMscModel* G4VMultipleScattering::EmM << 369 { << 370 return (index < mscModels.size()) ? mscModel << 371 } << 372 << 373 //....oooOO0OOooo........oooOO0OOooo........oo << 374 << 375 inline G4int G4VMultipleScattering::NumberOfMo 413 inline G4int G4VMultipleScattering::NumberOfModels() const 376 { 414 { 377 return numberOfModels; << 415 return modelManager->NumberOfModels(); 378 } 416 } 379 417 380 //....oooOO0OOooo........oooOO0OOooo........oo 418 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 381 419 382 inline G4VMscModel* << 420 inline G4VEmModel* 383 G4VMultipleScattering::GetModelByIndex(G4int i 421 G4VMultipleScattering::GetModelByIndex(G4int idx, G4bool ver) const 384 { 422 { 385 // static cast is possible inside this class << 423 return modelManager->GetModel(idx, ver); 386 return static_cast<G4VMscModel*>(modelManage << 387 } << 388 << 389 //....oooOO0OOooo........oooOO0OOooo........oo << 390 << 391 inline G4bool G4VMultipleScattering::UseBaseMa << 392 { << 393 return baseMat; << 394 } 424 } 395 425 396 //....oooOO0OOooo........oooOO0OOooo........oo 426 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 397 427 398 #endif 428 #endif 399 429