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