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