source: trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc @ 819

Last change on this file since 819 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 3.5 KB
Line 
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// 18-Sep-2003 First version is written by T. Koi
27// 23-Dec-2006 Isotope dependence added by D. Wright
28//
29
30#include "G4IonsSihverCrossSection.hh"
31#include "G4ParticleTable.hh"
32#include "G4IonTable.hh"
33
34G4double G4IonsSihverCrossSection::
35GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double /*ZZ*/, 
36                G4double AA, G4double /*aTemperature*/)
37{
38   G4double xsection = 0.0;
39
40   G4int At = G4int(AA);
41   //G4int Zt = G4int(ZZ);  // not used
42
43   G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
44   //Zp = aParticle->GetDefinition()->GetPDGCharge();   // not used 
45 
46   G4double one_third = 1.0 / 3.0;
47
48   G4double cubicrAt = std::pow ( G4double(At) , G4double(one_third) ); 
49   G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 
50
51   G4double b0 = 1.581 - 0.876 * ( 1.0 / cubicrAp + 1.0 / cubicrAt );
52
53   xsection = pi * square_r0
54            * std::pow ( G4double(cubicrAp + cubicrAt - b0 * (  1.0 / cubicrAp + 1.0 / cubicrAt ) ), G4double(2) );
55 
56   return xsection; 
57}
58
59
60G4double G4IonsSihverCrossSection::
61GetCrossSection(const G4DynamicParticle* aParticle, 
62                const G4Element* anElement, G4double temperature)
63{
64  G4int nIso = anElement->GetNumberOfIsotopes();
65  G4double xsection = 0;
66   
67  if (nIso) {
68    G4double sig;
69    G4IsotopeVector* isoVector = anElement->GetIsotopeVector();
70    G4double* abundVector = anElement->GetRelativeAbundanceVector();
71    G4double ZZ;
72    G4double AA;
73   
74    for (G4int i = 0; i < nIso; i++) {
75      ZZ = G4double( (*isoVector)[i]->GetZ() );
76      AA = G4double( (*isoVector)[i]->GetN() );
77      sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
78      xsection += sig*abundVector[i];
79    }
80 
81  } else {
82    xsection =
83      GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),
84                           temperature);
85  }
86   
87  return xsection;
88}
Note: See TracBrowser for help on using the repository browser.