#include <G4EmCalculator.hh>
Definition at line 79 of file G4EmCalculator.hh.
G4EmCalculator::G4EmCalculator | ( | ) |
Definition at line 88 of file G4EmCalculator.cc.
References G4LossTableManager::EmCorrections(), G4GenericIon::GenericIon(), and G4LossTableManager::Instance().
00089 { 00090 manager = G4LossTableManager::Instance(); 00091 corr = manager->EmCorrections(); 00092 nLocalMaterials = 0; 00093 verbose = 0; 00094 currentCoupleIndex = 0; 00095 currentCouple = 0; 00096 currentMaterial = 0; 00097 currentParticle = 0; 00098 lambdaParticle = 0; 00099 baseParticle = 0; 00100 currentLambda = 0; 00101 currentModel = 0; 00102 currentProcess = 0; 00103 loweModel = 0; 00104 chargeSquare = 1.0; 00105 massRatio = 1.0; 00106 mass = 0.0; 00107 currentCut = 0.0; 00108 currentParticleName= ""; 00109 currentMaterialName= ""; 00110 currentName = ""; 00111 lambdaName = ""; 00112 theGenericIon = G4GenericIon::GenericIon(); 00113 ionEffCharge = new G4ionEffectiveCharge(); 00114 isIon = false; 00115 isApplicable = false; 00116 }
G4EmCalculator::~G4EmCalculator | ( | ) |
Definition at line 120 of file G4EmCalculator.cc.
00121 { 00122 delete ionEffCharge; 00123 for (G4int i=0; i<nLocalMaterials; ++i) { 00124 delete localCouples[i]; 00125 } 00126 }
G4double G4EmCalculator::ComputeCrossSectionPerAtom | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | processName, | |||
const G4Element * | , | |||
G4double | cut = 0.0 | |||
) |
Definition at line 724 of file G4EmCalculator.cc.
References ComputeCrossSectionPerAtom(), FindParticle(), G4Element::GetN(), and G4Element::GetZ().
00729 { 00730 return ComputeCrossSectionPerAtom(kinEnergy,FindParticle(particle), 00731 processName, 00732 elm->GetZ(),elm->GetN(),cut); 00733 }
G4double G4EmCalculator::ComputeCrossSectionPerAtom | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
G4double | Z, | |||
G4double | A, | |||
G4double | cut = 0.0 | |||
) |
Definition at line 692 of file G4EmCalculator.cc.
References G4VEmModel::ComputeCrossSectionPerAtom(), G4cout, and G4endl.
Referenced by ComputeCrossSectionPerAtom().
00698 { 00699 G4double res = 0.0; 00700 if(UpdateParticle(p, kinEnergy)) { 00701 if(FindEmModel(p, processName, kinEnergy)) { 00702 G4double e = kinEnergy; 00703 if(baseParticle) { 00704 e *= kinEnergy*massRatio; 00705 res = currentModel->ComputeCrossSectionPerAtom( 00706 baseParticle, e, Z, A, cut) * chargeSquare; 00707 } else { 00708 res = currentModel->ComputeCrossSectionPerAtom(p, e, Z, A, cut); 00709 } 00710 if(verbose>0) { 00711 G4cout << "E(MeV)= " << kinEnergy/MeV 00712 << " cross(barn)= " << res/barn 00713 << " " << p->GetParticleName() 00714 << " Z= " << Z << " A= " << A/(g/mole) << " g/mole" 00715 << G4endl; 00716 } 00717 } 00718 } 00719 return res; 00720 }
G4double G4EmCalculator::ComputeCrossSectionPerVolume | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | proc, | |||
const G4String & | mat, | |||
G4double | cut = 0.0 | |||
) |
Definition at line 678 of file G4EmCalculator.cc.
References ComputeCrossSectionPerVolume(), FindMaterial(), and FindParticle().
00684 { 00685 return ComputeCrossSectionPerVolume(kinEnergy,FindParticle(particle), 00686 processName, 00687 FindMaterial(material),cut); 00688 }
G4double G4EmCalculator::ComputeCrossSectionPerVolume | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
const G4Material * | , | |||
G4double | cut = 0.0 | |||
) |
Definition at line 643 of file G4EmCalculator.cc.
References G4VEmModel::CrossSectionPerVolume(), G4cout, G4endl, and G4Material::GetName().
Referenced by ComputeCrossSectionPerVolume(), ComputeGammaAttenuationLength(), ComputeMeanFreePath(), and GetCrossSectionPerVolume().
00649 { 00650 currentMaterial = mat; 00651 currentMaterialName = mat->GetName(); 00652 G4double res = 0.0; 00653 if(UpdateParticle(p, kinEnergy)) { 00654 if(FindEmModel(p, processName, kinEnergy)) { 00655 G4double e = kinEnergy; 00656 if(baseParticle) { 00657 e *= kinEnergy*massRatio; 00658 res = currentModel->CrossSectionPerVolume( 00659 mat, baseParticle, e, cut, e) * chargeSquare; 00660 } else { 00661 res = currentModel->CrossSectionPerVolume(mat, p, e, cut, e); 00662 } 00663 if(verbose>0) { 00664 G4cout << "G4EmCalculator::ComputeXSPerVolume: E(MeV)= " << kinEnergy/MeV 00665 << " cross(cm-1)= " << res*cm 00666 << " cut(keV)= " << cut/keV 00667 << " " << p->GetParticleName() 00668 << " in " << mat->GetName() 00669 << G4endl; 00670 } 00671 } 00672 } 00673 return res; 00674 }
G4double G4EmCalculator::ComputeDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | proc, | |||
const G4String & | mat, | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 602 of file G4EmCalculator.cc.
References ComputeDEDX(), FindMaterial(), and FindParticle().
00607 { 00608 return ComputeDEDX(kinEnergy,FindParticle(particle),processName, 00609 FindMaterial(material),cut); 00610 }
G4double G4EmCalculator::ComputeDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
const G4Material * | , | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 435 of file G4EmCalculator.cc.
References G4VEmModel::ComputeDEDXPerVolume(), G4VEmModel::CorrectionsAlongStep(), FindCouple(), G4cout, G4endl, G4VEmModel::GetChargeSquareRatio(), G4Material::GetDensity(), G4VEmModel::GetName(), G4Material::GetName(), G4ParticleDefinition::GetParticleName(), G4VEmModel::LowEnergyLimit(), and G4DynamicParticle::SetKineticEnergy().
Referenced by ComputeDEDX(), and ComputeElectronicDEDX().
00440 { 00441 currentMaterial = mat; 00442 currentMaterialName = mat->GetName(); 00443 G4double res = 0.0; 00444 if(verbose > 1) { 00445 G4cout << "### G4EmCalculator::ComputeDEDX: " << p->GetParticleName() 00446 << " in " << currentMaterialName 00447 << " e(MeV)= " << kinEnergy/MeV << " cut(MeV)= " << cut/MeV 00448 << G4endl; 00449 } 00450 if(UpdateParticle(p, kinEnergy)) { 00451 if(FindEmModel(p, processName, kinEnergy)) { 00452 G4double escaled = kinEnergy*massRatio; 00453 if(baseParticle) { 00454 res = currentModel->ComputeDEDXPerVolume( 00455 mat, baseParticle, escaled, cut) * chargeSquare; 00456 if(verbose > 1) { 00457 G4cout << baseParticle->GetParticleName() 00458 << " Escaled(MeV)= " << escaled; 00459 } 00460 } else { 00461 res = currentModel->ComputeDEDXPerVolume(mat, p, kinEnergy, cut); 00462 if(verbose > 1) { G4cout << " no basePart E(MeV)= " << kinEnergy << " "; } 00463 } 00464 if(verbose > 1) { 00465 G4cout << currentModel->GetName() << ": DEDX(MeV/mm)= " << res*mm/MeV 00466 << " DEDX(MeV*cm^2/g)= " 00467 << res*gram/(MeV*cm2*mat->GetDensity()) 00468 << G4endl; 00469 } 00470 00471 // emulate smoothing procedure 00472 G4double eth = currentModel->LowEnergyLimit(); 00473 // G4cout << "massRatio= " << massRatio << " eth= " << eth << G4endl; 00474 if(loweModel) { 00475 G4double res0 = 0.0; 00476 G4double res1 = 0.0; 00477 if(baseParticle) { 00478 res1 = currentModel->ComputeDEDXPerVolume(mat, baseParticle, eth, cut) 00479 * chargeSquare; 00480 res0 = loweModel->ComputeDEDXPerVolume(mat, baseParticle, eth, cut) 00481 * chargeSquare; 00482 } else { 00483 res1 = currentModel->ComputeDEDXPerVolume(mat, p, eth, cut); 00484 res0 = loweModel->ComputeDEDXPerVolume(mat, p, eth, cut); 00485 } 00486 if(verbose > 1) { 00487 G4cout << "At boundary energy(MeV)= " << eth/MeV 00488 << " DEDX(MeV/mm)= " << res1*mm/MeV 00489 << G4endl; 00490 } 00491 00492 //G4cout << "eth= " << eth << " escaled= " << escaled 00493 // << " res0= " << res0 << " res1= " 00494 // << res1 << " q2= " << chargeSquare << G4endl; 00495 00496 if(res1 > 0.0 && escaled > 0.0) { 00497 res *= (1.0 + (res0/res1 - 1.0)*eth/escaled); 00498 } 00499 } 00500 00501 // low energy correction for ions 00502 if(isIon) { 00503 G4double length = CLHEP::nm; 00504 const G4Region* r = 0; 00505 const G4MaterialCutsCouple* couple = FindCouple(mat, r); 00506 G4double eloss = res*length; 00507 G4double niel = 0.0; 00508 dynParticle.SetKineticEnergy(kinEnergy); 00509 currentModel->GetChargeSquareRatio(p, mat, kinEnergy); 00510 currentModel->CorrectionsAlongStep(couple,&dynParticle,eloss,niel,length); 00511 res = eloss/length; 00512 00513 if(verbose > 1) { 00514 G4cout << "After Corrections: DEDX(MeV/mm)= " << res*mm/MeV 00515 << " DEDX(MeV*cm^2/g)= " << res*gram/(MeV*cm2*mat->GetDensity()) 00516 << G4endl; 00517 } 00518 } 00519 } 00520 00521 if(verbose > 0) { 00522 G4cout << "Sum: E(MeV)= " << kinEnergy/MeV 00523 << " DEDX(MeV/mm)= " << res*mm/MeV 00524 << " DEDX(MeV*cm^2/g)= " << res*gram/(MeV*cm2*mat->GetDensity()) 00525 << " cut(MeV)= " << cut/MeV 00526 << " " << p->GetParticleName() 00527 << " in " << currentMaterialName 00528 << " Zi^2= " << chargeSquare 00529 << " isIon=" << isIon 00530 << G4endl; 00531 } 00532 } 00533 return res; 00534 }
G4double G4EmCalculator::ComputeElectronicDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 572 of file G4EmCalculator.cc.
References ComputeElectronicDEDX(), FindMaterial(), and FindParticle().
00574 { 00575 return ComputeElectronicDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut); 00576 }
G4double G4EmCalculator::ComputeElectronicDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | mat, | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 538 of file G4EmCalculator.cc.
References ComputeDEDX(), G4LossTableManager::GetEnergyLossProcessVector(), G4Material::GetName(), G4LossTableManager::Instance(), and CLHEP::detail::n.
Referenced by ComputeElectronicDEDX(), and ComputeTotalDEDX().
00542 { 00543 currentMaterial = mat; 00544 currentMaterialName = mat->GetName(); 00545 G4double dedx = 0.0; 00546 if(UpdateParticle(part, kinEnergy)) { 00547 00548 G4LossTableManager* lManager = G4LossTableManager::Instance(); 00549 const std::vector<G4VEnergyLossProcess*> vel = 00550 lManager->GetEnergyLossProcessVector(); 00551 G4int n = vel.size(); 00552 00553 //G4cout << "ComputeElectronicDEDX for " << part->GetParticleName() 00554 // << " n= " << n << G4endl; 00555 00556 for(G4int i=0; i<n; ++i) { 00557 if(vel[i]) { 00558 G4VProcess* p = reinterpret_cast<G4VProcess*>(vel[i]); 00559 if(ActiveForParticle(part, p)) { 00560 //G4cout << "idx= " << i << " " << (vel[i])->GetProcessName() 00561 // << " " << (vel[i])->Particle()->GetParticleName() << G4endl; 00562 dedx += ComputeDEDX(kinEnergy,part,(vel[i])->GetProcessName(),mat,cut); 00563 } 00564 } 00565 } 00566 } 00567 return dedx; 00568 }
G4double G4EmCalculator::ComputeEnergyCutFromRangeCut | ( | G4double | range, | |
const G4String & | , | |||
const G4String & | ||||
) |
Definition at line 816 of file G4EmCalculator.cc.
References ComputeEnergyCutFromRangeCut(), FindMaterial(), and FindParticle().
00820 { 00821 return ComputeEnergyCutFromRangeCut(range,FindParticle(particle), 00822 FindMaterial(material)); 00823 }
G4double G4EmCalculator::ComputeEnergyCutFromRangeCut | ( | G4double | range, | |
const G4ParticleDefinition * | , | |||
const G4Material * | ||||
) |
Definition at line 805 of file G4EmCalculator.cc.
References G4ProductionCutsTable::GetProductionCutsTable().
Referenced by ComputeEnergyCutFromRangeCut().
00809 { 00810 return G4ProductionCutsTable::GetProductionCutsTable()-> 00811 ConvertRangeToEnergy(part, mat, range); 00812 }
G4double G4EmCalculator::ComputeGammaAttenuationLength | ( | G4double | kinEnergy, | |
const G4Material * | ||||
) |
Definition at line 738 of file G4EmCalculator.cc.
References ComputeCrossSectionPerVolume(), and G4Gamma::Gamma().
00740 { 00741 G4double res = 0.0; 00742 const G4ParticleDefinition* gamma = G4Gamma::Gamma(); 00743 res += ComputeCrossSectionPerVolume(kinEnergy, gamma, "conv", mat, 0.0); 00744 res += ComputeCrossSectionPerVolume(kinEnergy, gamma, "compt", mat, 0.0); 00745 res += ComputeCrossSectionPerVolume(kinEnergy, gamma, "phot", mat, 0.0); 00746 res += ComputeCrossSectionPerVolume(kinEnergy, gamma, "Rayl", mat, 0.0); 00747 if(res > 0.0) { res = 1.0/res; } 00748 return res; 00749 }
G4double G4EmCalculator::ComputeMeanFreePath | ( | G4double | kinEnergy, | |
const G4String & | , | |||
const G4String & | , | |||
const G4String & | processName, | |||
G4double | cut = 0.0 | |||
) |
Definition at line 793 of file G4EmCalculator.cc.
References ComputeMeanFreePath(), FindMaterial(), and FindParticle().
00798 { 00799 return ComputeMeanFreePath(kinEnergy,FindParticle(particle),processName, 00800 FindMaterial(material),cut); 00801 }
G4double G4EmCalculator::ComputeMeanFreePath | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
const G4Material * | , | |||
G4double | cut = 0.0 | |||
) |
Definition at line 772 of file G4EmCalculator.cc.
References ComputeCrossSectionPerVolume(), DBL_MAX, G4cout, G4endl, G4Material::GetName(), and G4ParticleDefinition::GetParticleName().
Referenced by ComputeMeanFreePath().
00777 { 00778 G4double mfp = DBL_MAX; 00779 G4double x = ComputeCrossSectionPerVolume(kinEnergy, p, processName, mat, cut); 00780 if(x > 0.0) { mfp = 1.0/x; } 00781 if(verbose>1) { 00782 G4cout << "E(MeV)= " << kinEnergy/MeV 00783 << " MFP(mm)= " << mfp/mm 00784 << " " << p->GetParticleName() 00785 << " in " << mat->GetName() 00786 << G4endl; 00787 } 00788 return mfp; 00789 }
G4double G4EmCalculator::ComputeNuclearDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat | |||
) |
Definition at line 633 of file G4EmCalculator.cc.
References ComputeNuclearDEDX(), FindMaterial(), and FindParticle().
00636 { 00637 return ComputeNuclearDEDX(kinEnergy,FindParticle(particle), 00638 FindMaterial(material)); 00639 }
G4double G4EmCalculator::ComputeNuclearDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | ||||
) |
Definition at line 614 of file G4EmCalculator.cc.
References G4cout, G4endl, G4Material::GetDensity(), G4ParticleDefinition::GetParticleName(), and G4EmCorrections::NuclearDEDX().
Referenced by ComputeNuclearDEDX(), and ComputeTotalDEDX().
00617 { 00618 00619 G4double res = corr->NuclearDEDX(p, mat, kinEnergy, false); 00620 00621 if(verbose > 1) { 00622 G4cout << p->GetParticleName() << " E(MeV)= " << kinEnergy/MeV 00623 << " NuclearDEDX(MeV/mm)= " << res*mm/MeV 00624 << " NuclearDEDX(MeV*cm^2/g)= " 00625 << res*gram/(MeV*cm2*mat->GetDensity()) 00626 << G4endl; 00627 } 00628 return res; 00629 }
G4double G4EmCalculator::ComputeShellIonisationCrossSectionPerAtom | ( | const G4String & | part, | |
G4int | Z, | |||
G4AtomicShellEnumerator | shell, | |||
G4double | kinEnergy, | |||
const G4Material * | mat = 0 | |||
) |
Definition at line 753 of file G4EmCalculator.cc.
References G4LossTableManager::AtomDeexcitation(), G4VAtomDeexcitation::ComputeShellIonisationCrossSectionPerAtom(), and FindParticle().
00759 { 00760 G4double res = 0.0; 00761 const G4ParticleDefinition* p = FindParticle(particle); 00762 G4VAtomDeexcitation* ad = manager->AtomDeexcitation(); 00763 if(p && ad) { 00764 res = ad->ComputeShellIonisationCrossSectionPerAtom(p, Z, shell, 00765 kinEnergy, mat); 00766 } 00767 return res; 00768 }
G4double G4EmCalculator::ComputeTotalDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 592 of file G4EmCalculator.cc.
References ComputeTotalDEDX(), FindMaterial(), and FindParticle().
00596 { 00597 return ComputeTotalDEDX(kinEnergy,FindParticle(part),FindMaterial(mat),cut); 00598 }
G4double G4EmCalculator::ComputeTotalDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
G4double | cut = DBL_MAX | |||
) |
Definition at line 580 of file G4EmCalculator.cc.
References ComputeElectronicDEDX(), and ComputeNuclearDEDX().
Referenced by ComputeTotalDEDX().
00584 { 00585 G4double dedx = ComputeElectronicDEDX(kinEnergy,part,mat,cut); 00586 if(mass > 700.*MeV) { dedx += ComputeNuclearDEDX(kinEnergy,part,mat); } 00587 return dedx; 00588 }
const G4MaterialCutsCouple * G4EmCalculator::FindCouple | ( | const G4Material * | , | |
const G4Region * | r = 0 | |||
) |
Definition at line 943 of file G4EmCalculator.cc.
References G4RegionStore::GetInstance(), G4ProductionCutsTable::GetMaterialCutsCouple(), G4Material::GetName(), G4Region::GetProductionCuts(), G4ProductionCutsTable::GetProductionCutsTable(), and G4RegionStore::GetRegion().
Referenced by ComputeDEDX(), GetCrossSectionPerVolume(), GetCSDARange(), GetDEDX(), GetKinEnergy(), GetRange(), and GetRangeFromRestricteDEDX().
00946 { 00947 if(!material) return 0; 00948 currentMaterial = material; 00949 currentMaterialName = material->GetName(); 00950 // Access to materials 00951 const G4ProductionCutsTable* theCoupleTable= 00952 G4ProductionCutsTable::GetProductionCutsTable(); 00953 const G4Region* r = region; 00954 if(!r) { 00955 r = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForTheWorld"); 00956 } 00957 return theCoupleTable->GetMaterialCutsCouple(material,r->GetProductionCuts()); 00958 00959 }
const G4ParticleDefinition * G4EmCalculator::FindIon | ( | G4int | Z, | |
G4int | A | |||
) |
Definition at line 907 of file G4EmCalculator.cc.
References G4ParticleTable::FindIon(), and G4ParticleTable::GetParticleTable().
00908 { 00909 const G4ParticleDefinition* p = 00910 G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z); 00911 return p; 00912 }
const G4Material * G4EmCalculator::FindMaterial | ( | const G4String & | ) |
Definition at line 916 of file G4EmCalculator.cc.
References G4cout, G4endl, and G4Material::GetMaterial().
Referenced by ComputeCrossSectionPerVolume(), ComputeDEDX(), ComputeElectronicDEDX(), ComputeEnergyCutFromRangeCut(), ComputeMeanFreePath(), ComputeNuclearDEDX(), ComputeTotalDEDX(), GetCrossSectionPerVolume(), GetCSDARange(), GetDEDX(), GetKinEnergy(), GetMeanFreePath(), GetRange(), and GetRangeFromRestricteDEDX().
00917 { 00918 if(name != currentMaterialName) { 00919 currentMaterial = G4Material::GetMaterial(name); 00920 currentMaterialName = name; 00921 if(!currentMaterial) 00922 G4cout << "### WARNING: G4EmCalculator::FindMaterial fails to find " 00923 << name << G4endl; 00924 } 00925 return currentMaterial; 00926 }
const G4ParticleDefinition * G4EmCalculator::FindParticle | ( | const G4String & | ) |
Definition at line 890 of file G4EmCalculator.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().
Referenced by ComputeCrossSectionPerAtom(), ComputeCrossSectionPerVolume(), ComputeDEDX(), ComputeElectronicDEDX(), ComputeEnergyCutFromRangeCut(), ComputeMeanFreePath(), ComputeNuclearDEDX(), ComputeShellIonisationCrossSectionPerAtom(), ComputeTotalDEDX(), GetCrossSectionPerVolume(), GetCSDARange(), GetDEDX(), GetKinEnergy(), GetMeanFreePath(), GetRange(), GetRangeFromRestricteDEDX(), and GetShellIonisationCrossSectionPerAtom().
00891 { 00892 const G4ParticleDefinition* p = 0; 00893 if(name != currentParticleName) { 00894 p = G4ParticleTable::GetParticleTable()->FindParticle(name); 00895 if(!p) { 00896 G4cout << "### WARNING: G4EmCalculator::FindParticle fails to find " 00897 << name << G4endl; 00898 } 00899 } else { 00900 p = currentParticle; 00901 } 00902 return p; 00903 }
Definition at line 930 of file G4EmCalculator.cc.
References G4RegionStore::GetInstance(), and G4RegionStore::GetRegion().
Referenced by GetCrossSectionPerVolume(), GetCSDARange(), GetDEDX(), GetKinEnergy(), GetMeanFreePath(), GetRange(), and GetRangeFromRestricteDEDX().
00931 { 00932 const G4Region* r = 0; 00933 if(reg != "" && reg != "world") { 00934 r = G4RegionStore::GetInstance()->GetRegion(reg); 00935 } else { 00936 r = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForTheWorld"); 00937 } 00938 return r; 00939 }
G4double G4EmCalculator::GetCrossSectionPerVolume | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | proc, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 345 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetCrossSectionPerVolume().
00350 { 00351 return GetCrossSectionPerVolume(kinEnergy,FindParticle(particle),processName, 00352 FindMaterial(material),FindRegion(reg)); 00353 }
G4double G4EmCalculator::GetCrossSectionPerVolume | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 308 of file G4EmCalculator.cc.
References ComputeCrossSectionPerVolume(), FindCouple(), G4cout, G4endl, G4MaterialCutsCouple::GetIndex(), G4Material::GetName(), and G4ParticleDefinition::GetParticleName().
Referenced by GetCrossSectionPerVolume(), and GetMeanFreePath().
00313 { 00314 G4double res = 0.0; 00315 const G4MaterialCutsCouple* couple = FindCouple(mat,region); 00316 00317 if(couple && UpdateParticle(p, kinEnergy)) { 00318 G4int idx = couple->GetIndex(); 00319 FindLambdaTable(p, processName, kinEnergy); 00320 00321 if(currentLambda) { 00322 G4double e = kinEnergy*massRatio; 00323 res = (((*currentLambda)[idx])->Value(e))*chargeSquare; 00324 } else { 00325 res = ComputeCrossSectionPerVolume(kinEnergy, p, processName, mat, 00326 kinEnergy); 00327 } 00328 if(verbose>0) { 00329 G4cout << "G4EmCalculator::GetXSPerVolume: E(MeV)= " << kinEnergy/MeV 00330 << " cross(cm-1)= " << res*cm 00331 << " " << p->GetParticleName() 00332 << " in " << mat->GetName(); 00333 if(verbose>1) 00334 G4cout << " idx= " << idx << " Escaled((MeV)= " 00335 << kinEnergy*massRatio 00336 << " q2= " << chargeSquare; 00337 G4cout << G4endl; 00338 } 00339 } 00340 return res; 00341 }
G4double G4EmCalculator::GetCSDARange | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 255 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetCSDARange().
00259 { 00260 return GetCSDARange(kinEnergy,FindParticle(particle), 00261 FindMaterial(material),FindRegion(reg)); 00262 }
G4double G4EmCalculator::GetCSDARange | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 200 of file G4EmCalculator.cc.
References FindCouple(), G4cout, G4endl, G4LossTableManager::GetCSDARange(), G4Material::GetName(), and G4ParticleDefinition::GetParticleName().
Referenced by GetCSDARange().
00204 { 00205 G4double res = 0.0; 00206 const G4MaterialCutsCouple* couple = FindCouple(mat,region); 00207 if(couple && UpdateParticle(p, kinEnergy)) { 00208 res = manager->GetCSDARange(p, kinEnergy, couple); 00209 if(verbose>0) { 00210 G4cout << "G4EmCalculator::GetRange: E(MeV)= " << kinEnergy/MeV 00211 << " range(mm)= " << res/mm 00212 << " " << p->GetParticleName() 00213 << " in " << mat->GetName() 00214 << G4endl; 00215 } 00216 } 00217 return res; 00218 }
G4double G4EmCalculator::GetDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 169 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetDEDX().
00171 { 00172 return GetDEDX(kinEnergy,FindParticle(particle), 00173 FindMaterial(material),FindRegion(reg)); 00174 }
G4double G4EmCalculator::GetDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 130 of file G4EmCalculator.cc.
References G4VEmModel::CorrectionsAlongStep(), FindCouple(), G4cout, G4endl, G4VEmModel::GetChargeSquareRatio(), G4LossTableManager::GetDEDX(), G4Material::GetDensity(), G4Material::GetName(), G4ParticleDefinition::GetParticleName(), and G4DynamicParticle::SetKineticEnergy().
Referenced by GetDEDX(), and G4EnergySplitter::SplitEnergyInVolumes().
00132 { 00133 G4double res = 0.0; 00134 const G4MaterialCutsCouple* couple = FindCouple(mat, region); 00135 if(couple && UpdateParticle(p, kinEnergy) ) { 00136 res = manager->GetDEDX(p, kinEnergy, couple); 00137 00138 if(isIon) { 00139 if(FindEmModel(p, currentProcessName, kinEnergy)) { 00140 G4double length = CLHEP::nm; 00141 G4double eloss = res*length; 00142 //G4cout << "### GetDEDX: E= " << kinEnergy << " dedx0= " << res 00143 // << " de= " << eloss << G4endl;; 00144 G4double niel = 0.0; 00145 dynParticle.SetKineticEnergy(kinEnergy); 00146 currentModel->GetChargeSquareRatio(p, mat, kinEnergy); 00147 currentModel->CorrectionsAlongStep(couple,&dynParticle,eloss,niel,length); 00148 res = eloss/length; 00149 //G4cout << " de1= " << eloss << " res1= " << res 00150 // << " " << p->GetParticleName() <<G4endl;; 00151 } 00152 } 00153 00154 if(verbose>0) { 00155 G4cout << "G4EmCalculator::GetDEDX: E(MeV)= " << kinEnergy/MeV 00156 << " DEDX(MeV/mm)= " << res*mm/MeV 00157 << " DEDX(MeV*cm^2/g)= " << res*gram/(MeV*cm2*mat->GetDensity()) 00158 << " " << p->GetParticleName() 00159 << " in " << mat->GetName() 00160 << " isIon= " << isIon 00161 << G4endl; 00162 } 00163 } 00164 return res; 00165 }
G4double G4EmCalculator::GetKinEnergy | ( | G4double | range, | |
const G4String & | part, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 299 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetKinEnergy().
00301 { 00302 return GetKinEnergy(range,FindParticle(particle), 00303 FindMaterial(material),FindRegion(reg)); 00304 }
G4double G4EmCalculator::GetKinEnergy | ( | G4double | range, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 277 of file G4EmCalculator.cc.
References FindCouple(), G4cout, G4endl, G4LossTableManager::GetEnergy(), G4Material::GetName(), and G4ParticleDefinition::GetParticleName().
Referenced by GetKinEnergy().
00281 { 00282 G4double res = 0.0; 00283 const G4MaterialCutsCouple* couple = FindCouple(mat,region); 00284 if(couple && UpdateParticle(p, 1.0*GeV)) { 00285 res = manager->GetEnergy(p, range, couple); 00286 if(verbose>0) { 00287 G4cout << "G4EmCalculator::GetKinEnergy: Range(mm)= " << range/mm 00288 << " KinE(MeV)= " << res/MeV 00289 << " " << p->GetParticleName() 00290 << " in " << mat->GetName() 00291 << G4endl; 00292 } 00293 } 00294 return res; 00295 }
G4double G4EmCalculator::GetMeanFreePath | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | proc, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 395 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetMeanFreePath().
00400 { 00401 return GetMeanFreePath(kinEnergy,FindParticle(particle),processName, 00402 FindMaterial(material),FindRegion(reg)); 00403 }
G4double G4EmCalculator::GetMeanFreePath | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4String & | processName, | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 374 of file G4EmCalculator.cc.
References DBL_MAX, G4cout, G4endl, GetCrossSectionPerVolume(), G4Material::GetName(), and G4ParticleDefinition::GetParticleName().
Referenced by GetMeanFreePath().
00379 { 00380 G4double res = DBL_MAX; 00381 G4double x = GetCrossSectionPerVolume(kinEnergy,p, processName, mat,region); 00382 if(x > 0.0) { res = 1.0/x; } 00383 if(verbose>1) { 00384 G4cout << "G4EmCalculator::GetMeanFreePath: E(MeV)= " << kinEnergy/MeV 00385 << " MFP(mm)= " << res/mm 00386 << " " << p->GetParticleName() 00387 << " in " << mat->GetName() 00388 << G4endl; 00389 } 00390 return res; 00391 }
G4double G4EmCalculator::GetRange | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 266 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetRange().
00270 { 00271 return GetRange(kinEnergy,FindParticle(particle), 00272 FindMaterial(material),FindRegion(reg)); 00273 }
G4double G4EmCalculator::GetRange | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 222 of file G4EmCalculator.cc.
References FindCouple(), G4cout, G4endl, G4Material::GetName(), G4ParticleDefinition::GetParticleName(), and G4LossTableManager::GetRange().
Referenced by GetRange().
00226 { 00227 G4double res = 0.0; 00228 const G4MaterialCutsCouple* couple = FindCouple(mat,region); 00229 if(couple && UpdateParticle(p, kinEnergy)) { 00230 res = manager->GetRange(p, kinEnergy, couple); 00231 if(verbose>0) { 00232 G4cout << "G4EmCalculator::GetRange: E(MeV)= " << kinEnergy/MeV 00233 << " range(mm)= " << res/mm 00234 << " " << p->GetParticleName() 00235 << " in " << mat->GetName() 00236 << G4endl; 00237 } 00238 } 00239 return res; 00240 }
G4double G4EmCalculator::GetRangeFromRestricteDEDX | ( | G4double | kinEnergy, | |
const G4String & | part, | |||
const G4String & | mat, | |||
const G4String & | s = "world" | |||
) |
Definition at line 244 of file G4EmCalculator.cc.
References FindMaterial(), FindParticle(), FindRegion(), and GetRangeFromRestricteDEDX().
00248 { 00249 return GetRangeFromRestricteDEDX(kinEnergy,FindParticle(particle), 00250 FindMaterial(material),FindRegion(reg)); 00251 }
G4double G4EmCalculator::GetRangeFromRestricteDEDX | ( | G4double | kinEnergy, | |
const G4ParticleDefinition * | , | |||
const G4Material * | , | |||
const G4Region * | r = 0 | |||
) |
Definition at line 178 of file G4EmCalculator.cc.
References FindCouple(), G4cout, G4endl, G4Material::GetName(), G4ParticleDefinition::GetParticleName(), and G4LossTableManager::GetRangeFromRestricteDEDX().
Referenced by GetRangeFromRestricteDEDX().
00182 { 00183 G4double res = 0.0; 00184 const G4MaterialCutsCouple* couple = FindCouple(mat,region); 00185 if(couple && UpdateParticle(p, kinEnergy)) { 00186 res = manager->GetRangeFromRestricteDEDX(p, kinEnergy, couple); 00187 if(verbose>0) { 00188 G4cout << "G4EmCalculator::GetRange: E(MeV)= " << kinEnergy/MeV 00189 << " range(mm)= " << res/mm 00190 << " " << p->GetParticleName() 00191 << " in " << mat->GetName() 00192 << G4endl; 00193 } 00194 } 00195 return res; 00196 }
G4double G4EmCalculator::GetShellIonisationCrossSectionPerAtom | ( | const G4String & | part, | |
G4int | Z, | |||
G4AtomicShellEnumerator | shell, | |||
G4double | kinEnergy | |||
) |
Definition at line 357 of file G4EmCalculator.cc.
References G4LossTableManager::AtomDeexcitation(), FindParticle(), and G4VAtomDeexcitation::GetShellIonisationCrossSectionPerAtom().
00362 { 00363 G4double res = 0.0; 00364 const G4ParticleDefinition* p = FindParticle(particle); 00365 G4VAtomDeexcitation* ad = manager->AtomDeexcitation(); 00366 if(p && ad) { 00367 res = ad->GetShellIonisationCrossSectionPerAtom(p, Z, shell, kinEnergy); 00368 } 00369 return res; 00370 }
void G4EmCalculator::PrintDEDXTable | ( | const G4ParticleDefinition * | ) |
Definition at line 407 of file G4EmCalculator.cc.
References G4VEnergyLossProcess::DEDXTable(), G4cout, G4endl, and G4ParticleDefinition::GetParticleName().
00408 { 00409 const G4VEnergyLossProcess* elp = FindEnergyLossProcess(p); 00410 G4cout << "##### DEDX Table for " << p->GetParticleName() << G4endl; 00411 if(elp) G4cout << *(elp->DEDXTable()) << G4endl; 00412 }
void G4EmCalculator::PrintInverseRangeTable | ( | const G4ParticleDefinition * | ) |
Definition at line 425 of file G4EmCalculator.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), and G4VEnergyLossProcess::InverseRangeTable().
00426 { 00427 const G4VEnergyLossProcess* elp = FindEnergyLossProcess(p); 00428 G4cout << "### G4EmCalculator: Inverse Range Table for " 00429 << p->GetParticleName() << G4endl; 00430 if(elp) G4cout << *(elp->InverseRangeTable()) << G4endl; 00431 }
void G4EmCalculator::PrintRangeTable | ( | const G4ParticleDefinition * | ) |
Definition at line 416 of file G4EmCalculator.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), and G4VEnergyLossProcess::RangeTableForLoss().
00417 { 00418 const G4VEnergyLossProcess* elp = FindEnergyLossProcess(p); 00419 G4cout << "##### Range Table for " << p->GetParticleName() << G4endl; 00420 if(elp) G4cout << *(elp->RangeTableForLoss()) << G4endl; 00421 }
void G4EmCalculator::SetVerbose | ( | G4int | val | ) |