Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (16 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc

    r819 r962  
    2424// ********************************************************************
    2525//
    26 // $Id: G4BGGPionElasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4BGGPionElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4646#include "G4GlauberGribovCrossSection.hh"
    4747#include "G4UPiNuclearCrossSection.hh"
     48#include "G4HadronNucleonXsc.hh"
    4849#include "G4PionPlus.hh"
    4950#include "G4PionMinus.hh"
     
    5253//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5354
    54 G4BGGPionElasticXS::G4BGGPionElasticXS(const G4ParticleDefinition* p)
     55G4BGGPionElasticXS::G4BGGPionElasticXS(const G4ParticleDefinition*)
    5556{
    5657  verboseLevel = 0;
    57   thEnergy     = 100.*GeV;
    58   if(p == G4PionPlus::PionPlus() || p == G4PionMinus::PionMinus()) {
    59     fPion = new G4UPiNuclearCrossSection();
    60     fGlauber = new G4GlauberGribovCrossSection();
    61     particle = p;
    62     Initialise();
    63   } else {
    64     fPion = 0;
    65     fGlauber = 0;
    66     particle = 0;
    67     if(p) G4cout << "### G4BGGPionElasticXS WARNING: is not applicable to "
    68                  << p->GetParticleName()
    69                  << G4endl;
    70     else  G4cout << "### G4BGGPionElasticXS WARNING: particle is not defined "
    71                  << G4endl;
    72   }
     58  fGlauberEnergy = 91.*GeV;
     59  fLowEnergy = 20.*MeV;
     60  fPion = 0;
     61  fGlauber = 0;
     62  fHadron  = 0;
     63  particle = 0;
     64  isPiplus = false;
     65  isInitialized = false;
    7366}
    7467
     
    7972  delete fGlauber;
    8073  delete fPion;
     74  delete fHadron;
    8175}
    8276
     
    9084  G4double cross = 0.0;
    9185  G4double ekin = dp->GetKineticEnergy();
    92   G4int iz = G4int(Z + 0.5);
     86  G4int iz = G4int(Z);
    9387  if(iz > 92) iz = 92;
    9488
    95   if(ekin > thEnergy) {
    96     cross = theFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
     89  if(ekin <= fLowEnergy) {
     90    cross = theCoulombFac[iz];
     91    if(isPiplus) { cross *= CoulombFactor(ekin, A); }
     92
     93  } else if(iz == 1) {
     94    if( A < 1.5) {
     95      //fHadron->GetHadronNucleonXscPDG(dp, G4Proton::Proton());
     96      //fHadron->GetHadronNucleonXscEL(dp, G4Proton::Proton());
     97      fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
     98      //fHadron->GetHadronNucleonXscVU(dp, G4Proton::Proton());
     99      //fHadron->GetHadronNucleonXscMK(dp, G4Proton::Proton());
     100      cross = fHadron->GetElasticHadronNucleonXsc();
     101    } else {
     102      fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton());
     103      cross = fHadron->GetElasticHadronNucleonXsc();
     104      fHadron->GetHadronNucleonXscNS(dp, G4Neutron::Neutron());
     105      cross += fHadron->GetElasticHadronNucleonXsc();
     106    }
     107  } else if(ekin > fGlauberEnergy) {
     108    cross = theGlauberFac[iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);
    97109  } else {
    98110    cross = fPion->GetElasticCrossSection(dp, Z, A);
     
    112124//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    113125
    114 void G4BGGPionElasticXS::BuildPhysicsTable(const G4ParticleDefinition&)
    115 {
     126void G4BGGPionElasticXS::BuildPhysicsTable(const G4ParticleDefinition& p)
     127{
     128  if(&p == G4PionPlus::PionPlus() || &p == G4PionMinus::PionMinus()) {
     129    particle = &p;
     130    Initialise();
     131  } else {
     132    G4cout << "### G4BGGPionElasticXS WARNING: is not applicable to "
     133           << p.GetParticleName()
     134           << G4endl;
     135  }
    116136}
    117137
     
    127147void G4BGGPionElasticXS::Initialise()
    128148{
     149  if(isInitialized) return;
     150  isInitialized = true;
     151
     152  fPion = new G4UPiNuclearCrossSection();
     153  fGlauber = new G4GlauberGribovCrossSection();
     154  fHadron  = new G4HadronNucleonXsc();
     155  fPion->BuildPhysicsTable(*particle);
     156  fGlauber->BuildPhysicsTable(*particle);
     157  if(particle == G4PionPlus::PionPlus()) isPiplus = true;
     158
    129159  G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(particle);
    130160  G4ThreeVector mom(0.0,0.0,1.0);
    131   G4DynamicParticle dp(part, mom, thEnergy);
     161  G4DynamicParticle dp(part, mom, fGlauberEnergy);
    132162
    133163  G4NistManager* nist = G4NistManager::Instance();
    134   G4double A = nist->GetAtomicMassAmu(2);
    135 
    136   G4double csup, csdn;
     164
     165  G4double A, csup, csdn;
    137166
    138167  if(verboseLevel > 0) G4cout << "### G4BGGPionElasticXS::Initialise for "
     
    147176    csdn = fPion->GetElasticCrossSection(&dp, Z, A);
    148177
    149     theFac[iz] = csdn/csup;
     178    theGlauberFac[iz] = csdn/csup;
    150179    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
    151                                 << " factor= " << theFac[iz] << G4endl;
    152   }
    153 }
    154 
    155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    156 
    157 
     180                                << " factor= " << theGlauberFac[iz] << G4endl;
     181  }
     182  dp.SetKineticEnergy(fLowEnergy);
     183  fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton());
     184  theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc();
     185  if(isPiplus) { theCoulombFac[1] /= CoulombFactor(fLowEnergy,1.0); }
     186
     187  for(G4int iz=2; iz<93; iz++) {
     188
     189    G4double Z = G4double(iz);
     190    A = nist->GetAtomicMassAmu(iz);
     191
     192    theCoulombFac[iz] = fPion->GetElasticCrossSection(&dp, Z, A);
     193    if(isPiplus) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy,A); }
     194    if(verboseLevel > 0) G4cout << "Z= " << Z <<  "  A= " << A
     195                                << " factor= " << theCoulombFac[iz] << G4endl;
     196  }
     197}
     198
     199//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     200
     201G4double G4BGGPionElasticXS::CoulombFactor(G4double kinEnergy, G4double A)
     202{
     203  G4double res= 0.0;
     204  if(kinEnergy <= DBL_MIN) return res;
     205  else if(A < 1.5) return kinEnergy*kinEnergy;
     206 
     207  G4double elog = std::log10(kinEnergy/GeV);
     208
     209  // from G4ProtonInelasticCrossSection
     210  G4double f1 = 8.0  - 8.0/A - 0.008*A;
     211  G4double f2 = 2.34 - 5.4/A - 0.0028*A;
     212
     213  res = 1.0/(1.0 + std::exp(-f1*(elog + f2)));
     214 
     215  f1 = 5.6 - 0.016*A;
     216  f2 = 1.37 + 1.37/A;
     217  res *= ( 1.0 + (0.8 + 18./A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));
     218  return res; 
     219}
     220
     221//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     222
     223
Note: See TracChangeset for help on using the changeset viewer.