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

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BGGPionElasticXS.cc,v 1.7 2009/11/19 19:40:45 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4BGGPionElasticXS.cc,v 1.8 2010/10/12 06:03:37 dennis Exp $
     27// GEANT4 tag $Name: hadr-cross-V09-03-12 $
    2828//
    2929// -------------------------------------------------------------------
     
    7777//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7878
    79 G4double G4BGGPionElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp,
    80                                                     G4double Z,
    81                                                     G4double A,
    82                                                     G4double)
     79G4double
     80G4BGGPionElasticXS::GetZandACrossSection(const G4DynamicParticle* dp,
     81                                         G4int Z, G4int A, G4double)
    8382{
    8483  G4double cross = 0.0;
    8584  G4double ekin = dp->GetKineticEnergy();
    86   G4int iz = G4int(Z);
    87   if(iz > 92) iz = 92;
     85//  G4int iz = G4int(Z);
     86  if(Z > 92) Z = 92;
    8887
    8988  if(ekin <= fLowEnergy) {
    90     cross = theCoulombFac[iz];
     89    cross = theCoulombFac[Z];
    9190    if(isPiplus) { cross *= CoulombFactor(ekin, A); }
    9291
    93   } else if(iz == 1) {
    94     if( A < 1.5) {
     92  } else if(Z == 1) {
     93    if( A < 2) {
    9594      fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
    9695      cross = fHadron->GetElasticHadronNucleonXsc();
     
    102101    }
    103102  } else if(ekin > fGlauberEnergy) {
    104     cross = theGlauberFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     103    cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    105104  } else {
    106105    cross = fPion->GetElasticCrossSection(dp, Z, A);
     
    159158  G4NistManager* nist = G4NistManager::Instance();
    160159
    161   G4double A, csup, csdn;
     160  G4double csup, csdn;
     161  G4int A;
    162162
    163163  if(verboseLevel > 0) G4cout << "### G4BGGPionElasticXS::Initialise for "
     
    167167
    168168    G4double Z = G4double(iz);
    169     A = nist->GetAtomicMassAmu(iz);
    170 
    171     csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);
    172     csdn = fPion->GetElasticCrossSection(&dp, Z, A);
     169    A = G4lrint(nist->GetAtomicMassAmu(iz));
     170
     171    csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A);
     172    csdn = fPion->GetElasticCrossSection(&dp, iz, A);
    173173
    174174    theGlauberFac[iz] = csdn/csup;
     
    179179  fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton());
    180180  theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc();
    181   if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1.0); }
     181  if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1); }
    182182
    183183  for(G4int iz=2; iz<93; iz++) {
    184184
    185185    G4double Z = G4double(iz);
    186     A = nist->GetAtomicMassAmu(iz);
    187 
    188     theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, Z, A);
     186    A = G4lrint(nist->GetAtomicMassAmu(iz));
     187
     188    theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, iz, A);
    189189    if(isPiplus) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy,A); }
    190190    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
     
    193193}
    194194
    195 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    196 
    197 G4double G4BGGPionElasticXS::CoulombFactor(G4double kinEnergy, G4double A)
     195
     196G4double G4BGGPionElasticXS::CoulombFactor(G4double kinEnergy, G4int A)
    198197{
    199198  G4double res= 0.0;
    200199  if(kinEnergy <= DBL_MIN) return res;
    201   else if(A < 1.5) return kinEnergy*kinEnergy;
     200  else if(A < 2) return kinEnergy*kinEnergy;
    202201 
    203202  G4double elog = std::log10(kinEnergy/GeV);
     203  G4double aa = A;
    204204
    205205  // from G4ProtonInelasticCrossSection
    206   G4double f1 = 8.0  - 8.0/A - 0.008*A;
    207   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;
    208208
    209209  res = 1.0/(1.0 + std::exp(-f1*(elog + f2)));
    210210 
    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))));
     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))));
    214214  return res; 
    215215}
    216216
    217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    218 
    219 
Note: See TracChangeset for help on using the changeset viewer.