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

    r962 r1340  
    7878}
    7979
    80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    81 
    82 G4bool G4UInelasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp,
    83                                                 G4double Z, G4double A)
     80
     81G4bool
     82G4UInelasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp,
     83                                          G4int Z, G4int A)
    8484{
    8585  G4bool res = false;
     
    9494}
    9595
    96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    97 
    98 G4double G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,
    99                                                    const G4Element* elm,
    100                                                    G4double temp)
    101 {
    102   return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
    103 }
    104 
    105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    106 
    107 G4double G4UInelasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp,
    108                                                         G4double Z,
    109                                                         G4double A,
    110                                                         G4double)
     96
     97G4double
     98G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,
     99                                          const G4Element* elm,
     100                                          G4double temp)
     101{
     102  G4int Z = G4lrint(elm->GetZ());
     103  G4int N = G4lrint(elm->GetN());
     104  return GetIsoZACrossSection(dp, Z, N, temp);
     105}
     106
     107
     108G4double
     109G4UInelasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp,
     110                                               G4int Z, G4int A, G4double)
    111111{
    112112  G4double cross = 0.0;
    113113  G4double ekin = dp->GetKineticEnergy();
    114   G4int iz = G4int(Z);
    115   if(iz > 92) iz = 92;
     114  //  G4int iz = G4int(Z);
     115  if(Z > 92) Z = 92;
    116116
    117117    // proton and neutron
    118118  if(fNucleon) {
    119     if(iz == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);
     119    if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);
    120120    else if(ekin > thEnergy) {
    121       cross = theFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
     121      cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
    122122    } else {
    123123      cross = fNucleon->GetIsoZACrossSection(dp, Z, A);
     
    126126    // pions
    127127  } else if(fUPi) {
    128     if(iz == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);
     128    if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);
    129129    else if(ekin > thEnergy) {
    130       cross = theFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
     130      cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
    131131    } else {
    132132      cross = fUPi->GetInelasticCrossSection(dp, Z, A);
     
    136136  } else {
    137137    if(hasGlauber && ekin > thEnergy) {
    138       cross = theFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
     138      cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
    139139    } else if(fGheisha->IsApplicable(dp, Z, A)){
    140140      cross = fGheisha->GetInelasticCrossSection(dp, Z, A);
     
    153153}
    154154
    155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    156155
    157156void G4UInelasticCrossSection::BuildPhysicsTable(const G4ParticleDefinition& p)
     
    173172
    174173
    175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    176 
    177174void G4UInelasticCrossSection::Initialise(const G4ParticleDefinition* p)
    178175{
     
    182179
    183180  G4NistManager* nist = G4NistManager::Instance();
    184   G4double A = nist->GetAtomicMassAmu(2);
    185 
    186   if(fGlauber->IsZAApplicable(&dp, 2.0, A)) {
     181  G4int A = G4lrint(nist->GetAtomicMassAmu(2));
     182
     183  if(fGlauber->IsIsoApplicable(&dp, 2, A)) {
    187184    hasGlauber = true;
    188185
     
    193190
    194191      G4double Z = G4double(iz);
    195       A = nist->GetAtomicMassAmu(iz);
    196       csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);
     192      A = G4lrint(nist->GetAtomicMassAmu(iz));
     193      csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A);
    197194
    198195      // proton and neutron
    199196      if(fNucleon) {
    200         csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A);
     197        csdn = fNucleon->GetIsoZACrossSection(&dp, iz, A);
    201198
    202199        // pions
    203200      } else if(fUPi) {
    204         csdn = fUPi->GetInelasticCrossSection(&dp, Z, A);
     201        csdn = fUPi->GetInelasticCrossSection(&dp, iz, A);
    205202
    206203        // other
    207       } else if(fGheisha->IsApplicable(&dp, Z, A)) {
    208         csdn = fGheisha->GetInelasticCrossSection(&dp, Z, A);
     204      } else if(fGheisha->IsApplicable(&dp, iz, A)) {
     205        csdn = fGheisha->GetInelasticCrossSection(&dp, iz, A);
    209206
    210207      } else {
     
    218215}
    219216
    220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    221 
    222 
Note: See TracChangeset for help on using the changeset viewer.