G4DensityEffectData.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 // $Id: G4DensityEffectData.hh 67044 2013-01-30 08:50:06Z gcosmo $
00027 
00028 //---------------------------------------------------------------------------
00029 //
00030 // GEANT4 Class file
00031 //
00032 // Description: Data on density effect
00033 //
00034 // Authors:   A.Bagulya, A.Ivanchenko 28.10.2009
00035 //
00036 // Modifications:
00037 // 
00038 // 
00039 //
00040 //----------------------------------------------------------------------------
00041 //
00042 //  Data are taken from:  
00043 //  R.M. Sternheimer et al. Density Effect for the Ionization Loss of Charged 
00044 //  Particles in Various Substances. Atom. Data Nucl. Data Tabl. 30 (1984) 261-271. 
00045 
00046 #ifndef DensityEffectData_h
00047 #define DensityEffectData_h 1
00048 
00049 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00050 
00051 #include "globals.hh"
00052 #include "G4Material.hh"
00053 #include <vector>
00054 
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00056 
00057 const G4int NDENSDATA  = 278;
00058 const G4int NDENSARRAY = 9;
00059 const G4int NDENSELEM  = 98;
00060 
00061 class G4DensityEffectData 
00062 {
00063 public:
00064 
00065   G4DensityEffectData();
00066 
00067   ~G4DensityEffectData();
00068 
00069   // return index by Z, -1 if material is not in the table 
00070   G4int GetElementIndex(G4int Z, G4State mState);
00071 
00072   // return index by material name, -1 if material is not in the table 
00073   G4int GetIndex(const G4String& matName);
00074 
00075   // printout data for material
00076   void PrintData(const G4String& matName);
00077 
00078   // printout all data
00079   void DumpData();
00080 
00081   // Access to the data via index
00082   inline G4double GetPlasmaEnergy(G4int idx); 
00083   inline G4double GetAdjustmentFactor(G4int idx); 
00084   inline G4double GetCdensity(G4int idx); 
00085   inline G4double GetX0density(G4int idx); 
00086   inline G4double GetX1density(G4int idx); 
00087   inline G4double GetAdensity(G4int idx); 
00088   inline G4double GetMdensity(G4int idx); 
00089   inline G4double GetDelta0density(G4int idx); 
00090   inline G4double GetErrorDensity(G4int idx); 
00091 
00092 private:
00093 
00094   void Initialize();
00095 
00096   void AddMaterial(G4double* val, const G4String& matName);
00097 
00098   // Assignment operator and copy constructor
00099   G4DensityEffectData & operator=(const G4DensityEffectData &right);
00100   G4DensityEffectData(const G4DensityEffectData&);
00101 
00102   G4double data[NDENSDATA][NDENSARRAY];
00103   std::vector<G4String> names;
00104 
00105   // indexes defined only for pure materials 
00106   G4int indexZ[NDENSELEM];
00107   G4State state[NDENSELEM];
00108 
00109   G4int index;
00110 
00111 };
00112 
00113 inline G4double G4DensityEffectData::GetPlasmaEnergy(G4int idx)
00114 {
00115   G4double x = DBL_MAX;
00116   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][0]; }
00117   return x;
00118 } 
00119 
00120 inline G4double G4DensityEffectData::GetAdjustmentFactor(G4int idx)
00121 {
00122   G4double x = DBL_MAX;
00123   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][1]; }
00124   return x;
00125 } 
00126 
00127 inline G4double G4DensityEffectData::GetCdensity(G4int idx)
00128 {
00129   G4double x = DBL_MAX;
00130   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][2]; }
00131   return x;
00132 } 
00133 
00134 inline G4double G4DensityEffectData::GetX0density(G4int idx)
00135 {
00136   G4double x = DBL_MAX;
00137   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][3]; }
00138   return x;
00139 } 
00140 
00141 inline G4double G4DensityEffectData::GetX1density(G4int idx)
00142 {
00143   G4double x = DBL_MAX;
00144   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][4]; }
00145   return x;
00146 } 
00147 
00148 inline G4double G4DensityEffectData::GetAdensity(G4int idx)
00149 {
00150   G4double x = DBL_MAX;
00151   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][5]; }
00152   return x;
00153 }
00154  
00155 inline G4double G4DensityEffectData::GetMdensity(G4int idx)
00156 {
00157   G4double x = DBL_MAX;
00158   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][6]; }
00159   return x;
00160 } 
00161 
00162 inline G4double G4DensityEffectData::GetDelta0density(G4int idx)
00163 {
00164   G4double x = DBL_MAX;
00165   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][7]; }
00166   return x;
00167 } 
00168 
00169 inline G4double G4DensityEffectData::GetErrorDensity(G4int idx)
00170 {
00171   G4double x = DBL_MAX;
00172   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][8]; }
00173   return x;
00174 } 
00175 
00176 
00177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00178 
00179 #endif
00180  

Generated on Mon May 27 17:48:00 2013 for Geant4 by  doxygen 1.4.7