[1199] | 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: G4NSS07IonisationBorn.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 | G4cout << "Enter initial energy in keV" << G4endl; |
---|
| 91 | G4double e0; |
---|
| 92 | // G4cin >> e0; |
---|
| 93 | e0 = e0 * keV; |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | std::vector<G4double> masonIoniTot; |
---|
| 97 | |
---|
| 98 | masonIoniTot.push_back(13.5*eV); |
---|
| 99 | masonIoniTot.push_back(15*eV); |
---|
| 100 | masonIoniTot.push_back(17.5*eV); |
---|
| 101 | masonIoniTot.push_back(20*eV); |
---|
| 102 | masonIoniTot.push_back(22.5*eV); |
---|
| 103 | masonIoniTot.push_back(30*eV); |
---|
| 104 | masonIoniTot.push_back(35*eV); |
---|
| 105 | masonIoniTot.push_back(30*eV); |
---|
| 106 | masonIoniTot.push_back(40*eV); |
---|
| 107 | masonIoniTot.push_back(45*eV); |
---|
| 108 | masonIoniTot.push_back(50*eV); |
---|
| 109 | masonIoniTot.push_back(60*eV); |
---|
| 110 | masonIoniTot.push_back(70*eV); |
---|
| 111 | masonIoniTot.push_back(80*eV); |
---|
| 112 | masonIoniTot.push_back(90*eV); |
---|
| 113 | masonIoniTot.push_back(100*eV); |
---|
| 114 | masonIoniTot.push_back(110*eV); |
---|
| 115 | masonIoniTot.push_back(125*eV); |
---|
| 116 | masonIoniTot.push_back(150*eV); |
---|
| 117 | masonIoniTot.push_back(175*eV); |
---|
| 118 | masonIoniTot.push_back(200*eV); |
---|
| 119 | masonIoniTot.push_back(250*eV); |
---|
| 120 | masonIoniTot.push_back(300*eV); |
---|
| 121 | masonIoniTot.push_back(400*eV); |
---|
| 122 | masonIoniTot.push_back(500*eV); |
---|
| 123 | masonIoniTot.push_back(600*eV); |
---|
| 124 | masonIoniTot.push_back(700*eV); |
---|
| 125 | masonIoniTot.push_back(800*eV); |
---|
| 126 | masonIoniTot.push_back(900*eV); |
---|
| 127 | masonIoniTot.push_back(1000*eV); |
---|
| 128 | |
---|
| 129 | G4int nE = masonIoniTot.size(); |
---|
| 130 | |
---|
| 131 | for (G4int i=0; i<nE; i++) |
---|
| 132 | { |
---|
| 133 | G4double energy = masonIoniTot[i]; |
---|
| 134 | |
---|
| 135 | G4DynamicParticle dynamicParticle(electron,direction,energy); |
---|
| 136 | // G4DynamicParticle dynamicParticle(proton,direction,energy); |
---|
| 137 | // G4DynamicParticle dynamicParticle(positron,direction,energy); |
---|
| 138 | |
---|
| 139 | // dynamicParticle.DumpInfo(0); |
---|
| 140 | |
---|
| 141 | // Track |
---|
| 142 | |
---|
| 143 | G4ThreeVector position(0.,0.,0.); |
---|
| 144 | G4double time = 0. ; |
---|
| 145 | |
---|
| 146 | G4Track track(&dynamicParticle,time,position); |
---|
| 147 | |
---|
| 148 | G4double sigma = cross->CrossSection(track); |
---|
| 149 | // G4double sigma = cross->CrossSection(energy,0); |
---|
| 150 | // G4double sigma = cross->CrossSection(energy,electron::GetParticleName()); |
---|
| 151 | |
---|
| 152 | // G4cout << energy/eV <<" eV, cross section = " << sigma / (cm*cm) << " cm-2" << G4endl; |
---|
| 153 | |
---|
| 154 | G4cout << energy/eV <<" " << sigma / cm2 << G4endl; |
---|
| 155 | |
---|
| 156 | // G4int level = cross->RandomSelect(energy); |
---|
| 157 | |
---|
| 158 | // G4cout << "Level = " << level << G4endl; |
---|
| 159 | } |
---|
| 160 | |
---|
| 161 | delete cross; |
---|
| 162 | |
---|
| 163 | G4cout << "END OF THE MAIN PROGRAM" << G4endl; |
---|
| 164 | } |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|