G4hParametrisedLossModel.cc

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 // -------------------------------------------------------------------
00028 //
00029 // GEANT4 Class file
00030 //
00031 //
00032 // File name:     G4hParametrisedLossModel
00033 //
00034 // Author:        V.Ivanchenko (Vladimir.Ivanchenko@cern.ch)
00035 // 
00036 // Creation date: 20 July 2000
00037 //
00038 // Modifications: 
00039 // 20/07/2000  V.Ivanchenko First implementation
00040 // 18/08/2000  V.Ivanchenko TRIM85 model is added
00041 // 03/10/2000  V.Ivanchenko CodeWizard clean up
00042 // 10/05/2001  V.Ivanchenko Clean up againist Linux compilation with -Wall
00043 // 30/12/2003  V.Ivanchenko SRIM2003 model is added
00044 // 07/05/2004  V.Ivanchenko Fix Graphite problem, add QAO model
00045 //
00046 // Class Description:
00047 //
00048 // Low energy protons/ions electronic stopping power parametrisation
00049 //
00050 // Class Description: End
00051 //
00052 // -------------------------------------------------------------------
00053 //
00054 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00056 
00057 #include "G4hParametrisedLossModel.hh"
00058 
00059 #include "globals.hh"
00060 #include "G4PhysicalConstants.hh"
00061 #include "G4SystemOfUnits.hh"
00062 #include "G4UnitsTable.hh"
00063 #include "G4hZiegler1977p.hh"
00064 #include "G4hZiegler1977He.hh"
00065 #include "G4hZiegler1985p.hh"
00066 #include "G4hSRIM2000p.hh"
00067 #include "G4hICRU49p.hh"
00068 #include "G4hICRU49He.hh"
00069 #include "G4DynamicParticle.hh"
00070 #include "G4ParticleDefinition.hh"
00071 #include "G4ElementVector.hh"
00072 #include "G4Material.hh"
00073 
00074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00075 
00076 G4hParametrisedLossModel::G4hParametrisedLossModel(const G4String& name)
00077   :G4VLowEnergyModel(name), modelName(name)
00078 {
00079   InitializeMe();
00080 }
00081 
00082 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00083 
00084 void G4hParametrisedLossModel::InitializeMe()
00085 {
00086   expStopPower125 = 0.;
00087 
00088   theZieglerFactor = eV*cm2*1.0e-15 ;
00089 
00090   // Registration of parametrisation models
00091   G4String blank  = G4String(" ") ;
00092   G4String zi77p  = G4String("Ziegler1977p") ;
00093   G4String zi77He = G4String("Ziegler1977He") ;
00094   G4String ir49p  = G4String("ICRU_R49p") ;
00095   G4String ir49He = G4String("ICRU_R49He") ;
00096   G4String zi85p  = G4String("Ziegler1985p") ;
00097   G4String zi00p  = G4String("SRIM2000p") ;
00098   G4String qao    = G4String("QAO") ;
00099   if(zi77p == modelName) {
00100       eStopingPowerTable = new G4hZiegler1977p();
00101       highEnergyLimit = 100.0*MeV;
00102       lowEnergyLimit  = 1.0*keV;
00103 
00104   } else if(zi77He == modelName) {
00105       eStopingPowerTable = new G4hZiegler1977He();
00106       highEnergyLimit = 10.0*MeV/4.0;
00107       lowEnergyLimit  = 1.0*keV/4.0;
00108 
00109   } else if(zi85p == modelName) {
00110       eStopingPowerTable = new G4hZiegler1985p();
00111       highEnergyLimit = 100.0*MeV;
00112       lowEnergyLimit  = 1.0*keV;
00113 
00114   } else if(zi00p == modelName ) {
00115       eStopingPowerTable = new G4hSRIM2000p();
00116       highEnergyLimit = 100.0*MeV;
00117       lowEnergyLimit  = 1.0*keV;
00118 
00119   } else if(ir49p == modelName || blank == modelName) {
00120       eStopingPowerTable = new G4hICRU49p();
00121       highEnergyLimit = 2.0*MeV;
00122       lowEnergyLimit  = 1.0*keV;
00123 
00124   } else if(ir49He == modelName) {
00125       eStopingPowerTable = new G4hICRU49He();
00126       highEnergyLimit = 10.0*MeV/4.0;
00127       lowEnergyLimit  = 1.0*keV/4.0;
00128       /*
00129   } else if(qao == modelName) {
00130       eStopingPowerTable = new G4hQAOModel();
00131       highEnergyLimit = 2.0*MeV;
00132       lowEnergyLimit  = 5.0*keV;
00133       */
00134   } else {
00135       eStopingPowerTable = new G4hICRU49p();
00136       highEnergyLimit = 2.0*MeV;
00137       lowEnergyLimit  = 1.0*keV;
00138       G4cout << "G4hParametrisedLossModel Warning: <" << modelName 
00139              << "> is unknown - default <"
00140              << ir49p << ">" << " is used for Electronic Stopping"
00141              << G4endl;
00142       modelName = ir49p;
00143   }
00144       /*
00145       G4cout << "G4hParametrisedLossModel: the model <"
00146              << modelName << ">" << " is used for Electronic Stopping"
00147              << G4endl;
00148 */
00149 }
00150 
00151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00152 
00153 G4hParametrisedLossModel::~G4hParametrisedLossModel()
00154 {
00155   delete eStopingPowerTable;
00156 }
00157 
00158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00159 
00160 G4double G4hParametrisedLossModel::TheValue(const G4DynamicParticle* particle,
00161                                             const G4Material* material)
00162 {
00163   G4double scaledEnergy = (particle->GetKineticEnergy())
00164                         * proton_mass_c2/(particle->GetMass());
00165   G4double factor = theZieglerFactor;
00166   if (scaledEnergy < lowEnergyLimit) {
00167     if (modelName != "QAO") factor *= std::sqrt(scaledEnergy/lowEnergyLimit);
00168     scaledEnergy = lowEnergyLimit;
00169   }
00170   G4double eloss = StoppingPower(material,scaledEnergy) * factor;
00171 
00172   return eloss;
00173 }
00174 
00175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00176 
00177 G4double G4hParametrisedLossModel::TheValue(const G4ParticleDefinition* aParticle,
00178                                             const G4Material* material,
00179                                                   G4double kineticEnergy)
00180 {
00181   G4double scaledEnergy = kineticEnergy
00182                         * proton_mass_c2/(aParticle->GetPDGMass());
00183 
00184   G4double factor = theZieglerFactor;
00185   if (scaledEnergy < lowEnergyLimit) {
00186     if (modelName != "QAO") factor *= std::sqrt(scaledEnergy/lowEnergyLimit);
00187     scaledEnergy = lowEnergyLimit;
00188   }
00189   G4double eloss = StoppingPower(material,scaledEnergy) * factor;
00190 
00191   return eloss;
00192 }
00193 
00194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00195 
00196 G4double G4hParametrisedLossModel::LowEnergyLimit(const G4ParticleDefinition* ,
00197                                                   const G4Material*) const
00198 {
00199   return lowEnergyLimit;
00200 }
00201 
00202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00203 
00204 G4double G4hParametrisedLossModel::HighEnergyLimit(const G4ParticleDefinition* ,
00205                                                    const G4Material*) const
00206 {
00207   return highEnergyLimit;
00208 }
00209 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00210 
00211 G4double G4hParametrisedLossModel::LowEnergyLimit(const G4ParticleDefinition* ) const
00212 {
00213   return lowEnergyLimit;
00214 }
00215 
00216 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00217 
00218 G4double G4hParametrisedLossModel::HighEnergyLimit(const G4ParticleDefinition* ) const
00219 {
00220   return highEnergyLimit;
00221 }
00222 
00223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00224 
00225 G4bool G4hParametrisedLossModel::IsInCharge(const G4DynamicParticle* ,
00226                                             const G4Material*) const
00227 {
00228   return true;
00229 }
00230 
00231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00232 
00233 G4bool G4hParametrisedLossModel::IsInCharge(const G4ParticleDefinition* ,
00234                                             const G4Material*) const
00235 {
00236   return true;
00237 }
00238 
00239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00240 
00241 G4double G4hParametrisedLossModel::StoppingPower(const G4Material* material,
00242                                                        G4double kineticEnergy)
00243 {
00244   G4double eloss = 0.0;
00245 
00246   const G4int numberOfElements = material->GetNumberOfElements() ;
00247   const G4double* theAtomicNumDensityVector =
00248     material->GetAtomicNumDensityVector() ;
00249 
00250 
00251   // compound material with parametrisation
00252   if( (eStopingPowerTable->HasMaterial(material)) ) {
00253 
00254     eloss = eStopingPowerTable->StoppingPower(material, kineticEnergy);
00255     if ("QAO" != modelName) {
00256       eloss *=  material->GetTotNbOfAtomsPerVolume();
00257       if(1 < numberOfElements) {
00258         G4int nAtoms = 0;
00259 
00260         const G4int* theAtomsVector = material->GetAtomsVector();
00261         for (G4int iel=0; iel<numberOfElements; iel++) {
00262           nAtoms += theAtomsVector[iel];
00263         }
00264         eloss /= nAtoms;
00265       }
00266     }
00267 
00268   // pure material
00269   } else if(1 == numberOfElements) {
00270 
00271     G4double z = material->GetZ();
00272     eloss = (eStopingPowerTable->ElectronicStoppingPower(z, kineticEnergy))
00273                                * (material->GetTotNbOfAtomsPerVolume()) ;
00274 
00275   // Experimental data exist only for kinetic energy 125 keV
00276   } else if( MolecIsInZiegler1988(material)) {
00277 
00278   // Cycle over elements - calculation based on Bragg's rule
00279     G4double eloss125 = 0.0 ;
00280     const G4ElementVector* theElementVector =
00281                            material->GetElementVector() ;
00282 
00283 
00284     //  loop for the elements in the material
00285     for (G4int i=0; i<numberOfElements; i++) {
00286       const G4Element* element = (*theElementVector)[i] ;
00287       G4double z = element->GetZ() ;
00288       eloss    +=(eStopingPowerTable->ElectronicStoppingPower(z,kineticEnergy))
00289                                     * theAtomicNumDensityVector[i] ;
00290       eloss125 +=(eStopingPowerTable->ElectronicStoppingPower(z,125.0*keV))
00291                                     * theAtomicNumDensityVector[i] ;
00292     }
00293 
00294     // Chemical factor is taken into account
00295     eloss *= ChemicalFactor(kineticEnergy, eloss125) ;
00296 
00297   // Brugg's rule calculation
00298   } else {
00299     const G4ElementVector* theElementVector =
00300                            material->GetElementVector() ;
00301 
00302     //  loop for the elements in the material
00303     for (G4int i=0; i<numberOfElements; i++)
00304     {
00305       const G4Element* element = (*theElementVector)[i] ;
00306       G4double z = element->GetZ() ;
00307       eloss   += (eStopingPowerTable->ElectronicStoppingPower(z,kineticEnergy))
00308                                    * theAtomicNumDensityVector[i];
00309     }
00310   }
00311   return eloss;
00312 }
00313 
00314 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00315 
00316 G4bool G4hParametrisedLossModel::MolecIsInZiegler1988(
00317                                  const G4Material* material)
00318 {
00319   // The list of molecules from
00320   // J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
00321   // Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
00322 
00323   G4String myFormula = G4String(" ") ;
00324   const G4String chFormula = material->GetChemicalFormula() ;
00325   if (myFormula == chFormula ) return false ;
00326   
00327   //  There are no evidence for difference of stopping power depended on
00328   //  phase of the compound except for water. The stopping power of the 
00329   //  water in gas phase can be predicted using Bragg's rule.
00330   //  
00331   //  No chemical factor for water-gas 
00332    
00333   myFormula = G4String("H_2O") ;
00334   const G4State theState = material->GetState() ;
00335   if( theState == kStateGas && myFormula == chFormula) return false ;
00336     
00337   const size_t numberOfMolecula = 53 ;
00338 
00339   // The coffecient from Table.4 of Ziegler & Manoyan
00340   const G4double HeEff = 2.8735 ;    
00341   
00342   static G4String name[numberOfMolecula] = {
00343     "H_2O",      "C_2H_4O",    "C_3H_6O",  "C_2H_2",             "C_H_3OH",
00344     "C_2H_5OH",  "C_3H_7OH",   "C_3H_4",   "NH_3",               "C_14H_10",
00345     "C_6H_6",    "C_4H_10",    "C_4H_6",   "C_4H_8O",            "CCl_4",
00346     "CF_4",      "C_6H_8",     "C_6H_12",  "C_6H_10O",           "C_6H_10",
00347     "C_8H_16",   "C_5H_10",    "C_5H_8",   "C_3H_6-Cyclopropane","C_2H_4F_2",
00348     "C_2H_2F_2", "C_4H_8O_2",  "C_2H_6",   "C_2F_6",             "C_2H_6O",
00349     "C_3H_6O",   "C_4H_10O",   "C_2H_4",   "C_2H_4O",            "C_2H_4S",
00350     "SH_2",      "CH_4",       "CCLF_3",   "CCl_2F_2",           "CHCl_2F",
00351     "(CH_3)_2S", "N_2O",       "C_5H_10O", "C_8H_6",             "(CH_2)_N",
00352     "(C_3H_6)_N","(C_8H_8)_N", "C_3H_8",   "C_3H_6-Propylene",   "C_3H_6O",
00353     "C_3H_6S",   "C_4H_4S",    "C_7H_8"
00354   } ;
00355     
00356   static G4double expStopping[numberOfMolecula] = {
00357      66.1,  190.4, 258.7,  42.2, 141.5, 
00358     210.9,  279.6, 198.8,  31.0, 267.5,
00359     122.8,  311.4, 260.3, 328.9, 391.3,
00360     206.6,  374.0, 422.0, 432.0, 398.0,
00361     554.0,  353.0, 326.0,  74.6, 220.5,
00362     197.4,  362.0, 170.0, 330.5, 211.3,
00363     262.3,  349.6,  51.3, 187.0, 236.9,
00364     121.9,   35.8, 247.0, 292.6, 268.0,
00365     262.3,   49.0, 398.9, 444.0,  22.91,
00366      68.0,  155.0,  84.0,  74.2, 254.7,
00367     306.8,  324.4, 420.0
00368   } ;
00369 
00370   static G4double expCharge[numberOfMolecula] = {
00371     HeEff, HeEff, HeEff,   1.0, HeEff, 
00372     HeEff, HeEff, HeEff,   1.0,   1.0,
00373       1.0, HeEff, HeEff, HeEff, HeEff,
00374     HeEff, HeEff, HeEff, HeEff, HeEff,
00375     HeEff, HeEff, HeEff,   1.0, HeEff,
00376     HeEff, HeEff, HeEff, HeEff, HeEff,
00377     HeEff, HeEff,   1.0, HeEff, HeEff,
00378     HeEff,   1.0, HeEff, HeEff, HeEff,
00379     HeEff,   1.0, HeEff, HeEff,   1.0,
00380       1.0,   1.0,   1.0,   1.0, HeEff,
00381     HeEff, HeEff, HeEff
00382   } ;
00383 
00384   static G4double numberOfAtomsPerMolecula[numberOfMolecula] = {
00385     3.0,  7.0, 10.0,  4.0,  6.0,  
00386     9.0, 12.0,  7.0,  4.0, 24.0,
00387     12.0, 14.0, 10.0, 13.0,  5.0,
00388     5.0, 14.0, 18.0, 17.0, 17.0,
00389     24.0, 15.0, 13.0,  9.0,  8.0,
00390     6.0, 14.0,  8.0,  8.0,  9.0,
00391     10.0, 15.0,  6.0,  7.0,  7.0,
00392     3.0,  5.0,  5.0,  5.0,  5.0,
00393     9.0,  3.0, 16.0, 14.0,  3.0,
00394     9.0, 16.0, 11.0,  9.0, 10.0,
00395     10.0,  9.0, 15.0
00396   } ;
00397 
00398   // Search for the compaund in the table
00399   for (size_t i=0; i<numberOfMolecula; i++)
00400     { 
00401       if(chFormula == name[i]) { 
00402         G4double exp125 = expStopping[i] * 
00403                           (material->GetTotNbOfAtomsPerVolume()) /
00404                           (expCharge[i] * numberOfAtomsPerMolecula[i]) ;
00405         SetExpStopPower125(exp125) ;
00406         return true ;
00407       }
00408     }
00409   
00410   return false ;
00411 }
00412 
00413 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00414 
00415 G4double G4hParametrisedLossModel::ChemicalFactor(
00416                             G4double kineticEnergy, G4double eloss125) const
00417 {
00418   // Approximation of Chemical Factor according to
00419   // J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
00420   // Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
00421   
00422   G4double gamma    = 1.0 + kineticEnergy/proton_mass_c2 ;    
00423   G4double gamma25  = 1.0 + 25.0*keV /proton_mass_c2 ;
00424   G4double gamma125 = 1.0 + 125.0*keV/proton_mass_c2 ;
00425   G4double beta     = std::sqrt(1.0 - 1.0/(gamma*gamma)) ;
00426   G4double beta25   = std::sqrt(1.0 - 1.0/(gamma25*gamma25)) ;
00427   G4double beta125  = std::sqrt(1.0 - 1.0/(gamma125*gamma125)) ;
00428   
00429   G4double factor = 1.0 + (expStopPower125/eloss125 - 1.0) *
00430                    (1.0 + std::exp( 1.48 * ( beta125/beta25 - 7.0 ) ) ) /
00431                    (1.0 + std::exp( 1.48 * ( beta/beta25    - 7.0 ) ) ) ;
00432   
00433   return factor ;
00434 }
00435 
00436 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....

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