G4PAIxSection.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // G4PAIxSection.hh -- header file
00031 //
00032 // GEANT 4 class header file --- Copyright CERN 1995
00033 // CERB Geneva Switzerland
00034 //
00035 // for information related to this code, please, contact
00036 // CERN, CN Division, ASD Group
00037 //
00038 // Preparation of ionizing collision cross section according to Photo Absorption 
00039 // Ionization (PAI) model for simulation of ionization energy losses in very thin
00040 // absorbers. Author: Vladimir.Grichine@cern.ch
00041 //
00042 // History:
00043 //
00044 // 28.10.11, V. Ivanchenko: Migration of exceptions to the new design 
00045 // 19.10.03, V. Grichine: Integral dEdx was added for G4PAIModel class 
00046 // 13.05.03, V. Grichine: Numerical instability was fixed in SumOverInterval/Border 
00047 //                        functions
00048 // 10.02.02, V. Grichine: New functions and arrays/gets for Cerenkov and 
00049 //                        plasmon collisions dN/dx
00050 // 27.10.99, V. Grichine: Bug fixed in constructors, 3rd constructor and 
00051 //                        GetStepEnergyLoss(step) were added, fDelta = 0.005
00052 // 30.11.97, V. Grichine: 2nd version 
00053 // 11.06.97, V. Grichine: 1st version
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           // Constructors
00072   G4PAIxSection( G4MaterialCutsCouple* matCC);
00073           
00074   G4PAIxSection( G4int materialIndex,
00075                          G4double maxEnergyTransfer   );
00076           
00077   G4PAIxSection( G4int materialIndex,           // for proton loss table
00078                          G4double maxEnergyTransfer,
00079                          G4double betaGammaSq ,
00080                          G4double** photoAbsCof, G4int intNumber         );
00081 
00082   G4PAIxSection( G4int materialIndex,           // test constructor
00083                          G4double maxEnergyTransfer,
00084                          G4double betaGammaSq          );
00085           
00086           // G4PAIxSection(const G4PAIxSection& right);
00087           
00088           // Destructor
00089           
00090           ~G4PAIxSection();
00091           
00092           // Operators
00093           // G4PAIxSection& operator=(const G4PAIxSection& right);
00094           // G4int operator==(const G4PAIxSection& right)const;
00095           // G4int operator!=(const G4PAIxSection& right)const;
00096           
00097           // Methods
00098           
00099           // General control functions
00100           
00101           void InitPAI();
00102 
00103           void NormShift( G4double betaGammaSq );
00104 
00105           void SplainPAI( G4double betaGammaSq );
00106                   
00107           // Physical methods
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           // Inline access functions
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 // Local class constants
00220  
00221 static const G4double fDelta; // energy shift from interval border = 0.001
00222 static const G4double fError; // error in lin-log approximation = 0.005
00223 
00224 static       G4int fNumberOfGammas;         // = 111;
00225 static const G4double fLorentzFactor[112];  //  static gamma array
00226 
00227 static 
00228 const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
00229 
00230 G4int    fIntervalNumber ;    //  The number of energy intervals
00231 G4double fNormalizationCof;   // Normalization cof for PhotoAbsorptionXsection
00232 
00233 // G4double fBetaGammaSq;        // (beta*gamma)^2
00234 
00235   G4int fMaterialIndex;  // current material index
00236   G4double fDensity;            // Current density
00237   G4double fElectronDensity;    // Current electron (number) density
00238   G4int    fSplineNumber;       // Current size of spline
00239 
00240 // Arrays of Sandia coefficients
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 ;          // Max size of output splain arrays = 500
00253 
00254 /* ******************
00255 G4double*          fSplineEnergy;   // energy points of splain
00256 G4double* fRePartDielectricConst;   // Real part of dielectric const
00257 G4double* fImPartDielectricConst;   // Imaginary part of dielectric const
00258 G4double*          fIntegralTerm;   // Integral term in PAI cross section
00259 G4double*        fDifPAIxSection;   // Differential PAI cross section
00260 G4double*   fIntegralPAIxSection;   // Integral PAI cross section  ?
00261 */ 
00262 
00263 
00264 G4double          fSplineEnergy[500];   // energy points of splain
00265 G4double fRePartDielectricConst[500];   // Real part of dielectric const
00266 G4double fImPartDielectricConst[500];   // Imaginary part of dielectric const
00267 G4double          fIntegralTerm[500];   // Integral term in PAI cross section
00268 G4double        fDifPAIxSection[500];   // Differential PAI cross section
00269 G4double          fdNdxCerenkov[500];   // dNdx of Cerenkov collisions
00270 G4double          fdNdxMM[500];   // dNdx of MM-Cerenkov collisions
00271 G4double          fdNdxPlasmon[500];   // dNdx of Plasmon collisions
00272 G4double          fdNdxResonance[500];   // dNdx of resonance collisions
00273 
00274 G4double   fIntegralPAIxSection[500];   // Integral PAI cross section  ?
00275 G4double   fIntegralPAIdEdx[500];   // Integral PAI dEdx  ?
00276 G4double   fIntegralCerenkov[500];   // Integral Cerenkov N>omega  ?
00277 G4double   fIntegralMM[500];   // Integral MM-Cerenkov N>omega  ?
00278 G4double   fIntegralPlasmon[500];   // Integral Plasmon N>omega  ?
00279 G4double   fIntegralResonance[500];   // Integral resonance N>omega  ?
00280 
00281 G4double fPAItable[500][112]; // Output array
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 // -----------------   end of G4PAIxSection header file    -------------------

Generated on Mon May 27 17:49:14 2013 for Geant4 by  doxygen 1.4.7