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 | // |
---|
27 | // $Id: G4NSS07ElasticRutherford.cc,v 1.1 2007/10/22 10:21:25 pia Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
29 | // |
---|
30 | /// |
---|
31 | // ------------------------------------------------------------------- |
---|
32 | // Author: Maria Grazia Pia |
---|
33 | // |
---|
34 | // Creation date: 6 August 2001 |
---|
35 | // |
---|
36 | // Modifications: |
---|
37 | // |
---|
38 | // ------------------------------------------------------------------- |
---|
39 | |
---|
40 | #include "globals.hh" |
---|
41 | #include "G4ios.hh" |
---|
42 | #include <fstream> |
---|
43 | #include <iomanip> |
---|
44 | #include <vector> |
---|
45 | |
---|
46 | |
---|
47 | #include "G4ParticleDefinition.hh" |
---|
48 | #include "G4ParticleTypes.hh" |
---|
49 | //#include "G4ParticleTable.hh" |
---|
50 | #include "G4ParticleMomentum.hh" |
---|
51 | #include "G4DynamicParticle.hh" |
---|
52 | #include "G4ThreeVector.hh" |
---|
53 | #include "G4Track.hh" |
---|
54 | #include "G4SystemOfUnits.hh" |
---|
55 | |
---|
56 | #include "G4CrossSectionElasticScreenedRutherford.hh" |
---|
57 | #include "G4CrossSectionExcitationEmfietzoglou.hh" |
---|
58 | #include "G4CrossSectionExcitationEmfietzoglouPartial.hh" |
---|
59 | #include "G4CrossSectionExcitationBorn.hh" |
---|
60 | #include "G4CrossSectionExcitationBornPartial.hh" |
---|
61 | #include "G4CrossSectionIonisationBornElectron.hh" |
---|
62 | #include "G4CrossSectionIonisationBorn.hh" |
---|
63 | |
---|
64 | int main() |
---|
65 | { |
---|
66 | // G4cout.setf( ios::scientific, ios::floatfield ); |
---|
67 | |
---|
68 | G4CrossSectionElasticScreenedRutherford* cross = new G4CrossSectionElasticScreenedRutherford; |
---|
69 | // G4CrossSectionExcitationEmfietzoglou* cross = new G4CrossSectionExcitationEmfietzoglou; |
---|
70 | // G4CrossSectionExcitationEmfietzoglouPartial* cross = new G4CrossSectionExcitationEmfietzoglouPartial; |
---|
71 | // G4CrossSectionExcitationBornPartial* cross = new G4CrossSectionExcitationBornPartial; |
---|
72 | // G4CrossSectionIonisationBornElectron* cross = new G4CrossSectionIonisationBornElectron; |
---|
73 | |
---|
74 | // G4CrossSectionIonisationBorn* cross = new G4CrossSectionIonisationBorn; |
---|
75 | |
---|
76 | // Particle definitions |
---|
77 | |
---|
78 | G4ParticleDefinition* electron = G4Electron::ElectronDefinition(); |
---|
79 | // G4ParticleDefinition* proton = G4Proton::ProtonDefinition(); |
---|
80 | // G4ParticleDefinition* positron = G4Positron::PositronDefinition(); |
---|
81 | |
---|
82 | // Create a DynamicParticle |
---|
83 | |
---|
84 | G4double initX = 0.; |
---|
85 | G4double initY = 0.; |
---|
86 | G4double initZ = 1.; |
---|
87 | |
---|
88 | G4ParticleMomentum direction(initX,initY,initZ); |
---|
89 | |
---|
90 | std::vector<G4double> mason; |
---|
91 | |
---|
92 | // Itikawa & Mason, J. Phys. Chem. Ref. Data 34 (1), pp. 1-22, 2005, table 4. |
---|
93 | mason.push_back(1); |
---|
94 | mason.push_back(2); |
---|
95 | mason.push_back(4); |
---|
96 | mason.push_back(6); |
---|
97 | mason.push_back(10); |
---|
98 | mason.push_back(20); |
---|
99 | mason.push_back(30); |
---|
100 | mason.push_back(40); |
---|
101 | mason.push_back(50); |
---|
102 | mason.push_back(60); |
---|
103 | mason.push_back(70); |
---|
104 | mason.push_back(80); |
---|
105 | mason.push_back(90); |
---|
106 | mason.push_back(100); |
---|
107 | |
---|
108 | G4int nE = mason.size(); |
---|
109 | |
---|
110 | |
---|
111 | for (G4int i=0; i<nE; i++) |
---|
112 | { |
---|
113 | G4double energy = mason[i] * eV; |
---|
114 | |
---|
115 | G4DynamicParticle dynamicParticle(electron,direction,energy); |
---|
116 | // G4DynamicParticle dynamicParticle(proton,direction,energy); |
---|
117 | // G4DynamicParticle dynamicParticle(positron,direction,energy); |
---|
118 | |
---|
119 | // dynamicParticle.DumpInfo(0); |
---|
120 | |
---|
121 | // Track |
---|
122 | |
---|
123 | G4ThreeVector position(0.,0.,0.); |
---|
124 | G4double time = 0. ; |
---|
125 | |
---|
126 | G4Track track(&dynamicParticle,time,position); |
---|
127 | |
---|
128 | G4double sigma = cross->CrossSection(track); |
---|
129 | // G4double sigma = cross->CrossSection(energy,0); |
---|
130 | // G4double sigma = cross->CrossSection(energy,electron::GetParticleName()); |
---|
131 | |
---|
132 | // G4cout << energy/eV <<" eV, cross section = " << sigma / (cm*cm) << " cm-2" << G4endl; |
---|
133 | |
---|
134 | G4cout << energy/eV <<" " << sigma / cm2 << G4endl; |
---|
135 | |
---|
136 | // G4int level = cross->RandomSelect(energy); |
---|
137 | |
---|
138 | // G4cout << "Level = " << level << G4endl; |
---|
139 | } |
---|
140 | |
---|
141 | delete cross; |
---|
142 | |
---|
143 | G4cout << "END OF THE MAIN PROGRAM" << G4endl; |
---|
144 | } |
---|
145 | |
---|
146 | |
---|
147 | |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | |
---|
152 | |
---|