source: trunk/source/processes/electromagnetic/lowenergy/src/G4PaulKCrossSection.cc@ 1197

Last change on this file since 1197 was 1192, checked in by garnier, 16 years ago

update par rapport a CVS

File size: 3.9 KB
RevLine 
[968]1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
[1192]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// -------------------------------------------------------------------
[968]34
[1192]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// -------------------------------------------------------------------
40
[968]41#include "globals.hh"
42#include "G4ios.hh"
43#include <fstream>
44#include <iomanip>
[1192]45//#include "G4CompositeEMDataSet.hh"
46//#include "G4ShellEMDataSet.hh"
[968]47#include "G4EMDataSet.hh"
[1192]48//#include "G4VEMDataSet.hh"
49//#include "G4VDataSetAlgorithm.hh"
[968]50#include "G4LogLogInterpolation.hh"
51#include "G4PaulKCrossSection.hh"
[1192]52#include "G4Proton.hh"
53#include "G4Alpha.hh"
[968]54
[1192]55
[968]56G4PaulKCrossSection::G4PaulKCrossSection()
[1192]57{
[968]58
[1192]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}
84
[968]85G4PaulKCrossSection::~G4PaulKCrossSection()
[1192]86{
[968]87
[1192]88 protonDataSetMap.clear();
89 alphaDataSetMap.clear();
90
91}
92
93G4double G4PaulKCrossSection::CalculateKCrossSection(G4int zTarget,G4double massIncident, G4double energyIncident)
[968]94{
95
[1192]96 G4Proton* aProtone = G4Proton::Proton();
97 G4Alpha* aAlpha = G4Alpha::Alpha();
98
99 G4double sigma = 0;
[968]100
[1192]101 if (massIncident == aProtone->GetPDGMass() )
102 {
103
104 sigma = protonDataSetMap[zTarget]->FindValue(energyIncident/MeV) / barn;
105
106 }
[968]107 else
108 {
[1192]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 }
[968]120 }
121
122
[1192]123
124 return sigma;
[968]125}
126
127
128
129
130
131
132
133
134
135
136
137
Note: See TracBrowser for help on using the repository browser.