Ignore:
Timestamp:
May 28, 2009, 4:26:57 PM (15 years ago)
Author:
garnier
Message:

maj sur la beta de geant 4.9.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/src/G4eCoulombScatteringModel.cc

    r1007 r1055  
    2424// ********************************************************************
    2525//
    26 // $Id: G4eCoulombScatteringModel.cc,v 1.59 2008/10/22 18:39:29 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4eCoulombScatteringModel.cc,v 1.69 2009/05/10 16:09:29 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
    2828//
    2929// -------------------------------------------------------------------
     
    6666//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    6767
     68G4double G4eCoulombScatteringModel::ScreenRSquare[] = {0.0};
     69G4double G4eCoulombScatteringModel::FormFactor[]    = {0.0};
     70
    6871using namespace std;
    6972
     
    8487  currentMaterial = 0;
    8588  currentElement  = 0;
    86   a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885);
     89  lowEnergyLimit = keV;
    8790  G4double p0 = electron_mass_c2*classic_electr_radius;
    8891  coeff  = twopi*p0*p0;
    89   constn = 6.937e-6/(MeV*MeV);
    9092  tkin = targetZ = mom2 = DBL_MIN;
    9193  elecXSection = nucXSection = 0.0;
    92   recoilThreshold = DBL_MAX;
     94  recoilThreshold = 100.*keV;
    9395  ecut = DBL_MAX;
    9496  particle = 0;
    9597  currentCouple = 0;
    96   for(size_t j=0; j<100; j++) {
    97     FF[j] = 0.0;
    98   }
     98
     99  // Thomas-Fermi screening radii
     100  // Formfactors from A.V. Butkevich et al., NIM A 488 (2002) 282
     101
     102  if(0.0 == ScreenRSquare[0]) {
     103    G4double a0 = electron_mass_c2/0.88534;
     104    G4double constn = 6.937e-6/(MeV*MeV);
     105
     106    ScreenRSquare[0] = alpha2*a0*a0;
     107    for(G4int j=1; j<100; j++) {
     108      G4double x = a0*fNistManager->GetZ13(j);
     109      ScreenRSquare[j] = alpha2*x*x;
     110      x = fNistManager->GetA27(j);
     111      FormFactor[j] = constn*x*x;
     112    }
     113  }
    99114}
    100115
     
    121136  if(!isInitialised) {
    122137    isInitialised = true;
    123 
    124     if(pParticleChange)
    125       fParticleChange =
    126         reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
    127     else
    128       fParticleChange = new G4ParticleChangeForGamma();
     138    fParticleChange = GetParticleChangeForGamma();
    129139  }
    130140  if(mass < GeV && particle->GetParticleType() != "nucleus") {
     
    157167      G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22);
    158168      //G4cout << "ctm= " << ctm << G4endl;
    159       if(ctm < 1.0) cosTetMaxElec = ctm;
     169      if(ctm <  1.0) cosTetMaxElec = ctm;
     170      if(ctm < -1.0) cosTetMaxElec = -1.0;
    160171    }
    161172  }
     
    196207{
    197208  // This method needs initialisation before be called
    198 
    199   G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2;
     209  G4double fac = coeff*targetZ*chargeSquare*kinFactor;
    200210  elecXSection = 0.0;
    201211  nucXSection  = 0.0;
     
    216226    G4double s  = screenZ*formfactA;
    217227    G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ;
    218     G4double d  = (1.0 - s)/formfactA;
     228    G4double s1 = 1.0 - s;
     229    G4double d  = s1/formfactA;
    219230    //G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl;
    220231    if(d < 0.2*x1) {
     
    226237      G4double x2 = x1 + d;
    227238      G4double z2 = z1 + d;
    228       x = (1.0 + 2.0*s)*((cosTetMinNuc - cosTetMaxNuc2)*(1.0/(x1*z1) + 1.0/(x2*z2)) -
    229                          2.0*log(z1*x2/(z2*x1))/d);
     239      x = (1.0/x1 - 1.0/z1 + 1.0/x2 - 1.0/z2 - 2.0*log(z1*x2/(z2*x1))/d)/(s1*s1);
    230240    }
    231241    nucXSection += fac*targetZ*x;
    232242  }
    233 
    234243  //G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn
    235244  //    << " Asc= " << screenZ << G4endl;
     
    283292    G4int ia = SelectIsotopeNumber(currentElement);
    284293    G4double Trec = z1*mom2/(amu_c2*G4double(ia));
    285     G4double th =
    286       std::min(recoilThreshold,
    287                targetZ*currentElement->GetIonisation()->GetMeanExcitationEnergy());
    288 
    289     if(Trec > th) {
    290       G4int iz = G4int(targetZ);
     294
     295    if(Trec > recoilThreshold) {
    291296      G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz);
    292297      Trec = z1*mom2/ion->GetPDGMass();
Note: See TracChangeset for help on using the changeset viewer.