Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/src/G4IonsSihverCrossSection.cc

    r819 r1340  
    3131#include "G4ParticleTable.hh"
    3232#include "G4IonTable.hh"
     33#include "G4HadTmpUtil.hh"
    3334
    3435G4double G4IonsSihverCrossSection::
    35 GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double /*ZZ*/,
    36                 G4double AA, G4double /*aTemperature*/)
     36GetZandACrossSection(const G4DynamicParticle* aParticle,
     37                     G4int /*ZZ*/, G4int AA, G4double /*aTemperature*/)
    3738{
    3839   G4double xsection = 0.0;
    39 
    40    G4int At = G4int(AA);
    41    //G4int Zt = G4int(ZZ);  // not used
     40   G4int At = AA;
    4241
    4342   G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
    44    //Zp = aParticle->GetDefinition()->GetPDGCharge();   // not used 
    4543 
    4644   G4double one_third = 1.0 / 3.0;
     
    4947   G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 
    5048
    51    G4double b0 = 1.581 - 0.876 * ( 1.0 / cubicrAp + 1.0 / cubicrAt );
     49   G4double b0 = 1.581 - 0.876 * (1.0/cubicrAp + 1.0/cubicrAt);
    5250
    5351   xsection = pi * square_r0
    54             * std::pow ( G4double(cubicrAp + cubicrAt - b0 * (  1.0 / cubicrAp + 1.0 / cubicrAt ) ), G4double(2) );
     52            * std::pow(G4double(cubicrAp + cubicrAt - b0 * (1.0/cubicrAp + 1.0/cubicrAt)), G4double(2));
    5553 
    5654   return xsection;
     
    6967    G4IsotopeVector* isoVector = anElement->GetIsotopeVector();
    7068    G4double* abundVector = anElement->GetRelativeAbundanceVector();
    71     G4double ZZ;
    72     G4double AA;
     69    G4int ZZ;
     70    G4int AA;
    7371   
    7472    for (G4int i = 0; i < nIso; i++) {
    75       ZZ = G4double( (*isoVector)[i]->GetZ() );
    76       AA = G4double( (*isoVector)[i]->GetN() );
     73      ZZ = (*isoVector)[i]->GetZ();
     74      AA = (*isoVector)[i]->GetN();
    7775      sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
    7876      xsection += sig*abundVector[i];
     
    8078 
    8179  } else {
    82     xsection =
    83       GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),
    84                           temperature);
     80    G4int ZZ = G4lrint(anElement->GetZ());
     81    G4int AA = G4lrint(anElement->GetN());
     82    xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
    8583  }
    8684   
Note: See TracChangeset for help on using the changeset viewer.