00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 #ifndef G4PAIXSECTION_HH
00056 #define G4PAIXSECTION_HH
00057 
00058 #include "G4ios.hh"
00059 #include "globals.hh"
00060 #include "Randomize.hh"
00061 
00062 #include"G4SandiaTable.hh"
00063 
00064 class G4MaterialCutsCouple;
00065 class G4Sandiatable;
00066 
00067 
00068 class G4PAIxSection
00069 {
00070 public:
00071           
00072   G4PAIxSection( G4MaterialCutsCouple* matCC);
00073           
00074   G4PAIxSection( G4int materialIndex,
00075                          G4double maxEnergyTransfer   );
00076           
00077   G4PAIxSection( G4int materialIndex,           
00078                          G4double maxEnergyTransfer,
00079                          G4double betaGammaSq ,
00080                          G4double** photoAbsCof, G4int intNumber         );
00081 
00082   G4PAIxSection( G4int materialIndex,           
00083                          G4double maxEnergyTransfer,
00084                          G4double betaGammaSq          );
00085           
00086           
00087           
00088           
00089           
00090           ~G4PAIxSection();
00091           
00092           
00093           
00094           
00095           
00096           
00097           
00098           
00099           
00100           
00101           void InitPAI();
00102 
00103           void NormShift( G4double betaGammaSq );
00104 
00105           void SplainPAI( G4double betaGammaSq );
00106                   
00107           
00108           
00109 
00110           G4double RutherfordIntegral( G4int intervalNumber,
00111                                        G4double limitLow,
00112                                        G4double limitHigh     );
00113 
00114           G4double ImPartDielectricConst( G4int intervalNumber,
00115                                           G4double energy        );
00116 
00117           G4double GetPhotonRange( G4double energy );
00118           G4double GetElectronRange( G4double energy );
00119 
00120           G4double RePartDielectricConst(G4double energy);
00121 
00122           G4double DifPAIxSection( G4int intervalNumber,
00123                                    G4double betaGammaSq    );
00124 
00125           G4double PAIdNdxCerenkov( G4int intervalNumber,
00126                                    G4double betaGammaSq    );
00127           G4double PAIdNdxMM( G4int intervalNumber,
00128                                    G4double betaGammaSq    );
00129 
00130           G4double PAIdNdxPlasmon( G4int intervalNumber,
00131                                    G4double betaGammaSq    );
00132 
00133           G4double PAIdNdxResonance( G4int intervalNumber,
00134                                    G4double betaGammaSq    );
00135 
00136           void     IntegralPAIxSection();
00137           void     IntegralCerenkov();
00138           void     IntegralMM();
00139           void     IntegralPlasmon();
00140           void     IntegralResonance();
00141 
00142           G4double SumOverInterval(G4int intervalNumber);
00143           G4double SumOverIntervaldEdx(G4int intervalNumber);
00144           G4double SumOverInterCerenkov(G4int intervalNumber);
00145           G4double SumOverInterMM(G4int intervalNumber);
00146           G4double SumOverInterPlasmon(G4int intervalNumber);
00147           G4double SumOverInterResonance(G4int intervalNumber);
00148 
00149           G4double SumOverBorder( G4int intervalNumber,
00150                                   G4double energy          );
00151           G4double SumOverBorderdEdx( G4int intervalNumber,
00152                                   G4double energy          );
00153           G4double SumOverBordCerenkov( G4int intervalNumber,
00154                                         G4double energy          );
00155           G4double SumOverBordMM( G4int intervalNumber,
00156                                         G4double energy          );
00157           G4double SumOverBordPlasmon( G4int intervalNumber,
00158                                        G4double energy          );
00159           G4double SumOverBordResonance( G4int intervalNumber,
00160                                        G4double energy          );
00161 
00162           G4double GetStepEnergyLoss( G4double step );
00163           G4double GetStepCerenkovLoss( G4double step );
00164           G4double GetStepMMLoss( G4double step );
00165           G4double GetStepPlasmonLoss( G4double step );
00166           G4double GetStepResonanceLoss( G4double step );
00167          
00168           G4double GetEnergyTransfer();
00169           G4double GetCerenkovEnergyTransfer();
00170           G4double GetMMEnergyTransfer();
00171           G4double GetPlasmonEnergyTransfer();
00172           G4double GetResonanceEnergyTransfer();
00173           G4double GetRutherfordEnergyTransfer();
00174          
00175           
00176 
00177           G4int GetNumberOfGammas() const { return fNumberOfGammas; }
00178           
00179           G4int GetSplineSize() const { return fSplineNumber; }
00180           
00181           G4int GetIntervalNumber() const { return fIntervalNumber; }
00182 
00183           G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; } 
00184 
00185           G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; } 
00186           G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; } 
00187           G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; } 
00188           G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; } 
00189           G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; } 
00190           
00191           G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; }
00192           G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; }
00193           G4double GetMeanMMLoss() const {return fIntegralMM[0]; }
00194           G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; }
00195           G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; }
00196 
00197           G4double GetNormalizationCof() const { return fNormalizationCof; }
00198           
00199           inline G4double GetPAItable(G4int i,G4int j) const;
00200 
00201           inline G4double GetLorentzFactor(G4int i) const;
00202                   
00203           inline G4double GetSplineEnergy(G4int i) const;
00204           
00205           inline G4double GetIntegralPAIxSection(G4int i) const;
00206           inline G4double GetIntegralPAIdEdx(G4int i) const;
00207           inline G4double GetIntegralCerenkov(G4int i) const;
00208           inline G4double GetIntegralMM(G4int i) const;
00209           inline G4double GetIntegralPlasmon(G4int i) const;
00210           inline G4double GetIntegralResonance(G4int i) const;
00211 
00212 private :
00213 
00214   void CallError(G4int i, const G4String& methodName) const;
00215 
00216   G4PAIxSection & operator=(const G4PAIxSection &right);
00217   G4PAIxSection(const G4PAIxSection&);
00218 
00219 
00220  
00221 static const G4double fDelta; 
00222 static const G4double fError; 
00223 
00224 static       G4int fNumberOfGammas;         
00225 static const G4double fLorentzFactor[112];  
00226 
00227 static 
00228 const G4int fRefGammaNumber ; 
00229 
00230 G4int    fIntervalNumber ;    
00231 G4double fNormalizationCof;   
00232 
00233 
00234 
00235   G4int fMaterialIndex;  
00236   G4double fDensity;            
00237   G4double fElectronDensity;    
00238   G4int    fSplineNumber;       
00239 
00240 
00241 
00242   G4OrderedTable* fMatSandiaMatrix;
00243   G4SandiaTable*  fSandia;
00244 
00245 G4double* fEnergyInterval;
00246 G4double* fA1; 
00247 G4double* fA2;
00248 G4double* fA3; 
00249 G4double* fA4;
00250 
00251 static
00252 const G4int   fMaxSplineSize ;          
00253 
00254 
00255 
00256 
00257 
00258 
00259 
00260 
00261  
00262 
00263 
00264 G4double          fSplineEnergy[500];   
00265 G4double fRePartDielectricConst[500];   
00266 G4double fImPartDielectricConst[500];   
00267 G4double          fIntegralTerm[500];   
00268 G4double        fDifPAIxSection[500];   
00269 G4double          fdNdxCerenkov[500];   
00270 G4double          fdNdxMM[500];   
00271 G4double          fdNdxPlasmon[500];   
00272 G4double          fdNdxResonance[500];   
00273 
00274 G4double   fIntegralPAIxSection[500];   
00275 G4double   fIntegralPAIdEdx[500];   
00276 G4double   fIntegralCerenkov[500];   
00277 G4double   fIntegralMM[500];   
00278 G4double   fIntegralPlasmon[500];   
00279 G4double   fIntegralResonance[500];   
00280 
00281 G4double fPAItable[500][112]; 
00282 
00283 };    
00284 
00286 
00287 
00288 inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const
00289 {
00290    return fPAItable[i][j];
00291 }
00292 
00293 inline G4double G4PAIxSection::GetLorentzFactor(G4int j) const
00294 {
00295    return fLorentzFactor[j];
00296 }
00297 
00298 inline G4double G4PAIxSection::GetSplineEnergy(G4int i) const 
00299 {
00300   if(i < 1 || i > fSplineNumber) { CallError(i, "GetSplineEnergy"); }
00301   return fSplineEnergy[i];
00302 }
00303           
00304 inline G4double G4PAIxSection::GetIntegralPAIxSection(G4int i) const 
00305 {
00306   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIxSection"); }
00307   return fIntegralPAIxSection[i];
00308 }
00309 
00310 inline G4double G4PAIxSection::GetIntegralPAIdEdx(G4int i) const 
00311 {
00312   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIdEdx"); }
00313   return fIntegralPAIdEdx[i];
00314 }
00315 
00316 inline G4double G4PAIxSection::GetIntegralCerenkov(G4int i) const 
00317 {
00318   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralCerenkov"); }
00319   return fIntegralCerenkov[i];
00320 }
00321 
00322 inline G4double G4PAIxSection::GetIntegralMM(G4int i) const 
00323 {
00324   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralMM"); }
00325   return fIntegralMM[i];
00326 }
00327 
00328 inline G4double G4PAIxSection::GetIntegralPlasmon(G4int i) const 
00329 {
00330   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPlasmon"); }
00331   return fIntegralPlasmon[i];
00332 }
00333 
00334 inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const 
00335 {
00336   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralResonance"); }
00337   return fIntegralResonance[i];
00338 }
00339 
00340 #endif   
00341 
00342