G4PAIySection.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 // G4PAIySection.hh -- header file
00031 //
00032 //
00033 // Preparation of ionizing collision cross section according to Photo Absorption 
00034 // Ionization (PAI) model for simulation of ionization energy losses in very thin
00035 // absorbers. Author: Vladimir.Grichine@cern.ch
00036 //
00037 // History:
00038 //
00039 // 01.10.07, V.Ivanchenko create using V.Grichine G4PAIxSection class
00040 // 21.11.10, V.Grichine   fVerbose and SetVerbose added
00041 // 28.10.11, V.Ivanchenko Migration of exceptions to the new design 
00042 
00043 #ifndef G4PAIYSECTION_HH
00044 #define G4PAIYSECTION_HH
00045 
00046 #include "G4ios.hh"
00047 #include "globals.hh"
00048 #include "Randomize.hh"
00049 
00050 #include "G4SandiaTable.hh"
00051 
00052 class G4PAIySection
00053 {
00054 public:
00055 
00056   G4PAIySection();
00057           
00058   ~G4PAIySection();
00059 
00060   void Initialize(const G4Material* material, 
00061                   G4double maxEnergyTransfer, 
00062                   G4double betaGammaSq);
00063                     
00064   void     ComputeLowEnergyCof(const G4Material* material);
00065 
00066   void InitPAI();
00067 
00068   void NormShift( G4double betaGammaSq );
00069   
00070   void SplainPAI( G4double betaGammaSq );
00071                   
00072   // Physical methods
00073   G4double RutherfordIntegral( G4int intervalNumber,
00074                                G4double limitLow,
00075                                G4double limitHigh     );
00076 
00077   G4double ImPartDielectricConst( G4int intervalNumber,
00078                                   G4double energy        );
00079 
00080   G4double RePartDielectricConst(G4double energy);
00081 
00082   G4double DifPAIySection( G4int intervalNumber,
00083                            G4double betaGammaSq    );
00084 
00085   G4double PAIdNdxCerenkov( G4int intervalNumber,
00086                             G4double betaGammaSq    );
00087 
00088   G4double PAIdNdxPlasmon( G4int intervalNumber,
00089                            G4double betaGammaSq    );
00090 
00091   void     IntegralPAIySection();
00092   void     IntegralCerenkov();
00093   void     IntegralPlasmon();
00094 
00095   G4double SumOverInterval(G4int intervalNumber);
00096   G4double SumOverIntervaldEdx(G4int intervalNumber);
00097   G4double SumOverInterCerenkov(G4int intervalNumber);
00098   G4double SumOverInterPlasmon(G4int intervalNumber);
00099 
00100   G4double SumOverBorder( G4int intervalNumber,
00101                           G4double energy          );
00102   G4double SumOverBorderdEdx( G4int intervalNumber,
00103                               G4double energy          );
00104   G4double SumOverBordCerenkov( G4int intervalNumber,
00105                                 G4double energy          );
00106   G4double SumOverBordPlasmon( G4int intervalNumber,
00107                                G4double energy          );
00108 
00109   G4double GetStepEnergyLoss( G4double step );
00110   G4double GetStepCerenkovLoss( G4double step );
00111   G4double GetStepPlasmonLoss( G4double step );
00112          
00113   // Inline access functions
00114 
00115   inline G4int GetNumberOfGammas() const { return fNumberOfGammas; }
00116           
00117   inline G4int GetSplineSize() const { return fSplineNumber; }
00118           
00119   inline G4int GetIntervalNumber() const { return fIntervalNumber; }
00120 
00121   inline G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; } 
00122 
00123   inline G4double GetDifPAIySection(G4int i){ return fDifPAIySection[i]; } 
00124   inline G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i]; } 
00125   inline G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; } 
00126           
00127   inline G4double GetMeanEnergyLoss() const {return fIntegralPAIySection[0]; }
00128   inline G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; }
00129   inline G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; }
00130 
00131   inline G4double GetNormalizationCof() const { return fNormalizationCof; }
00132           
00133   inline G4double GetPAItable(G4int i,G4int j) const;
00134 
00135   inline G4double GetLorentzFactor(G4int i) const;
00136                   
00137   inline G4double GetSplineEnergy(G4int i) const;
00138           
00139   inline G4double GetIntegralPAIySection(G4int i) const;
00140   inline G4double GetIntegralPAIdEdx(G4int i) const;
00141   inline G4double GetIntegralCerenkov(G4int i) const;
00142   inline G4double GetIntegralPlasmon(G4int i) const;
00143 
00144   inline void SetVerbose(G4int v) { fVerbose = v; };
00145 
00146 private :
00147 
00148   void CallError(G4int i, const G4String& methodName) const;
00149 
00150   // Local class constants
00151  
00152   static const G4double fDelta; // energy shift from interval border = 0.001
00153   static const G4double fError; // error in lin-log approximation = 0.005
00154 
00155   static       G4int fNumberOfGammas;         // = 111;
00156   static const G4double fLorentzFactor[112];  //  static gamma array
00157 
00158   static
00159   const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15)
00160 
00161   G4int    fIntervalNumber ;    //  The number of energy intervals
00162   G4double fNormalizationCof;   // Normalization cof for PhotoAbsorptionXsection
00163 
00164   G4double fDensity;            // Current density
00165   G4double fElectronDensity;    // Current electron (number) density
00166   G4double fLowEnergyCof;    // Correction cof for low energy region
00167   G4int    fSplineNumber;       // Current size of spline
00168   G4int    fVerbose;       // verbose flag
00169 
00170   G4SandiaTable*  fSandia;
00171 
00172   G4double fEnergyInterval[500];
00173   G4double fA1[500]; 
00174   G4double fA2[500];
00175   G4double fA3[500]; 
00176   G4double fA4[500];
00177 
00178   static
00179   const G4int   fMaxSplineSize ;          // Max size of output splain arrays = 500
00180 
00181   G4double          fSplineEnergy[500];   // energy points of splain
00182   G4double fRePartDielectricConst[500];   // Real part of dielectric const
00183   G4double fImPartDielectricConst[500];   // Imaginary part of dielectric const
00184   G4double          fIntegralTerm[500];   // Integral term in PAI cross section
00185   G4double        fDifPAIySection[500];   // Differential PAI cross section
00186   G4double          fdNdxCerenkov[500];   // dNdx of Cerenkov collisions
00187   G4double          fdNdxPlasmon[500];    // dNdx of Plasmon collisions
00188 
00189   G4double   fIntegralPAIySection[500];   // Integral PAI cross section  ?
00190   G4double   fIntegralPAIdEdx[500];       // Integral PAI dEdx  ?
00191   G4double   fIntegralCerenkov[500];      // Integral Cerenkov N>omega  ?
00192   G4double   fIntegralPlasmon[500];       // Integral Plasmon N>omega  ?
00193 
00194   G4double   fPAItable[500][112];         // Output array
00195 
00196 };
00197 
00199 //
00200 
00201 
00202 inline G4double G4PAIySection::GetPAItable(G4int i, G4int j) const
00203 {
00204    return fPAItable[i][j];
00205 }
00206 
00207 inline G4double G4PAIySection::GetLorentzFactor(G4int j) const
00208 {
00209    return fLorentzFactor[j];
00210 }
00211 
00212 inline G4double G4PAIySection::GetSplineEnergy(G4int i) const 
00213 {
00214   if(i < 1 || i > fSplineNumber) { CallError(i, "GetSplineEnergy"); }
00215   return fSplineEnergy[i];
00216 }
00217           
00218 inline G4double G4PAIySection::GetIntegralPAIySection(G4int i) const 
00219 {
00220   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIySection"); }
00221   return fIntegralPAIySection[i];
00222 }
00223 
00224 inline G4double G4PAIySection::GetIntegralPAIdEdx(G4int i) const 
00225 {
00226   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPAIdEdx"); }
00227   return fIntegralPAIdEdx[i];
00228 }
00229 
00230 inline G4double G4PAIySection::GetIntegralCerenkov(G4int i) const 
00231 {
00232   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralCerenkov"); }
00233   return fIntegralCerenkov[i];
00234 }
00235 
00236 inline G4double G4PAIySection::GetIntegralPlasmon(G4int i) const 
00237 {
00238   if(i < 1 || i > fSplineNumber) { CallError(i, "GetIntegralPlasmon"); }
00239   return fIntegralPlasmon[i];
00240 }
00241 
00242 #endif   
00243 
00244 // -----------------   end of G4PAIySection header file    -------------------

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