- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/lowenergy/src/G4PaulKCrossSection.cc
r1228 r1315 25 25 // 26 26 // 27 // History: 28 // ----------- 29 // 21 Apr 2008 H. Abdelohauwed - 1st implementation 30 // 29 Apr 2009 ALF Major Design Revision 31 // 32 // ------------------------------------------------------------------- 33 34 // Class description: 35 // Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell 36 // Further documentation available from http://www.ge.infn.it/geant4/lowE 37 38 // ------------------------------------------------------------------- 27 39 28 40 #include "globals.hh" … … 30 42 #include <fstream> 31 43 #include <iomanip> 32 #include "G4CompositeEMDataSet.hh"33 #include "G4ShellEMDataSet.hh"44 //#include "G4CompositeEMDataSet.hh" 45 //#include "G4ShellEMDataSet.hh" 34 46 #include "G4EMDataSet.hh" 35 #include "G4VEMDataSet.hh"36 #include "G4VDataSetAlgorithm.hh"47 //#include "G4VEMDataSet.hh" 48 //#include "G4VDataSetAlgorithm.hh" 37 49 #include "G4LogLogInterpolation.hh" 38 50 #include "G4PaulKCrossSection.hh" 51 #include "G4Proton.hh" 52 #include "G4Alpha.hh" 53 39 54 40 55 G4PaulKCrossSection::G4PaulKCrossSection() 41 { } 56 { 57 58 59 interpolation = new G4LogLogInterpolation(); 60 61 /* 62 G4String path = getenv("G4LEDATA"); 63 64 if (!path) 65 G4Exception("G4paulKCrossSection::G4paulKCrossSection: G4LEDATA environment variable not set"); 66 G4cout << path + "/kcsPaul/kcs-" << G4endl; 67 */ 68 69 70 for (G4int i=4; i<93; i++) { 71 protonDataSetMap[i] = new G4EMDataSet(i,interpolation); 72 protonDataSetMap[i]->LoadData("pixe/kpcsPaul/kcs-"); 73 } 74 for (G4int i=6; i<93; i++) { 75 alphaDataSetMap[i] = new G4EMDataSet(i,interpolation); 76 alphaDataSetMap[i]->LoadData("pixe/kacsPaul/kacs-"); 77 } 78 79 80 81 82 } 42 83 43 84 G4PaulKCrossSection::~G4PaulKCrossSection() 44 { }85 { 45 86 46 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4int zIncident, G4double energyIncident) 87 protonDataSetMap.clear(); 88 alphaDataSetMap.clear(); 89 90 } 91 92 G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident) 47 93 { 48 94 49 G4String fileName; 95 G4Proton* aProtone = G4Proton::Proton(); 96 G4Alpha* aAlpha = G4Alpha::Alpha(); 97 98 G4double sigma = 0; 50 99 51 if (zIncident == 1) 52 { fileName = "kcsPaul/kcs-";} 100 if (massIncident == aProtone->GetPDGMass() ) 101 { 102 103 sigma = protonDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 104 105 } 53 106 else 54 107 { 55 if (zIncident == 2) 56 { fileName = "kacsPaul/kacs-";} 57 108 if (massIncident == aAlpha->GetPDGMass()) 109 { 110 111 sigma = alphaDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn; 112 113 } 114 else 115 { 116 G4cout << "we can treat only Proton or Alpha incident particles " << G4endl; 117 sigma = 0.; 118 } 58 119 } 59 60 120 61 G4VDataSetAlgorithm* interpolation = new G4LogLogInterpolation();62 63 G4VEMDataSet* dataSet;64 65 dataSet = new G4EMDataSet(zTarget,interpolation);66 121 67 dataSet->LoadData(fileName); 68 69 70 G4double sigma = dataSet->FindValue(energyIncident/MeV) / barn; 71 72 return sigma; 122 123 return sigma; 73 124 } 74 125
Note: See TracChangeset
for help on using the changeset viewer.