[819] | 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 | // |
---|
| 28 | // GEANT4 Class file |
---|
| 29 | // |
---|
| 30 | // |
---|
| 31 | // File name: G4hShellCrossSectionExp.cc |
---|
| 32 | // |
---|
| 33 | // Author: Simona Saliceti (simona.saliceti@ge.infn.it) |
---|
| 34 | // |
---|
| 35 | // History: |
---|
| 36 | // ----------- |
---|
| 37 | // From 23 Oct 2001 A. Mantero G4hShellCrossSection |
---|
| 38 | // 30/03/2004 Simona Saliceti 1st implementation |
---|
| 39 | // ------------------------------------------------------------------- |
---|
| 40 | // Class Description: |
---|
| 41 | // Empiric Model for shell cross sections in proton ionisation |
---|
| 42 | // ------------------------------------------------------------------- |
---|
[1192] | 43 | // $Id: G4hShellCrossSectionExp.cc,v 1.7 2009/06/10 13:32:36 mantero Exp $ |
---|
[1228] | 44 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[819] | 45 | |
---|
| 46 | #include "globals.hh" |
---|
| 47 | #include <vector> |
---|
| 48 | #include "G4hShellCrossSectionExp.hh" |
---|
| 49 | #include "G4AtomicTransitionManager.hh" |
---|
| 50 | #include "G4Electron.hh" |
---|
| 51 | #include "G4hShellCrossSectionExpData.hh" |
---|
| 52 | #include "G4Proton.hh" |
---|
| 53 | #include "G4ParticleDefinition.hh" |
---|
| 54 | |
---|
| 55 | G4hShellCrossSectionExp::G4hShellCrossSectionExp() |
---|
| 56 | { |
---|
| 57 | kShellData = new G4hShellCrossSectionExpData(); |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | G4hShellCrossSectionExp::~G4hShellCrossSectionExp() |
---|
| 61 | { } |
---|
| 62 | |
---|
| 63 | std::vector<G4double> G4hShellCrossSectionExp::GetCrossSection(G4int Z, |
---|
| 64 | G4double incidentEnergy, |
---|
| 65 | G4double mass, |
---|
| 66 | G4double deltaEnergy, |
---|
| 67 | G4bool testFlag) const |
---|
| 68 | { |
---|
| 69 | mass = 0.0; |
---|
| 70 | deltaEnergy = 0.0; |
---|
| 71 | |
---|
| 72 | std::vector<G4double> aCrossSection; |
---|
| 73 | |
---|
| 74 | // Fill the vector of cross sections with the value just calculated |
---|
| 75 | aCrossSection.push_back(GetCrossSectionExp(Z,incidentEnergy)); |
---|
| 76 | |
---|
| 77 | if (testFlag) |
---|
| 78 | { |
---|
| 79 | G4cout <<"Element: " <<Z<<" Particle Energy: "<<incidentEnergy/MeV<<" MeV" <<G4endl; |
---|
| 80 | G4cout <<"Cross Section: "<<aCrossSection[0]/barn<<" barns"<< G4endl; |
---|
| 81 | } |
---|
| 82 | return aCrossSection; |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | //This function calculated the cross section with the Empiric model |
---|
| 86 | G4double G4hShellCrossSectionExp::GetCrossSectionExp(G4int Z, |
---|
| 87 | G4double incidentEnergy) const |
---|
| 88 | { |
---|
| 89 | // Vector that stores the calculated cross-sections for each shell: |
---|
| 90 | G4double crossSectionsInBarn = 0.0; |
---|
| 91 | G4double crossSections = 0.0; |
---|
| 92 | |
---|
| 93 | std::vector<G4double>* parVec = kShellData->GetParam(Z); |
---|
| 94 | std::vector<G4double>::iterator i = (*parVec).begin(); |
---|
| 95 | |
---|
| 96 | G4double a = *i; |
---|
| 97 | G4double b = *(i+1); |
---|
| 98 | G4double c = *(i+2); |
---|
| 99 | |
---|
| 100 | G4double incidentEnergyInMeV = incidentEnergy/MeV; |
---|
| 101 | |
---|
| 102 | if(Z<26 && Z>=6 && Z!=17) |
---|
| 103 | { |
---|
| 104 | crossSectionsInBarn = a*(std::pow(b,(1./incidentEnergyInMeV)))*(std::pow(incidentEnergyInMeV,c)); |
---|
| 105 | } |
---|
[961] | 106 | else if((Z<66 && Z>=26) || Z==17) |
---|
[819] | 107 | { |
---|
| 108 | crossSectionsInBarn = std::exp(a+(b/incidentEnergyInMeV)+(c*std::log(incidentEnergyInMeV))); |
---|
| 109 | } |
---|
| 110 | else if(Z<=92 && Z>=66) |
---|
| 111 | { |
---|
| 112 | crossSectionsInBarn = (std::pow(incidentEnergyInMeV,a))*std::exp(b-(c*incidentEnergyInMeV)); |
---|
| 113 | } |
---|
| 114 | else |
---|
| 115 | { |
---|
| 116 | G4cout << "Error: there is not that Z" << G4endl; |
---|
| 117 | } |
---|
| 118 | |
---|
| 119 | crossSections = crossSectionsInBarn*barn; |
---|
| 120 | return crossSections; |
---|
| 121 | } |
---|
| 122 | |
---|
| 123 | // This function gives the atomic cross section of k shell only |
---|
| 124 | void G4hShellCrossSectionExp::SetTotalCS(G4double value) |
---|
| 125 | { |
---|
| 126 | atomTotalCrossSection = value; |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | //A new implementation of Probability to calculate the cross section probability for k shell only |
---|
| 130 | std::vector<G4double> G4hShellCrossSectionExp::Probabilities( |
---|
| 131 | G4int Z, |
---|
| 132 | G4double incidentEnergy, |
---|
| 133 | G4double hMass, |
---|
| 134 | G4double deltaEnergy |
---|
| 135 | ) const |
---|
| 136 | { |
---|
| 137 | hMass = 0.0; |
---|
| 138 | deltaEnergy = 0.0; |
---|
| 139 | |
---|
| 140 | std::vector<G4double> kProbability; |
---|
| 141 | kProbability.push_back(GetCrossSectionExp(Z,incidentEnergy)/atomTotalCrossSection); |
---|
| 142 | // ---- MGP ---- Next line corrected to kProbability[0] instead of [1], which is not initialized! |
---|
| 143 | kProbability.push_back(1 - kProbability[0]); |
---|
| 144 | |
---|
| 145 | return kProbability; |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | |
---|