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 // $Id: G4VEnergyLossProcess.hh 106714 2017-10-20 09:38:06Z gcosmo $ >> 27 // GEANT4 tag $Name: 26 // 28 // 27 // ------------------------------------------- 29 // ------------------------------------------------------------------- 28 // 30 // 29 // GEANT4 Class header file 31 // GEANT4 Class header file 30 // 32 // 31 // 33 // 32 // File name: G4VEnergyLossProcess 34 // File name: G4VEnergyLossProcess 33 // 35 // 34 // Author: Vladimir Ivanchenko on base 36 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 37 // 36 // Creation date: 03.01.2002 38 // Creation date: 03.01.2002 37 // 39 // 38 // Modifications: Vladimir Ivanchenko << 40 // Modifications: >> 41 // >> 42 // 26-12-02 Secondary production moved to derived classes (V.Ivanchenko) >> 43 // 20-01-03 Migrade to cut per region (V.Ivanchenko) >> 44 // 24-01-03 Make models region aware (V.Ivanchenko) >> 45 // 05-02-03 Fix compilation warnings (V.Ivanchenko) >> 46 // 13-02-03 SubCutoffProcessors defined for regions (V.Ivanchenko) >> 47 // 17-02-03 Fix problem of store/restore tables (V.Ivanchenko) >> 48 // 26-02-03 Region dependent step limit (V.Ivanchenko) >> 49 // 26-03-03 Add GetDEDXDispersion (V.Ivanchenko) >> 50 // 09-04-03 Fix problem of negative range limit for non integral (V.Ivanchenko) >> 51 // 13-05-03 Add calculation of precise range (V.Ivanchenko) >> 52 // 21-07-03 Add UpdateEmModel method (V.Ivanchenko) >> 53 // 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko) >> 54 // 14-01-04 Activate precise range calculation (V.Ivanchenko) >> 55 // 10-03-04 Fix problem of step limit calculation (V.Ivanchenko) >> 56 // 30-06-04 make destructor virtual (V.Ivanchenko) >> 57 // 05-07-04 fix problem of GenericIons seen at small cuts (V.Ivanchenko) >> 58 // 03-08-04 Add DEDX table to all processes for control on integral range(VI) >> 59 // 06-08-04 Clear up names of member functions (V.Ivanchenko) >> 60 // 27-08-04 Add NeedBuildTables method (V.Ivanchneko) >> 61 // 09-09-04 Bug fix for the integral mode with 2 peaks (V.Ivanchneko) >> 62 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko) >> 63 // 08-04-05 Major optimisation of internal interfaces (V.Ivanchenko) >> 64 // 11-04-05 Use MaxSecondaryEnergy from a model (V.Ivanchenko) >> 65 // 10-01-05 Remove SetStepLimits (V.Ivanchenko) >> 66 // 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko) >> 67 // 13-01-06 Remove AddSubCutSecondaries and cleanup (V.Ivantchenko) >> 68 // 20-01-06 Introduce G4EmTableType and reducing number of methods (VI) >> 69 // 26-01-06 Add public method GetCSDARange (V.Ivanchenko) >> 70 // 22-03-06 Add SetDynamicMassCharge (V.Ivanchenko) >> 71 // 23-03-06 Use isIonisation flag (V.Ivanchenko) >> 72 // 13-05-06 Add method to access model by index (V.Ivanchenko) >> 73 // 14-01-07 add SetEmModel(index) and SetFluctModel() (mma) >> 74 // 15-01-07 Add separate ionisation tables and reorganise get/set methods for >> 75 // dedx tables (V.Ivanchenko) >> 76 // 13-03-07 use SafetyHelper instead of navigator (V.Ivanchenko) >> 77 // 27-07-07 use stl vector for emModels instead of C-array (V.Ivanchenko) >> 78 // 25-09-07 More accurate handling zero xsect in >> 79 // PostStepGetPhysicalInteractionLength (V.Ivanchenko) >> 80 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) >> 81 // 15-07-08 Reorder class members for further multi-thread development (VI) 39 // 82 // 40 // Class Description: 83 // Class Description: 41 // 84 // 42 // It is the unified energy loss process it ca 85 // It is the unified energy loss process it calculates the continuous 43 // energy loss for charged particles using a s 86 // energy loss for charged particles using a set of Energy Loss 44 // models valid for different energy regions. 87 // models valid for different energy regions. There are a possibility 45 // to create and access to dE/dx and range tab 88 // to create and access to dE/dx and range tables, or to calculate 46 // that information on fly. 89 // that information on fly. 47 90 48 // ------------------------------------------- 91 // ------------------------------------------------------------------- 49 // 92 // 50 93 51 #ifndef G4VEnergyLossProcess_h 94 #ifndef G4VEnergyLossProcess_h 52 #define G4VEnergyLossProcess_h 1 95 #define G4VEnergyLossProcess_h 1 53 96 54 #include "G4VContinuousDiscreteProcess.hh" 97 #include "G4VContinuousDiscreteProcess.hh" 55 #include "globals.hh" 98 #include "globals.hh" 56 #include "G4Material.hh" 99 #include "G4Material.hh" 57 #include "G4MaterialCutsCouple.hh" 100 #include "G4MaterialCutsCouple.hh" 58 #include "G4Track.hh" 101 #include "G4Track.hh" 59 #include "G4EmModelManager.hh" 102 #include "G4EmModelManager.hh" >> 103 #include "G4UnitsTable.hh" 60 #include "G4ParticleChangeForLoss.hh" 104 #include "G4ParticleChangeForLoss.hh" 61 #include "G4EmTableType.hh" 105 #include "G4EmTableType.hh" 62 #include "G4EmSecondaryParticleType.hh" << 63 #include "G4PhysicsTable.hh" 106 #include "G4PhysicsTable.hh" 64 #include "G4PhysicsVector.hh" 107 #include "G4PhysicsVector.hh" >> 108 #include "G4EmParameters.hh" 65 109 66 class G4Step; 110 class G4Step; 67 class G4ParticleDefinition; 111 class G4ParticleDefinition; 68 class G4EmParameters; << 69 class G4VEmModel; 112 class G4VEmModel; 70 class G4VEmFluctuationModel; 113 class G4VEmFluctuationModel; 71 class G4DataVector; 114 class G4DataVector; 72 class G4Region; 115 class G4Region; 73 class G4SafetyHelper; 116 class G4SafetyHelper; 74 class G4VAtomDeexcitation; 117 class G4VAtomDeexcitation; 75 class G4VSubCutProducer; 118 class G4VSubCutProducer; 76 class G4EmBiasingManager; 119 class G4EmBiasingManager; 77 class G4LossTableManager; 120 class G4LossTableManager; 78 class G4EmDataHandler; << 79 121 80 //....oooOO0OOooo........oooOO0OOooo........oo 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 81 123 82 class G4VEnergyLossProcess : public G4VContinu 124 class G4VEnergyLossProcess : public G4VContinuousDiscreteProcess 83 { 125 { 84 public: 126 public: 85 127 86 G4VEnergyLossProcess(const G4String& name = 128 G4VEnergyLossProcess(const G4String& name = "EnergyLoss", 87 G4ProcessType type = fE 129 G4ProcessType type = fElectromagnetic); 88 130 89 ~G4VEnergyLossProcess() override; << 131 virtual ~G4VEnergyLossProcess(); >> 132 >> 133 private: >> 134 // clean vectors and arrays >> 135 void Clean(); 90 136 91 //------------------------------------------ 137 //------------------------------------------------------------------------ 92 // Virtual methods to be implemented in conc 138 // Virtual methods to be implemented in concrete processes 93 //------------------------------------------ 139 //------------------------------------------------------------------------ 94 140 >> 141 public: >> 142 virtual G4bool IsApplicable(const G4ParticleDefinition& p) override = 0; >> 143 >> 144 // obsolete to be removed >> 145 virtual void PrintInfo() {}; >> 146 >> 147 virtual void ProcessDescription(std::ostream& outFile) const override; >> 148 95 protected: 149 protected: 96 150 97 // description of specific process parameter << 151 virtual void StreamProcessInfo(std::ostream&, G4String) const {}; 98 virtual void StreamProcessInfo(std::ostream& << 99 152 100 virtual void InitialiseEnergyLossProcess(con 153 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, 101 con 154 const G4ParticleDefinition*) = 0; 102 155 103 public: << 156 //------------------------------------------------------------------------ >> 157 // Methods with standard implementation; may be overwritten if needed >> 158 //------------------------------------------------------------------------ 104 159 105 // used as low energy limit LambdaTable << 106 virtual G4double MinPrimaryEnergy(const G4Pa 160 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*, 107 const G4Ma 161 const G4Material*, G4double cut); 108 162 109 // print documentation in html format << 163 //------------------------------------------------------------------------ 110 void ProcessDescription(std::ostream& outFil << 164 // Virtual methods implementation common to all EM ContinuousDiscrete >> 165 // processes. Further inheritance is not assumed >> 166 //------------------------------------------------------------------------ >> 167 >> 168 public: 111 169 112 // prepare all tables 170 // prepare all tables 113 void PreparePhysicsTable(const G4ParticleDef << 171 virtual void PreparePhysicsTable(const G4ParticleDefinition&) override; 114 172 115 // build all tables 173 // build all tables 116 void BuildPhysicsTable(const G4ParticleDefin << 174 virtual void BuildPhysicsTable(const G4ParticleDefinition&) override; 117 175 118 // build a table 176 // build a table 119 G4PhysicsTable* BuildDEDXTable(G4EmTableType 177 G4PhysicsTable* BuildDEDXTable(G4EmTableType tType = fRestricted); 120 178 121 // build a table 179 // build a table 122 G4PhysicsTable* BuildLambdaTable(G4EmTableTy 180 G4PhysicsTable* BuildLambdaTable(G4EmTableType tType = fRestricted); 123 181 124 // Called before tracking of each new G4Trac 182 // Called before tracking of each new G4Track 125 void StartTracking(G4Track*) override; << 183 virtual void StartTracking(G4Track*) override; 126 184 127 // Step limit from AlongStep 185 // Step limit from AlongStep 128 G4double AlongStepGetPhysicalInteractionLeng << 186 virtual G4double AlongStepGetPhysicalInteractionLength( 129 const G4Trac 187 const G4Track&, 130 G4double pr 188 G4double previousStepSize, 131 G4double cu 189 G4double currentMinimumStep, 132 G4double& cu 190 G4double& currentSafety, 133 G4GPILSelect 191 G4GPILSelection* selection) override; 134 192 135 // Step limit from cross section 193 // Step limit from cross section 136 G4double PostStepGetPhysicalInteractionLengt << 194 virtual G4double PostStepGetPhysicalInteractionLength( 137 const G4Trac 195 const G4Track& track, 138 G4double pre << 196 G4double previousStepSize, 139 G4ForceCondi 197 G4ForceCondition* condition) override; 140 198 141 // AlongStep computations 199 // AlongStep computations 142 G4VParticleChange* AlongStepDoIt(const G4Tra << 200 virtual G4VParticleChange* AlongStepDoIt(const G4Track&, >> 201 const G4Step&) override; >> 202 >> 203 // Sampling of secondaries in vicinity of geometrical boundary >> 204 // Return sum of secodaries energy >> 205 G4double SampleSubCutSecondaries(std::vector<G4Track*>&, const G4Step&, >> 206 G4VEmModel* model, G4int matIdx); 143 207 144 // PostStep sampling of secondaries 208 // PostStep sampling of secondaries 145 G4VParticleChange* PostStepDoIt(const G4Trac << 209 virtual G4VParticleChange* PostStepDoIt(const G4Track&, >> 210 const G4Step&) override; 146 211 147 // Store all PhysicsTable in files. 212 // Store all PhysicsTable in files. 148 // Return false in case of any fatal failure 213 // Return false in case of any fatal failure at I/O 149 G4bool StorePhysicsTable(const G4ParticleDef << 214 virtual G4bool StorePhysicsTable(const G4ParticleDefinition*, 150 const G4String& dir << 215 const G4String& directory, 151 G4bool ascii = fals << 216 G4bool ascii = false) override; 152 217 153 // Retrieve all Physics from a files. 218 // Retrieve all Physics from a files. 154 // Return true if all the Physics Table are 219 // Return true if all the Physics Table are built. 155 // Return false if any fatal failure. 220 // Return false if any fatal failure. 156 G4bool RetrievePhysicsTable(const G4Particle << 221 virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 157 const G4String& << 222 const G4String& directory, 158 G4bool ascii) ov << 223 G4bool ascii) override; 159 224 160 private: 225 private: 161 226 162 // summary printout after initialisation 227 // summary printout after initialisation 163 void StreamInfo(std::ostream& out, const G4P 228 void StreamInfo(std::ostream& out, const G4ParticleDefinition& part, 164 G4bool rst=false) const; << 229 G4String endOfLine=G4String("\n")) const; >> 230 >> 231 // store a table >> 232 G4bool StoreTable(const G4ParticleDefinition* p, >> 233 G4PhysicsTable*, G4bool ascii, >> 234 const G4String& directory, >> 235 const G4String& tname); >> 236 >> 237 // retrieve a table >> 238 G4bool RetrieveTable(const G4ParticleDefinition* p, >> 239 G4PhysicsTable*, G4bool ascii, >> 240 const G4String& directory, >> 241 const G4String& tname, >> 242 G4bool mandatory); 165 243 166 //------------------------------------------ 244 //------------------------------------------------------------------------ 167 // Public interface to cross section, mfp an 245 // Public interface to cross section, mfp and sampling of fluctuations 168 // These methods are not used in run time 246 // These methods are not used in run time 169 //------------------------------------------ 247 //------------------------------------------------------------------------ 170 248 171 public: 249 public: 172 250 173 // access to dispersion of restricted energy 251 // access to dispersion of restricted energy loss 174 G4double GetDEDXDispersion(const G4MaterialC 252 G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, 175 const G4DynamicPa 253 const G4DynamicParticle* dp, 176 G4double length); 254 G4double length); 177 255 178 // Access to cross section table 256 // Access to cross section table 179 G4double CrossSectionPerVolume(G4double kine 257 G4double CrossSectionPerVolume(G4double kineticEnergy, 180 const G4Mater 258 const G4MaterialCutsCouple* couple); 181 G4double CrossSectionPerVolume(G4double kine << 182 const G4Mater << 183 G4double logK << 184 259 185 // access to cross section 260 // access to cross section 186 G4double MeanFreePath(const G4Track& track); 261 G4double MeanFreePath(const G4Track& track); 187 262 188 // access to step limit 263 // access to step limit 189 G4double ContinuousStepLimit(const G4Track& 264 G4double ContinuousStepLimit(const G4Track& track, 190 G4double previo 265 G4double previousStepSize, 191 G4double curren 266 G4double currentMinimumStep, 192 G4double& curre 267 G4double& currentSafety); 193 268 194 protected: 269 protected: 195 270 196 // implementation of the pure virtual method 271 // implementation of the pure virtual method 197 G4double GetMeanFreePath(const G4Track& trac << 272 virtual G4double GetMeanFreePath(const G4Track& track, 198 G4double previousSt << 273 G4double previousStepSize, 199 G4ForceCondition* c << 274 G4ForceCondition* condition) override; 200 275 201 // implementation of the pure virtual method 276 // implementation of the pure virtual method 202 G4double GetContinuousStepLimit(const G4Trac << 277 virtual G4double GetContinuousStepLimit(const G4Track& track, 203 G4double pre << 278 G4double previousStepSize, 204 G4double cur << 279 G4double currentMinimumStep, 205 G4double& cu << 280 G4double& currentSafety) override; 206 281 207 // creation of an empty vector for cross sec << 282 //------------------------------------------------------------------------ >> 283 // Run time method which may be also used by derived processes >> 284 //------------------------------------------------------------------------ >> 285 >> 286 // creeation of an empty vector for cross section 208 G4PhysicsVector* LambdaPhysicsVector(const G 287 G4PhysicsVector* LambdaPhysicsVector(const G4MaterialCutsCouple*, 209 G4doubl 288 G4double cut); 210 289 211 inline std::size_t CurrentMaterialCutsCouple << 290 inline size_t CurrentMaterialCutsCoupleIndex() const; 212 291 213 //------------------------------------------ 292 //------------------------------------------------------------------------ 214 // Specific methods to set, access, modify m 293 // Specific methods to set, access, modify models 215 //------------------------------------------ 294 //------------------------------------------------------------------------ 216 295 217 // Select model in run time 296 // Select model in run time 218 inline void SelectModel(G4double kinEnergy); 297 inline void SelectModel(G4double kinEnergy); 219 298 220 public: 299 public: 221 // Select model by energy and couple index << 300 // Select model by energy and region index 222 // Not for run time processing << 223 inline G4VEmModel* SelectModelForMaterial(G4 301 inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy, 224 st << 302 size_t& idx) const; 225 303 226 // Add EM model coupled with fluctuation mod 304 // Add EM model coupled with fluctuation model for region, smaller value 227 // of order defines which pair of models wil 305 // of order defines which pair of models will be selected for a given 228 // energy interval 306 // energy interval 229 void AddEmModel(G4int, G4VEmModel*, 307 void AddEmModel(G4int, G4VEmModel*, 230 G4VEmFluctuationModel* fluc << 308 G4VEmFluctuationModel* fluc = 0, 231 const G4Region* region = nul 309 const G4Region* region = nullptr); 232 310 >> 311 // Define new energy range for the model identified by the name >> 312 void UpdateEmModel(const G4String&, G4double, G4double); >> 313 233 // Assign a model to a process local list, t 314 // Assign a model to a process local list, to enable the list in run time 234 // the derived process should execute AddEmM 315 // the derived process should execute AddEmModel(..) for all such models 235 void SetEmModel(G4VEmModel*, G4int index=0); 316 void SetEmModel(G4VEmModel*, G4int index=0); 236 << 237 // Access to models << 238 inline std::size_t NumberOfModels() const; << 239 317 240 // Return a model from the local list << 318 // return a model from the local list 241 inline G4VEmModel* EmModel(std::size_t index << 319 G4VEmModel* EmModel(size_t index=0) const; 242 320 243 // Access to models from G4EmModelManager li << 321 // Access to models 244 inline G4VEmModel* GetModelByIndex(std::size << 322 G4VEmModel* GetModelByIndex(G4int idx = 0, G4bool ver = false) const; >> 323 >> 324 G4int NumberOfModels() const; 245 325 246 // Assign a fluctuation model to a process 326 // Assign a fluctuation model to a process 247 inline void SetFluctModel(G4VEmFluctuationMo 327 inline void SetFluctModel(G4VEmFluctuationModel*); 248 328 249 // Return the assigned fluctuation model << 329 // return the assigned fluctuation model 250 inline G4VEmFluctuationModel* FluctModel() c << 330 inline G4VEmFluctuationModel* FluctModel(); 251 331 252 //------------------------------------------ 332 //------------------------------------------------------------------------ 253 // Define and access particle type 333 // Define and access particle type 254 //------------------------------------------ 334 //------------------------------------------------------------------------ 255 335 256 protected: 336 protected: 257 inline void SetParticle(const G4ParticleDefi 337 inline void SetParticle(const G4ParticleDefinition* p); 258 inline void SetSecondaryParticle(const G4Par 338 inline void SetSecondaryParticle(const G4ParticleDefinition* p); 259 339 260 public: 340 public: 261 inline void SetBaseParticle(const G4Particle 341 inline void SetBaseParticle(const G4ParticleDefinition* p); 262 inline const G4ParticleDefinition* Particle( 342 inline const G4ParticleDefinition* Particle() const; 263 inline const G4ParticleDefinition* BaseParti 343 inline const G4ParticleDefinition* BaseParticle() const; 264 inline const G4ParticleDefinition* Secondary 344 inline const G4ParticleDefinition* SecondaryParticle() const; 265 345 266 // hide assignment operator << 267 G4VEnergyLossProcess(G4VEnergyLossProcess &) << 268 G4VEnergyLossProcess & operator=(const G4VEn << 269 << 270 //------------------------------------------ 346 //------------------------------------------------------------------------ 271 // Get/set parameters to configure the proce 347 // Get/set parameters to configure the process at initialisation time 272 //------------------------------------------ 348 //------------------------------------------------------------------------ 273 349 274 // Add subcut processor for the region << 350 // Add subcutoff option for the region 275 void ActivateSubCutoff(const G4Region* regio << 351 void ActivateSubCutoff(G4bool val, const G4Region* region = nullptr); 276 352 277 // Activate biasing 353 // Activate biasing 278 void SetCrossSectionBiasingFactor(G4double f 354 void SetCrossSectionBiasingFactor(G4double f, G4bool flag = true); 279 355 280 void ActivateForcedInteraction(G4double leng 356 void ActivateForcedInteraction(G4double length, 281 const G4Strin 357 const G4String& region, 282 G4bool flag = 358 G4bool flag = true); 283 359 284 void ActivateSecondaryBiasing(const G4String 360 void ActivateSecondaryBiasing(const G4String& region, G4double factor, 285 G4double energ 361 G4double energyLimit); 286 362 >> 363 // Add subcutoff process (bremsstrahlung) to sample secondary >> 364 // particle production in vicinity of the geometry boundary >> 365 void AddCollaborativeProcess(G4VEnergyLossProcess*); >> 366 287 inline void SetLossFluctuations(G4bool val); 367 inline void SetLossFluctuations(G4bool val); 288 368 289 inline void SetSpline(G4bool val); << 369 inline void SetIntegral(G4bool val); 290 inline void SetCrossSectionType(G4CrossSecti << 370 inline G4bool IsIntegral() const; 291 inline G4CrossSectionType CrossSectionType() << 292 371 293 // Set/Get flag "isIonisation" 372 // Set/Get flag "isIonisation" 294 void SetIonisation(G4bool val); 373 void SetIonisation(G4bool val); 295 inline G4bool IsIonisationProcess() const; 374 inline G4bool IsIonisationProcess() const; 296 375 297 // Redefine parameteters for stepping contro 376 // Redefine parameteters for stepping control 298 void SetLinearLossLimit(G4double val); 377 void SetLinearLossLimit(G4double val); 299 void SetStepFunction(G4double v1, G4double v << 378 void SetStepFunction(G4double v1, G4double v2, G4bool lock=true); 300 void SetLowestEnergyLimit(G4double); 379 void SetLowestEnergyLimit(G4double); 301 380 302 inline G4int NumberOfSubCutoffRegions() cons 381 inline G4int NumberOfSubCutoffRegions() const; 303 382 304 //------------------------------------------ 383 //------------------------------------------------------------------------ 305 // Specific methods to path Physics Tables t 384 // Specific methods to path Physics Tables to the process 306 //------------------------------------------ 385 //------------------------------------------------------------------------ 307 386 308 void SetDEDXTable(G4PhysicsTable* p, G4EmTab 387 void SetDEDXTable(G4PhysicsTable* p, G4EmTableType tType); 309 void SetCSDARangeTable(G4PhysicsTable* pRang 388 void SetCSDARangeTable(G4PhysicsTable* pRange); 310 void SetRangeTableForLoss(G4PhysicsTable* p) 389 void SetRangeTableForLoss(G4PhysicsTable* p); >> 390 void SetSecondaryRangeTable(G4PhysicsTable* p); 311 void SetInverseRangeTable(G4PhysicsTable* p) 391 void SetInverseRangeTable(G4PhysicsTable* p); 312 void SetLambdaTable(G4PhysicsTable* p); << 313 392 314 void SetTwoPeaksXS(std::vector<G4TwoPeaksXS* << 393 void SetLambdaTable(G4PhysicsTable* p); 315 void SetEnergyOfCrossSectionMax(std::vector< << 394 void SetSubLambdaTable(G4PhysicsTable* p); 316 << 317 //------------------------------------------ << 318 // Specific methods to define custom Physics << 319 //------------------------------------------ << 320 395 321 // Binning for dEdx, range, inverse range an << 396 // Binning for dEdx, range, inverse range and labda tables 322 void SetDEDXBinning(G4int nbins); 397 void SetDEDXBinning(G4int nbins); 323 398 324 // Min kinetic energy for tables 399 // Min kinetic energy for tables 325 void SetMinKinEnergy(G4double e); 400 void SetMinKinEnergy(G4double e); 326 inline G4double MinKinEnergy() const; 401 inline G4double MinKinEnergy() const; 327 402 328 // Max kinetic energy for tables 403 // Max kinetic energy for tables 329 void SetMaxKinEnergy(G4double e); 404 void SetMaxKinEnergy(G4double e); 330 inline G4double MaxKinEnergy() const; 405 inline G4double MaxKinEnergy() const; 331 406 332 // Biasing parameters 407 // Biasing parameters 333 inline G4double CrossSectionBiasingFactor() 408 inline G4double CrossSectionBiasingFactor() const; 334 409 335 // Return values for given G4MaterialCutsCou 410 // Return values for given G4MaterialCutsCouple 336 inline G4double GetDEDX(G4double kineticEner << 411 inline G4double GetDEDX(G4double& kineticEnergy, 337 inline G4double GetCSDADEDX(G4double kinetic << 412 const G4MaterialCutsCouple*); 338 const G4Material << 413 inline G4double GetDEDXForSubsec(G4double& kineticEnergy, 339 inline G4double GetDEDX(G4double kineticEner << 414 const G4MaterialCutsCouple*); 340 G4double logKineticE << 415 inline G4double GetRange(G4double& kineticEnergy, 341 inline G4double GetRange(G4double kineticEne << 416 const G4MaterialCutsCouple*); 342 inline G4double GetRange(G4double kineticEne << 417 inline G4double GetCSDARange(G4double& kineticEnergy, 343 G4double logKinetic << 344 inline G4double GetCSDARange(G4double kineti << 345 const G4Materia 418 const G4MaterialCutsCouple*); 346 inline G4double GetKineticEnergy(G4double ra << 419 inline G4double GetRangeForLoss(G4double& kineticEnergy, >> 420 const G4MaterialCutsCouple*); >> 421 inline G4double GetKineticEnergy(G4double& range, 347 const G4Mat 422 const G4MaterialCutsCouple*); 348 inline G4double GetLambda(G4double kineticEn << 423 inline G4double GetLambda(G4double& kineticEnergy, 349 inline G4double GetLambda(G4double kineticEn << 424 const G4MaterialCutsCouple*); 350 G4double logKineti << 351 425 352 inline G4bool TablesAreBuilt() const; 426 inline G4bool TablesAreBuilt() const; 353 427 354 // Access to specific tables 428 // Access to specific tables 355 inline G4PhysicsTable* DEDXTable() const; 429 inline G4PhysicsTable* DEDXTable() const; >> 430 inline G4PhysicsTable* DEDXTableForSubsec() const; 356 inline G4PhysicsTable* DEDXunRestrictedTable 431 inline G4PhysicsTable* DEDXunRestrictedTable() const; 357 inline G4PhysicsTable* IonisationTable() con 432 inline G4PhysicsTable* IonisationTable() const; >> 433 inline G4PhysicsTable* IonisationTableForSubsec() const; 358 inline G4PhysicsTable* CSDARangeTable() cons 434 inline G4PhysicsTable* CSDARangeTable() const; >> 435 inline G4PhysicsTable* SecondaryRangeTable() const; 359 inline G4PhysicsTable* RangeTableForLoss() c 436 inline G4PhysicsTable* RangeTableForLoss() const; 360 inline G4PhysicsTable* InverseRangeTable() c 437 inline G4PhysicsTable* InverseRangeTable() const; 361 inline G4PhysicsTable* LambdaTable() const; 438 inline G4PhysicsTable* LambdaTable() const; 362 inline std::vector<G4TwoPeaksXS*>* TwoPeaksX << 439 inline G4PhysicsTable* SubLambdaTable() const; 363 inline std::vector<G4double>* EnergyOfCrossS << 364 << 365 inline G4bool UseBaseMaterial() const; << 366 440 367 //------------------------------------------ 441 //------------------------------------------------------------------------ 368 // Run time method for simulation of ionisat 442 // Run time method for simulation of ionisation 369 //------------------------------------------ 443 //------------------------------------------------------------------------ 370 444 371 // access atom on which interaction happens 445 // access atom on which interaction happens 372 const G4Element* GetCurrentElement() const; 446 const G4Element* GetCurrentElement() const; 373 447 374 // Set scaling parameters for ions is needed 448 // Set scaling parameters for ions is needed to G4EmCalculator 375 void SetDynamicMassCharge(G4double massratio << 449 inline void SetDynamicMassCharge(G4double massratio, G4double charge2ratio); 376 450 377 private: 451 private: 378 452 379 void FillSecondariesAlongStep(G4double weigh << 453 void FillSecondariesAlongStep(G4double& eloss, G4double& weight); 380 454 381 void PrintWarning(const G4String&, G4double << 455 void PrintWarning(G4String, G4double val); 382 456 383 // define material and indexes 457 // define material and indexes 384 inline void DefineMaterial(const G4MaterialC 458 inline void DefineMaterial(const G4MaterialCutsCouple* couple); 385 459 386 //------------------------------------------ 460 //------------------------------------------------------------------------ 387 // Compute values using scaling relation, ma 461 // Compute values using scaling relation, mass and charge of based particle 388 //------------------------------------------ 462 //------------------------------------------------------------------------ 389 inline G4double GetDEDXForScaledEnergy(G4dou << 390 inline G4double GetDEDXForScaledEnergy(G4dou << 391 G4dou << 392 inline G4double GetIonisationForScaledEnergy << 393 inline G4double GetScaledRangeForScaledEnerg << 394 inline G4double GetScaledRangeForScaledEnerg << 395 << 396 << 397 inline G4double GetLimitScaledRangeForScaled << 398 inline G4double GetLimitScaledRangeForScaled << 399 << 400 463 >> 464 inline G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy); >> 465 inline G4double GetSubDEDXForScaledEnergy(G4double scaledKinEnergy); >> 466 inline G4double GetIonisationForScaledEnergy(G4double scaledKinEnergy); >> 467 inline G4double GetSubIonisationForScaledEnergy(G4double scaledKinEnergy); >> 468 inline G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy); >> 469 inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy); 401 inline G4double ScaledKinEnergyForLoss(G4dou 470 inline G4double ScaledKinEnergyForLoss(G4double range); 402 inline G4double GetLambdaForScaledEnergy(G4d << 471 inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy); 403 inline G4double GetLambdaForScaledEnergy(G4d << 472 inline void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy); 404 G4d << 405 473 406 inline G4double LogScaledEkin(const G4Track& << 474 // hide assignment operator 407 << 475 G4VEnergyLossProcess(G4VEnergyLossProcess &) = delete; 408 void ComputeLambdaForScaledEnergy(G4double s << 476 G4VEnergyLossProcess & operator=(const G4VEnergyLossProcess &right) = delete; 409 const G4Tr << 410 << 411 G4bool IsRegionForCubcutProcessor(const G4Tr << 412 << 413 protected: << 414 << 415 G4ParticleChangeForLoss fParticleChange; << 416 const G4Material* currentMaterial << 417 const G4MaterialCutsCouple* currentCouple = << 418 477 419 private: << 478 // ======== Parameters of the class fixed at construction ========= 420 479 421 G4LossTableManager* lManager; 480 G4LossTableManager* lManager; 422 G4EmModelManager* modelManager; 481 G4EmModelManager* modelManager; 423 G4VEmModel* currentModel = n << 482 G4EmBiasingManager* biasManager; 424 G4EmBiasingManager* biasManager = nu << 425 G4SafetyHelper* safetyHelper; 483 G4SafetyHelper* safetyHelper; 426 G4EmParameters* theParameters; 484 G4EmParameters* theParameters; 427 G4VEmFluctuationModel* fluctModel = nul << 428 G4VAtomDeexcitation* atomDeexcitation << 429 G4VSubCutProducer* subcutProducer = << 430 << 431 const G4ParticleDefinition* particle = nullp << 432 const G4ParticleDefinition* baseParticle = n << 433 const G4ParticleDefinition* secondaryParticl << 434 G4EmDataHandler* theData = nullptr; << 435 << 436 G4PhysicsTable* theDEDXTable = nullptr; << 437 G4PhysicsTable* theDEDXunRestrictedTable = n << 438 G4PhysicsTable* theIonisationTable = nullptr << 439 G4PhysicsTable* theRangeTableForLoss = nullp << 440 G4PhysicsTable* theCSDARangeTable = nullptr; << 441 G4PhysicsTable* theInverseRangeTable = nullp << 442 G4PhysicsTable* theLambdaTable = nullptr; << 443 << 444 std::vector<const G4Region*>* scoffRegions = << 445 std::vector<G4VEmModel*>* emModels = nul << 446 const std::vector<G4int>* theDensityIdx << 447 const std::vector<G4double>* theDensityFact << 448 const G4DataVector* theCuts = null << 449 485 450 std::vector<G4double>* theEnergyOfCrossSecti << 486 const G4ParticleDefinition* secondaryParticle; 451 std::vector<G4TwoPeaksXS*>* fXSpeaks = nullp << 487 const G4ParticleDefinition* theElectron; >> 488 const G4ParticleDefinition* thePositron; >> 489 const G4ParticleDefinition* theGamma; >> 490 const G4ParticleDefinition* theGenericIon; >> 491 >> 492 // ======== Parameters of the class fixed at initialisation ======= >> 493 >> 494 std::vector<G4VEmModel*> emModels; >> 495 G4VEmFluctuationModel* fluctModel; >> 496 G4VAtomDeexcitation* atomDeexcitation; >> 497 G4VSubCutProducer* subcutProducer; >> 498 std::vector<const G4Region*> scoffRegions; >> 499 G4int nSCoffRegions; >> 500 G4bool* idxSCoffRegions; >> 501 >> 502 std::vector<G4VEnergyLossProcess*> scProcesses; >> 503 G4int nProcesses; >> 504 >> 505 // tables and vectors >> 506 G4PhysicsTable* theDEDXTable; >> 507 G4PhysicsTable* theDEDXSubTable; >> 508 G4PhysicsTable* theDEDXunRestrictedTable; >> 509 G4PhysicsTable* theIonisationTable; >> 510 G4PhysicsTable* theIonisationSubTable; >> 511 G4PhysicsTable* theRangeTableForLoss; >> 512 G4PhysicsTable* theCSDARangeTable; >> 513 G4PhysicsTable* theSecondaryRangeTable; >> 514 G4PhysicsTable* theInverseRangeTable; >> 515 G4PhysicsTable* theLambdaTable; >> 516 G4PhysicsTable* theSubLambdaTable; >> 517 >> 518 size_t idxDEDX; >> 519 size_t idxDEDXSub; >> 520 size_t idxDEDXunRestricted; >> 521 size_t idxIonisation; >> 522 size_t idxIonisationSub; >> 523 size_t idxRange; >> 524 size_t idxCSDA; >> 525 size_t idxSecRange; >> 526 size_t idxInverseRange; >> 527 size_t idxLambda; >> 528 size_t idxSubLambda; >> 529 >> 530 std::vector<G4double> theDEDXAtMaxEnergy; >> 531 std::vector<G4double> theRangeAtMaxEnergy; >> 532 std::vector<G4double> theEnergyOfCrossSectionMax; >> 533 std::vector<G4double> theCrossSectionMax; >> 534 >> 535 const std::vector<G4double>* theDensityFactor; >> 536 const std::vector<G4int>* theDensityIdx; >> 537 >> 538 const G4DataVector* theCuts; >> 539 const G4DataVector* theSubCuts; >> 540 >> 541 const G4ParticleDefinition* baseParticle; >> 542 >> 543 G4int nBins; >> 544 G4int nBinsCSDA; 452 545 453 G4double lowestKinEnergy; 546 G4double lowestKinEnergy; 454 G4double minKinEnergy; 547 G4double minKinEnergy; 455 G4double maxKinEnergy; 548 G4double maxKinEnergy; 456 G4double maxKinEnergyCSDA; 549 G4double maxKinEnergyCSDA; 457 550 458 G4double linLossLimit = 0.01; << 551 G4double linLossLimit; 459 G4double dRoverRange = 0.2; << 552 G4double dRoverRange; 460 G4double finalRange; 553 G4double finalRange; 461 G4double lambdaFactor = 0.8; << 554 G4double lambdaFactor; 462 G4double invLambdaFactor; << 555 G4double biasFactor; 463 G4double biasFactor = 1.0; << 556 464 << 557 G4bool lossFluctuationFlag; 465 G4double massRatio = 1.0; << 558 G4bool rndmStepFlag; 466 G4double logMassRatio = 0.0; << 559 G4bool tablesAreBuilt; 467 G4double fFactor = 1.0; << 560 G4bool integral; 468 G4double reduceFactor = 1.0; << 561 G4bool isIon; 469 G4double chargeSqRatio = 1.0; << 562 G4bool isIonisation; 470 G4double fRange = 0.0; << 563 G4bool useSubCutoff; 471 G4double fRangeEnergy = 0.0; << 564 G4bool useDeexcitation; >> 565 G4bool biasFlag; >> 566 G4bool weightFlag; >> 567 G4bool isMaster; >> 568 G4bool actIntegral; >> 569 G4bool actStepFunc; >> 570 G4bool actLinLossLimit; >> 571 G4bool actLossFluc; >> 572 G4bool actBinning; >> 573 G4bool actMinKinEnergy; >> 574 G4bool actMaxKinEnergy; 472 575 473 protected: 576 protected: 474 577 475 G4double preStepLambda = 0.0; << 578 G4ParticleChangeForLoss fParticleChange; 476 G4double preStepKinEnergy = 0.0; << 477 G4double preStepScaledEnergy = 0.0; << 478 G4double mfpKinEnergy = 0.0; << 479 579 480 std::size_t currentCoupleIndex = 0; << 580 // ======== Cached values - may be state dependent ================ 481 581 482 private: 582 private: 483 583 484 G4int nBins; << 584 std::vector<G4DynamicParticle*> secParticles; 485 G4int nBinsCSDA; << 585 std::vector<G4Track*> scTracks; 486 G4int numberOfModels = 0; << 586 487 G4int nSCoffRegions = 0; << 587 const G4ParticleDefinition* particle; 488 G4int secID = _DeltaElectron; << 489 G4int tripletID = _TripletElectron; << 490 G4int biasID = _DeltaEBelowCut; << 491 G4int epixeID = _ePIXE; << 492 G4int gpixeID = _GammaPIXE; << 493 G4int mainSecondaries = 1; << 494 << 495 std::size_t basedCoupleIndex = 0; << 496 std::size_t coupleIdxRange = 0; << 497 std::size_t idxDEDX = 0; << 498 std::size_t idxDEDXunRestricted = 0; << 499 std::size_t idxIonisation = 0; << 500 std::size_t idxRange = 0; << 501 std::size_t idxCSDA = 0; << 502 std::size_t idxSecRange = 0; << 503 std::size_t idxInverseRange = 0; << 504 std::size_t idxLambda = 0; << 505 << 506 G4GPILSelection aGPILSelection; << 507 G4CrossSectionType fXSType = fEmOnePeak; << 508 << 509 G4bool lossFluctuationFlag = true; << 510 G4bool useCutAsFinalRange = false; << 511 G4bool tablesAreBuilt = false; << 512 G4bool spline = true; << 513 G4bool isIon = false; << 514 G4bool isIonisation = false; << 515 G4bool useDeexcitation = false; << 516 G4bool biasFlag = false; << 517 G4bool weightFlag = false; << 518 G4bool isMaster = false; << 519 G4bool baseMat = false; << 520 G4bool actLinLossLimit = false; << 521 G4bool actLossFluc = false; << 522 G4bool actBinning = false; << 523 G4bool actMinKinEnergy = false; << 524 G4bool actMaxKinEnergy = false; << 525 588 526 std::vector<G4DynamicParticle*> secParticles << 589 G4VEmModel* currentModel; 527 std::vector<G4Track*> scTracks; << 590 const G4Material* currentMaterial; >> 591 const G4MaterialCutsCouple* currentCouple; >> 592 size_t currentCoupleIndex; >> 593 size_t basedCoupleIndex; >> 594 size_t lastIdx; >> 595 >> 596 G4double massRatio; >> 597 G4double fFactor; >> 598 G4double reduceFactor; >> 599 G4double chargeSqRatio; >> 600 >> 601 G4double preStepLambda; >> 602 G4double fRange; >> 603 G4double computedRange; >> 604 G4double preStepKinEnergy; >> 605 G4double preStepScaledEnergy; >> 606 G4double preStepRangeEnergy; >> 607 G4double mfpKinEnergy; >> 608 >> 609 G4GPILSelection aGPILSelection; >> 610 >> 611 G4int secID; >> 612 G4int subsecID; >> 613 G4int biasID; 528 }; 614 }; 529 615 530 // ======== Run time inline methods ========== 616 // ======== Run time inline methods ================ 531 617 532 inline std::size_t G4VEnergyLossProcess::Curre << 618 inline size_t G4VEnergyLossProcess::CurrentMaterialCutsCoupleIndex() const 533 { 619 { 534 return currentCoupleIndex; 620 return currentCoupleIndex; 535 } 621 } 536 622 537 //....oooOO0OOooo........oooOO0OOooo........oo 623 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 538 624 539 inline void G4VEnergyLossProcess::SelectModel( 625 inline void G4VEnergyLossProcess::SelectModel(G4double kinEnergy) 540 { 626 { 541 currentModel = modelManager->SelectModel(kin 627 currentModel = modelManager->SelectModel(kinEnergy, currentCoupleIndex); 542 currentModel->SetCurrentCouple(currentCouple 628 currentModel->SetCurrentCouple(currentCouple); 543 } 629 } 544 630 545 //....oooOO0OOooo........oooOO0OOooo........oo 631 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 546 632 547 inline G4VEmModel* G4VEnergyLossProcess::Selec 633 inline G4VEmModel* G4VEnergyLossProcess::SelectModelForMaterial( 548 G4double kinEnergy, std::si << 634 G4double kinEnergy, size_t& idx) const 549 { 635 { 550 return modelManager->SelectModel(kinEnergy, 636 return modelManager->SelectModel(kinEnergy, idx); 551 } 637 } 552 638 553 //....oooOO0OOooo........oooOO0OOooo........oo 639 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 554 640 555 inline void 641 inline void 556 G4VEnergyLossProcess::DefineMaterial(const G4M 642 G4VEnergyLossProcess::DefineMaterial(const G4MaterialCutsCouple* couple) 557 { 643 { 558 if(couple != currentCouple) { 644 if(couple != currentCouple) { 559 currentCouple = couple; << 645 currentCouple = couple; 560 currentMaterial = couple->GetMaterial(); 646 currentMaterial = couple->GetMaterial(); 561 basedCoupleIndex = currentCoupleIndex = co << 647 currentCoupleIndex = couple->GetIndex(); 562 fFactor = chargeSqRatio*biasFactor; << 648 basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex]; 563 mfpKinEnergy = DBL_MAX; << 649 fFactor = chargeSqRatio*biasFactor*(*theDensityFactor)[currentCoupleIndex]; 564 idxLambda = 0; << 565 if(baseMat) { << 566 basedCoupleIndex = (*theDensityIdx)[curr << 567 fFactor *= (*theDensityFactor)[currentCo << 568 } << 569 reduceFactor = 1.0/(fFactor*massRatio); 650 reduceFactor = 1.0/(fFactor*massRatio); >> 651 mfpKinEnergy = DBL_MAX; >> 652 idxLambda = idxSubLambda = 0; 570 } 653 } 571 } 654 } 572 655 573 //....oooOO0OOooo........oooOO0OOooo........oo 656 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 574 657 >> 658 inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio, >> 659 G4double charge2ratio) >> 660 { >> 661 massRatio = massratio; >> 662 fFactor = charge2ratio*biasFactor*(*theDensityFactor)[currentCoupleIndex]; >> 663 chargeSqRatio = charge2ratio; >> 664 reduceFactor = 1.0/(fFactor*massRatio); >> 665 } >> 666 >> 667 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 668 575 inline G4double G4VEnergyLossProcess::GetDEDXF 669 inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e) 576 { 670 { 577 /* 671 /* 578 G4cout << "G4VEnergyLossProcess::GetDEDX: Id 672 G4cout << "G4VEnergyLossProcess::GetDEDX: Idx= " 579 << basedCoupleIndex << " E(MeV)= " 673 << basedCoupleIndex << " E(MeV)= " << e 580 << " Emin= " << minKinEnergy << " Fa 674 << " Emin= " << minKinEnergy << " Factor= " << fFactor 581 << " " << theDEDXTable << G4endl; */ 675 << " " << theDEDXTable << G4endl; */ 582 G4double x = fFactor*(*theDEDXTable)[basedCo 676 G4double x = fFactor*(*theDEDXTable)[basedCoupleIndex]->Value(e, idxDEDX); 583 if(e < minKinEnergy) { x *= std::sqrt(e/minK 677 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 584 return x; 678 return x; 585 } 679 } 586 680 587 //....oooOO0OOooo........oooOO0OOooo........oo 681 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 588 682 589 inline << 683 inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e) 590 G4double G4VEnergyLossProcess::GetDEDXForScale << 591 { 684 { 592 /* << 685 G4double x = 593 G4cout << "G4VEnergyLossProcess::GetDEDX: Id << 686 fFactor*(*theDEDXSubTable)[basedCoupleIndex]->Value(e, idxDEDXSub); 594 << basedCoupleIndex << " E(MeV)= " << 595 << " Emin= " << minKinEnergy << " Fa << 596 << " " << theDEDXTable << G4endl; */ << 597 G4double x = fFactor*(*theDEDXTable)[basedCo << 598 if(e < minKinEnergy) { x *= std::sqrt(e/minK 687 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 599 return x; 688 return x; 600 } 689 } 601 690 602 //....oooOO0OOooo........oooOO0OOooo........oo 691 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 603 692 604 inline G4double G4VEnergyLossProcess::GetIonis 693 inline G4double G4VEnergyLossProcess::GetIonisationForScaledEnergy(G4double e) 605 { 694 { 606 G4double x = 695 G4double x = 607 fFactor*(*theIonisationTable)[basedCoupleI 696 fFactor*(*theIonisationTable)[basedCoupleIndex]->Value(e, idxIonisation); 608 if(e < minKinEnergy) { x *= std::sqrt(e/minK 697 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 609 return x; 698 return x; 610 } 699 } 611 700 612 //....oooOO0OOooo........oooOO0OOooo........oo 701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 613 702 614 inline G4double G4VEnergyLossProcess::GetScale << 703 inline >> 704 G4double G4VEnergyLossProcess::GetSubIonisationForScaledEnergy(G4double e) 615 { 705 { 616 //G4cout << "G4VEnergyLossProcess::GetScaled << 706 G4double x = fFactor* 617 // << basedCoupleIndex << " E(MeV)= << 707 (*theIonisationSubTable)[basedCoupleIndex]->Value(e, idxIonisationSub); 618 // << " lastIdx= " << lastIdx << " << 708 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } 619 if(currentCoupleIndex != coupleIdxRange || f << 709 return x; 620 coupleIdxRange = currentCoupleIndex; << 621 fRangeEnergy = e; << 622 fRange = reduceFactor*((*theRangeTableForL << 623 if (fRange < 0.0) { fRange = 0.0; } << 624 else if (e < minKinEnergy) { fRange *= std << 625 } << 626 //G4cout << "G4VEnergyLossProcess::GetScaled << 627 // << basedCoupleIndex << " E(MeV)= << 628 // << " R= " << computedRange << " << 629 return fRange; << 630 } 710 } 631 711 632 inline G4double << 712 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 633 G4VEnergyLossProcess::GetScaledRangeForScaledE << 713 >> 714 inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e) 634 { 715 { 635 //G4cout << "G4VEnergyLossProcess::GetScaled 716 //G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= " 636 // << basedCoupleIndex << " E(MeV)= 717 // << basedCoupleIndex << " E(MeV)= " << e 637 // << " lastIdx= " << lastIdx << " 718 // << " lastIdx= " << lastIdx << " " << theRangeTableForLoss << G4endl; 638 if(currentCoupleIndex != coupleIdxRange || f << 719 if(basedCoupleIndex != lastIdx || preStepRangeEnergy != e) { 639 coupleIdxRange = currentCoupleIndex; << 720 lastIdx = basedCoupleIndex; 640 fRangeEnergy = e; << 721 preStepRangeEnergy = e; 641 fRange = reduceFactor*((*theRangeTableForL << 722 computedRange = 642 if (fRange < 0.0) { fRange = 0.0; } << 723 ((*theRangeTableForLoss)[basedCoupleIndex])->Value(e, idxRange); 643 else if (e < minKinEnergy) { fRange *= std << 724 if(e < minKinEnergy) { computedRange *= std::sqrt(e/minKinEnergy); } 644 } 725 } 645 //G4cout << "G4VEnergyLossProcess::GetScaled 726 //G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= " 646 // << basedCoupleIndex << " E(MeV)= 727 // << basedCoupleIndex << " E(MeV)= " << e 647 // << " R= " << fRange << " " << t << 728 // << " R= " << fRange << " " << theRangeTableForLoss << G4endl; 648 return fRange; << 649 } << 650 729 651 //....oooOO0OOooo........oooOO0OOooo........oo << 730 return computedRange; 652 << 653 inline G4double << 654 G4VEnergyLossProcess::GetLimitScaledRangeForSc << 655 { << 656 G4double x = ((*theCSDARangeTable)[basedCoup << 657 if (x < 0.0) { x = 0.0; } << 658 else if (e < minKinEnergy) { x *= std::sqrt( << 659 return x; << 660 } 731 } 661 732 662 //....oooOO0OOooo........oooOO0OOooo........oo 733 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 663 734 664 inline G4double 735 inline G4double 665 G4VEnergyLossProcess::GetLimitScaledRangeForSc << 736 G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e) 666 << 667 { 737 { 668 G4double x = ((*theCSDARangeTable)[basedCoup << 738 G4double x; 669 if (x < 0.0) { x = 0.0; } << 739 if (e < maxKinEnergyCSDA) { 670 else if (e < minKinEnergy) { x *= std::sqrt( << 740 x = ((*theCSDARangeTable)[basedCoupleIndex])->Value(e, idxCSDA); >> 741 if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); } >> 742 } else { >> 743 x = theRangeAtMaxEnergy[basedCoupleIndex] + >> 744 (e - maxKinEnergyCSDA)/theDEDXAtMaxEnergy[basedCoupleIndex]; >> 745 } 671 return x; 746 return x; 672 } 747 } 673 748 674 //....oooOO0OOooo........oooOO0OOooo........oo 749 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 675 750 676 inline G4double G4VEnergyLossProcess::ScaledKi 751 inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r) 677 { 752 { 678 //G4cout << "G4VEnergyLossProcess::GetEnergy 753 //G4cout << "G4VEnergyLossProcess::GetEnergy: Idx= " 679 // << basedCoupleIndex << " R(mm)= " 754 // << basedCoupleIndex << " R(mm)= " << r << " " 680 // << theInverseRangeTable << G4endl 755 // << theInverseRangeTable << G4endl; 681 G4PhysicsVector* v = (*theInverseRangeTable) 756 G4PhysicsVector* v = (*theInverseRangeTable)[basedCoupleIndex]; 682 G4double rmin = v->Energy(0); 757 G4double rmin = v->Energy(0); 683 G4double e = 0.0; 758 G4double e = 0.0; 684 if(r >= rmin) { e = v->Value(r, idxInverseRa 759 if(r >= rmin) { e = v->Value(r, idxInverseRange); } 685 else if(r > 0.0) { 760 else if(r > 0.0) { 686 G4double x = r/rmin; 761 G4double x = r/rmin; 687 e = minKinEnergy*x*x; 762 e = minKinEnergy*x*x; 688 } 763 } 689 return e; 764 return e; 690 } 765 } 691 766 692 //....oooOO0OOooo........oooOO0OOooo........oo 767 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 693 768 694 inline G4double G4VEnergyLossProcess::GetLambd 769 inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e) 695 { 770 { 696 return fFactor*((*theLambdaTable)[basedCoupl 771 return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda); 697 } 772 } 698 773 699 //....oooOO0OOooo........oooOO0OOooo........oo 774 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 700 775 701 inline G4double << 702 G4VEnergyLossProcess::GetLambdaForScaledEnergy << 703 { << 704 return fFactor*((*theLambdaTable)[basedCoupl << 705 } << 706 << 707 //....oooOO0OOooo........oooOO0OOooo........oo << 708 << 709 inline G4double G4VEnergyLossProcess::LogScale << 710 { << 711 return track.GetDynamicParticle()->GetLogKin << 712 } << 713 << 714 //....oooOO0OOooo........oooOO0OOooo........oo << 715 << 716 inline G4double 776 inline G4double 717 G4VEnergyLossProcess::GetDEDX(G4double kinEner << 777 G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy, 718 const G4Material 778 const G4MaterialCutsCouple* couple) 719 { 779 { 720 DefineMaterial(couple); 780 DefineMaterial(couple); 721 return GetDEDXForScaledEnergy(kinEnergy*mass << 781 return GetDEDXForScaledEnergy(kineticEnergy*massRatio); 722 } 782 } 723 783 724 //....oooOO0OOooo........oooOO0OOooo........oo 784 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 725 785 726 inline G4double 786 inline G4double 727 G4VEnergyLossProcess::GetDEDX(G4double kinEner << 787 G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy, 728 const G4Material << 788 const G4MaterialCutsCouple* couple) 729 G4double logKinE << 730 { 789 { 731 DefineMaterial(couple); 790 DefineMaterial(couple); 732 return GetDEDXForScaledEnergy(kinEnergy*mass << 791 return GetSubDEDXForScaledEnergy(kineticEnergy*massRatio); 733 } 792 } 734 793 735 //....oooOO0OOooo........oooOO0OOooo........oo 794 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 736 795 737 inline G4double 796 inline G4double 738 G4VEnergyLossProcess::GetRange(G4double kinEne << 797 G4VEnergyLossProcess::GetRange(G4double& kineticEnergy, 739 const G4Materia 798 const G4MaterialCutsCouple* couple) 740 { 799 { >> 800 G4double x = fRange; 741 DefineMaterial(couple); 801 DefineMaterial(couple); 742 return GetScaledRangeForScaledEnergy(kinEner << 802 if(theCSDARangeTable) { >> 803 x = GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio) >> 804 * reduceFactor; >> 805 } else if(theRangeTableForLoss) { >> 806 x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor; >> 807 } >> 808 return x; 743 } 809 } 744 810 745 //....oooOO0OOooo........oooOO0OOooo........oo 811 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 746 812 747 inline G4double 813 inline G4double 748 G4VEnergyLossProcess::GetRange(G4double kinEne << 814 G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy, 749 const G4Materia << 815 const G4MaterialCutsCouple* couple) 750 G4double logKin << 751 { 816 { 752 DefineMaterial(couple); 817 DefineMaterial(couple); 753 return GetScaledRangeForScaledEnergy(kinEner << 818 return (theCSDARangeTable) ? >> 819 GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor >> 820 : DBL_MAX; 754 } 821 } 755 822 756 //....oooOO0OOooo........oooOO0OOooo........oo 823 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 757 824 758 inline G4double 825 inline G4double 759 G4VEnergyLossProcess::GetCSDARange(G4double ki << 826 G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy, 760 const G4Mat << 827 const G4MaterialCutsCouple* couple) 761 { 828 { >> 829 // G4cout << "GetRangeForLoss: Range from " << GetProcessName() << G4endl; 762 DefineMaterial(couple); 830 DefineMaterial(couple); 763 return (nullptr == theCSDARangeTable) ? DBL_ << 831 return GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor; 764 GetLimitScaledRangeForScaledEnergy(kinetic << 765 } 832 } 766 833 767 //....oooOO0OOooo........oooOO0OOooo........oo 834 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 768 835 769 inline G4double 836 inline G4double 770 G4VEnergyLossProcess::GetKineticEnergy(G4doubl << 837 G4VEnergyLossProcess::GetKineticEnergy(G4double& range, 771 const G 838 const G4MaterialCutsCouple* couple) 772 { 839 { 773 DefineMaterial(couple); 840 DefineMaterial(couple); 774 return ScaledKinEnergyForLoss(range/reduceFa 841 return ScaledKinEnergyForLoss(range/reduceFactor)/massRatio; 775 } 842 } 776 843 777 //....oooOO0OOooo........oooOO0OOooo........oo 844 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 778 845 779 inline G4double 846 inline G4double 780 G4VEnergyLossProcess::GetLambda(G4double kinEn << 847 G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy, 781 const G4Materi 848 const G4MaterialCutsCouple* couple) 782 { 849 { 783 DefineMaterial(couple); 850 DefineMaterial(couple); 784 return (nullptr != theLambdaTable) ? << 851 return theLambdaTable ? GetLambdaForScaledEnergy(kineticEnergy*massRatio) : 0.0; 785 GetLambdaForScaledEnergy(kinEnergy*massRat << 786 } 852 } 787 853 788 //....oooOO0OOooo........oooOO0OOooo........oo 854 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 789 855 790 inline G4double << 856 inline void G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(G4double e) 791 G4VEnergyLossProcess::GetLambda(G4double kinEn << 792 const G4Materi << 793 G4double logKi << 794 { 857 { 795 DefineMaterial(couple); << 858 mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex]; 796 return (nullptr != theLambdaTable) ? << 859 if (e <= mfpKinEnergy) { 797 GetLambdaForScaledEnergy(kinEnergy*massRat << 860 preStepLambda = GetLambdaForScaledEnergy(e); 798 : 0.0; << 861 >> 862 } else { >> 863 G4double e1 = e*lambdaFactor; >> 864 if(e1 > mfpKinEnergy) { >> 865 preStepLambda = GetLambdaForScaledEnergy(e); >> 866 G4double preStepLambda1 = GetLambdaForScaledEnergy(e1); >> 867 if(preStepLambda1 > preStepLambda) { >> 868 mfpKinEnergy = e1; >> 869 preStepLambda = preStepLambda1; >> 870 } >> 871 } else { >> 872 preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex]; >> 873 } >> 874 } 799 } 875 } 800 876 801 // ======== Get/Set inline methods used at ini 877 // ======== Get/Set inline methods used at initialisation ================ 802 878 803 inline void G4VEnergyLossProcess::SetFluctMode 879 inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p) 804 { 880 { 805 fluctModel = p; 881 fluctModel = p; 806 } 882 } 807 883 808 //....oooOO0OOooo........oooOO0OOooo........oo 884 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 809 885 810 inline G4VEmFluctuationModel* G4VEnergyLossPro << 886 inline G4VEmFluctuationModel* G4VEnergyLossProcess::FluctModel() 811 { 887 { 812 return fluctModel; 888 return fluctModel; 813 } 889 } 814 890 815 //....oooOO0OOooo........oooOO0OOooo........oo 891 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 816 892 817 inline void G4VEnergyLossProcess::SetParticle( 893 inline void G4VEnergyLossProcess::SetParticle(const G4ParticleDefinition* p) 818 { 894 { 819 particle = p; 895 particle = p; 820 } 896 } 821 897 822 //....oooOO0OOooo........oooOO0OOooo........oo 898 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 823 899 824 inline void 900 inline void 825 G4VEnergyLossProcess::SetSecondaryParticle(con 901 G4VEnergyLossProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 826 { 902 { 827 secondaryParticle = p; 903 secondaryParticle = p; 828 } 904 } 829 905 830 //....oooOO0OOooo........oooOO0OOooo........oo 906 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 831 907 832 inline void 908 inline void 833 G4VEnergyLossProcess::SetBaseParticle(const G4 909 G4VEnergyLossProcess::SetBaseParticle(const G4ParticleDefinition* p) 834 { 910 { 835 baseParticle = p; 911 baseParticle = p; 836 } 912 } 837 913 838 //....oooOO0OOooo........oooOO0OOooo........oo 914 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 839 915 840 inline const G4ParticleDefinition* G4VEnergyLo 916 inline const G4ParticleDefinition* G4VEnergyLossProcess::Particle() const 841 { 917 { 842 return particle; 918 return particle; 843 } 919 } 844 920 845 //....oooOO0OOooo........oooOO0OOooo........oo 921 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 846 922 847 inline const G4ParticleDefinition* G4VEnergyLo 923 inline const G4ParticleDefinition* G4VEnergyLossProcess::BaseParticle() const 848 { 924 { 849 return baseParticle; 925 return baseParticle; 850 } 926 } 851 927 852 //....oooOO0OOooo........oooOO0OOooo........oo 928 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 853 929 854 inline const G4ParticleDefinition* 930 inline const G4ParticleDefinition* 855 G4VEnergyLossProcess::SecondaryParticle() cons 931 G4VEnergyLossProcess::SecondaryParticle() const 856 { 932 { 857 return secondaryParticle; 933 return secondaryParticle; 858 } 934 } 859 935 860 //....oooOO0OOooo........oooOO0OOooo........oo 936 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 861 937 862 inline void G4VEnergyLossProcess::SetLossFluct 938 inline void G4VEnergyLossProcess::SetLossFluctuations(G4bool val) 863 { 939 { 864 lossFluctuationFlag = val; 940 lossFluctuationFlag = val; 865 actLossFluc = true; 941 actLossFluc = true; 866 } 942 } 867 943 868 //....oooOO0OOooo........oooOO0OOooo........oo 944 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 869 945 870 inline void G4VEnergyLossProcess::SetSpline(G4 << 946 inline void G4VEnergyLossProcess::SetIntegral(G4bool val) 871 { << 872 spline = val; << 873 } << 874 << 875 //....oooOO0OOooo........oooOO0OOooo........oo << 876 << 877 inline void G4VEnergyLossProcess::SetCrossSect << 878 { 947 { 879 fXSType = val; << 948 integral = val; >> 949 actIntegral = true; 880 } 950 } 881 951 882 //....oooOO0OOooo........oooOO0OOooo........oo 952 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 883 953 884 inline G4CrossSectionType G4VEnergyLossProcess << 954 inline G4bool G4VEnergyLossProcess::IsIntegral() const 885 { 955 { 886 return fXSType; << 956 return integral; 887 } 957 } 888 958 889 //....oooOO0OOooo........oooOO0OOooo........oo 959 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 890 960 891 inline G4bool G4VEnergyLossProcess::IsIonisati 961 inline G4bool G4VEnergyLossProcess::IsIonisationProcess() const 892 { 962 { 893 return isIonisation; 963 return isIonisation; 894 } 964 } 895 965 896 //....oooOO0OOooo........oooOO0OOooo........oo 966 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 897 967 898 inline G4int G4VEnergyLossProcess::NumberOfSub 968 inline G4int G4VEnergyLossProcess::NumberOfSubCutoffRegions() const 899 { 969 { 900 return nSCoffRegions; 970 return nSCoffRegions; 901 } 971 } 902 972 903 //....oooOO0OOooo........oooOO0OOooo........oo 973 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 904 974 905 inline G4double G4VEnergyLossProcess::MinKinEn 975 inline G4double G4VEnergyLossProcess::MinKinEnergy() const 906 { 976 { 907 return minKinEnergy; 977 return minKinEnergy; 908 } 978 } 909 979 910 //....oooOO0OOooo........oooOO0OOooo........oo 980 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 911 981 912 inline G4double G4VEnergyLossProcess::MaxKinEn 982 inline G4double G4VEnergyLossProcess::MaxKinEnergy() const 913 { 983 { 914 return maxKinEnergy; 984 return maxKinEnergy; 915 } 985 } 916 986 917 //....oooOO0OOooo........oooOO0OOooo........oo 987 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 918 988 919 inline G4double G4VEnergyLossProcess::CrossSec 989 inline G4double G4VEnergyLossProcess::CrossSectionBiasingFactor() const 920 { 990 { 921 return biasFactor; 991 return biasFactor; 922 } 992 } 923 993 924 //....oooOO0OOooo........oooOO0OOooo........oo 994 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 925 995 926 inline G4bool G4VEnergyLossProcess::TablesAreB 996 inline G4bool G4VEnergyLossProcess::TablesAreBuilt() const 927 { 997 { 928 return tablesAreBuilt; << 998 return tablesAreBuilt; 929 } 999 } 930 1000 931 //....oooOO0OOooo........oooOO0OOooo........oo 1001 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 932 1002 933 inline G4PhysicsTable* G4VEnergyLossProcess::D 1003 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTable() const 934 { 1004 { 935 return theDEDXTable; 1005 return theDEDXTable; 936 } 1006 } 937 1007 938 //....oooOO0OOooo........oooOO0OOooo........oo 1008 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 939 1009 940 inline G4PhysicsTable* G4VEnergyLossProcess::D << 1010 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXTableForSubsec() const 941 { << 942 return theDEDXunRestrictedTable; << 943 } << 944 << 945 //....oooOO0OOooo........oooOO0OOooo........oo << 946 << 947 inline G4PhysicsTable* G4VEnergyLossProcess::I << 948 { 1011 { 949 return theIonisationTable; << 1012 return theDEDXSubTable; 950 } << 951 << 952 //....oooOO0OOooo........oooOO0OOooo........oo << 953 << 954 inline G4PhysicsTable* G4VEnergyLossProcess::C << 955 { << 956 return theCSDARangeTable; << 957 } 1013 } 958 1014 959 //....oooOO0OOooo........oooOO0OOooo........oo 1015 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 960 1016 961 inline G4PhysicsTable* G4VEnergyLossProcess::R << 1017 inline G4PhysicsTable* G4VEnergyLossProcess::DEDXunRestrictedTable() const 962 { 1018 { 963 return theRangeTableForLoss; << 1019 return theDEDXunRestrictedTable; 964 } 1020 } 965 1021 966 //....oooOO0OOooo........oooOO0OOooo........oo 1022 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 967 1023 968 inline G4PhysicsTable* G4VEnergyLossProcess::I << 1024 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTable() const 969 { 1025 { 970 return theInverseRangeTable; << 1026 return theIonisationTable; 971 } 1027 } 972 1028 973 //....oooOO0OOooo........oooOO0OOooo........oo 1029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 974 1030 975 inline G4PhysicsTable* G4VEnergyLossProcess::L << 1031 inline G4PhysicsTable* G4VEnergyLossProcess::IonisationTableForSubsec() const 976 { 1032 { 977 return theLambdaTable; << 1033 return theIonisationSubTable; 978 } 1034 } 979 1035 980 //....oooOO0OOooo........oooOO0OOooo........oo 1036 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 981 1037 982 inline G4bool G4VEnergyLossProcess::UseBaseMat << 1038 inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const 983 { 1039 { 984 return baseMat; << 1040 return theCSDARangeTable; 985 } 1041 } 986 1042 987 //....oooOO0OOooo........oooOO0OOooo........oo 1043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 988 1044 989 inline std::vector<G4double>* << 1045 inline G4PhysicsTable* G4VEnergyLossProcess::SecondaryRangeTable() const 990 G4VEnergyLossProcess::EnergyOfCrossSectionMax( << 991 { 1046 { 992 return theEnergyOfCrossSectionMax; << 1047 return theSecondaryRangeTable; 993 } 1048 } 994 1049 995 //....oooOO0OOooo........oooOO0OOooo........oo 1050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 996 1051 997 inline std::vector<G4TwoPeaksXS*>* G4VEnergyLo << 1052 inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const 998 { 1053 { 999 return fXSpeaks; << 1054 return theRangeTableForLoss; 1000 } 1055 } 1001 1056 1002 //....oooOO0OOooo........oooOO0OOooo........o 1057 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1003 1058 1004 inline std::size_t G4VEnergyLossProcess::Numb << 1059 inline G4PhysicsTable* G4VEnergyLossProcess::InverseRangeTable() const 1005 { 1060 { 1006 return numberOfModels; << 1061 return theInverseRangeTable; 1007 } 1062 } 1008 1063 1009 //....oooOO0OOooo........oooOO0OOooo........o 1064 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1010 1065 1011 inline G4VEmModel* G4VEnergyLossProcess::EmMo << 1066 inline G4PhysicsTable* G4VEnergyLossProcess::LambdaTable() const 1012 { 1067 { 1013 return (index < emModels->size()) ? (*emMod << 1068 return theLambdaTable; 1014 } 1069 } 1015 1070 1016 //....oooOO0OOooo........oooOO0OOooo........o 1071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1017 1072 1018 inline G4VEmModel* << 1073 inline G4PhysicsTable* G4VEnergyLossProcess::SubLambdaTable() const 1019 G4VEnergyLossProcess::GetModelByIndex(std::si << 1020 { 1074 { 1021 return modelManager->GetModel((G4int)idx, v << 1075 return theSubLambdaTable; 1022 } 1076 } 1023 1077 1024 //....oooOO0OOooo........oooOO0OOooo........o 1078 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 1025 1079 1026 #endif 1080 #endif 1027 1081