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/G4IonsKoxCrossSection.cc

    r1055 r1340  
    3232#include "G4ParticleTable.hh"
    3333#include "G4IonTable.hh"
     34#include "G4HadTmpUtil.hh"
    3435
    3536G4double G4IonsKoxCrossSection::
    36 GetIsoZACrossSection(const G4DynamicParticle* aParticle, G4double ZZ,
    37                      G4double AA, G4double /*temperature*/)
     37GetZandACrossSection(const G4DynamicParticle* aParticle, G4int ZZ,
     38                     G4int AA, G4double /*temperature*/)
    3839{
    3940   G4double xsection = 0.0;
    4041
    4142   G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
    42    G4int Zp = int ( aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5);
     43   G4int Zp = G4int(aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5);
    4344   G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
    4445
     
    4647   // if (  ke_per_N < lowerLimit ) return xsection;
    4748
    48    G4int At = int (AA + 0.5);
    49    G4int Zt = int (ZZ + 0.5 )
     49   G4int At = AA;
     50   G4int Zt = ZZ
    5051
    5152   G4double one_third = 1.0 / 3.0;
     
    5455   G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 
    5556
     57   // rc divide fermi
     58   G4double Bc = Zt * Zp / ( (rc/fermi) * (cubicrAp+cubicrAt) );
    5659
    57    G4double Bc = Zt * Zp / ( ( rc / fermi ) * (  cubicrAp + cubicrAt ) );   // rc divide fermi
    58    G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
    59    G4double proj_mass = aParticle->GetMass(); 
     60   G4double targ_mass =
     61     G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(Zt, At);
     62   G4double proj_mass = aParticle->GetMass();
    6063   G4double proj_momentum = aParticle->GetMomentum().mag();
    6164
     
    6972
    7073   G4double a = 1.85;
    71    G4double Rsurf = r0 * ( a * cubicrAp * cubicrAt / ( cubicrAp + cubicrAt ) - c);
     74   G4double Rsurf = r0 * (a*cubicrAp * cubicrAt/(cubicrAp + cubicrAt) - c);
    7275   G4double D = 5.0 * ( At - 2 * Zt ) * Zp / ( Ap * At );
    7376   Rsurf = Rsurf + D * fermi;  // multiply D by fermi
    7477
    7578   G4double Rint = Rvol + Rsurf;
    76 
    7779   xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) );
    7880 
    7981   return xsection;
    8082}
     83
    8184
    8285G4double G4IonsKoxCrossSection::
     
    9194    G4IsotopeVector* isoVector = anElement->GetIsotopeVector();
    9295    G4double* abundVector = anElement->GetRelativeAbundanceVector();
    93     G4double ZZ;
    94     G4double AA;
     96    G4int ZZ;
     97    G4int AA;
    9598     
    9699    for (G4int i = 0; i < nIso; i++) {
    97       ZZ = G4double( (*isoVector)[i]->GetZ() );
    98       AA = G4double( (*isoVector)[i]->GetN() );
    99       sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
     100      ZZ = (*isoVector)[i]->GetZ();
     101      AA = (*isoVector)[i]->GetN();
     102      sig = GetZandACrossSection(aParticle, ZZ, AA, temperature);
    100103      xsection += sig*abundVector[i];
    101104    }
    102105   
    103106  } else {
    104     xsection =
    105       GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),
    106                           temperature);
     107    G4int ZZ = G4lrint(anElement->GetZ());
     108    G4int AA = G4lrint(anElement->GetN());
     109    xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature);
    107110  }
    108111   
     
    111114
    112115
    113 G4double G4IonsKoxCrossSection::calEcm ( G4double mp , G4double mt , G4double Plab )
     116G4double
     117G4IonsKoxCrossSection::calEcm(G4double mp, G4double mt, G4double Plab)
    114118{
    115119   G4double Elab = std::sqrt ( mp * mp + Plab * Plab );
     
    121125
    122126
    123 G4double G4IonsKoxCrossSection::calCeValue( const G4double ke )
     127G4double G4IonsKoxCrossSection::calCeValue(const G4double ke)
    124128{
    125129   // Calculate c value
     
    131135   G4double Ce;
    132136   G4double log10_ke = std::log10 ( ke );   
    133    if ( log10_ke > 1.5 )
     137   if (log10_ke > 1.5)
    134138   {
    135139      Ce = - 10.0 / std::pow ( G4double(log10_ke) , G4double(5) ) + 2.0;
     
    137141   else
    138142   {
    139       Ce = ( - 10.0 / std::pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / std::pow ( G4double(1.5) , G4double(3) ) * std::pow ( G4double(log10_ke) , G4double(3) );
     143      Ce = (-10.0/std::pow(G4double(1.5), G4double(5) ) + 2.0) /
     144           std::pow(G4double(1.5), G4double(3)) * std::pow(G4double(log10_ke), G4double(3) );
    140145
    141146   }
Note: See TracChangeset for help on using the changeset viewer.