G4ecpssrFormFactorMixsModel.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 // History:
00027 // -----------
00028 //  01 Oct 2011   A.M., S.I. - 1st implementation
00029 // 
00030 // Class description
00031 // ----------------
00032 //  Computation of K, L & M shell ECPSSR ionisation cross sections for protons and alphas
00033 //  Based on the work of A. Taborda et al. 
00034 //  EXRS2012 proceedings
00035 // ---------------------------------------------------------------------------------------
00036 
00037 #include <fstream>
00038 #include <iomanip>
00039 
00040 #include "globals.hh"
00041 #include "G4ios.hh"
00042 #include "G4SystemOfUnits.hh"
00043 
00044 #include "G4EMDataSet.hh"
00045 #include "G4LinInterpolation.hh"
00046 #include "G4Proton.hh"
00047 #include "G4Alpha.hh"
00048 
00049 #include "G4ecpssrFormFactorMixsModel.hh"
00050 
00051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00052 
00053 G4ecpssrFormFactorMixsModel::G4ecpssrFormFactorMixsModel()
00054 { 
00055   interpolation = new G4LinInterpolation();
00056 
00057   for (G4int i=62; i<93; i++) 
00058   {
00059       protonM1DataSetMap[i] = new G4EMDataSet(i,interpolation);
00060       protonM1DataSetMap[i]->LoadData("pixe/ecpssr/proton/m1-");
00061             
00062       protonM2DataSetMap[i] = new G4EMDataSet(i,interpolation);
00063       protonM2DataSetMap[i]->LoadData("pixe/ecpssr/proton/m2-");
00064             
00065       protonM3DataSetMap[i] = new G4EMDataSet(i,interpolation);
00066       protonM3DataSetMap[i]->LoadData("pixe/ecpssr/proton/m3-");
00067             
00068       protonM4DataSetMap[i] = new G4EMDataSet(i,interpolation);
00069       protonM4DataSetMap[i]->LoadData("pixe/ecpssr/proton/m4-");
00070             
00071       protonM5DataSetMap[i] = new G4EMDataSet(i,interpolation);
00072       protonM5DataSetMap[i]->LoadData("pixe/ecpssr/proton/m5-");
00073   }
00074 
00075   protonMiXsVector.push_back(protonM1DataSetMap);
00076   protonMiXsVector.push_back(protonM2DataSetMap);
00077   protonMiXsVector.push_back(protonM3DataSetMap);
00078   protonMiXsVector.push_back(protonM4DataSetMap);
00079   protonMiXsVector.push_back(protonM5DataSetMap);
00080 
00081 
00082   for (G4int i=62; i<93; i++) 
00083   {
00084       alphaM1DataSetMap[i] = new G4EMDataSet(i,interpolation);
00085       alphaM1DataSetMap[i]->LoadData("pixe/ecpssr/alpha/m1-");
00086              
00087       alphaM2DataSetMap[i] = new G4EMDataSet(i,interpolation);
00088       alphaM2DataSetMap[i]->LoadData("pixe/ecpssr/alpha/m2-");
00089              
00090       alphaM3DataSetMap[i] = new G4EMDataSet(i,interpolation);
00091       alphaM3DataSetMap[i]->LoadData("pixe/ecpssr/alpha/m3-");
00092              
00093       alphaM4DataSetMap[i] = new G4EMDataSet(i,interpolation);
00094       alphaM4DataSetMap[i]->LoadData("pixe/ecpssr/alpha/m4-");
00095              
00096       alphaM5DataSetMap[i] = new G4EMDataSet(i,interpolation);
00097       alphaM5DataSetMap[i]->LoadData("pixe/ecpssr/alpha/m5-");
00098 
00099   }
00100 
00101   alphaMiXsVector.push_back(alphaM1DataSetMap);
00102   alphaMiXsVector.push_back(alphaM2DataSetMap);
00103   alphaMiXsVector.push_back(alphaM3DataSetMap);
00104   alphaMiXsVector.push_back(alphaM4DataSetMap);
00105   alphaMiXsVector.push_back(alphaM5DataSetMap);
00106 
00107 
00108 
00109 }
00110 
00111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00112 
00113 G4ecpssrFormFactorMixsModel::~G4ecpssrFormFactorMixsModel()
00114 { 
00115   protonM1DataSetMap.clear();
00116   alphaM1DataSetMap.clear();
00117   
00118   protonM2DataSetMap.clear();
00119   alphaM2DataSetMap.clear();
00120   
00121   protonM3DataSetMap.clear();
00122   alphaM3DataSetMap.clear();
00123   
00124   protonM4DataSetMap.clear();
00125   alphaM4DataSetMap.clear();
00126   
00127   protonM5DataSetMap.clear();
00128   alphaM5DataSetMap.clear();
00129   
00130   delete interpolation;
00131 }
00132 
00133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00134 
00135 G4double G4ecpssrFormFactorMixsModel::CalculateMiCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident, G4int mShellId)
00136 {
00137   G4Proton* aProton = G4Proton::Proton();
00138   G4Alpha* aAlpha = G4Alpha::Alpha();  
00139   G4double sigma = 0;
00140   G4int mShellIndex = mShellId -1;
00141 
00142   if (energyIncident > 0.1*MeV && energyIncident < 10*MeV && zTarget < 93 && zTarget > 61) {
00143 
00144     if (massIncident == aProton->GetPDGMass())
00145       {      
00146         sigma = protonMiXsVector[mShellIndex][zTarget]->FindValue(energyIncident/MeV);  
00147         if (sigma !=0 && energyIncident > protonMiXsVector[mShellIndex][zTarget]->GetEnergies(0).back()*MeV) return 0.;
00148       }
00149     else if (massIncident == aAlpha->GetPDGMass())
00150       {
00151         sigma = alphaMiXsVector[mShellIndex][zTarget]->FindValue(energyIncident/MeV); 
00152         if (sigma !=0 && energyIncident > protonMiXsVector[mShellIndex][zTarget]->GetEnergies(0).back()*MeV) return 0.;
00153       }
00154     else
00155       { 
00156         sigma = 0.;
00157       }
00158   }
00159   
00160   // sigma is in internal units: it has been converted from 
00161   // the input file in barns bt the EmDataset
00162   return sigma;
00163 }
00164 
00165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00166 
00167 G4double G4ecpssrFormFactorMixsModel::CalculateM1CrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00168 {
00169 
00170   // mShellId
00171   return  CalculateMiCrossSection (zTarget, massIncident, energyIncident, 1); 
00172 
00173 }
00174 
00175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00176 
00177 G4double G4ecpssrFormFactorMixsModel::CalculateM2CrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00178 {
00179 
00180   // mShellId
00181   return  CalculateMiCrossSection (zTarget, massIncident, energyIncident, 2); 
00182 
00183   /*
00184 
00185   G4Proton* aProton = G4Proton::Proton();
00186   G4Alpha* aAlpha = G4Alpha::Alpha();  
00187   G4double sigma = 0;
00188 
00189   if (energyIncident > 0.1*MeV && energyIncident < 10*MeV && zTarget < 93 && zTarget > 61) {
00190 
00191     if (massIncident == aProton->GetPDGMass())
00192       {      
00193         sigma = protonM2DataSetMap[zTarget]->FindValue(energyIncident/MeV);  
00194         if (sigma !=0 && energyIncident > protonM2DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00195       }
00196     else if (massIncident == aAlpha->GetPDGMass())
00197       {
00198         sigma = alphaM2DataSetMap[zTarget]->FindValue(energyIncident/MeV); 
00199         if (sigma !=0 && energyIncident > alphaM2DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00200       }
00201     else
00202       { 
00203         sigma = 0.;
00204       }
00205   }
00206   
00207   // sigma is in internal units: it has been converted from 
00208   // the input file in barns bt the EmDataset
00209   return sigma;
00210   */
00211 }
00212 
00213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00214 
00215 G4double G4ecpssrFormFactorMixsModel::CalculateM3CrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00216 {
00217 
00218   return  CalculateMiCrossSection (zTarget, massIncident, energyIncident, 3); 
00219   /*
00220 
00221 
00222   G4Proton* aProton = G4Proton::Proton();
00223   G4Alpha* aAlpha = G4Alpha::Alpha();  
00224   G4double sigma = 0;
00225 
00226   if (energyIncident > 0.1*MeV && energyIncident < 10*MeV && zTarget < 93 && zTarget > 61) {
00227 
00228     if (massIncident == aProton->GetPDGMass())
00229       {      
00230         sigma = protonM3DataSetMap[zTarget]->FindValue(energyIncident/MeV);  
00231         if (sigma !=0 && energyIncident > protonM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00232       }
00233     else if (massIncident == aAlpha->GetPDGMass())
00234       {
00235         sigma = alphaM3DataSetMap[zTarget]->FindValue(energyIncident/MeV); 
00236         if (sigma !=0 && energyIncident > alphaM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00237       }
00238     else
00239       { 
00240         sigma = 0.;
00241       }
00242   }
00243   
00244   // sigma is in internal units: it has been converted from 
00245   // the input file in barns bt the EmDataset
00246   return sigma;
00247   */
00248 }
00249 
00250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00251 
00252 G4double G4ecpssrFormFactorMixsModel::CalculateM4CrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00253 {
00254 
00255   return  CalculateMiCrossSection (zTarget, massIncident, energyIncident, 4); 
00256   /*
00257   G4Proton* aProton = G4Proton::Proton();
00258   G4Alpha* aAlpha = G4Alpha::Alpha();  
00259   G4double sigma = 0;
00260 
00261   if (energyIncident > 0.1*MeV && energyIncident < 10*MeV && zTarget < 93 && zTarget > 61) {
00262 
00263     if (massIncident == aProton->GetPDGMass())
00264       {      
00265         sigma = protonM3DataSetMap[zTarget]->FindValue(energyIncident/MeV);  
00266         if (sigma !=0 && energyIncident > protonM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00267       }
00268     else if (massIncident == aAlpha->GetPDGMass())
00269       {
00270         sigma = alphaM3DataSetMap[zTarget]->FindValue(energyIncident/MeV); 
00271         if (sigma !=0 && energyIncident > alphaM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00272       }
00273     else
00274       { 
00275         sigma = 0.;
00276       }
00277   }
00278   
00279   // sigma is in internal units: it has been converted from 
00280   // the input file in barns bt the EmDataset
00281   return sigma;
00282   */
00283 }
00284 
00285 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00286 
00287 G4double G4ecpssrFormFactorMixsModel::CalculateM5CrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00288 {
00289 
00290   return  CalculateMiCrossSection (zTarget, massIncident, energyIncident, 5); 
00291   /*
00292   G4Proton* aProton = G4Proton::Proton();
00293   G4Alpha* aAlpha = G4Alpha::Alpha();  
00294   G4double sigma = 0;
00295 
00296   if (energyIncident > 0.1*MeV && energyIncident < 10*MeV && zTarget < 93 && zTarget > 61) {
00297 
00298     if (massIncident == aProton->GetPDGMass())
00299       {      
00300         sigma = protonM3DataSetMap[zTarget]->FindValue(energyIncident/MeV);  
00301         if (sigma !=0 && energyIncident > protonM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00302       }
00303     else if (massIncident == aAlpha->GetPDGMass())
00304       {
00305         sigma = alphaM3DataSetMap[zTarget]->FindValue(energyIncident/MeV); 
00306         if (sigma !=0 && energyIncident > alphaM3DataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00307       }
00308     else
00309       { 
00310         sigma = 0.;
00311       }
00312   }
00313   
00314   // sigma is in internal units: it has been converted from 
00315   // the input file in barns bt the EmDataset
00316   return sigma;
00317   */
00318 }

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