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

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BGGNucleonInelasticXS.cc,v 1.7 2009/11/19 19:40:45 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4BGGNucleonInelasticXS.cc,v 1.9 2010/10/12 06:16:19 dennis Exp $
     27// GEANT4 tag $Name: hadr-cross-V09-03-12 $
    2828//
    2929// -------------------------------------------------------------------
     
    7575}
    7676
    77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    78 
    79 G4double G4BGGNucleonInelasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp,
    80                                                        G4double Z,
    81                                                        G4double A,
    82                                                        G4double)
     77
     78G4double
     79G4BGGNucleonInelasticXS::GetZandACrossSection(const G4DynamicParticle* dp,
     80                                              G4int Z, G4int A, G4double)
    8381{
    8482  G4double cross = 0.0;
    8583  G4double ekin = dp->GetKineticEnergy();
    86   G4int iz = G4int(Z);
    87   if(iz > 92) iz = 92;
     84//  G4int iz = G4int(Z);
     85  if(Z > 92) Z = 92;
    8886
    8987  if(ekin <= fLowEnergy) {
    90     cross = theCoulombFac[iz]*CoulombFactor(ekin, A);
    91   } else if(iz == 1) {
    92     if( A < 1.5) {
     88    cross = theCoulombFac[Z]*CoulombFactor(ekin, A);
     89  } else if(Z == 1) {
     90    if( A < 2) {
    9391      fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
    9492      cross = fHadron->GetInelasticHadronNucleonXsc();
     
    10098    }
    10199  } else if(ekin > fGlauberEnergy) {
    102     cross = theGlauberFac[iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
     100    cross = theGlauberFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);
    103101  } else {
    104     cross = fNucleon->GetIsoZACrossSection(dp, Z, A);
     102    cross = fNucleon->GetZandACrossSection(dp, Z, A);
    105103  }
    106104
     
    156154
    157155  G4NistManager* nist = G4NistManager::Instance();
    158   G4double A = nist->GetAtomicMassAmu(2);
     156  G4int A = G4lrint(nist->GetAtomicMassAmu(2));
    159157
    160158  G4double csup, csdn;
     
    166164
    167165    G4double Z = G4double(iz);
    168     A = nist->GetAtomicMassAmu(iz);
    169 
    170     csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);
    171     csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A);
     166    A = G4lrint(nist->GetAtomicMassAmu(iz));
     167
     168    csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A);
     169//    csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A);
     170    csdn = fNucleon->GetZandACrossSection(&dp, iz, A);
    172171
    173172    theGlauberFac[iz] = csdn/csup;
     
    178177  fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton());
    179178  theCoulombFac[1] =
    180     fHadron->GetInelasticHadronNucleonXsc()/CoulombFactor(fLowEnergy,1.0);
     179    fHadron->GetInelasticHadronNucleonXsc()/CoulombFactor(fLowEnergy,1);
    181180     
    182181  for(G4int iz=2; iz<93; iz++) {
    183182
    184183    G4double Z = G4double(iz);
    185     A = nist->GetAtomicMassAmu(iz);
     184    A = G4lrint(nist->GetAtomicMassAmu(iz));
    186185
    187186    theCoulombFac[iz] =
    188       fNucleon->GetIsoZACrossSection(&dp, Z, A)/CoulombFactor(fLowEnergy,A);
     187      fNucleon->GetZandACrossSection(&dp, iz, A)/CoulombFactor(fLowEnergy,A);
    189188
    190189    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
     
    193192}
    194193
    195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    196 
    197 G4double G4BGGNucleonInelasticXS::CoulombFactor(G4double kinEnergy, G4double A)
     194
     195G4double G4BGGNucleonInelasticXS::CoulombFactor(G4double kinEnergy, G4int A)
    198196{
    199197  G4double res= 0.0;
    200198  if(kinEnergy <= DBL_MIN) return res;
    201   else if (A < 1.5) return kinEnergy*kinEnergy;
     199  else if (A < 2) return kinEnergy*kinEnergy;
    202200 
    203201  G4double elog = std::log10(kinEnergy/GeV);
     202  G4double aa = A;
    204203
    205204  // from G4ProtonInelasticCrossSection
    206205  if(isProton) {
    207     G4double f1 = 8.0  - 8.0/A - 0.008*A;
    208     G4double f2 = 2.34 - 5.4/A - 0.0028*A;
     206    G4double f1 = 8.0  - 8.0/aa - 0.008*aa;
     207    G4double f2 = 2.34 - 5.4/aa - 0.0028*aa;
    209208
    210209    res = 1.0/(1.0 + std::exp(-f1*(elog + f2)));
    211210 
    212     f1 = 5.6 - 0.016*A;
    213     f2 = 1.37 + 1.37/A;
    214     res *= ( 1.0 + (0.8 + 18./A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));
     211    f1 = 5.6 - 0.016*aa;
     212    f2 = 1.37 + 1.37/aa;
     213    res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2))));
    215214  } else {
    216215
    217     G4double p3 = 0.6 + 13./A - 0.0005*A;
    218     G4double p4 = 7.2449 - 0.018242*A;
    219     G4double p5 = 1.36 + 1.8/A + 0.0005*A;
    220     G4double p6 = 1. + 200./A + 0.02*A;
    221     G4double p7 = 3.0 - (A-70.)*(A-200.)/11000.;
     216    G4double p3 = 0.6 + 13./aa - 0.0005*aa;
     217    G4double p4 = 7.2449 - 0.018242*aa;
     218    G4double p5 = 1.36 + 1.8/aa + 0.0005*aa;
     219    G4double p6 = 1. + 200./aa + 0.02*aa;
     220    G4double p7 = 3.0 - (aa-70.)*(aa-200.)/11000.;
    222221
    223222    res = (1.+p3/(1. + std::exp(p4*(elog+p5))))/(1.+std::exp(-p6*(elog+p7)));
     
    227226}
    228227
    229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    230 
Note: See TracChangeset for help on using the changeset viewer.