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 | //$Id: G4empCrossSection.cc,v 1.3 2010/11/12 18:09:44 mantero Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
28 | // |
---|
29 | // |
---|
30 | // |
---|
31 | // History: |
---|
32 | // ----------- |
---|
33 | // 29 Apr 2009 ALF 1st implementation |
---|
34 | // |
---|
35 | // ------------------------------------------------------------------- |
---|
36 | // Class description: |
---|
37 | // empirical model for K and L Ionization CS for Protons and Alpha |
---|
38 | // Further documentation available from http://www.ge.infn.it/geant4/lowE |
---|
39 | // ------------------------------------------------------------------- |
---|
40 | |
---|
41 | |
---|
42 | #include "globals.hh" |
---|
43 | #include "G4empCrossSection.hh" |
---|
44 | #include "G4Proton.hh" |
---|
45 | //#include "G4Alpha.hh" |
---|
46 | //#include <math.h> |
---|
47 | |
---|
48 | G4empCrossSection::G4empCrossSection() |
---|
49 | :totalCS(0) |
---|
50 | { |
---|
51 | |
---|
52 | paulShellK = new G4PaulKCrossSection(); |
---|
53 | orlicShellLi = new G4OrlicLiCrossSection(); |
---|
54 | |
---|
55 | } |
---|
56 | |
---|
57 | G4empCrossSection::~G4empCrossSection() |
---|
58 | { |
---|
59 | |
---|
60 | delete paulShellK; |
---|
61 | delete orlicShellLi; |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | std::vector<G4double> G4empCrossSection::GetCrossSection(G4int Z, |
---|
66 | G4double incidentEnergy, |
---|
67 | G4double mass, |
---|
68 | G4double deltaEnergy, |
---|
69 | G4bool testFlag) const |
---|
70 | { |
---|
71 | |
---|
72 | deltaEnergy = 0; |
---|
73 | testFlag = 0; |
---|
74 | |
---|
75 | std::vector<G4double> crossSections; |
---|
76 | |
---|
77 | crossSections.push_back( paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy) ); |
---|
78 | |
---|
79 | G4Proton* aProtone = G4Proton::Proton(); |
---|
80 | |
---|
81 | if (mass == aProtone->GetPDGMass() ) { |
---|
82 | |
---|
83 | crossSections.push_back( orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy) ); |
---|
84 | crossSections.push_back( orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy) ); |
---|
85 | crossSections.push_back( orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy) ); |
---|
86 | } |
---|
87 | |
---|
88 | return crossSections; |
---|
89 | |
---|
90 | } |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | std::vector<G4double> G4empCrossSection::Probabilities(G4int Z, |
---|
96 | G4double incidentEnergy, |
---|
97 | G4double mass, |
---|
98 | G4double deltaEnergy) const |
---|
99 | { |
---|
100 | |
---|
101 | std::vector<G4double> crossSections = GetCrossSection(Z, incidentEnergy, mass, deltaEnergy); |
---|
102 | |
---|
103 | for (size_t i=0; i<crossSections.size(); i++ ) { |
---|
104 | |
---|
105 | if (totalCS) { |
---|
106 | crossSections[i] = crossSections[i]/totalCS; |
---|
107 | } |
---|
108 | |
---|
109 | } |
---|
110 | |
---|
111 | return crossSections; |
---|
112 | |
---|
113 | } |
---|
114 | |
---|
115 | |
---|
116 | void G4empCrossSection::SetTotalCS(G4double val){ |
---|
117 | |
---|
118 | totalCS = val; |
---|
119 | |
---|
120 | } |
---|
121 | |
---|
122 | |
---|
123 | |
---|