G4ecpssrFormFactorKxsModel.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 //  X-Ray Spectrom. 2011, 40, 127-134
00035 // ---------------------------------------------------------------------------------------
00036 
00037 #include <fstream>
00038 #include <iomanip>
00039 
00040 #include "G4ecpssrFormFactorKxsModel.hh"
00041 
00042 #include "globals.hh"
00043 #include "G4SystemOfUnits.hh"
00044 #include "G4ios.hh"
00045 
00046 #include "G4EMDataSet.hh"
00047 #include "G4LogLogInterpolation.hh"
00048 #include "G4Proton.hh"
00049 #include "G4Alpha.hh"
00050 
00051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00052 
00053 G4ecpssrFormFactorKxsModel::G4ecpssrFormFactorKxsModel()
00054 { 
00055   interpolation = new G4LogLogInterpolation();
00056 
00057   for (G4int i=6; i<93; i++) 
00058   {
00059       protonDataSetMap[i] = new G4EMDataSet(i,interpolation);
00060       protonDataSetMap[i]->LoadData("pixe/ecpssr/proton/k-");
00061   }
00062 
00063   for (G4int i=6; i<93; i++) 
00064   {
00065       alphaDataSetMap[i] = new G4EMDataSet(i,interpolation);
00066       alphaDataSetMap[i]->LoadData("pixe/ecpssr/alpha/k-");
00067   }
00068 
00069 }
00070 
00071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00072 
00073 G4ecpssrFormFactorKxsModel::~G4ecpssrFormFactorKxsModel()
00074 { 
00075   protonDataSetMap.clear();
00076   alphaDataSetMap.clear();
00077   delete interpolation;
00078 }
00079 
00080 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00081 
00082 G4double G4ecpssrFormFactorKxsModel::CalculateCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
00083 {
00084   G4Proton* aProton = G4Proton::Proton();
00085   G4Alpha* aAlpha = G4Alpha::Alpha();  
00086   G4double sigma = 0;
00087 
00088   if (energyIncident > 0.1*MeV && energyIncident < 100.*MeV && zTarget < 93 && zTarget > 5) {
00089 
00090     if (massIncident == aProton->GetPDGMass())
00091       {         
00092         sigma = protonDataSetMap[zTarget]->FindValue(energyIncident/MeV);  
00093         if (sigma !=0 && energyIncident > protonDataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00094       }
00095     else if (massIncident == aAlpha->GetPDGMass())
00096       {
00097         sigma = alphaDataSetMap[zTarget]->FindValue(energyIncident/MeV); 
00098         if (sigma !=0 && energyIncident > alphaDataSetMap[zTarget]->GetEnergies(0).back()*MeV) return 0.;
00099       }
00100     else
00101       { 
00102         sigma = 0.;
00103       }
00104   }
00105   
00106   // sigma is in internal units: it has been converted from 
00107   // the input file in barns bt the EmDataset
00108   return sigma;
00109 }

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