- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/utils/src/G4EmCorrections.cc
r1228 r1315 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4EmCorrections.cc,v 1.5 4 2009/10/29 17:56:36 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3$26 // $Id: G4EmCorrections.cc,v 1.58 2010/06/04 09:28:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 #include "G4ProductionCutsTable.hh" 69 69 #include "G4MaterialCutsCouple.hh" 70 #include "G4AtomicShells.hh" 70 71 71 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 123 124 G4double sum = (2.0*(Barkas + Bloch) + Mott); 124 125 125 if(verbose > 1) 126 if(verbose > 1) { 126 127 G4cout << "EmCorrections: E(MeV)= " << e/MeV << " Barkas= " << Barkas 127 128 << " Bloch= " << Bloch << " Mott= " << Mott 128 << " Sum= " << sum << G4endl;129 129 << " Sum= " << sum << " q2= " << q2 << G4endl; 130 } 130 131 sum *= material->GetElectronDensity() * q2 * twopi_mc2_rcl2 /beta2; 131 132 return sum; … … 165 166 // Other corrections from S.P.Ahlen Rev. Mod. Phys., Vol 52, No1, 1980 166 167 SetupKinematics(p, mat, e); 167 if(tau <= 0.0) return 0.0;168 if(tau <= 0.0) { return 0.0; } 168 169 169 170 G4double Barkas = BarkasCorrection (p, mat, e); … … 180 181 sum *= material->GetElectronDensity() * q2 * twopi_mc2_rcl2 /beta2; 181 182 182 if(verbose > 1) G4cout << " Sum= " << sum << G4endl;183 if(verbose > 1) { G4cout << " Sum= " << sum << G4endl; } 183 184 return sum; 184 185 } … … 219 220 sum = ComputeIonCorrections(p,couple->GetMaterial(),e) - rest/e; 220 221 221 if(verbose > 1) G4cout << " Sum= " << sum << " dSum= " << rest/e << G4endl;222 if(verbose > 1) { G4cout << " Sum= " << sum << " dSum= " << rest/e << G4endl; } 222 223 } 223 224 return sum; … … 267 268 } 268 269 G4double e0= 13.6*eV*Z2; 269 term += f*atomDensity[i]*KShell( shells.GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z;270 term += f*atomDensity[i]*KShell(G4AtomicShells::GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z; 270 271 } 271 272 … … 293 294 G4double e0= 13.6*eV*Z2*0.25; 294 295 G4double f = 0.125; 295 G4int nmax = std::min(4, shells.GetNumberOfShells(iz));296 G4int nmax = std::min(4,G4AtomicShells::GetNumberOfShells(iz)); 296 297 for(G4int j=1; j<nmax; j++) { 297 G4double ne = G4double( shells.GetNumberOfElectrons(iz,j));298 G4double e1 = shells.GetBindingEnergy(iz,j);298 G4double ne = G4double(G4AtomicShells::GetNumberOfElectrons(iz,j)); 299 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,j); 299 300 // G4cout << "LShell: j= " << j << " ne= " << ne << " e(eV)= " << e/eV 300 301 // << " e0(eV)= " << e0/eV << G4endl; … … 417 418 for (G4int i = 0; i<numberOfElements; i++) { 418 419 420 G4double res = 0.0; 419 421 G4double Z = (*theElementVector)[i]->GetZ(); 420 422 G4int iz = G4int(Z); … … 426 428 } 427 429 G4double e0= 13.6*eV*Z2; 428 term += f*atomDensity[i]*KShell(shells.GetBindingEnergy(iz,0)/e0,ba2/Z2)/Z;430 res += f*KShell(G4AtomicShells::GetBindingEnergy(iz,0)/e0,ba2/Z2); 429 431 if(2 < iz) { 430 432 G4double Zeff = Z - ZD[10]; … … 434 436 f = 0.125; 435 437 G4double eta = ba2/Z2; 436 G4int ntot = shells.GetNumberOfShells(iz);438 G4int ntot = G4AtomicShells::GetNumberOfShells(iz); 437 439 G4int nmax = std::min(4, ntot); 438 440 G4double norm = 0.0; 439 441 G4double eshell = 0.0; 440 for(G4int j=1; j<nmax; j++) {441 G4double x = G4double(shells.GetNumberOfElectrons(iz,j));442 G4 double e1 = shells.GetBindingEnergy(iz,j);443 norm += x;444 eshell += e1* x;445 term += f*x*atomDensity[i]*LShell(e1/e0,eta)/Z;442 for(G4int j=1; j<nmax; ++j) { 443 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,j); 444 G4int ne = G4AtomicShells::GetNumberOfElectrons(iz,j); 445 norm += ne; 446 eshell += e1*ne; 447 res += f*ne*LShell(e1/e0,eta); 446 448 } 447 if( 10 < iz) {449 if(ntot > nmax) { 448 450 eshell /= norm; 449 451 G4double eeff = eshell*eta; 450 for(G4int k=nmax; k<ntot; k++) {451 G4double x = G4double(shells.GetNumberOfElectrons(iz,k));452 G4double e1 = shells.GetBindingEnergy(iz,k);453 term += f*x*atomDensity[i]*LShell(e1/e0,eeff/e1)/Z;454 // term += f*x*atomDensity[i]*LShell(eshell/e0,eeff/e1)/Z;452 for(G4int k=nmax; k<ntot; ++k) { 453 G4int ne = G4AtomicShells::GetNumberOfElectrons(iz,k); 454 G4double e1 = G4AtomicShells::GetBindingEnergy(iz,k); 455 res += f*ne*LShell(e1/e0,eeff/e1); 456 //res += f*ne*LShell(e1/eshell,eeff/e1); 455 457 } 458 } 456 459 /* 457 460 if(28 >= iz) { 458 term += f*(Z - 10.)*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;461 res += f*(Z - 10.)*LShell(eshell,HM[iz-11]*eta); 459 462 } else if(32 >= iz) { 460 term += f*18.0*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;463 res += f*18.0*LShell(eshell,HM[iz-11]*eta); 461 464 } else if(60 >= iz) { 462 term += f*18.0*atomDensity[i]*LShell(eshell,HM[iz-11]*eta)/Z;463 term += f*(Z - 28.)*atomDensity[i]*LShell(eshell,HN[iz-33]*eta)/Z;465 res += f*18.0*LShell(eshell,HM[iz-11]*eta); 466 res += f*(Z - 28.)*LShell(eshell,HN[iz-33]*eta); 464 467 } else { 465 term += f*18.0*atomDensity[i]*LShell(eshell,HM[53]*eta)/Z;466 term += f*32.0*atomDensity[i]*LShell(eshell,HN[30]*eta)/Z;467 term += f*(Z - 60.)*atomDensity[i]*LShell(eshell,150.*eta)/Z;468 res += f*18.0*LShell(eshell,HM[50]*eta); 469 res += f*32.0*LShell(eshell,HN[30]*eta); 470 res += f*(Z - 60.)*LShell(eshell,150.*eta); 468 471 } 469 472 */ 470 471 }472 //term += atomDensity[i]*MSH[iz]/(ba2*ba2);473 } 474 //term += atomDensity[i]*(res/Z + MSH[iz]/(ba2*ba2)); 475 term += res*atomDensity[i]/Z; 473 476 } 474 477 475 478 term /= material->GetTotNbOfAtomsPerVolume(); 479 //if(charge < 0.0) { term = -term; } 476 480 return term; 477 481 } … … 552 556 553 557 BarkasTerm *= 1.29*charge/material->GetTotNbOfAtomsPerVolume(); 558 559 // temporary protection 560 if(charge < -7.0 ) { BarkasTerm *= (-7.0/charge); } 561 554 562 return BarkasTerm; 555 563 } … … 574 582 } while (del > 0.01*term); 575 583 576 return -y2*term; 584 G4double res = -y2*term; 585 // temporary protection 586 if(q2 > 49. && res < -0.2) { res = -0.2; } 587 588 return res; 577 589 } 578 590 … … 808 820 ionList[idx] = ion; 809 821 stopData[idx] = vv; 810 if(verbose>1) G4cout << "End data set " << G4endl;822 if(verbose>1) { G4cout << "End data set " << G4endl; } 811 823 } 812 824 … … 1395 1407 18.2 1396 1408 }; 1397 for(i=0; i<53; i++) {HM[i] = hm[i];}1398 for(i=0; i<31; i++) {HN[i] = hn[i];}1409 for(i=0; i<53; ++i) {HM[i] = hm[i];} 1410 for(i=0; i<31; ++i) {HN[i] = hn[i];} 1399 1411 1400 1412 const G4double mm[93] = {
Note: See TracChangeset
for help on using the changeset viewer.