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