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

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BGGNucleonElasticXS.cc,v 1.7 2009/11/19 19:40:45 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4BGGNucleonElasticXS.cc,v 1.8 2010/10/12 06:02:41 dennis Exp $
     27// GEANT4 tag $Name: hadr-cross-V09-03-12 $
    2828//
    2929// -------------------------------------------------------------------
     
    5151#include "G4NistManager.hh"
    5252
    53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5453
    5554G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(const G4ParticleDefinition*)
     
    7574}
    7675
    77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    78 
    79 G4double G4BGGNucleonElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp,
    80                                                        G4double Z,
    81                                                        G4double A,
    82                                                        G4double)
     76
     77G4double
     78G4BGGNucleonElasticXS::GetZandACrossSection(const G4DynamicParticle* dp,
     79                                            G4int Z, G4int A, G4double)
    8380{
    8481  G4double cross = 0.0;
    8582  G4double ekin = dp->GetKineticEnergy();
    86   G4int iz = G4int(Z);
    87   if(iz > 92) iz = 92;
     83  if(Z > 92) Z = 92;
    8884
    8985  if(ekin <= fLowEnergy) {
    90     cross = theCoulombFac[iz];
     86    cross = theCoulombFac[Z];
    9187    if(isProton) { cross *= CoulombFactor(ekin, A); }
    9288
    93   } else if(iz == 1) {
    94     if( A < 1.5) {
     89  } else if(Z == 1) {
     90    if( A < 2) {
    9591      fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
    9692      cross = fHadron->GetElasticHadronNucleonXsc();
     
    10298    }
    10399  } else if(ekin > fGlauberEnergy) {
    104     cross = theGlauberFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     100    cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    105101  } else {
    106102    cross = fNucleon->GetElasticCrossSection(dp, Z, A);
     
    159155  G4NistManager* nist = G4NistManager::Instance();
    160156
    161   G4double A, csup, csdn;
     157  G4double csup, csdn;
     158  G4int A;
    162159
    163160  if(verboseLevel > 0) G4cout << "### G4BGGNucleonElasticXS::Initialise for "
     
    167164
    168165    G4double Z = G4double(iz);
    169     A = nist->GetAtomicMassAmu(iz);
    170 
    171     csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);
    172     csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);
     166    A = G4lrint(nist->GetAtomicMassAmu(iz));
     167
     168    csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A);
     169    csdn = fNucleon->GetElasticCrossSection(&dp, iz, A);
    173170
    174171    theGlauberFac[iz] = csdn/csup;
     
    179176  fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton());
    180177  theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc();
    181   if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1.0); }
     178  if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1); }
    182179
    183180  for(G4int iz=2; iz<93; iz++) {
    184181
    185182    G4double Z = G4double(iz);
    186     A = nist->GetAtomicMassAmu(iz);
    187 
    188     theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, Z, A);
     183    A = G4lrint(nist->GetAtomicMassAmu(iz));
     184
     185    theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, iz, A);
    189186    if(isProton) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy, A); }
    190187    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
     
    195192//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    196193
    197 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4double A)
    198 {
    199   G4double res= 0.0;
     194G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4int A)
     195{
     196  G4double res = 0.0;
    200197  if(kinEnergy <= DBL_MIN) return res;
    201   else if(A < 1.5) return kinEnergy*kinEnergy;
     198  else if(A < 2) return kinEnergy*kinEnergy;
    202199
    203200  G4double elog = std::log10(kinEnergy/GeV);
     201  G4double aa = A;
    204202
    205203  // from G4ProtonInelasticCrossSection
    206   G4double f1 = 8.0  - 8.0/A - 0.008*A;
    207   G4double f2 = 2.34 - 5.4/A - 0.0028*A;
     204  G4double f1 = 8.0  - 8.0/aa - 0.008*aa;
     205  G4double f2 = 2.34 - 5.4/aa - 0.0028*aa;
    208206
    209207  res = 1.0/(1.0 + std::exp(-f1*(elog + f2)));
    210208 
    211   f1 = 5.6 - 0.016*A;
    212   f2 = 1.37 + 1.37/A;
    213   res *= ( 1.0 + (0.8 + 18./A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));
     209  f1 = 5.6 - 0.016*aa;
     210  f2 = 1.37 + 1.37/aa;
     211  res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2))));
    214212  return res; 
    215213}
    216214
    217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    218 
    219 
     215
Note: See TracChangeset for help on using the changeset viewer.