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

    r1228 r1340  
    6363#include "G4ParticleTable.hh"
    6464#include "G4IonTable.hh"
     65#include "G4HadTmpUtil.hh"
     66
    6567
    6668///////////////////////////////////////////////////////////////////////////////
     
    101103  (const G4DynamicParticle* theProjectile, const G4Element* theTarget)
    102104{
    103   return IsZAApplicable(theProjectile, theTarget->GetZ(), theTarget->GetN());
    104 }
    105 
    106 
    107 G4bool G4TripathiLightCrossSection::IsZAApplicable
    108   (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA)
     105  G4int Z = G4lrint(theTarget->GetZ());
     106  G4int A = G4lrint(theTarget->GetN());
     107  return IsIsoApplicable(theProjectile, Z, A);
     108}
     109
     110
     111G4bool
     112G4TripathiLightCrossSection::IsIsoApplicable(const G4DynamicParticle* theProjectile,
     113                                             G4int ZZ, G4int AA)
    109114{
    110115  G4bool result = false;
     
    122127  return result;
    123128}
    124 ///////////////////////////////////////////////////////////////////////////////
    125 //
    126 G4double G4TripathiLightCrossSection::GetIsoZACrossSection
    127   (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA,
    128    G4double /*theTemperature*/)
     129
     130///////////////////////////////////////////////////////////////////////////////
     131//
     132G4double
     133G4TripathiLightCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile,
     134                                                  G4int ZZ, G4int AA, G4double /*theTemperature*/)
    129135{
    130136//
     
    301307          SetLowEnergyCheck(true);
    302308      G4double resultp =
    303         GetIsoZACrossSection(&slowerProjectile, ZZ, AA, 0.0);
     309        GetZandACrossSection(&slowerProjectile, ZZ, AA, 0.0);
    304310          SetLowEnergyCheck(savelowenergy);
    305311      if (resultp >result) result = 0.0;
     
    322328    G4IsotopeVector* isoVector = theTarget->GetIsotopeVector();
    323329    G4double* abundVector = theTarget->GetRelativeAbundanceVector();
    324     G4double ZZ;
    325     G4double AA;
     330    G4int ZZ;
     331    G4int AA;
    326332     
    327333    for (G4int i = 0; i < nIso; i++) {
    328       ZZ = G4double( (*isoVector)[i]->GetZ() );
    329       AA = G4double( (*isoVector)[i]->GetN() );
    330       sig = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     334      ZZ = (*isoVector)[i]->GetZ();
     335      AA = (*isoVector)[i]->GetN();
     336      sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    331337      xsection += sig*abundVector[i];
    332338    }
    333339   
    334340  } else {
    335     xsection =
    336       GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),
    337                           theTemperature);
     341    G4int ZZ = G4lrint(theTarget->GetZ());
     342    G4int AA = G4lrint(theTarget->GetN());
     343    xsection = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
    338344  }
    339345   
     
    348354  lowEnergyCheck = aLowEnergyCheck;
    349355}
    350 ///////////////////////////////////////////////////////////////////////////////
    351 //
     356
Note: See TracChangeset for help on using the changeset viewer.