| 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: G4hShellCrossSectionDoubleExp.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 | // -------------------------------------------------------------------
|
|---|
| 43 | // $Id: G4hShellCrossSectionDoubleExp.cc,v 1.9 2008/06/26 18:19:10 sincerti Exp $
|
|---|
| 44 | // GEANT4 tag $Name: geant4-09-02 $
|
|---|
| 45 |
|
|---|
| 46 | #include "globals.hh"
|
|---|
| 47 | #include <vector>
|
|---|
| 48 | #include "G4hShellCrossSectionDoubleExp.hh"
|
|---|
| 49 | #include "G4AtomicTransitionManager.hh"
|
|---|
| 50 | #include "G4Electron.hh"
|
|---|
| 51 | #include "G4hShellCrossSectionDoubleExpData.hh"
|
|---|
| 52 | #include "G4Proton.hh"
|
|---|
| 53 | #include "G4ParticleDefinition.hh"
|
|---|
| 54 |
|
|---|
| 55 | G4hShellCrossSectionDoubleExp::G4hShellCrossSectionDoubleExp()
|
|---|
| 56 | {
|
|---|
| 57 | kShellData = new G4hShellCrossSectionDoubleExpData();
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | G4hShellCrossSectionDoubleExp::~G4hShellCrossSectionDoubleExp()
|
|---|
| 61 | { }
|
|---|
| 62 |
|
|---|
| 63 | std::vector<G4double> G4hShellCrossSectionDoubleExp::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(GetCrossSectionDoubleExp(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 G4hShellCrossSectionDoubleExp::GetCrossSectionDoubleExp(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<std::vector<G4double>*> parVec = kShellData->GetParam(Z);
|
|---|
| 94 | std::vector<G4double>* energyVec = parVec[0];
|
|---|
| 95 | std::vector<G4double>* par1Vec = parVec[1];
|
|---|
| 96 | std::vector<G4double>* par2Vec = parVec[2];
|
|---|
| 97 |
|
|---|
| 98 | std::vector<G4double>::iterator i = (*par1Vec).begin();
|
|---|
| 99 |
|
|---|
| 100 | G4double a1 = *i;
|
|---|
| 101 | G4double b1 = *(i+1);
|
|---|
| 102 | G4double c1 = *(i+2);
|
|---|
| 103 |
|
|---|
| 104 | std::vector<G4double>::iterator j = (*par2Vec).begin();
|
|---|
| 105 |
|
|---|
| 106 | G4double a2 = *j;
|
|---|
| 107 | G4double b2 = *(j+1);
|
|---|
| 108 | G4double c2 = *(j+2);
|
|---|
| 109 | G4double d2 = *(j+3);
|
|---|
| 110 | G4double e2 = *(j+4);
|
|---|
| 111 |
|
|---|
| 112 | G4double incidentEnergyInMeV = incidentEnergy/MeV;
|
|---|
| 113 |
|
|---|
| 114 | // energy is the energy to split the file in low and high energy
|
|---|
| 115 | std::vector<G4double>::iterator l = (*energyVec).begin();
|
|---|
| 116 | G4double energy = *l;
|
|---|
| 117 | energy = energy/MeV;
|
|---|
| 118 |
|
|---|
| 119 | if(incidentEnergyInMeV <= energy)
|
|---|
| 120 | {
|
|---|
| 121 | if(Z<26)
|
|---|
| 122 | {
|
|---|
| 123 | crossSectionsInBarn = (std::pow(incidentEnergyInMeV,(a1)))*std::exp((b1)-((c1)*(incidentEnergyInMeV)));
|
|---|
| 124 | }
|
|---|
| 125 | else if(Z>=26)
|
|---|
| 126 | {
|
|---|
| 127 | crossSectionsInBarn = a1*(std::pow(b1,(1./incidentEnergyInMeV)))*(std::pow(incidentEnergyInMeV,c1));
|
|---|
| 128 | }
|
|---|
| 129 | }
|
|---|
| 130 | else if(incidentEnergyInMeV > energy)
|
|---|
| 131 | {
|
|---|
| 132 | if(Z<26 || (Z>=36 && Z<=65))
|
|---|
| 133 | {
|
|---|
| 134 | crossSectionsInBarn = (a2)*(std::pow((b2),(1./incidentEnergyInMeV)))*(std::pow(incidentEnergyInMeV,(c2)));
|
|---|
| 135 | }
|
|---|
| 136 | else if(Z>=26 && Z<36)
|
|---|
| 137 | {
|
|---|
| 138 | crossSectionsInBarn = a2+b2*(std::log(incidentEnergyInMeV))+c2*(std::pow(std::log(incidentEnergyInMeV),2))+d2*(std::pow(std::log(incidentEnergyInMeV),3));
|
|---|
| 139 | }
|
|---|
| 140 | else if(Z>65 && Z<=92)
|
|---|
| 141 | {
|
|---|
| 142 | crossSectionsInBarn = a2+b2*(std::log(incidentEnergyInMeV))+c2*(std::pow(std::log(incidentEnergyInMeV),2))+d2*(std::pow(std::log(incidentEnergyInMeV),3))+e2*(std::pow(std::log(incidentEnergyInMeV),4));
|
|---|
| 143 | }
|
|---|
| 144 | }
|
|---|
| 145 |
|
|---|
| 146 | // if(Z<26 && incidentEnergyInMeV <= energy)
|
|---|
| 147 | // {
|
|---|
| 148 | // crossSectionsInBarn = (std::pow(incidentEnergyInMeV,(a1)))*std::exp((b1)-((c1)*incidentEnergyInMeV));
|
|---|
| 149 | // }
|
|---|
| 150 | // else if(Z>=26 && incidentEnergyInMeV <= energy)
|
|---|
| 151 | // {
|
|---|
| 152 | // crossSectionsInBarn = a1*(std::pow(b1,(1./incidentEnergyInMeV)))*(std::pow(incidentEnergyInMeV,c1));
|
|---|
| 153 | // }
|
|---|
| 154 | // else if((Z<26 || (36<=Z && Z<=65)) && incidentEnergyInMeV > energy)
|
|---|
| 155 | // {
|
|---|
| 156 | // crossSectionsInBarn = (a2)*(std::pow((b2),(1./incidentEnergyInMeV)))*(std::pow(incidentEnergyInMeV,(c2)));
|
|---|
| 157 | // }
|
|---|
| 158 | // else if(Z>=26 && Z<=35 && incidentEnergyInMeV > energy)
|
|---|
| 159 | // {
|
|---|
| 160 | // crossSectionsInBarn = a2+b2*(std::log(incidentEnergyInMeV))+c2*(std::pow(std::log(incidentEnergyInMeV),2))+d2*(std::pow(std::log(incidentEnergyInMeV),3));
|
|---|
| 161 | // }
|
|---|
| 162 | // else if(Z>=67 && Z<=92 && incidentEnergyInMeV > energy)
|
|---|
| 163 | // {
|
|---|
| 164 | // crossSectionsInBarn = a2+b2*(std::log(incidentEnergyInMeV))+c2*(std::pow(std::log(incidentEnergyInMeV),2))+d2*(std::pow(std::log(incidentEnergyInMeV),3))+e2*(std::pow(std::log(incidentEnergyInMeV),4));
|
|---|
| 165 | // }
|
|---|
| 166 |
|
|---|
| 167 | crossSections = crossSectionsInBarn*barn;
|
|---|
| 168 | return crossSections;
|
|---|
| 169 | }
|
|---|
| 170 |
|
|---|
| 171 | // This function gives the atomic cross section of k shell only
|
|---|
| 172 | void G4hShellCrossSectionDoubleExp::SetTotalCS(G4double value)
|
|---|
| 173 | {
|
|---|
| 174 | atomTotalCrossSection = value;
|
|---|
| 175 | }
|
|---|
| 176 |
|
|---|
| 177 | //A new implementation of Probability to calculate the cross section probability for k shell only
|
|---|
| 178 | std::vector<G4double> G4hShellCrossSectionDoubleExp::Probabilities(
|
|---|
| 179 | G4int Z,
|
|---|
| 180 | G4double incidentEnergy,
|
|---|
| 181 | G4double hMass,
|
|---|
| 182 | G4double deltaEnergy
|
|---|
| 183 | ) const
|
|---|
| 184 | {
|
|---|
| 185 | hMass = 0.0;
|
|---|
| 186 | deltaEnergy = 0.0;
|
|---|
| 187 |
|
|---|
| 188 | std::vector<G4double> kProbability;//(0);
|
|---|
| 189 |
|
|---|
| 190 |
|
|---|
| 191 | if (atomTotalCrossSection!=0.) // SI - 26 june 2008
|
|---|
| 192 |
|
|---|
| 193 | {
|
|---|
| 194 | kProbability.push_back(GetCrossSectionDoubleExp(Z,incidentEnergy)/atomTotalCrossSection);
|
|---|
| 195 | // ---- MGP ---- Next line corrected to kProbability[0] instead of [1], which is not initialized!
|
|---|
| 196 | kProbability.push_back(1 - kProbability[0]);
|
|---|
| 197 | }
|
|---|
| 198 |
|
|---|
| 199 | return kProbability;
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 |
|
|---|