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