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

    r819 r1340  
    6565#include "G4ParticleTable.hh"
    6666#include "G4IonTable.hh"
     67#include "G4HadTmpUtil.hh"
    6768
    6869#include <iomanip>
    69 ///////////////////////////////////////////////////////////////////////////////
    70 //
     70
     71
    7172G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection ()
    7273{
     
    7980  return;
    8081}
    81 ///////////////////////////////////////////////////////////////////////////////
    82 //
     82
     83
    8384G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection ()
    8485{
     
    9293//
    9394
    94 G4bool G4GeneralSpaceNNCrossSection::IsZAApplicable
    95  (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA)
    96 {
    97   G4bool result = protonInelastic->IsZAApplicable(theProjectile, ZZ, AA);
     95G4bool G4GeneralSpaceNNCrossSection::IsIsoApplicable
     96 (const G4DynamicParticle* theProjectile, G4int ZZ, G4int AA)
     97{
     98  G4bool result = protonInelastic->IsIsoApplicable(theProjectile, ZZ, AA);
    9899  if (!result)
    99100  {
    100     result = ionProton->IsZAApplicable(theProjectile, ZZ, AA);
     101    result = ionProton->IsIsoApplicable(theProjectile, ZZ, AA);
    101102    if (!result)
    102103    {
    103       result = TripathiGeneral->IsZAApplicable(theProjectile, ZZ, AA);
     104      result = TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA);
    104105      if (!result)
    105         result = Shen->IsZAApplicable(theProjectile, ZZ, AA);
     106        result = Shen->IsIsoApplicable(theProjectile, ZZ, AA);
    106107    }
    107108  }
     
    139140    G4IsotopeVector* isoVector = theTarget->GetIsotopeVector();
    140141    G4double* abundVector = theTarget->GetRelativeAbundanceVector();
    141     G4double ZZ;
    142     G4double AA;
     142    G4int ZZ;
     143    G4int AA;
    143144     
    144145    for (G4int i = 0; i < nIso; i++) {
    145       ZZ = G4double( (*isoVector)[i]->GetZ() );
    146       AA = G4double( (*isoVector)[i]->GetN() );
    147       sig = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     146      ZZ = (*isoVector)[i]->GetZ();
     147      AA = (*isoVector)[i]->GetN();
     148      sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    148149      xsection += sig*abundVector[i];
    149150    }
    150151   
    151152  } else {
    152     xsection =
    153       GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),
    154                           theTemperature);
     153    G4int ZZ = G4lrint(theTarget->GetZ());
     154    G4int AA = G4lrint(theTarget->GetN());
     155    xsection = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    155156  }
    156157   
     
    159160
    160161
    161 G4double G4GeneralSpaceNNCrossSection::GetIsoZACrossSection
    162   (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA,
    163    G4double theTemperature)
     162G4double
     163G4GeneralSpaceNNCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile,
     164                                                   G4int ZZ, G4int AA, G4double theTemperature)
    164165{
    165166  G4double result = 0.0;
     
    186187    {
    187188      result = protonInelastic->
    188         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     189        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    189190      if (verboseLevel >= 2)
    190191        G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl;
     
    193194    {
    194195      result = TripathiLight->
    195         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     196        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    196197      if (verboseLevel >= 2)
    197198        G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
     
    203204    {
    204205      result = ionProton->
    205         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     206        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    206207      if (verboseLevel >= 2)
    207208        G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl;
     
    210211    {
    211212      result = TripathiLight->
    212         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     213        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    213214      if (verboseLevel >= 2)
    214215        G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
     
    217218  else
    218219  {
    219     if (TripathiLight->IsZAApplicable(theProjectile, ZZ, AA))
     220    if (TripathiLight->IsIsoApplicable(theProjectile, ZZ, AA))
    220221    {
    221222      result = TripathiLight->
    222         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     223        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    223224      if (verboseLevel >= 2)
    224225        G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
    225226    }
    226     else if (TripathiGeneral->IsZAApplicable(theProjectile, ZZ, AA))
     227    else if (TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA))
    227228    {
    228229      result = TripathiGeneral->
    229         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     230        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    230231      if (verboseLevel >= 2)
    231232        G4cout <<"Selecting G4TripathiCrossSection" <<G4endl;
    232233    }
    233     else if (Shen->IsZAApplicable(theProjectile, ZZ, AA))
     234    else if (Shen->IsIsoApplicable(theProjectile, ZZ, AA))
    234235    {
    235236      result = Shen->
    236         GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature);
     237        GetZandACrossSection(theProjectile, ZZ, AA, theTemperature);
    237238      if (verboseLevel >= 2)
    238239        G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl;
     
    247248  return result;
    248249}
    249 ///////////////////////////////////////////////////////////////////////////////
    250 //
     250
Note: See TracChangeset for help on using the changeset viewer.