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: G4EmCalculator.hh 105120 2017-07-13 13:24:43Z gcosmo $ >> 27 // 26 // 28 // 27 // ------------------------------------------- 29 // ------------------------------------------------------------------- 28 // 30 // 29 // GEANT4 Class header file 31 // GEANT4 Class header file 30 // 32 // 31 // 33 // 32 // File name: G4EmCalculator 34 // File name: G4EmCalculator 33 // 35 // 34 // Author: Vladimir Ivanchenko 36 // Author: Vladimir Ivanchenko 35 // 37 // 36 // Creation date: 27.06.2004 38 // Creation date: 27.06.2004 37 // 39 // 38 // Modifications: 40 // Modifications: 39 // 17.11.2004 Change signature of methods, add 41 // 17.11.2004 Change signature of methods, add new methods (V.Ivanchenko) 40 // 11.01.2006 Add GetCSDARange (V.Ivanchenko) 42 // 11.01.2006 Add GetCSDARange (V.Ivanchenko) 41 // 26.01.2006 Rename GetRange -> GetRangeFromR 43 // 26.01.2006 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko) 42 // 22.03.2006 Add ComputeElectronicDEDX and Co 44 // 22.03.2006 Add ComputeElectronicDEDX and ComputeTotalDEDX (V.Ivanchenko) 43 // 29.09.2006 Add member loweModel (V.Ivanchen 45 // 29.09.2006 Add member loweModel (V.Ivanchenko) 44 // 15.03.2007 Add ComputeEnergyCutFromRangeCut 46 // 15.03.2007 Add ComputeEnergyCutFromRangeCut methods (V.Ivanchenko) 45 // 02.02.2018 Add parameter to FindLambdaTable << 46 // 47 // 47 // Class Description: 48 // Class Description: 48 // 49 // 49 // Provide access to dE/dx and cross sections 50 // Provide access to dE/dx and cross sections 50 51 51 // ------------------------------------------- 52 // ------------------------------------------------------------------- 52 // 53 // 53 54 54 #ifndef G4EmCalculator_h 55 #ifndef G4EmCalculator_h 55 #define G4EmCalculator_h 1 56 #define G4EmCalculator_h 1 56 57 57 #include <vector> 58 #include <vector> 58 #include "globals.hh" 59 #include "globals.hh" >> 60 #include "G4DataVector.hh" >> 61 #include "G4DynamicParticle.hh" 59 #include "G4VAtomDeexcitation.hh" 62 #include "G4VAtomDeexcitation.hh" 60 63 61 class G4LossTableManager; 64 class G4LossTableManager; 62 class G4NistManager; 65 class G4NistManager; 63 class G4Material; 66 class G4Material; 64 class G4MaterialCutsCouple; 67 class G4MaterialCutsCouple; 65 class G4ParticleDefinition; 68 class G4ParticleDefinition; 66 class G4PhysicsTable; 69 class G4PhysicsTable; 67 class G4VEmModel; 70 class G4VEmModel; 68 class G4VEnergyLossProcess; 71 class G4VEnergyLossProcess; 69 class G4VEmProcess; 72 class G4VEmProcess; 70 class G4VMultipleScattering; 73 class G4VMultipleScattering; 71 class G4VProcess; 74 class G4VProcess; 72 class G4ionEffectiveCharge; 75 class G4ionEffectiveCharge; 73 class G4Region; 76 class G4Region; 74 class G4Element; 77 class G4Element; 75 class G4EmCorrections; 78 class G4EmCorrections; 76 class G4EmParameters; 79 class G4EmParameters; 77 class G4IonTable; 80 class G4IonTable; 78 81 79 class G4EmCalculator 82 class G4EmCalculator 80 { 83 { 81 84 82 public: 85 public: 83 86 84 G4EmCalculator(); 87 G4EmCalculator(); 85 88 86 ~G4EmCalculator(); 89 ~G4EmCalculator(); 87 90 88 //========================================== 91 //=========================================================================== 89 // Methods to access precalculated dE/dx and 92 // Methods to access precalculated dE/dx and cross sections 90 // Materials should exist in the list of the 93 // Materials should exist in the list of the G4MaterialCutsCouple 91 //========================================== 94 //=========================================================================== 92 95 93 G4double GetDEDX(G4double kinEnergy, const G 96 G4double GetDEDX(G4double kinEnergy, const G4ParticleDefinition*, 94 const G4Material*, 97 const G4Material*, 95 const G4Region* r = nullptr 98 const G4Region* r = nullptr); 96 inline G4double GetDEDX(G4double kinEnergy, 99 inline G4double GetDEDX(G4double kinEnergy, const G4String& part, 97 const G4String& mat, 100 const G4String& mat, 98 const G4String& regname = " << 101 const G4String& s = "world"); 99 102 100 G4double GetRangeFromRestricteDEDX(G4double 103 G4double GetRangeFromRestricteDEDX(G4double kinEnergy, 101 const G4ParticleDefinition*, 104 const G4ParticleDefinition*, 102 const G4Material*, 105 const G4Material*, 103 const G4Region* r = nullptr); 106 const G4Region* r = nullptr); 104 inline G4double GetRangeFromRestricteDEDX(G4 107 inline G4double GetRangeFromRestricteDEDX(G4double kinEnergy, 105 const G4String& part, 108 const G4String& part, 106 const G4String& mat, 109 const G4String& mat, 107 const G4String& regname = "world << 110 const G4String& s = "world"); 108 111 109 G4double GetCSDARange(G4double kinEnergy, co 112 G4double GetCSDARange(G4double kinEnergy, const G4ParticleDefinition*, 110 const G4Material*, 113 const G4Material*, 111 const G4Region* r = nullptr); 114 const G4Region* r = nullptr); 112 inline G4double GetCSDARange(G4double kinEne 115 inline G4double GetCSDARange(G4double kinEnergy, const G4String& part, 113 const G4String& mat, 116 const G4String& mat, 114 const G4String& regname = "world"); << 117 const G4String& s = "world"); 115 118 116 G4double GetRange(G4double kinEnergy, const 119 G4double GetRange(G4double kinEnergy, const G4ParticleDefinition*, 117 const G4Material*, 120 const G4Material*, 118 const G4Region* r = nullptr); 121 const G4Region* r = nullptr); 119 inline G4double GetRange(G4double kinEnergy, 122 inline G4double GetRange(G4double kinEnergy, const G4String& part, 120 const G4String& mat, 123 const G4String& mat, 121 const G4String& regname = "world"); << 124 const G4String& s = "world"); 122 125 123 G4double GetKinEnergy(G4double range, const 126 G4double GetKinEnergy(G4double range, const G4ParticleDefinition*, 124 const G4Material*, 127 const G4Material*, 125 const G4Region* r = nullptr); 128 const G4Region* r = nullptr); 126 inline G4double GetKinEnergy(G4double range, 129 inline G4double GetKinEnergy(G4double range, const G4String& part, 127 const G4String& mat, 130 const G4String& mat, 128 const G4String& regname = "world"); << 131 const G4String& s = "world"); 129 132 130 G4double GetCrossSectionPerVolume( 133 G4double GetCrossSectionPerVolume( 131 G4double kinEnergy, const G 134 G4double kinEnergy, const G4ParticleDefinition*, 132 const G4String& processName 135 const G4String& processName, const G4Material*, 133 const G4Region* r = nullptr); 136 const G4Region* r = nullptr); 134 inline G4double GetCrossSectionPerVolume( 137 inline G4double GetCrossSectionPerVolume( 135 G4double kinEnergy, const G 138 G4double kinEnergy, const G4String& part, const G4String& proc, 136 const G4String& mat, const << 139 const G4String& mat, const G4String& s = "world"); 137 140 138 G4double GetShellIonisationCrossSectionPerAt 141 G4double GetShellIonisationCrossSectionPerAtom( 139 const G4String& part, G4int 142 const G4String& part, G4int Z, 140 G4AtomicShellEnumerator shell, 143 G4AtomicShellEnumerator shell, 141 G4double kinEnergy); 144 G4double kinEnergy); 142 145 143 G4double GetMeanFreePath(G4double kinEnergy, 146 G4double GetMeanFreePath(G4double kinEnergy, const G4ParticleDefinition*, 144 const G4String& processName, const G 147 const G4String& processName, const G4Material*, 145 const G4Region* r = nullptr); 148 const G4Region* r = nullptr); 146 inline G4double GetMeanFreePath(G4double kin 149 inline G4double GetMeanFreePath(G4double kinEnergy, const G4String& part, 147 const G4String& proc, const G4String 150 const G4String& proc, const G4String& mat, 148 const G4String& regname = "world"); << 151 const G4String& s = "world"); 149 152 150 void PrintDEDXTable(const G4ParticleDefiniti 153 void PrintDEDXTable(const G4ParticleDefinition*); 151 154 152 void PrintRangeTable(const G4ParticleDefinit 155 void PrintRangeTable(const G4ParticleDefinition*); 153 156 154 void PrintInverseRangeTable(const G4Particle 157 void PrintInverseRangeTable(const G4ParticleDefinition*); 155 158 156 //========================================== 159 //=========================================================================== 157 // Methods to calculate dE/dx and cross sect 160 // Methods to calculate dE/dx and cross sections "on fly" 158 // Existing tables and G4MaterialCutsCouples 161 // Existing tables and G4MaterialCutsCouples are not used 159 //========================================== 162 //=========================================================================== 160 163 161 G4double ComputeDEDX(G4double kinEnergy, con 164 G4double ComputeDEDX(G4double kinEnergy, const G4ParticleDefinition*, 162 const G4String& process 165 const G4String& processName, const G4Material*, 163 G4double cut = DBL_MAX); 166 G4double cut = DBL_MAX); 164 inline G4double ComputeDEDX(G4double kinEner 167 inline G4double ComputeDEDX(G4double kinEnergy, const G4String& part, 165 const G4String& proc, 168 const G4String& proc, 166 const G4String& mat, G4 169 const G4String& mat, G4double cut = DBL_MAX); 167 170 168 G4double ComputeElectronicDEDX(G4double kinE 171 G4double ComputeElectronicDEDX(G4double kinEnergy, 169 const G4ParticleDefinition*, 172 const G4ParticleDefinition*, 170 const G4Material* mat, G4double cut = 173 const G4Material* mat, G4double cut = DBL_MAX); 171 inline G4double ComputeElectronicDEDX(G4doub 174 inline G4double ComputeElectronicDEDX(G4double kinEnergy, const G4String& part, 172 const G4String& mat, G4double cut = D 175 const G4String& mat, G4double cut = DBL_MAX); 173 176 174 G4double ComputeDEDXForCutInRange(G4double k 177 G4double ComputeDEDXForCutInRange(G4double kinEnergy, 175 const G4ParticleDefinition*, 178 const G4ParticleDefinition*, 176 const G4Material* mat, G4double ra 179 const G4Material* mat, G4double rangecut = DBL_MAX); 177 inline G4double ComputeDEDXForCutInRange(G4d 180 inline G4double ComputeDEDXForCutInRange(G4double kinEnergy, const G4String& part, 178 const G4String& mat, 181 const G4String& mat, 179 G4double rangecut = DBL_MAX); 182 G4double rangecut = DBL_MAX); 180 183 181 G4double ComputeNuclearDEDX(G4double kinEner 184 G4double ComputeNuclearDEDX(G4double kinEnergy, const G4ParticleDefinition*, 182 const G4Material*); 185 const G4Material*); 183 inline G4double ComputeNuclearDEDX(G4double 186 inline G4double ComputeNuclearDEDX(G4double kinEnergy, const G4String& part, 184 const G4String& mat); 187 const G4String& mat); 185 188 186 G4double ComputeTotalDEDX(G4double kinEnergy 189 G4double ComputeTotalDEDX(G4double kinEnergy, const G4ParticleDefinition*, 187 const G4Material*, G4double cut = DB 190 const G4Material*, G4double cut = DBL_MAX); 188 inline G4double ComputeTotalDEDX(G4double ki 191 inline G4double ComputeTotalDEDX(G4double kinEnergy, const G4String& part, 189 const G4String& mat, G4double cut = 192 const G4String& mat, G4double cut = DBL_MAX); 190 193 191 G4double ComputeCrossSectionPerVolume( 194 G4double ComputeCrossSectionPerVolume( 192 G4double kinEnergy, con 195 G4double kinEnergy, const G4ParticleDefinition*, 193 const G4String& process 196 const G4String& processName, const G4Material*, 194 G4double cut = 0.0); 197 G4double cut = 0.0); 195 inline G4double ComputeCrossSectionPerVolume 198 inline G4double ComputeCrossSectionPerVolume( 196 G4double kinEnergy, con 199 G4double kinEnergy, const G4String& part, 197 const G4String& proc, 200 const G4String& proc, 198 const G4String& mat, G4 201 const G4String& mat, G4double cut = 0.0); 199 202 200 G4double ComputeCrossSectionPerAtom( 203 G4double ComputeCrossSectionPerAtom( 201 G4double kinEnergy, con 204 G4double kinEnergy, const G4ParticleDefinition*, 202 const G4String& process 205 const G4String& processName, G4double Z, G4double A, 203 G4double cut = 0.0); 206 G4double cut = 0.0); 204 inline G4double ComputeCrossSectionPerAtom( 207 inline G4double ComputeCrossSectionPerAtom( 205 G4double kinEnergy, con 208 G4double kinEnergy, const G4String& part, 206 const G4String& process 209 const G4String& processName, const G4Element*, 207 G4double cut = 0.0); 210 G4double cut = 0.0); 208 211 209 G4double ComputeCrossSectionPerShell( 212 G4double ComputeCrossSectionPerShell( 210 G4double kinEnergy, con 213 G4double kinEnergy, const G4ParticleDefinition*, 211 const G4String& process 214 const G4String& processName, G4int Z, G4int shellIdx, 212 G4double cut = 0.0); 215 G4double cut = 0.0); 213 inline G4double ComputeCrossSectionPerShell( 216 inline G4double ComputeCrossSectionPerShell( 214 G4double kinEnergy, con 217 G4double kinEnergy, const G4String& part, 215 const G4String& process 218 const G4String& processName, const G4Element*, 216 G4int shellIdx, 219 G4int shellIdx, 217 G4double cut = 0.0); 220 G4double cut = 0.0); 218 221 219 G4double ComputeGammaAttenuationLength(G4dou 222 G4double ComputeGammaAttenuationLength(G4double kinEnergy, 220 const G4Material*); 223 const G4Material*); 221 224 222 G4double ComputeShellIonisationCrossSectionP 225 G4double ComputeShellIonisationCrossSectionPerAtom( 223 const G4String& part, G4int 226 const G4String& part, G4int Z, 224 G4AtomicShellEnumerator shell, 227 G4AtomicShellEnumerator shell, 225 G4double kinEnergy, 228 G4double kinEnergy, 226 const G4Material* mat = nul 229 const G4Material* mat = nullptr); 227 230 228 G4double ComputeMeanFreePath( 231 G4double ComputeMeanFreePath( 229 G4double kinEnergy, con 232 G4double kinEnergy, const G4ParticleDefinition*, 230 const G4String& process 233 const G4String& processName, const G4Material*, 231 G4double cut = 0.0); 234 G4double cut = 0.0); 232 inline G4double ComputeMeanFreePath( 235 inline G4double ComputeMeanFreePath( 233 G4double kinEnergy, con 236 G4double kinEnergy, const G4String&, const G4String&, 234 const G4String& process 237 const G4String& processName, G4double cut = 0.0); 235 238 236 G4double ComputeEnergyCutFromRangeCut( 239 G4double ComputeEnergyCutFromRangeCut( 237 G4double range, const G 240 G4double range, const G4ParticleDefinition*, 238 const G4Material*); 241 const G4Material*); 239 inline G4double ComputeEnergyCutFromRangeCut 242 inline G4double ComputeEnergyCutFromRangeCut( 240 G4double range, const G 243 G4double range, const G4String&, 241 const G4String&); 244 const G4String&); 242 245 243 //========================================== 246 //=========================================================================== 244 // Methods to access particles, materials, r 247 // Methods to access particles, materials, regions, processes 245 //========================================== 248 //=========================================================================== 246 249 247 const G4ParticleDefinition* FindParticle(con 250 const G4ParticleDefinition* FindParticle(const G4String&); 248 251 249 const G4ParticleDefinition* FindIon(G4int Z, 252 const G4ParticleDefinition* FindIon(G4int Z, G4int A); 250 253 251 const G4Material* FindMaterial(const G4Strin 254 const G4Material* FindMaterial(const G4String&); 252 255 253 const G4Region* FindRegion(const G4String&); 256 const G4Region* FindRegion(const G4String&); 254 257 255 const G4MaterialCutsCouple* FindCouple(const 258 const G4MaterialCutsCouple* FindCouple(const G4Material*, 256 const G4Region* r = nullptr); 259 const G4Region* r = nullptr); 257 260 258 G4VProcess* FindProcess(const G4ParticleDefi 261 G4VProcess* FindProcess(const G4ParticleDefinition* part, 259 const G4String& processName); 262 const G4String& processName); 260 263 261 void SetupMaterial(const G4Material*); 264 void SetupMaterial(const G4Material*); 262 265 263 void SetupMaterial(const G4String&); 266 void SetupMaterial(const G4String&); 264 267 265 void SetVerbose(G4int val); 268 void SetVerbose(G4int val); 266 269 267 inline void SetApplySmoothing(G4int val); << 270 //=========================================================================== 268 << 271 // Private methods 269 // hide copy and assign << 272 //=========================================================================== 270 G4EmCalculator & operator=(const G4EmCalcul << 271 G4EmCalculator(const G4EmCalculator&) = del << 272 273 273 private: 274 private: 274 275 275 G4bool UpdateParticle(const G4ParticleDefini 276 G4bool UpdateParticle(const G4ParticleDefinition*, G4double kinEnergy); 276 277 277 G4bool UpdateCouple(const G4Material*, G4dou 278 G4bool UpdateCouple(const G4Material*, G4double cut); 278 279 279 void FindLambdaTable(const G4ParticleDefinit 280 void FindLambdaTable(const G4ParticleDefinition*, 280 const G4String& process << 281 const G4String& processName, 281 G4double kinEnergy, G4i << 282 G4double kinEnergy); 282 283 283 G4bool FindEmModel(const G4ParticleDefinitio 284 G4bool FindEmModel(const G4ParticleDefinition*, 284 const G4String& processNa 285 const G4String& processName, 285 G4double kinEnergy) 286 G4double kinEnergy); 286 287 >> 288 G4VEnergyLossProcess* FindEnergyLossProcess(const G4ParticleDefinition*); >> 289 287 G4VEnergyLossProcess* FindEnLossProcess(cons 290 G4VEnergyLossProcess* FindEnLossProcess(const G4ParticleDefinition*, 288 const G4String& processName); 291 const G4String& processName); 289 292 290 G4VEmProcess* FindDiscreteProcess(const G4Pa 293 G4VEmProcess* FindDiscreteProcess(const G4ParticleDefinition*, 291 const G4String& processName); 294 const G4String& processName); 292 295 293 G4VMultipleScattering* FindMscProcess(const 296 G4VMultipleScattering* FindMscProcess(const G4ParticleDefinition*, 294 const G4String& processName); 297 const G4String& processName); 295 298 296 G4bool ActiveForParticle(const G4ParticleDef 299 G4bool ActiveForParticle(const G4ParticleDefinition* part, 297 G4VProcess* proc); 300 G4VProcess* proc); 298 301 299 void CheckMaterial(G4int Z); 302 void CheckMaterial(G4int Z); 300 303 >> 304 // hide copy and assign >> 305 G4EmCalculator & operator=(const G4EmCalculator &right) = delete; >> 306 G4EmCalculator(const G4EmCalculator&) = delete; >> 307 >> 308 std::vector<const G4Material*> localMaterials; >> 309 std::vector<const G4MaterialCutsCouple*> localCouples; >> 310 301 G4EmParameters* theParameters; 311 G4EmParameters* theParameters; 302 G4LossTableManager* manager; 312 G4LossTableManager* manager; 303 G4NistManager* nist; 313 G4NistManager* nist; 304 G4IonTable* ionTable; 314 G4IonTable* ionTable; 305 G4EmCorrections* corr; 315 G4EmCorrections* corr; >> 316 G4DataVector localCuts; >> 317 G4int nLocalMaterials; >> 318 >> 319 G4int verbose; 306 320 307 // cache 321 // cache 308 const G4MaterialCutsCouple* currentCouple = << 322 G4int currentCoupleIndex; 309 const G4Material* currentMaterial << 323 const G4MaterialCutsCouple* currentCouple; 310 const G4Material* cutMaterial = n << 324 const G4Material* currentMaterial; 311 const G4ParticleDefinition* currentParticle << 325 const G4Material* cutMaterial; 312 const G4ParticleDefinition* lambdaParticle << 326 const G4ParticleDefinition* currentParticle; 313 const G4ParticleDefinition* baseParticle = << 327 const G4ParticleDefinition* lambdaParticle; 314 const G4PhysicsTable* currentLambda = << 328 const G4ParticleDefinition* baseParticle; 315 << 329 const G4PhysicsTable* currentLambda; 316 G4VEmModel* currentModel = << 330 317 G4VEmModel* loweModel = nul << 331 G4VEmModel* currentModel; 318 G4VEnergyLossProcess* currentProcess << 332 G4VEmModel* loweModel; 319 G4VProcess* curProcess = nu << 333 G4VEnergyLossProcess* currentProcess; 320 G4DynamicParticle* dynParticle = n << 334 G4VProcess* curProcess; 321 335 322 const G4ParticleDefinition* theGenericIon; 336 const G4ParticleDefinition* theGenericIon; 323 G4ionEffectiveCharge* ionEffCharge; 337 G4ionEffectiveCharge* ionEffCharge; >> 338 G4DynamicParticle dynParticle; 324 339 325 G4double currentCut = DB << 340 G4String currentName; 326 G4double chargeSquare = << 341 G4String lambdaName; 327 G4double massRatio = 1.0 << 342 G4double currentCut; 328 G4double mass = 0; << 343 G4double chargeSquare; >> 344 G4double massRatio; >> 345 G4double mass; 329 G4double cutenergy[3]; 346 G4double cutenergy[3]; >> 347 G4bool isIon; >> 348 G4bool isApplicable; 330 349 331 G4int currentCoupleIn << 350 G4String currentParticleName; 332 G4int nLocalMaterials << 351 G4String currentMaterialName; 333 G4int verbose = 0; << 352 G4String currentProcessName; 334 << 335 G4bool isIon = false; << 336 G4bool isApplicable = << 337 G4bool applySmoothing << 338 << 339 std::vector<const G4Material*> lo << 340 std::vector<const G4MaterialCutsCouple*> lo << 341 std::vector<G4double> lo << 342 << 343 G4String currentName = " << 344 G4String lambdaName = "" << 345 G4String currentParticle << 346 G4String currentMaterial << 347 G4String currentProcessN << 348 }; 353 }; 349 354 350 //....oooOO0OOooo.......oooOO0OOooo........ooo 355 //....oooOO0OOooo.......oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 351 //....oooOO0OOooo........oooOO0OOooo........oo 356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 352 357 353 inline 358 inline 354 G4double G4EmCalculator::GetDEDX(G4double kinE 359 G4double G4EmCalculator::GetDEDX(G4double kinEnergy, const G4String& particle, 355 const G4Strin 360 const G4String& material, const G4String& reg) 356 { 361 { 357 return GetDEDX(kinEnergy,FindParticle(partic 362 return GetDEDX(kinEnergy,FindParticle(particle), 358 FindMaterial(material),FindRegion(reg)); 363 FindMaterial(material),FindRegion(reg)); 359 } 364 } 360 365 361 //....oooOO0OOooo........oooOO0OOooo........oo 366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 362 367 363 inline 368 inline 364 G4double G4EmCalculator::GetRangeFromRestricte 369 G4double G4EmCalculator::GetRangeFromRestricteDEDX(G4double kinEnergy, 365 const G4String& particle, 370 const G4String& particle, 366 const G4String& material, 371 const G4String& material, 367 const G4String& reg) 372 const G4String& reg) 368 { 373 { 369 return GetRangeFromRestricteDEDX(kinEnergy,F 374 return GetRangeFromRestricteDEDX(kinEnergy,FindParticle(particle), 370 FindMaterial(material),FindRegion(r 375 FindMaterial(material),FindRegion(reg)); 371 } 376 } 372 377 373 //....oooOO0OOooo........oooOO0OOooo........oo 378 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 374 379 375 inline 380 inline 376 G4double G4EmCalculator::GetCSDARange(G4double 381 G4double G4EmCalculator::GetCSDARange(G4double kinEnergy, 377 const G4String& particle, 382 const G4String& particle, 378 const G4String& material, 383 const G4String& material, 379 const G4String& reg) 384 const G4String& reg) 380 { 385 { 381 return GetCSDARange(kinEnergy,FindParticle(p 386 return GetCSDARange(kinEnergy,FindParticle(particle), 382 FindMaterial(material),FindRegion(reg)); 387 FindMaterial(material),FindRegion(reg)); 383 } 388 } 384 389 385 //....oooOO0OOooo........oooOO0OOooo........oo 390 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 386 391 387 inline 392 inline 388 G4double G4EmCalculator::GetRange(G4double kin 393 G4double G4EmCalculator::GetRange(G4double kinEnergy, 389 const G4String& particle, 394 const G4String& particle, 390 const G4String& material, 395 const G4String& material, 391 const G4String& reg) 396 const G4String& reg) 392 { 397 { 393 return GetRange(kinEnergy,FindParticle(parti 398 return GetRange(kinEnergy,FindParticle(particle), 394 FindMaterial(material),FindRegion(reg)); 399 FindMaterial(material),FindRegion(reg)); 395 } 400 } 396 401 397 //....oooOO0OOooo........oooOO0OOooo........oo 402 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 398 403 399 inline 404 inline 400 G4double G4EmCalculator::GetKinEnergy(G4double 405 G4double G4EmCalculator::GetKinEnergy(G4double range, const G4String& particle, 401 const G4 406 const G4String& material, const G4String& reg) 402 { 407 { 403 return GetKinEnergy(range,FindParticle(parti 408 return GetKinEnergy(range,FindParticle(particle), 404 FindMaterial(material),FindRegion(re 409 FindMaterial(material),FindRegion(reg)); 405 } 410 } 406 411 407 //....oooOO0OOooo........oooOO0OOooo........oo 412 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 408 413 409 inline 414 inline 410 G4double G4EmCalculator::GetCrossSectionPerVol 415 G4double G4EmCalculator::GetCrossSectionPerVolume(G4double kinEnergy, 411 co 416 const G4String& particle, 412 const G4String& processName, 417 const G4String& processName, 413 co 418 const G4String& material, 414 const G4String& reg) 419 const G4String& reg) 415 { 420 { 416 return GetCrossSectionPerVolume(kinEnergy,Fi 421 return GetCrossSectionPerVolume(kinEnergy,FindParticle(particle),processName, 417 FindMaterial 422 FindMaterial(material),FindRegion(reg)); 418 } 423 } 419 424 420 //....oooOO0OOooo........oooOO0OOooo........oo 425 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 421 426 422 inline 427 inline 423 G4double G4EmCalculator::GetMeanFreePath(G4dou 428 G4double G4EmCalculator::GetMeanFreePath(G4double kinEnergy, 424 const 429 const G4String& particle, 425 const G4String& processName, 430 const G4String& processName, 426 const 431 const G4String& material, 427 const G4String& reg) 432 const G4String& reg) 428 { 433 { 429 return GetMeanFreePath(kinEnergy,FindParticl 434 return GetMeanFreePath(kinEnergy,FindParticle(particle),processName, 430 FindMaterial(material 435 FindMaterial(material),FindRegion(reg)); 431 } 436 } 432 437 433 //....oooOO0OOooo........oooOO0OOooo........oo 438 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 434 439 435 inline G4double 440 inline G4double 436 G4EmCalculator::ComputeElectronicDEDX(G4double 441 G4EmCalculator::ComputeElectronicDEDX(G4double kinEnergy, const G4String& part, 437 const G4String& mat, G4double cu 442 const G4String& mat, G4double cut) 438 { 443 { 439 return 444 return 440 ComputeElectronicDEDX(kinEnergy,FindPartic 445 ComputeElectronicDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut); 441 } 446 } 442 447 443 //....oooOO0OOooo........oooOO0OOooo........oo 448 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 444 449 445 inline G4double 450 inline G4double 446 G4EmCalculator::ComputeDEDXForCutInRange(G4dou 451 G4EmCalculator::ComputeDEDXForCutInRange(G4double kinEnergy, 447 const G4String& part, 452 const G4String& part, 448 const G4String& mat, 453 const G4String& mat, 449 G4double rangecut) 454 G4double rangecut) 450 { 455 { 451 return ComputeDEDXForCutInRange(kinEnergy,Fi 456 return ComputeDEDXForCutInRange(kinEnergy,FindParticle(part), 452 FindMaterial(mat), rangecut); 457 FindMaterial(mat), rangecut); 453 } 458 } 454 459 455 //....oooOO0OOooo........oooOO0OOooo........oo 460 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 456 461 457 inline 462 inline 458 G4double G4EmCalculator::ComputeTotalDEDX(G4do 463 G4double G4EmCalculator::ComputeTotalDEDX(G4double kinEnergy, 459 const G4String& part, 464 const G4String& part, 460 const G4String& mat, 465 const G4String& mat, 461 G4double cut) 466 G4double cut) 462 { 467 { 463 return ComputeTotalDEDX(kinEnergy,FindPartic 468 return ComputeTotalDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut); 464 } 469 } 465 470 466 //....oooOO0OOooo........oooOO0OOooo........oo 471 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 467 472 468 inline 473 inline 469 G4double G4EmCalculator::ComputeDEDX(G4double 474 G4double G4EmCalculator::ComputeDEDX(G4double kinEnergy, 470 const G4S 475 const G4String& particle, 471 const G4String& processName, 476 const G4String& processName, 472 const G4S 477 const G4String& material, 473 G4d 478 G4double cut) 474 { 479 { 475 return ComputeDEDX(kinEnergy,FindParticle(pa 480 return ComputeDEDX(kinEnergy,FindParticle(particle),processName, 476 FindMaterial(material),cu 481 FindMaterial(material),cut); 477 } 482 } 478 483 479 //....oooOO0OOooo........oooOO0OOooo........oo 484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 480 485 481 inline 486 inline 482 G4double G4EmCalculator::ComputeNuclearDEDX(G4 487 G4double G4EmCalculator::ComputeNuclearDEDX(G4double kinEnergy, 483 const G4 488 const G4String& particle, 484 const G4String& material) 489 const G4String& material) 485 { 490 { 486 return ComputeNuclearDEDX(kinEnergy,FindPart 491 return ComputeNuclearDEDX(kinEnergy,FindParticle(particle), 487 FindMaterial(material)); 492 FindMaterial(material)); 488 } 493 } 489 494 490 //....oooOO0OOooo........oooOO0OOooo........oo 495 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 491 496 492 inline 497 inline 493 G4double G4EmCalculator::ComputeCrossSectionPe 498 G4double G4EmCalculator::ComputeCrossSectionPerVolume( 494 499 G4double kinEnergy, 495 c 500 const G4String& particle, 496 const G4String& processName, 501 const G4String& processName, 497 c 502 const G4String& material, 498 503 G4double cut) 499 { 504 { 500 return ComputeCrossSectionPerVolume(kinEnerg 505 return ComputeCrossSectionPerVolume(kinEnergy,FindParticle(particle), 501 processName, 506 processName, 502 FindMate 507 FindMaterial(material),cut); 503 } 508 } 504 509 505 //....oooOO0OOooo........oooOO0OOooo........oo 510 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 506 511 507 inline 512 inline 508 G4double G4EmCalculator::ComputeCrossSectionPe 513 G4double G4EmCalculator::ComputeCrossSectionPerAtom(G4double kinEnergy, 509 514 const G4String& particle, 510 515 const G4String& processName, 511 const G4Element* elm, 516 const G4Element* elm, 512 G4doub 517 G4double cut) 513 { 518 { 514 return ComputeCrossSectionPerAtom(kinEnergy, 519 return ComputeCrossSectionPerAtom(kinEnergy,FindParticle(particle), 515 processName, 520 processName, 516 elm->GetZ( 521 elm->GetZ(),elm->GetN(),cut); 517 } 522 } 518 523 519 //....oooOO0OOooo........oooOO0OOooo........oo 524 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 520 525 521 inline G4double G4EmCalculator::ComputeCrossSe 526 inline G4double G4EmCalculator::ComputeCrossSectionPerShell( 522 G4double kinEnergy, con 527 G4double kinEnergy, const G4String& part, 523 const G4String& process 528 const G4String& processName, const G4Element* elm, 524 G4int shellIdx, G4doubl 529 G4int shellIdx, G4double cut) 525 { 530 { 526 return ComputeCrossSectionPerShell(kinEnergy 531 return ComputeCrossSectionPerShell(kinEnergy, FindParticle(part), 527 processName, elm->GetZasInt(), 532 processName, elm->GetZasInt(), 528 shellIdx, cut); 533 shellIdx, cut); 529 } 534 } 530 535 531 //....oooOO0OOooo........oooOO0OOooo........oo 536 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 532 537 533 inline 538 inline 534 G4double G4EmCalculator::ComputeEnergyCutFromR 539 G4double G4EmCalculator::ComputeEnergyCutFromRangeCut( 535 G4double range, 540 G4double range, 536 const G4String& particle, 541 const G4String& particle, 537 const G4String& material) 542 const G4String& material) 538 { 543 { 539 return ComputeEnergyCutFromRangeCut(range,Fi 544 return ComputeEnergyCutFromRangeCut(range,FindParticle(particle), 540 FindMaterial(material)); 545 FindMaterial(material)); 541 } 546 } 542 547 543 //....oooOO0OOooo........oooOO0OOooo........oo 548 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 544 549 545 inline 550 inline 546 G4double G4EmCalculator::ComputeMeanFreePath(G 551 G4double G4EmCalculator::ComputeMeanFreePath(G4double kinEnergy, 547 c 552 const G4String& particle, 548 c 553 const G4String& processName, 549 c 554 const G4String& material, 550 555 G4double cut) 551 { 556 { 552 return ComputeMeanFreePath(kinEnergy,FindPar 557 return ComputeMeanFreePath(kinEnergy,FindParticle(particle),processName, 553 FindMaterial(mate 558 FindMaterial(material),cut); 554 } << 555 << 556 //....oooOO0OOooo........oooOO0OOooo........oo << 557 << 558 inline void G4EmCalculator::SetApplySmoothing( << 559 { << 560 applySmoothing = val; << 561 } 559 } 562 560 563 //....oooOO0OOooo........oooOO0OOooo........oo 561 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 564 562 565 #endif 563 #endif 566 564