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 // $Id: G4PAIySection.hh,v 1.3 2010-11-21 10:55:44 grichine Exp $ >> 28 // GEANT4 tag $Name: not supported by cvs2svn $ >> 29 // 25 // 30 // 26 // G4PAIySection.hh -- header file 31 // G4PAIySection.hh -- header file 27 // 32 // 28 // 33 // 29 // Preparation of ionizing collision cross sec 34 // Preparation of ionizing collision cross section according to Photo Absorption 30 // Ionization (PAI) model for simulation of io 35 // Ionization (PAI) model for simulation of ionization energy losses in very thin 31 // absorbers. Author: Vladimir.Grichine@cern.c 36 // absorbers. Author: Vladimir.Grichine@cern.ch 32 // 37 // 33 // History: 38 // History: 34 // 39 // 35 // 01.10.07, V.Ivanchenko create using V.Grich 40 // 01.10.07, V.Ivanchenko create using V.Grichine G4PAIxSection class 36 // 21.11.10, V.Grichine fVerbose and SetVerb << 41 // 21.11.10, V.Grichine, fVerbose and SetVerbose added 37 // 28.10.11, V.Ivanchenko Migration of excepti << 38 42 39 #ifndef G4PAIYSECTION_HH 43 #ifndef G4PAIYSECTION_HH 40 #define G4PAIYSECTION_HH 44 #define G4PAIYSECTION_HH 41 45 42 #include "G4ios.hh" 46 #include "G4ios.hh" 43 #include "globals.hh" 47 #include "globals.hh" 44 #include "Randomize.hh" 48 #include "Randomize.hh" 45 49 46 #include "G4SandiaTable.hh" 50 #include "G4SandiaTable.hh" 47 51 48 class G4PAIySection 52 class G4PAIySection 49 { 53 { 50 public: 54 public: 51 55 52 explicit G4PAIySection(); << 56 G4PAIySection(); 53 << 57 54 ~G4PAIySection() = default; << 58 ~G4PAIySection(); 55 << 59 56 void Initialize(const G4Material* material, << 60 void Initialize(const G4Material* material, 57 G4double betaGammaSq, G4Sand << 61 G4double maxEnergyTransfer, 58 << 62 G4double betaGammaSq); 59 void ComputeLowEnergyCof(const G4Material* m << 63 60 << 61 void InitPAI(); 64 void InitPAI(); 62 65 63 void NormShift( G4double betaGammaSq ); 66 void NormShift( G4double betaGammaSq ); 64 67 65 void SplainPAI( G4double betaGammaSq ); 68 void SplainPAI( G4double betaGammaSq ); 66 << 69 67 // Physical methods 70 // Physical methods 68 G4double RutherfordIntegral( G4int intervalN 71 G4double RutherfordIntegral( G4int intervalNumber, 69 G4double limitL << 72 G4double limitLow, 70 G4double limitH << 73 G4double limitHigh ); 71 74 72 G4double ImPartDielectricConst( G4int interv 75 G4double ImPartDielectricConst( G4int intervalNumber, 73 G4double ene << 76 G4double energy ); 74 77 75 G4double RePartDielectricConst(G4double ener 78 G4double RePartDielectricConst(G4double energy); 76 79 77 G4double DifPAIySection( G4int intervalNumbe 80 G4double DifPAIySection( G4int intervalNumber, 78 G4double betaGammaS << 81 G4double betaGammaSq ); 79 82 80 G4double PAIdNdxCerenkov( G4int intervalNumb 83 G4double PAIdNdxCerenkov( G4int intervalNumber, 81 G4double betaGamma << 84 G4double betaGammaSq ); 82 85 83 G4double PAIdNdxPlasmon( G4int intervalNumbe 86 G4double PAIdNdxPlasmon( G4int intervalNumber, 84 G4double betaGammaS << 87 G4double betaGammaSq ); 85 88 86 void IntegralPAIySection(); 89 void IntegralPAIySection(); 87 void IntegralCerenkov(); 90 void IntegralCerenkov(); 88 void IntegralPlasmon(); 91 void IntegralPlasmon(); 89 92 90 G4double SumOverInterval(G4int intervalNumbe 93 G4double SumOverInterval(G4int intervalNumber); 91 G4double SumOverIntervaldEdx(G4int intervalN 94 G4double SumOverIntervaldEdx(G4int intervalNumber); 92 G4double SumOverInterCerenkov(G4int interval 95 G4double SumOverInterCerenkov(G4int intervalNumber); 93 G4double SumOverInterPlasmon(G4int intervalN 96 G4double SumOverInterPlasmon(G4int intervalNumber); 94 97 95 G4double SumOverBorder( G4int intervalNumber 98 G4double SumOverBorder( G4int intervalNumber, 96 G4double energy << 99 G4double energy ); 97 G4double SumOverBorderdEdx( G4int intervalNu 100 G4double SumOverBorderdEdx( G4int intervalNumber, 98 G4double energy << 101 G4double energy ); 99 G4double SumOverBordCerenkov( G4int interval 102 G4double SumOverBordCerenkov( G4int intervalNumber, 100 G4double energ << 103 G4double energy ); 101 G4double SumOverBordPlasmon( G4int intervalN 104 G4double SumOverBordPlasmon( G4int intervalNumber, 102 G4double energy << 105 G4double energy ); 103 106 104 G4double GetStepEnergyLoss( G4double step ); 107 G4double GetStepEnergyLoss( G4double step ); 105 G4double GetStepCerenkovLoss( G4double step 108 G4double GetStepCerenkovLoss( G4double step ); 106 G4double GetStepPlasmonLoss( G4double step ) 109 G4double GetStepPlasmonLoss( G4double step ); 107 << 110 108 G4double GetLorentzFactor(G4int j) const; << 109 << 110 // Inline access functions 111 // Inline access functions 111 112 112 inline G4int GetNumberOfGammas() const { ret 113 inline G4int GetNumberOfGammas() const { return fNumberOfGammas; } 113 << 114 114 inline G4int GetSplineSize() const { return 115 inline G4int GetSplineSize() const { return fSplineNumber; } 115 << 116 116 inline G4int GetIntervalNumber() const { ret 117 inline G4int GetIntervalNumber() const { return fIntervalNumber; } 117 118 118 inline G4double GetEnergyInterval(G4int i){ 119 inline G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; } 119 120 120 inline G4double GetDifPAIySection(G4int i){ 121 inline G4double GetDifPAIySection(G4int i){ return fDifPAIySection[i]; } 121 inline G4double GetPAIdNdxCrenkov(G4int i){ 122 inline G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i]; } 122 inline G4double GetPAIdNdxPlasmon(G4int i){ 123 inline G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; } 123 << 124 124 inline G4double GetMeanEnergyLoss() const {r 125 inline G4double GetMeanEnergyLoss() const {return fIntegralPAIySection[0]; } 125 inline G4double GetMeanCerenkovLoss() const 126 inline G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; } 126 inline G4double GetMeanPlasmonLoss() const { 127 inline G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; } 127 128 128 inline G4double GetNormalizationCof() const 129 inline G4double GetNormalizationCof() const { return fNormalizationCof; } 129 130 130 inline G4double GetPAItable(G4int i,G4int j) 131 inline G4double GetPAItable(G4int i,G4int j) const; 131 << 132 >> 133 inline G4double GetLorentzFactor(G4int i) const; >> 134 132 inline G4double GetSplineEnergy(G4int i) con 135 inline G4double GetSplineEnergy(G4int i) const; 133 << 136 134 inline G4double GetIntegralPAIySection(G4int 137 inline G4double GetIntegralPAIySection(G4int i) const; 135 inline G4double GetIntegralPAIdEdx(G4int i) 138 inline G4double GetIntegralPAIdEdx(G4int i) const; 136 inline G4double GetIntegralCerenkov(G4int i) 139 inline G4double GetIntegralCerenkov(G4int i) const; 137 inline G4double GetIntegralPlasmon(G4int i) 140 inline G4double GetIntegralPlasmon(G4int i) const; 138 141 139 inline void SetVerbose(G4int v) { fVerbose = << 142 void SetVerbose(G4int v){fVerbose = v;}; 140 << 141 G4PAIySection & operator=(const G4PAIySectio << 142 G4PAIySection(const G4PAIySection&) = delete << 143 143 144 private : 144 private : 145 145 146 void CallError(G4int i, const G4String& meth << 146 // Local class constants 147 << 148 // Local class constants << 149 147 150 static const G4double fDelta; // energy shif 148 static const G4double fDelta; // energy shift from interval border = 0.001 151 static const G4double fError; // error in li 149 static const G4double fError; // error in lin-log approximation = 0.005 152 150 153 static G4int fNumberOfGammas; // = 111; << 151 static G4int fNumberOfGammas; // = 111; 154 static const G4double fLorentzFactor[112]; 152 static const G4double fLorentzFactor[112]; // static gamma array 155 153 156 static 154 static 157 const G4int fRefGammaNumber; // The number o << 155 const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15) 158 156 159 G4int fIntervalNumber ; // The number << 157 G4int fIntervalNumber ; // The number of energy intervals 160 G4double fNormalizationCof; // Normalizatio << 158 G4double fNormalizationCof; // Normalization cof for PhotoAbsorptionXsection 161 << 162 G4double betaBohr; << 163 G4double betaBohr4; << 164 159 165 G4double fDensity; // Current den 160 G4double fDensity; // Current density 166 G4double fElectronDensity; // Current ele 161 G4double fElectronDensity; // Current electron (number) density 167 G4double fLowEnergyCof; // Correction << 168 G4int fSplineNumber; // Current siz 162 G4int fSplineNumber; // Current size of spline 169 G4int fVerbose; // verbose fla << 163 G4int fVerbose; // verbose flag 170 164 171 G4SandiaTable* fSandia; 165 G4SandiaTable* fSandia; 172 166 173 G4DataVector fEnergyInterval; << 167 G4double fEnergyInterval[500]; 174 G4DataVector fA1; << 168 G4double fA1[500]; 175 G4DataVector fA2; << 169 G4double fA2[500]; 176 G4DataVector fA3; << 170 G4double fA3[500]; 177 G4DataVector fA4; << 171 G4double fA4[500]; 178 172 179 static 173 static 180 const G4int fMaxSplineSize; // Max size of << 174 const G4int fMaxSplineSize ; // Max size of output splain arrays = 500 >> 175 >> 176 G4double fSplineEnergy[500]; // energy points of splain >> 177 G4double fRePartDielectricConst[500]; // Real part of dielectric const >> 178 G4double fImPartDielectricConst[500]; // Imaginary part of dielectric const >> 179 G4double fIntegralTerm[500]; // Integral term in PAI cross section >> 180 G4double fDifPAIySection[500]; // Differential PAI cross section >> 181 G4double fdNdxCerenkov[500]; // dNdx of Cerenkov collisions >> 182 G4double fdNdxPlasmon[500]; // dNdx of Plasmon collisions >> 183 >> 184 G4double fIntegralPAIySection[500]; // Integral PAI cross section ? >> 185 G4double fIntegralPAIdEdx[500]; // Integral PAI dEdx ? >> 186 G4double fIntegralCerenkov[500]; // Integral Cerenkov N>omega ? >> 187 G4double fIntegralPlasmon[500]; // Integral Plasmon N>omega ? 181 188 182 G4DataVector fSplineEnergy; // ener << 189 G4double fPAItable[500][112]; // Output array 183 G4DataVector fRePartDielectricConst; // Real << 184 G4DataVector fImPartDielectricConst; // Imag << 185 G4DataVector fIntegralTerm; // Inte << 186 G4DataVector fDifPAIySection; // Diff << 187 G4DataVector fdNdxCerenkov; // dNdx << 188 G4DataVector fdNdxPlasmon; // dNdx << 189 << 190 G4DataVector fIntegralPAIySection; // Inte << 191 G4DataVector fIntegralPAIdEdx; // Inte << 192 G4DataVector fIntegralCerenkov; // Inte << 193 G4DataVector fIntegralPlasmon; // Inte << 194 190 195 G4double fPAItable[500][112]; // Outp << 196 }; 191 }; 197 192 >> 193 //////////////// Inline methods ////////////////////////////////// >> 194 // >> 195 >> 196 198 inline G4double G4PAIySection::GetPAItable(G4i 197 inline G4double G4PAIySection::GetPAItable(G4int i, G4int j) const 199 { 198 { 200 return fPAItable[i][j]; 199 return fPAItable[i][j]; 201 } 200 } 202 201 >> 202 inline G4double G4PAIySection::GetLorentzFactor(G4int j) const >> 203 { >> 204 return fLorentzFactor[j]; >> 205 } >> 206 203 inline G4double G4PAIySection::GetSplineEnergy 207 inline G4double G4PAIySection::GetSplineEnergy(G4int i) const 204 { 208 { 205 if(i < 1 || i > fSplineNumber) { CallError(i << 209 if(i < 1 || i > fSplineNumber) 206 return fSplineEnergy[i]; << 210 { >> 211 G4Exception("Invalid argument in G4PAIySection::GetSplineEnergy"); >> 212 } >> 213 return fSplineEnergy[i]; 207 } 214 } 208 << 215 209 inline G4double G4PAIySection::GetIntegralPAIy 216 inline G4double G4PAIySection::GetIntegralPAIySection(G4int i) const 210 { 217 { 211 if(i < 1 || i > fSplineNumber) { CallError(i << 218 if(i < 1 || i > fSplineNumber) 212 return fIntegralPAIySection[i]; << 219 { >> 220 G4Exception("Invalid argument in G4PAIySection::GetIntegralPAIySection"); >> 221 } >> 222 return fIntegralPAIySection[i]; 213 } 223 } 214 224 215 inline G4double G4PAIySection::GetIntegralPAId 225 inline G4double G4PAIySection::GetIntegralPAIdEdx(G4int i) const 216 { 226 { 217 if(i < 1 || i > fSplineNumber) { CallError(i << 227 if(i < 1 || i > fSplineNumber) 218 return fIntegralPAIdEdx[i]; << 228 { >> 229 G4Exception("Invalid argument in G4PAIySection::GetIntegralPAIySection"); >> 230 } >> 231 return fIntegralPAIdEdx[i]; 219 } 232 } 220 233 221 inline G4double G4PAIySection::GetIntegralCere 234 inline G4double G4PAIySection::GetIntegralCerenkov(G4int i) const 222 { 235 { 223 if(i < 1 || i > fSplineNumber) { CallError(i << 236 if(i < 1 || i > fSplineNumber) 224 return fIntegralCerenkov[i]; << 237 { >> 238 G4Exception("Invalid argument in G4PAIySection::GetIntegralCerenkov"); >> 239 } >> 240 return fIntegralCerenkov[i]; 225 } 241 } 226 242 227 inline G4double G4PAIySection::GetIntegralPlas 243 inline G4double G4PAIySection::GetIntegralPlasmon(G4int i) const 228 { 244 { 229 if(i < 1 || i > fSplineNumber) { CallError(i << 245 if(i < 1 || i > fSplineNumber) 230 return fIntegralPlasmon[i]; << 246 { >> 247 G4Exception("Invalid argument in G4PAIySection::GetIntegralPlasmon"); >> 248 } >> 249 return fIntegralPlasmon[i]; 231 } 250 } 232 251 233 #endif 252 #endif 234 253 235 // ----------------- end of G4PAIySection he 254 // ----------------- end of G4PAIySection header file ------------------- 236 255