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

    r962 r1340  
    8080//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    8181
    82 G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp,
    83                                                 G4double Z, G4double A)
     82// G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp,
     83//                                              G4double Z, G4double A)
     84G4bool G4UElasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp,
     85                                               G4int Z, G4int A)
    8486{
    8587  G4bool res = false;
     
    9496}
    9597
    96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    97 
    98 G4double G4UElasticCrossSection::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 G4UElasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp,
    108                                                         G4double Z,
    109                                                         G4double A,
    110                                                         G4double)
     98
     99G4double
     100G4UElasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,
     101                                        const G4Element* elm, G4double temp)
     102{
     103  G4int Z = G4lrint(elm->GetZ());
     104  G4int N = G4lrint(elm->GetN());
     105
     106  return GetZandACrossSection(dp, Z, N, temp);
     107}
     108
     109
     110G4double
     111G4UElasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp,
     112                                             G4int Z, G4int A, G4double)
    111113{
    112114  G4double cross = 0.0;
    113115  G4double ekin = dp->GetKineticEnergy();
    114   G4int iz = G4int(Z);
    115   if(iz > 92) iz = 92;
     116//  G4int iz = G4int(Z);
     117  if(Z > 92) Z = 92;
    116118
    117119    // proton and neutron
    118120  if(fNucleon) {
    119     if(iz == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);
     121    if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);
    120122    else if(ekin > thEnergy) {
    121       cross = theFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     123      cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    122124    } else {
    123125      cross = fNucleon->GetElasticCrossSection(dp, Z, A);
     
    126128    // pions
    127129  } else if(fUPi) {
    128     if(iz == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);
     130    if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);
    129131    else if(ekin > thEnergy) {
    130       cross = theFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     132      cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    131133    } else {
    132134      cross = fUPi->GetElasticCrossSection(dp, Z, A);
     
    136138  } else {
    137139    if(hasGlauber && ekin > thEnergy) {
    138       cross = theFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     140      cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    139141    } else if(fGheisha->IsApplicable(dp, Z, A)) {
    140142      cross = fGheisha->GetElasticCrossSection(dp, Z, A);
     
    182184
    183185  G4NistManager* nist = G4NistManager::Instance();
    184   G4double A = nist->GetAtomicMassAmu(2);
     186  G4int A = G4lrint(nist->GetAtomicMassAmu(2));
    185187
    186188  if(fGlauber->IsZAApplicable(&dp, 2.0, A)) {
     
    193195
    194196      G4double Z = G4double(iz);
    195       A = nist->GetAtomicMassAmu(iz);
    196       csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);
     197      A = G4lrint(nist->GetAtomicMassAmu(iz));
     198      csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A);
    197199      // proton and neutron
    198200      if(fNucleon) {
    199         csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);
     201        csdn = fNucleon->GetElasticCrossSection(&dp, iz, A);
    200202
    201203        // pions
    202204      } else if(fUPi) {
    203         csdn = fUPi->GetElasticCrossSection(&dp, Z, A);
     205        csdn = fUPi->GetElasticCrossSection(&dp, iz, A);
    204206
    205207        // other
    206       } else if(fGheisha->IsApplicable(&dp, Z, A)) {
    207         csdn = fGheisha->GetElasticCrossSection(&dp, Z, A);
     208      } else if(fGheisha->IsApplicable(&dp, iz, A)) {
     209        csdn = fGheisha->GetElasticCrossSection(&dp, iz, A);
    208210
    209211      } else {
     
    217219}
    218220
    219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    220 
    221 
     221
Note: See TracChangeset for help on using the changeset viewer.