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 // >> 26 // >> 27 // 25 // 28 // 26 // G4PAIxSection.hh -- header file 29 // G4PAIxSection.hh -- header file 27 // 30 // 28 // GEANT 4 class header file --- Copyright CER 31 // GEANT 4 class header file --- Copyright CERN 1995 29 // CERB Geneva Switzerland 32 // CERB Geneva Switzerland 30 // 33 // 31 // for information related to this code, pleas 34 // for information related to this code, please, contact 32 // CERN, CN Division, ASD Group 35 // CERN, CN Division, ASD Group 33 // 36 // 34 // Preparation of ionizing collision cross sec 37 // Preparation of ionizing collision cross section according to Photo Absorption 35 // Ionization (PAI) model for simulation of io 38 // Ionization (PAI) model for simulation of ionization energy losses in very thin 36 // absorbers. Author: Vladimir.Grichine@cern.c 39 // absorbers. Author: Vladimir.Grichine@cern.ch 37 // 40 // 38 // History: 41 // History: 39 // 42 // 40 // 28.10.11, V. Ivanchenko: Migration of excep 43 // 28.10.11, V. Ivanchenko: Migration of exceptions to the new design 41 // 19.10.03, V. Grichine: Integral dEdx was ad 44 // 19.10.03, V. Grichine: Integral dEdx was added for G4PAIModel class 42 // 13.05.03, V. Grichine: Numerical instabilit 45 // 13.05.03, V. Grichine: Numerical instability was fixed in SumOverInterval/Border 43 // functions 46 // functions 44 // 10.02.02, V. Grichine: New functions and ar 47 // 10.02.02, V. Grichine: New functions and arrays/gets for Cerenkov and 45 // plasmon collisions d 48 // plasmon collisions dN/dx 46 // 27.10.99, V. Grichine: Bug fixed in constru 49 // 27.10.99, V. Grichine: Bug fixed in constructors, 3rd constructor and 47 // GetStepEnergyLoss(st 50 // GetStepEnergyLoss(step) were added, fDelta = 0.005 48 // 30.11.97, V. Grichine: 2nd version 51 // 30.11.97, V. Grichine: 2nd version 49 // 11.06.97, V. Grichine: 1st version 52 // 11.06.97, V. Grichine: 1st version 50 53 51 #ifndef G4PAIXSECTION_HH 54 #ifndef G4PAIXSECTION_HH 52 #define G4PAIXSECTION_HH 55 #define G4PAIXSECTION_HH 53 56 54 #include "G4ios.hh" 57 #include "G4ios.hh" 55 #include "globals.hh" 58 #include "globals.hh" 56 #include "Randomize.hh" 59 #include "Randomize.hh" 57 60 58 #include "G4SandiaTable.hh" << 61 #include"G4SandiaTable.hh" 59 62 60 class G4MaterialCutsCouple; 63 class G4MaterialCutsCouple; 61 class G4Sandiatable; 64 class G4Sandiatable; 62 65 63 66 64 class G4PAIxSection 67 class G4PAIxSection 65 { 68 { 66 public: 69 public: 67 // Constructors 70 // Constructors 68 G4PAIxSection(); 71 G4PAIxSection(); 69 G4PAIxSection( G4MaterialCutsCouple* matCC); 72 G4PAIxSection( G4MaterialCutsCouple* matCC); 70 73 71 G4PAIxSection( G4int materialIndex, G4double << 74 G4PAIxSection( G4int materialIndex, >> 75 G4double maxEnergyTransfer ); 72 76 73 G4PAIxSection( G4int materialIndex, 77 G4PAIxSection( G4int materialIndex, // for proton loss table 74 G4double maxEnergyTransfer, 78 G4double maxEnergyTransfer, 75 G4double betaGammaSq , 79 G4double betaGammaSq , 76 G4double** photoAbsCo 80 G4double** photoAbsCof, G4int intNumber ); 77 81 78 G4PAIxSection( G4int materialIndex, 82 G4PAIxSection( G4int materialIndex, // test constructor 79 G4double maxEnergyTransfer, 83 G4double maxEnergyTransfer, 80 G4double betaGammaSq ); 84 G4double betaGammaSq ); 81 85 82 ~G4PAIxSection(); 86 ~G4PAIxSection(); 83 87 84 void Initialize(const G4Material* material, 88 void Initialize(const G4Material* material, G4double maxEnergyTransfer, 85 G4double betaGammaSq, G4SandiaTable*); 89 G4double betaGammaSq, G4SandiaTable*); 86 90 87 // General control functions 91 // General control functions 88 92 89 void ComputeLowEnergyCof(const G4Materia 93 void ComputeLowEnergyCof(const G4Material* material); 90 void ComputeLowEnergyCof(); 94 void ComputeLowEnergyCof(); 91 95 92 void InitPAI(); 96 void InitPAI(); 93 97 94 void NormShift( G4double betaGammaSq ); 98 void NormShift( G4double betaGammaSq ); 95 99 96 void SplainPAI( G4double betaGammaSq ); 100 void SplainPAI( G4double betaGammaSq ); 97 101 98 // Physical methods 102 // Physical methods 99 103 100 G4double RutherfordIntegral( G4int intervalN 104 G4double RutherfordIntegral( G4int intervalNumber, 101 G4double limitLow, 105 G4double limitLow, 102 G4double limitHigh ); << 106 G4double limitHigh ); 103 107 104 G4double ImPartDielectricConst( G4int interv 108 G4double ImPartDielectricConst( G4int intervalNumber, 105 G4double energy ); << 109 G4double energy ); 106 110 107 G4double GetPhotonRange( G4double energy ); 111 G4double GetPhotonRange( G4double energy ); 108 G4double GetElectronRange( G4double energy ) 112 G4double GetElectronRange( G4double energy ); 109 113 110 G4double RePartDielectricConst(G4double ener 114 G4double RePartDielectricConst(G4double energy); 111 115 112 G4double DifPAIxSection( G4int intervalNumbe 116 G4double DifPAIxSection( G4int intervalNumber, 113 G4double betaGammaSq ); << 117 G4double betaGammaSq ); 114 118 115 G4double PAIdNdxCerenkov( G4int intervalNumb 119 G4double PAIdNdxCerenkov( G4int intervalNumber, 116 G4double betaGammaSq ); << 120 G4double betaGammaSq ); 117 G4double PAIdNdxMM( G4int intervalNumber, 121 G4double PAIdNdxMM( G4int intervalNumber, 118 G4double betaGammaSq ); << 122 G4double betaGammaSq ); 119 123 120 G4double PAIdNdxPlasmon( G4int intervalNumbe 124 G4double PAIdNdxPlasmon( G4int intervalNumber, 121 G4double betaGammaSq ); << 125 G4double betaGammaSq ); 122 126 123 G4double PAIdNdxResonance( G4int intervalNum 127 G4double PAIdNdxResonance( G4int intervalNumber, 124 G4double betaGammaSq ); << 128 G4double betaGammaSq ); 125 129 126 130 127 void IntegralPAIxSection(); 131 void IntegralPAIxSection(); 128 void IntegralCerenkov(); 132 void IntegralCerenkov(); 129 void IntegralMM(); 133 void IntegralMM(); 130 void IntegralPlasmon(); 134 void IntegralPlasmon(); 131 void IntegralResonance(); 135 void IntegralResonance(); 132 136 133 G4double SumOverInterval(G4int intervalNumbe 137 G4double SumOverInterval(G4int intervalNumber); 134 G4double SumOverIntervaldEdx(G4int intervalN 138 G4double SumOverIntervaldEdx(G4int intervalNumber); 135 G4double SumOverInterCerenkov(G4int interval 139 G4double SumOverInterCerenkov(G4int intervalNumber); 136 G4double SumOverInterMM(G4int intervalNumber 140 G4double SumOverInterMM(G4int intervalNumber); 137 G4double SumOverInterPlasmon(G4int intervalN 141 G4double SumOverInterPlasmon(G4int intervalNumber); 138 G4double SumOverInterResonance(G4int interva 142 G4double SumOverInterResonance(G4int intervalNumber); 139 143 140 G4double SumOverBorder( G4int intervalNumber 144 G4double SumOverBorder( G4int intervalNumber, 141 G4double energy ); 145 G4double energy ); 142 G4double SumOverBorderdEdx( G4int intervalNu 146 G4double SumOverBorderdEdx( G4int intervalNumber, 143 G4double energy ); 147 G4double energy ); 144 G4double SumOverBordCerenkov( G4int interval 148 G4double SumOverBordCerenkov( G4int intervalNumber, 145 G4double energy ); 149 G4double energy ); 146 G4double SumOverBordMM( G4int intervalNumber 150 G4double SumOverBordMM( G4int intervalNumber, 147 G4double energy ); 151 G4double energy ); 148 G4double SumOverBordPlasmon( G4int intervalN 152 G4double SumOverBordPlasmon( G4int intervalNumber, 149 G4double energy ); 153 G4double energy ); 150 G4double SumOverBordResonance( G4int interva 154 G4double SumOverBordResonance( G4int intervalNumber, 151 G4double energy ); 155 G4double energy ); 152 156 153 G4double GetStepEnergyLoss( G4double step ); 157 G4double GetStepEnergyLoss( G4double step ); 154 G4double GetStepCerenkovLoss( G4double step 158 G4double GetStepCerenkovLoss( G4double step ); 155 G4double GetStepMMLoss( G4double step ); 159 G4double GetStepMMLoss( G4double step ); 156 G4double GetStepPlasmonLoss( G4double step ) 160 G4double GetStepPlasmonLoss( G4double step ); 157 G4double GetStepResonanceLoss( G4double step 161 G4double GetStepResonanceLoss( G4double step ); 158 162 159 G4double GetEnergyTransfer(); 163 G4double GetEnergyTransfer(); 160 G4double GetCerenkovEnergyTransfer(); 164 G4double GetCerenkovEnergyTransfer(); 161 G4double GetMMEnergyTransfer(); 165 G4double GetMMEnergyTransfer(); 162 G4double GetPlasmonEnergyTransfer(); 166 G4double GetPlasmonEnergyTransfer(); 163 G4double GetResonanceEnergyTransfer(); 167 G4double GetResonanceEnergyTransfer(); 164 G4double GetRutherfordEnergyTransfer(); 168 G4double GetRutherfordEnergyTransfer(); 165 169 166 // Inline access functions 170 // Inline access functions 167 171 168 G4int GetNumberOfGammas() const { return fNu 172 G4int GetNumberOfGammas() const { return fNumberOfGammas; } 169 173 170 G4int GetSplineSize() const { return fSpline 174 G4int GetSplineSize() const { return fSplineNumber; } 171 175 172 G4int GetIntervalNumber() const { return fIn 176 G4int GetIntervalNumber() const { return fIntervalNumber; } 173 177 174 G4double GetEnergyInterval(G4int i){ return 178 G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; } 175 179 176 G4double GetDifPAIxSection(G4int i){ return 180 G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; } 177 G4double GetPAIdNdxCerenkov(G4int i){ return 181 G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; } 178 G4double GetPAIdNdxMM(G4int i){ return fdNdx 182 G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; } 179 G4double GetPAIdNdxPlasmon(G4int i){ return 183 G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; } 180 G4double GetPAIdNdxResonance(G4int i){ retur 184 G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; } 181 185 182 G4double GetMeanEnergyLoss() const {return f 186 G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; } 183 G4double GetMeanCerenkovLoss() const {return 187 G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; } 184 G4double GetMeanMMLoss() const {return fInte 188 G4double GetMeanMMLoss() const {return fIntegralMM[0]; } 185 G4double GetMeanPlasmonLoss() const {return 189 G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; } 186 G4double GetMeanResonanceLoss() const {retur 190 G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; } 187 191 188 G4double GetNormalizationCof() const { retur 192 G4double GetNormalizationCof() const { return fNormalizationCof; } 189 193 190 G4double GetLowEnergyCof() const { return fL 194 G4double GetLowEnergyCof() const { return fLowEnergyCof; } 191 195 192 G4double GetLorentzFactor(G4int i) const; 196 G4double GetLorentzFactor(G4int i) const; 193 197 194 inline void SetVerbose(G4int v) { fVerbose=v 198 inline void SetVerbose(G4int v) { fVerbose=v; }; 195 199 196 200 197 inline G4double GetPAItable(G4int i,G4int j) 201 inline G4double GetPAItable(G4int i,G4int j) const; 198 202 199 inline G4double GetSplineEnergy(G4int i) con 203 inline G4double GetSplineEnergy(G4int i) const; 200 204 201 inline G4double GetIntegralPAIxSection(G4int 205 inline G4double GetIntegralPAIxSection(G4int i) const; 202 inline G4double GetIntegralPAIdEdx(G4int i) 206 inline G4double GetIntegralPAIdEdx(G4int i) const; 203 inline G4double GetIntegralCerenkov(G4int i) 207 inline G4double GetIntegralCerenkov(G4int i) const; 204 inline G4double GetIntegralMM(G4int i) const 208 inline G4double GetIntegralMM(G4int i) const; 205 inline G4double GetIntegralPlasmon(G4int i) 209 inline G4double GetIntegralPlasmon(G4int i) const; 206 inline G4double GetIntegralResonance(G4int i 210 inline G4double GetIntegralResonance(G4int i) const; 207 211 208 G4PAIxSection & operator=(const G4PAIxSectio << 209 G4PAIxSection(const G4PAIxSection&) = delete << 210 << 211 private : 212 private : 212 213 213 void CallError(G4int i, const G4String& meth 214 void CallError(G4int i, const G4String& methodName) const; 214 215 >> 216 G4PAIxSection & operator=(const G4PAIxSection &right) = delete; >> 217 G4PAIxSection(const G4PAIxSection&) = delete; >> 218 215 // Local class constants 219 // Local class constants 216 220 217 static const G4double fDelta; // energy shif 221 static const G4double fDelta; // energy shift from interval border = 0.001 218 static const G4double fError; // error in li 222 static const G4double fError; // error in lin-log approximation = 0.005 219 223 220 static G4int fNumberOfGammas; // = 111; << 224 static G4int fNumberOfGammas; // = 111; 221 static const G4double fLorentzFactor[112]; / << 225 static const G4double fLorentzFactor[112]; // static gamma array 222 226 223 static 227 static 224 const G4int fRefGammaNumber; // The number o << 228 const G4int fRefGammaNumber; //The number of gamma for creation of spline (15) >> 229 >> 230 G4int fIntervalNumber ; // The number of energy intervals >> 231 G4double fNormalizationCof; // Normalization cof for PhotoAbsorptionXsection 225 232 226 G4int fIntervalNumber ; // The number o << 233 // G4double fBetaGammaSq; // (beta*gamma)^2 227 G4double fNormalizationCof; // Normalizatio << 228 234 229 G4int fMaterialIndex; // current materi << 235 G4int fMaterialIndex; // current material index 230 G4double fDensity; // Current densit << 236 G4double fDensity; // Current density 231 G4double fElectronDensity; // Current electr << 237 G4double fElectronDensity; // Current electron (number) density 232 G4double fLowEnergyCof; // Correction cof 238 G4double fLowEnergyCof; // Correction cof for low energy region 233 G4int fSplineNumber; // Current size o << 239 G4int fSplineNumber; // Current size of spline 234 G4int fVerbose; // verbose flag << 240 G4int fVerbose; // verbose flag 235 241 236 // Arrays of Sandia coefficients 242 // Arrays of Sandia coefficients 237 243 238 G4OrderedTable* fMatSandiaMatrix; 244 G4OrderedTable* fMatSandiaMatrix; 239 245 240 G4SandiaTable* fSandia; 246 G4SandiaTable* fSandia; 241 247 242 G4DataVector fEnergyInterval; 248 G4DataVector fEnergyInterval; 243 G4DataVector fA1; 249 G4DataVector fA1; 244 G4DataVector fA2; 250 G4DataVector fA2; 245 G4DataVector fA3; 251 G4DataVector fA3; 246 G4DataVector fA4; 252 G4DataVector fA4; 247 253 248 static 254 static 249 const G4int fMaxSplineSize ; // Max size of 255 const G4int fMaxSplineSize ; // Max size of output splain arrays = 500 250 256 251 G4DataVector fSplineEnergy; // << 257 G4DataVector fSplineEnergy; // energy points of splain 252 G4DataVector fRePartDielectricConst; // 258 G4DataVector fRePartDielectricConst; // Real part of dielectric const 253 G4DataVector fImPartDielectricConst; // 259 G4DataVector fImPartDielectricConst; // Imaginary part of dielectric const 254 G4DataVector fIntegralTerm; // 260 G4DataVector fIntegralTerm; // Integral term in PAI cross section 255 G4DataVector fDifPAIxSection; // 261 G4DataVector fDifPAIxSection; // Differential PAI cross section 256 G4DataVector fdNdxCerenkov; // 262 G4DataVector fdNdxCerenkov; // dNdx of Cerenkov collisions 257 G4DataVector fdNdxPlasmon; // 263 G4DataVector fdNdxPlasmon; // dNdx of Plasmon collisions 258 G4DataVector fdNdxMM; // << 264 G4DataVector fdNdxMM; // dNdx of MM-Cerenkov collisions 259 G4DataVector fdNdxResonance; // << 265 G4DataVector fdNdxResonance; // dNdx of Resonance collisions 260 266 261 G4DataVector fIntegralPAIxSection; // 267 G4DataVector fIntegralPAIxSection; // Integral PAI cross section ? 262 G4DataVector fIntegralPAIdEdx; // 268 G4DataVector fIntegralPAIdEdx; // Integral PAI dEdx ? 263 G4DataVector fIntegralCerenkov; // 269 G4DataVector fIntegralCerenkov; // Integral Cerenkov N>omega ? 264 G4DataVector fIntegralPlasmon; // 270 G4DataVector fIntegralPlasmon; // Integral Plasmon N>omega ? 265 G4DataVector fIntegralMM; // << 271 G4DataVector fIntegralMM; // Integral MM N>omega ? 266 G4DataVector fIntegralResonance; // << 272 G4DataVector fIntegralResonance; // Integral resonance N>omega ? 267 273 268 G4double fPAItable[500][112]; // Output arra 274 G4double fPAItable[500][112]; // Output array 269 275 270 }; 276 }; 271 277 272 //////////////// Inline methods ///////////// 278 //////////////// Inline methods ////////////////////////////////// 273 // 279 // 274 280 275 inline G4double G4PAIxSection::GetPAItable(G4i 281 inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const 276 { 282 { 277 return fPAItable[i][j]; 283 return fPAItable[i][j]; 278 } 284 } 279 285 280 inline G4double G4PAIxSection::GetSplineEnergy 286 inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const 281 { 287 { 282 if(i < 1 || i > fSplineNumber) { CallError(i 288 if(i < 1 || i > fSplineNumber) { CallError(i, "GetSplineEnergy"); } 283 return fSplineEnergy[i]; 289 return fSplineEnergy[i]; 284 } 290 } 285 291 286 inline G4double G4PAIxSection::GetIntegralPAIx 292 inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const 287 { 293 { 288 if(i < 1 || i > fSplineNumber) { CallError(i 294 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIxSection"); } 289 return fIntegralPAIxSection[i]; 295 return fIntegralPAIxSection[i]; 290 } 296 } 291 297 292 inline G4double G4PAIxSection::GetIntegralPAId 298 inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const 293 { 299 { 294 if(i < 1 || i > fSplineNumber) { CallError(i 300 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIdEdx"); } 295 return fIntegralPAIdEdx[i]; 301 return fIntegralPAIdEdx[i]; 296 } 302 } 297 303 298 inline G4double G4PAIxSection::GetIntegralCere 304 inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const 299 { 305 { 300 if(i < 1 || i > fSplineNumber) { CallError(i 306 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralCerenkov"); } 301 return fIntegralCerenkov[i]; 307 return fIntegralCerenkov[i]; 302 } 308 } 303 309 304 inline G4double G4PAIxSection::GetIntegralMM(G 310 inline G4double G4PAIxSection::GetIntegralMM(G4int i) const 305 { 311 { 306 if(i < 1 || i > fSplineNumber) { CallError(i 312 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralMM"); } 307 return fIntegralMM[i]; 313 return fIntegralMM[i]; 308 } 314 } 309 315 310 inline G4double G4PAIxSection::GetIntegralPlas 316 inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const 311 { 317 { 312 if(i < 1 || i > fSplineNumber) { CallError(i 318 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPlasmon"); } 313 return fIntegralPlasmon[i]; 319 return fIntegralPlasmon[i]; 314 } 320 } 315 321 316 inline G4double G4PAIxSection::GetIntegralReso 322 inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const 317 { 323 { 318 if(i < 1 || i > fSplineNumber) { CallError(i 324 if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralResonance"); } 319 return fIntegralResonance[i]; 325 return fIntegralResonance[i]; 320 } 326 } 321 327 322 #endif 328 #endif 323 329 324 // ----------------- end of G4PAIxSection he 330 // ----------------- end of G4PAIxSection header file ------------------- 325 331