#include <G4VEmProcess.hh>
Inheritance diagram for G4VEmProcess:
Definition at line 91 of file G4VEmProcess.hh.
G4VEmProcess::G4VEmProcess | ( | const G4String & | name, | |
G4ProcessType | type = fElectromagnetic | |||
) |
Definition at line 89 of file G4VEmProcess.cc.
References DBL_MAX, G4Electron::Electron(), fParticleChange, G4Gamma::Gamma(), G4LossTableManager::Instance(), G4Positron::Positron(), G4VProcess::pParticleChange, and G4VProcess::SetVerboseLevel().
00089 : 00090 G4VDiscreteProcess(name, type), 00091 secondaryParticle(0), 00092 buildLambdaTable(true), 00093 numberOfModels(0), 00094 theLambdaTable(0), 00095 theLambdaTablePrim(0), 00096 theDensityFactor(0), 00097 theDensityIdx(0), 00098 integral(false), 00099 applyCuts(false), 00100 startFromNull(false), 00101 splineFlag(true), 00102 currentModel(0), 00103 particle(0), 00104 currentParticle(0), 00105 currentCouple(0) 00106 { 00107 SetVerboseLevel(1); 00108 00109 // Size of tables assuming spline 00110 minKinEnergy = 0.1*keV; 00111 maxKinEnergy = 10.0*TeV; 00112 nLambdaBins = 77; 00113 minKinEnergyPrim = DBL_MAX; 00114 00115 // default lambda factor 00116 lambdaFactor = 0.8; 00117 00118 // default limit on polar angle 00119 polarAngleLimit = 0.0; 00120 biasFactor = 1.0; 00121 00122 // particle types 00123 theGamma = G4Gamma::Gamma(); 00124 theElectron = G4Electron::Electron(); 00125 thePositron = G4Positron::Positron(); 00126 00127 pParticleChange = &fParticleChange; 00128 secParticles.reserve(5); 00129 00130 preStepLambda = 0.0; 00131 mfpKinEnergy = DBL_MAX; 00132 00133 modelManager = new G4EmModelManager(); 00134 biasManager = 0; 00135 biasFlag = false; 00136 weightFlag = false; 00137 (G4LossTableManager::Instance())->Register(this); 00138 warn = 0; 00139 }
G4VEmProcess::~G4VEmProcess | ( | ) | [virtual] |
Definition at line 143 of file G4VEmProcess.cc.
References G4PhysicsTable::clearAndDestroy(), G4cout, G4endl, G4VProcess::GetProcessName(), G4LossTableManager::Instance(), and G4VProcess::verboseLevel.
00144 { 00145 if(1 < verboseLevel) { 00146 G4cout << "G4VEmProcess destruct " << GetProcessName() 00147 << " " << this << " " << theLambdaTable <<G4endl; 00148 } 00149 Clear(); 00150 if(theLambdaTable) { 00151 theLambdaTable->clearAndDestroy(); 00152 delete theLambdaTable; 00153 } 00154 if(theLambdaTablePrim) { 00155 theLambdaTablePrim->clearAndDestroy(); 00156 delete theLambdaTablePrim; 00157 } 00158 delete modelManager; 00159 delete biasManager; 00160 (G4LossTableManager::Instance())->DeRegister(this); 00161 }
void G4VEmProcess::ActivateForcedInteraction | ( | G4double | length = 0.0 , |
|
const G4String & | r = "" , |
|||
G4bool | flag = true | |||
) |
Definition at line 1046 of file G4VEmProcess.cc.
References G4EmBiasingManager::ActivateForcedInteraction(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), and G4VProcess::verboseLevel.
01048 { 01049 if(!biasManager) { biasManager = new G4EmBiasingManager(); } 01050 if(1 < verboseLevel) { 01051 G4cout << "### ActivateForcedInteraction: for " 01052 << particle->GetParticleName() 01053 << " and process " << GetProcessName() 01054 << " length(mm)= " << length/mm 01055 << " in G4Region <" << r 01056 << "> weightFlag= " << flag 01057 << G4endl; 01058 } 01059 weightFlag = flag; 01060 biasManager->ActivateForcedInteraction(length, r); 01061 }
void G4VEmProcess::ActivateSecondaryBiasing | ( | const G4String & | region, | |
G4double | factor, | |||
G4double | energyLimit | |||
) |
Definition at line 1066 of file G4VEmProcess.cc.
References G4EmBiasingManager::ActivateSecondaryBiasing(), G4Electron::Electron(), G4cout, G4endl, G4VProcess::GetProcessName(), and G4VProcess::verboseLevel.
01069 { 01070 if (0.0 <= factor) { 01071 01072 // Range cut can be applied only for e- 01073 if(0.0 == factor && secondaryParticle != G4Electron::Electron()) 01074 { return; } 01075 01076 if(!biasManager) { biasManager = new G4EmBiasingManager(); } 01077 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit); 01078 if(1 < verboseLevel) { 01079 G4cout << "### ActivateSecondaryBiasing: for " 01080 << " process " << GetProcessName() 01081 << " factor= " << factor 01082 << " in G4Region <" << region 01083 << "> energyLimit(MeV)= " << energyLimit/MeV 01084 << G4endl; 01085 } 01086 } 01087 }
void G4VEmProcess::AddEmModel | ( | G4int | , | |
G4VEmModel * | , | |||
const G4Region * | region = 0 | |||
) |
Definition at line 182 of file G4VEmProcess.cc.
References G4EmModelManager::AddEmModel(), G4VProcess::pParticleChange, and G4VEmModel::SetParticleChange().
Referenced by TLBE< T >::ConstructEM(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmDNAPhysicsChemistry::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4MuElecInelastic::InitialiseProcess(), G4MuElecElastic::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4eplusPolarizedAnnihilation::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAElectronSolvatation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), and G4EmConfigurator::PrepareModels().
00184 { 00185 G4VEmFluctuationModel* fm = 0; 00186 modelManager->AddEmModel(order, p, fm, region); 00187 if(p) { p->SetParticleChange(pParticleChange); } 00188 }
void G4VEmProcess::BuildPhysicsTable | ( | const G4ParticleDefinition & | ) | [virtual] |
Reimplemented from G4VProcess.
Reimplemented in G4eplusPolarizedAnnihilation, and G4PolarizedCompton.
Definition at line 336 of file G4VEmProcess.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4LossTableManager::Instance(), PrintInfoDefinition(), and G4VProcess::verboseLevel.
Referenced by G4PolarizedCompton::BuildPhysicsTable(), and G4eplusPolarizedAnnihilation::BuildPhysicsTable().
00337 { 00338 G4String num = part.GetParticleName(); 00339 if(1 < verboseLevel) { 00340 G4cout << "G4VEmProcess::BuildPhysicsTable() for " 00341 << GetProcessName() 00342 << " and particle " << num 00343 << " buildLambdaTable= " << buildLambdaTable 00344 << G4endl; 00345 } 00346 00347 (G4LossTableManager::Instance())->BuildPhysicsTable(particle); 00348 00349 if(buildLambdaTable || minKinEnergyPrim < maxKinEnergy) { 00350 BuildLambdaTable(); 00351 } 00352 00353 // explicitly defined printout by particle name 00354 if(1 < verboseLevel || 00355 (0 < verboseLevel && (num == "gamma" || num == "e-" || 00356 num == "e+" || num == "mu+" || 00357 num == "mu-" || num == "proton"|| 00358 num == "pi+" || num == "pi-" || 00359 num == "kaon+" || num == "kaon-" || 00360 num == "alpha" || num == "anti_proton" || 00361 num == "GenericIon"))) 00362 { 00363 particle = ∂ 00364 PrintInfoDefinition(); 00365 } 00366 00367 if(1 < verboseLevel) { 00368 G4cout << "G4VEmProcess::BuildPhysicsTable() done for " 00369 << GetProcessName() 00370 << " and particle " << num 00371 << G4endl; 00372 } 00373 }
G4double G4VEmProcess::ComputeCrossSectionPerAtom | ( | G4double | kineticEnergy, | |
G4double | Z, | |||
G4double | A = 0. , |
|||
G4double | cut = 0.0 | |||
) |
Definition at line 942 of file G4VEmProcess.cc.
References G4VEmModel::ComputeCrossSectionPerAtom(), and SelectModel().
00944 { 00945 SelectModel(kineticEnergy, currentCoupleIndex); 00946 G4double x = 0.0; 00947 if(currentModel) { 00948 x = currentModel->ComputeCrossSectionPerAtom(currentParticle,kineticEnergy, 00949 Z,A,cut); 00950 } 00951 return x; 00952 }
G4double G4VEmProcess::CrossSectionBiasingFactor | ( | ) | const [inline] |
G4double G4VEmProcess::CrossSectionPerVolume | ( | G4double | kineticEnergy, | |
const G4MaterialCutsCouple * | couple | |||
) |
Definition at line 899 of file G4VEmProcess.cc.
References G4VEmModel::CrossSectionPerVolume(), and SelectModel().
00901 { 00902 // Cross section per atom is calculated 00903 DefineMaterial(couple); 00904 G4double cross = 0.0; 00905 if(theLambdaTable) { 00906 cross = (*theDensityFactor)[currentCoupleIndex]* 00907 (((*theLambdaTable)[basedCoupleIndex])->Value(kineticEnergy)); 00908 } else { 00909 SelectModel(kineticEnergy, currentCoupleIndex); 00910 cross = currentModel->CrossSectionPerVolume(currentMaterial, 00911 currentParticle,kineticEnergy); 00912 } 00913 00914 if(cross < 0.0) { cross = 0.0; } 00915 return cross; 00916 }
size_t G4VEmProcess::CurrentMaterialCutsCoupleIndex | ( | ) | const [inline, protected] |
G4VEmModel * G4VEmProcess::EmModel | ( | G4int | index = 1 |
) |
Definition at line 230 of file G4VEmProcess.cc.
Referenced by G4RayleighScattering::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAElectronSolvatation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), G4ComptonScattering::InitialiseProcess(), G4PolarizedPhotoElectricEffect::PrintInfo(), G4DNAVibExcitation::PrintInfo(), G4DNAIonisation::PrintInfo(), G4DNAExcitation::PrintInfo(), G4DNAElastic::PrintInfo(), G4DNAChargeIncrease::PrintInfo(), G4DNAChargeDecrease::PrintInfo(), and G4DNAAttachment::PrintInfo().
00231 { 00232 G4VEmModel* p = 0; 00233 if(index >= 0 && index < G4int(emModels.size())) { p = emModels[index]; } 00234 return p; 00235 }
const G4Element * G4VEmProcess::GetCurrentElement | ( | ) | const |
Definition at line 1019 of file G4VEmProcess.cc.
References G4VEmModel::GetCurrentElement().
01020 { 01021 const G4Element* elm = 0; 01022 if(currentModel) {elm = currentModel->GetCurrentElement(); } 01023 return elm; 01024 }
G4double G4VEmProcess::GetElectronEnergyCut | ( | ) | [inline, protected] |
G4double G4VEmProcess::GetGammaEnergyCut | ( | ) | [inline, protected] |
G4double G4VEmProcess::GetLambda | ( | G4double & | kinEnergy, | |
const G4MaterialCutsCouple * | couple | |||
) | [inline] |
Definition at line 496 of file G4VEmProcess.hh.
References SelectModel().
Referenced by PostStepDoIt(), and G4AdjointComptonModel::RapidSampleSecondaries().
00498 { 00499 DefineMaterial(couple); 00500 SelectModel(kinEnergy, currentCoupleIndex); 00501 return GetCurrentLambda(kinEnergy); 00502 }
G4double G4VEmProcess::GetMeanFreePath | ( | const G4Track & | track, | |
G4double | previousStepSize, | |||
G4ForceCondition * | condition | |||
) | [protected, virtual] |
Implements G4VDiscreteProcess.
Reimplemented in G4eplusPolarizedAnnihilation, and G4PolarizedCompton.
Definition at line 920 of file G4VEmProcess.cc.
References MeanFreePath(), and NotForced.
Referenced by G4PolarizedCompton::GetMeanFreePath(), and G4eplusPolarizedAnnihilation::GetMeanFreePath().
00923 { 00924 *condition = NotForced; 00925 return G4VEmProcess::MeanFreePath(track); 00926 }
G4VEmModel * G4VEmProcess::GetModelByIndex | ( | G4int | idx = 0 , |
|
G4bool | ver = false | |||
) |
Definition at line 247 of file G4VEmProcess.cc.
References G4EmModelManager::GetModel().
00248 { 00249 return modelManager->GetModel(idx, ver); 00250 }
G4ParticleChangeForGamma * G4VEmProcess::GetParticleChange | ( | ) | [inline, protected] |
Definition at line 653 of file G4VEmProcess.hh.
References fParticleChange.
00654 { 00655 return &fParticleChange; 00656 }
virtual void G4VEmProcess::InitialiseProcess | ( | const G4ParticleDefinition * | ) | [protected, pure virtual] |
Implemented in G4DNAAttachment, G4DNAChargeDecrease, G4DNAChargeIncrease, G4DNAElastic, G4DNAElectronSolvatation, G4DNAExcitation, G4DNAIonisation, G4DNAVibExcitation, G4eeToHadrons, G4MuElecElastic, G4MuElecInelastic, G4RayleighScattering, G4eplusPolarizedAnnihilation, G4PolarizedCompton, G4PolarizedGammaConversion, G4PolarizedPhotoElectricEffect, G4ComptonScattering, G4CoulombScattering, G4eplusAnnihilation, G4GammaConversion, G4NuclearStopping, and G4PhotoElectricEffect.
Referenced by PreparePhysicsTable().
virtual G4bool G4VEmProcess::IsApplicable | ( | const G4ParticleDefinition & | p | ) | [pure virtual] |
Reimplemented from G4VProcess.
Implemented in G4DNAAttachment, G4DNAChargeDecrease, G4DNAChargeIncrease, G4DNAElastic, G4DNAElectronSolvatation, G4DNAExcitation, G4DNAIonisation, G4DNAVibExcitation, G4eeToHadrons, G4MuElecElastic, G4MuElecInelastic, G4RayleighScattering, G4eplusPolarizedAnnihilation, G4PolarizedCompton, G4PolarizedGammaConversion, G4PolarizedPhotoElectricEffect, G4ComptonScattering, G4CoulombScattering, G4eplusAnnihilation, G4GammaConversion, G4NuclearStopping, and G4PhotoElectricEffect.
G4bool G4VEmProcess::IsIntegral | ( | ) | const [inline] |
G4int G4VEmProcess::LambdaBinning | ( | ) | const [inline] |
Definition at line 546 of file G4VEmProcess.hh.
Referenced by G4PolarizedCompton::BuildAsymmetryTable(), and G4eplusPolarizedAnnihilation::BuildAsymmetryTable().
G4PhysicsVector * G4VEmProcess::LambdaPhysicsVector | ( | const G4MaterialCutsCouple * | ) | [protected] |
Definition at line 1009 of file G4VEmProcess.cc.
References G4LossTableManager::Instance(), and G4PhysicsVector::SetSpline().
Referenced by G4PolarizedCompton::BuildAsymmetryTable(), and G4eplusPolarizedAnnihilation::BuildAsymmetryTable().
01010 { 01011 G4PhysicsVector* v = 01012 new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nLambdaBins); 01013 v->SetSpline((G4LossTableManager::Instance())->SplineFlag()); 01014 return v; 01015 }
const G4PhysicsTable * G4VEmProcess::LambdaTable | ( | ) | const [inline] |
G4double G4VEmProcess::MaxKinEnergy | ( | ) | const [inline] |
Definition at line 560 of file G4VEmProcess.hh.
Referenced by G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), and G4ComptonScattering::InitialiseProcess().
Definition at line 930 of file G4VEmProcess.cc.
References DBL_MAX, G4Track::GetKineticEnergy(), and G4Track::GetMaterialCutsCouple().
Referenced by GetMeanFreePath().
00931 { 00932 DefineMaterial(track.GetMaterialCutsCouple()); 00933 preStepLambda = GetCurrentLambda(track.GetKineticEnergy()); 00934 G4double x = DBL_MAX; 00935 if(0.0 < preStepLambda) { x = 1.0/preStepLambda; } 00936 return x; 00937 }
G4double G4VEmProcess::MinKinEnergy | ( | ) | const [inline] |
Definition at line 553 of file G4VEmProcess.hh.
Referenced by G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), and G4ComptonScattering::InitialiseProcess().
G4double G4VEmProcess::MinPrimaryEnergy | ( | const G4ParticleDefinition * | , | |
const G4Material * | ||||
) | [protected, virtual] |
Reimplemented in G4CoulombScattering, and G4GammaConversion.
Definition at line 174 of file G4VEmProcess.cc.
G4VEmModel * G4VEmProcess::Model | ( | G4int | index = 1 |
) |
Definition at line 207 of file G4VEmProcess.cc.
References G4cout, and G4endl.
Referenced by G4MuElecInelastic::InitialiseProcess(), G4MuElecElastic::InitialiseProcess(), G4MuElecInelastic::PrintInfo(), and G4MuElecElastic::PrintInfo().
00208 { 00209 if(warn < 10) { 00210 G4cout << "### G4VEmProcess::Model is obsolete method and will be " 00211 << "removed for the next release." << G4endl; 00212 G4cout << " Please, use EmModel" << G4endl; 00213 } 00214 G4VEmModel* p = 0; 00215 if(index >= 0 && index < G4int(emModels.size())) { p = emModels[index]; } 00216 return p; 00217 }
const G4ParticleDefinition * G4VEmProcess::Particle | ( | ) | const [inline] |
G4double G4VEmProcess::PolarAngleLimit | ( | ) | const [inline] |
Definition at line 583 of file G4VEmProcess.hh.
Referenced by G4CoulombScattering::InitialiseProcess(), G4CoulombScattering::MinPrimaryEnergy(), and G4CoulombScattering::PrintInfo().
G4VParticleChange * G4VEmProcess::PostStepDoIt | ( | const G4Track & | , | |
const G4Step & | ||||
) | [virtual] |
Reimplemented from G4VDiscreteProcess.
Definition at line 632 of file G4VEmProcess.cc.
References G4VParticleChange::AddSecondary(), G4EmBiasingManager::ApplySecondaryBiasing(), G4VProcess::ClearNumberOfInteractionLengthLeft(), DBL_MAX, fAlive, G4EmBiasingManager::ForcedInteractionRegion(), fParticleChange, fStopAndKill, fStopButAlive, G4cout, G4endl, G4UniformRand, G4ProcessManager::GetAtRestProcessVector(), G4Track::GetDynamicParticle(), G4Track::GetGlobalTime(), G4Track::GetKineticEnergy(), GetLambda(), G4VParticleChange::GetLocalEnergyDeposit(), G4VParticleChange::GetParentWeight(), G4ParticleDefinition::GetParticleName(), G4Track::GetPosition(), G4Step::GetPostStepPoint(), G4ParticleDefinition::GetProcessManager(), G4VProcess::GetProcessName(), G4ParticleChangeForGamma::GetProposedKineticEnergy(), G4StepPoint::GetSafety(), G4Track::GetTouchableHandle(), G4VParticleChange::GetTrackStatus(), G4Track::GetTrackStatus(), G4ParticleChangeForGamma::InitializeForPostStep(), G4VEmModel::IsActive(), G4VProcess::pParticleChange, G4VParticleChange::ProposeLocalEnergyDeposit(), G4VParticleChange::ProposeTrackStatus(), G4VParticleChange::ProposeWeight(), G4VEmModel::SampleSecondaries(), G4EmBiasingManager::SecondaryBiasingRegion(), SelectModel(), G4VParticleChange::SetNumberOfSecondaries(), G4Track::SetTouchableHandle(), G4Track::SetWeight(), G4ProcessVector::size(), G4VProcess::theNumberOfInteractionLengthLeft, and G4VProcess::verboseLevel.
00634 { 00635 // In all cases clear number of interaction lengths 00636 theNumberOfInteractionLengthLeft = -1.0; 00637 mfpKinEnergy = DBL_MAX; 00638 00639 fParticleChange.InitializeForPostStep(track); 00640 00641 // Do not make anything if particle is stopped, the annihilation then 00642 // should be performed by the AtRestDoIt! 00643 if (track.GetTrackStatus() == fStopButAlive) { return &fParticleChange; } 00644 00645 G4double finalT = track.GetKineticEnergy(); 00646 00647 // forced process - should happen only once per track 00648 if(biasFlag) { 00649 if(biasManager->ForcedInteractionRegion(currentCoupleIndex)) { 00650 biasFlag = false; 00651 } 00652 } 00653 00654 // Integral approach 00655 if (integral) { 00656 G4double lx = GetLambda(finalT, currentCouple); 00657 if(preStepLambda<lx && 1 < verboseLevel) { 00658 G4cout << "WARNING: for " << currentParticle->GetParticleName() 00659 << " and " << GetProcessName() 00660 << " E(MeV)= " << finalT/MeV 00661 << " preLambda= " << preStepLambda << " < " 00662 << lx << " (postLambda) " 00663 << G4endl; 00664 } 00665 00666 if(preStepLambda*G4UniformRand() > lx) { 00667 ClearNumberOfInteractionLengthLeft(); 00668 return &fParticleChange; 00669 } 00670 } 00671 00672 SelectModel(finalT, currentCoupleIndex); 00673 if(!currentModel->IsActive(finalT)) { return &fParticleChange; } 00674 00675 // define new weight for primary and secondaries 00676 G4double weight = fParticleChange.GetParentWeight(); 00677 if(weightFlag) { 00678 weight /= biasFactor; 00679 fParticleChange.ProposeWeight(weight); 00680 } 00681 00682 /* 00683 if(0 < verboseLevel) { 00684 G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= " 00685 << finalT/MeV 00686 << " MeV; model= (" << currentModel->LowEnergyLimit() 00687 << ", " << currentModel->HighEnergyLimit() << ")" 00688 << G4endl; 00689 } 00690 */ 00691 00692 // sample secondaries 00693 secParticles.clear(); 00694 currentModel->SampleSecondaries(&secParticles, 00695 currentCouple, 00696 track.GetDynamicParticle(), 00697 (*theCuts)[currentCoupleIndex]); 00698 00699 // bremsstrahlung splitting or Russian roulette 00700 if(biasManager) { 00701 if(biasManager->SecondaryBiasingRegion(currentCoupleIndex)) { 00702 G4double eloss = 0.0; 00703 weight *= biasManager->ApplySecondaryBiasing(secParticles, 00704 track, currentModel, 00705 &fParticleChange, 00706 eloss, currentCoupleIndex, 00707 (*theCuts)[currentCoupleIndex], 00708 step.GetPostStepPoint()->GetSafety()); 00709 if(eloss > 0.0) { 00710 eloss += fParticleChange.GetLocalEnergyDeposit(); 00711 fParticleChange.ProposeLocalEnergyDeposit(eloss); 00712 } 00713 } 00714 } 00715 00716 // save secondaries 00717 G4int num = secParticles.size(); 00718 if(num > 0) { 00719 00720 fParticleChange.SetNumberOfSecondaries(num); 00721 G4double edep = fParticleChange.GetLocalEnergyDeposit(); 00722 00723 for (G4int i=0; i<num; ++i) { 00724 if (secParticles[i]) { 00725 G4DynamicParticle* dp = secParticles[i]; 00726 const G4ParticleDefinition* p = dp->GetParticleDefinition(); 00727 G4double e = dp->GetKineticEnergy(); 00728 G4bool good = true; 00729 if(applyCuts) { 00730 if (p == theGamma) { 00731 if (e < (*theCutsGamma)[currentCoupleIndex]) { good = false; } 00732 00733 } else if (p == theElectron) { 00734 if (e < (*theCutsElectron)[currentCoupleIndex]) { good = false; } 00735 00736 } else if (p == thePositron) { 00737 if (electron_mass_c2 < (*theCutsGamma)[currentCoupleIndex] && 00738 e < (*theCutsPositron)[currentCoupleIndex]) { 00739 good = false; 00740 e += 2.0*electron_mass_c2; 00741 } 00742 } 00743 // added secondary if it is good 00744 } 00745 if (good) { 00746 G4Track* t = new G4Track(dp, track.GetGlobalTime(), track.GetPosition()); 00747 t->SetTouchableHandle(track.GetTouchableHandle()); 00748 t->SetWeight(weight); 00749 pParticleChange->AddSecondary(t); 00750 //G4cout << "Secondary(post step) has weight " << t->GetWeight() 00751 // << ", Ekin= " << t->GetKineticEnergy()/MeV << " MeV" <<G4endl; 00752 } else { 00753 delete dp; 00754 edep += e; 00755 } 00756 } 00757 } 00758 fParticleChange.ProposeLocalEnergyDeposit(edep); 00759 } 00760 00761 if(0.0 == fParticleChange.GetProposedKineticEnergy() && 00762 fAlive == fParticleChange.GetTrackStatus()) { 00763 if(particle->GetProcessManager()->GetAtRestProcessVector()->size() > 0) 00764 { fParticleChange.ProposeTrackStatus(fStopButAlive); } 00765 else { fParticleChange.ProposeTrackStatus(fStopAndKill); } 00766 } 00767 00768 // ClearNumberOfInteractionLengthLeft(); 00769 return &fParticleChange; 00770 }
G4double G4VEmProcess::PostStepGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4double | previousStepSize, | |||
G4ForceCondition * | condition | |||
) | [virtual] |
Reimplemented from G4VDiscreteProcess.
Reimplemented in G4eplusPolarizedAnnihilation, and G4PolarizedCompton.
Definition at line 557 of file G4VEmProcess.cc.
References G4VProcess::currentInteractionLength, DBL_MAX, G4cout, G4endl, G4Track::GetKineticEnergy(), G4Track::GetMaterialCutsCouple(), G4Material::GetName(), G4Track::GetParentID(), G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4VEmModel::IsActive(), NotForced, G4VProcess::ResetNumberOfInteractionLengthLeft(), SelectModel(), G4VProcess::theNumberOfInteractionLengthLeft, and G4VProcess::verboseLevel.
Referenced by G4PolarizedCompton::PostStepGetPhysicalInteractionLength(), and G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength().
00561 { 00562 *condition = NotForced; 00563 G4double x = DBL_MAX; 00564 00565 preStepKinEnergy = track.GetKineticEnergy(); 00566 DefineMaterial(track.GetMaterialCutsCouple()); 00567 SelectModel(preStepKinEnergy, currentCoupleIndex); 00568 00569 if(!currentModel->IsActive(preStepKinEnergy)) { return x; } 00570 00571 // forced biasing only for primary particles 00572 if(biasManager) { 00573 if(0 == track.GetParentID()) { 00574 if(biasFlag && biasManager->ForcedInteractionRegion(currentCoupleIndex)) { 00575 return biasManager->GetStepLimit(currentCoupleIndex, previousStepSize); 00576 } 00577 } 00578 } 00579 00580 // compute mean free path 00581 if(preStepKinEnergy < mfpKinEnergy) { 00582 if (integral) { ComputeIntegralLambda(preStepKinEnergy); } 00583 else { preStepLambda = GetCurrentLambda(preStepKinEnergy); } 00584 00585 // zero cross section 00586 if(preStepLambda <= 0.0) { 00587 theNumberOfInteractionLengthLeft = -1.0; 00588 currentInteractionLength = DBL_MAX; 00589 } 00590 } 00591 00592 // non-zero cross section 00593 if(preStepLambda > 0.0) { 00594 00595 if (theNumberOfInteractionLengthLeft < 0.0) { 00596 00597 // beggining of tracking (or just after DoIt of this process) 00598 ResetNumberOfInteractionLengthLeft(); 00599 00600 } else if(currentInteractionLength < DBL_MAX) { 00601 00602 // subtract NumberOfInteractionLengthLeft using previous step 00603 theNumberOfInteractionLengthLeft -= previousStepSize/currentInteractionLength; 00604 //SubtractNumberOfInteractionLengthLeft(previousStepSize); 00605 if(theNumberOfInteractionLengthLeft < 0.) { 00606 theNumberOfInteractionLengthLeft = 0.0; 00607 //theNumberOfInteractionLengthLeft = perMillion; 00608 } 00609 } 00610 00611 // new mean free path and step limit for the next step 00612 currentInteractionLength = 1.0/preStepLambda; 00613 x = theNumberOfInteractionLengthLeft * currentInteractionLength; 00614 #ifdef G4VERBOSE 00615 if (verboseLevel>2){ 00616 G4cout << "G4VEmProcess::PostStepGetPhysicalInteractionLength "; 00617 G4cout << "[ " << GetProcessName() << "]" << G4endl; 00618 G4cout << " for " << currentParticle->GetParticleName() 00619 << " in Material " << currentMaterial->GetName() 00620 << " Ekin(MeV)= " << preStepKinEnergy/MeV 00621 <<G4endl; 00622 G4cout << " MeanFreePath = " << currentInteractionLength/cm << "[cm]" 00623 << " InteractionLength= " << x/cm <<"[cm] " <<G4endl; 00624 } 00625 #endif 00626 } 00627 return x; 00628 }
void G4VEmProcess::PreparePhysicsTable | ( | const G4ParticleDefinition & | ) | [virtual] |
Reimplemented from G4VProcess.
Reimplemented in G4eplusPolarizedAnnihilation, and G4PolarizedCompton.
Definition at line 254 of file G4VEmProcess.cc.
References G4LossTableManager::AtomDeexcitation(), DBL_MAX, G4cout, G4endl, G4GenericIon::GenericIon(), G4LossTableBuilder::GetCoupleIndexes(), G4LossTableBuilder::GetDensityFactors(), G4ProductionCutsTable::GetEnergyCutsVector(), G4EmModelManager::GetModel(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleSubType(), G4ParticleDefinition::GetParticleType(), G4VProcess::GetProcessName(), G4ProductionCutsTable::GetProductionCutsTable(), G4LossTableManager::GetTableBuilder(), G4ProductionCutsTable::GetTableSize(), idxG4ElectronCut, idxG4GammaCut, idxG4PositronCut, G4EmBiasingManager::Initialise(), G4EmModelManager::Initialise(), G4LossTableBuilder::InitialiseBaseMaterials(), InitialiseProcess(), G4LossTableManager::Instance(), CLHEP::detail::n, G4EmModelManager::NumberOfModels(), G4PhysicsTableHelper::PreparePhysicsTable(), G4LossTableManager::PreparePhysicsTable(), G4EmModelManager::SetFluoFlag(), SetParticle(), G4VEmModel::SetPolarAngleLimit(), and G4VProcess::verboseLevel.
Referenced by G4PolarizedCompton::PreparePhysicsTable(), and G4eplusPolarizedAnnihilation::PreparePhysicsTable().
00255 { 00256 if(!particle) { SetParticle(&part); } 00257 00258 if(part.GetParticleType() == "nucleus" && 00259 part.GetParticleSubType() == "generic") { 00260 00261 G4String pname = part.GetParticleName(); 00262 if(pname != "deuteron" && pname != "triton" && 00263 pname != "alpha" && pname != "He3" && 00264 pname != "alpha+" && pname != "helium" && 00265 pname != "hydrogen") { 00266 00267 particle = G4GenericIon::GenericIon(); 00268 } 00269 } 00270 00271 if(1 < verboseLevel) { 00272 G4cout << "G4VEmProcess::PreparePhysicsTable() for " 00273 << GetProcessName() 00274 << " and particle " << part.GetParticleName() 00275 << " local particle " << particle->GetParticleName() 00276 << G4endl; 00277 } 00278 00279 G4LossTableManager* man = G4LossTableManager::Instance(); 00280 G4LossTableBuilder* bld = man->GetTableBuilder(); 00281 00282 man->PreparePhysicsTable(&part, this); 00283 00284 if(particle == &part) { 00285 Clear(); 00286 InitialiseProcess(particle); 00287 00288 const G4ProductionCutsTable* theCoupleTable= 00289 G4ProductionCutsTable::GetProductionCutsTable(); 00290 size_t n = theCoupleTable->GetTableSize(); 00291 00292 theEnergyOfCrossSectionMax.resize(n, 0.0); 00293 theCrossSectionMax.resize(n, DBL_MAX); 00294 00295 // initialisation of models 00296 numberOfModels = modelManager->NumberOfModels(); 00297 for(G4int i=0; i<numberOfModels; ++i) { 00298 G4VEmModel* mod = modelManager->GetModel(i); 00299 if(0 == i) { currentModel = mod; } 00300 mod->SetPolarAngleLimit(polarAngleLimit); 00301 if(mod->HighEnergyLimit() > maxKinEnergy) { 00302 mod->SetHighEnergyLimit(maxKinEnergy); 00303 } 00304 } 00305 00306 if(man->AtomDeexcitation()) { modelManager->SetFluoFlag(true); } 00307 theCuts = modelManager->Initialise(particle,secondaryParticle, 00308 2.,verboseLevel); 00309 theCutsGamma = theCoupleTable->GetEnergyCutsVector(idxG4GammaCut); 00310 theCutsElectron = theCoupleTable->GetEnergyCutsVector(idxG4ElectronCut); 00311 theCutsPositron = theCoupleTable->GetEnergyCutsVector(idxG4PositronCut); 00312 00313 // prepare tables 00314 if(buildLambdaTable){ 00315 theLambdaTable = G4PhysicsTableHelper::PreparePhysicsTable(theLambdaTable); 00316 bld->InitialiseBaseMaterials(theLambdaTable); 00317 } 00318 // high energy table 00319 if(minKinEnergyPrim < maxKinEnergy){ 00320 theLambdaTablePrim = 00321 G4PhysicsTableHelper::PreparePhysicsTable(theLambdaTablePrim); 00322 bld->InitialiseBaseMaterials(theLambdaTablePrim); 00323 } 00324 // forced biasing 00325 if(biasManager) { 00326 biasManager->Initialise(part,GetProcessName(),verboseLevel); 00327 biasFlag = false; 00328 } 00329 } 00330 theDensityFactor = bld->GetDensityFactors(); 00331 theDensityIdx = bld->GetCoupleIndexes(); 00332 }
virtual void G4VEmProcess::PrintInfo | ( | ) | [pure virtual] |
Implemented in G4DNAAttachment, G4DNAChargeDecrease, G4DNAChargeIncrease, G4DNAElastic, G4DNAElectronSolvatation, G4DNAExcitation, G4DNAIonisation, G4DNAVibExcitation, G4eeToHadrons, G4MuElecElastic, G4MuElecInelastic, G4RayleighScattering, G4eplusPolarizedAnnihilation, G4PolarizedCompton, G4PolarizedGammaConversion, G4PolarizedPhotoElectricEffect, G4ComptonScattering, G4CoulombScattering, G4eplusAnnihilation, G4GammaConversion, G4NuclearStopping, and G4PhotoElectricEffect.
Referenced by PrintInfoDefinition().
void G4VEmProcess::PrintInfoDefinition | ( | ) |
Definition at line 481 of file G4VEmProcess.cc.
References G4EmModelManager::DumpModelList(), G4BestUnit, G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), G4PhysicsTable::length(), PrintInfo(), and G4VProcess::verboseLevel.
Referenced by BuildPhysicsTable().
00482 { 00483 if(verboseLevel > 0) { 00484 G4cout << G4endl << GetProcessName() << ": for " 00485 << particle->GetParticleName(); 00486 if(integral) { G4cout << ", integral: 1 "; } 00487 if(applyCuts) { G4cout << ", applyCuts: 1 "; } 00488 G4cout << " SubType= " << GetProcessSubType();; 00489 if(biasFactor != 1.0) { G4cout << " BiasingFactor= " << biasFactor; } 00490 G4cout << G4endl; 00491 if(buildLambdaTable) { 00492 size_t length = theLambdaTable->length(); 00493 for(size_t i=0; i<length; ++i) { 00494 G4PhysicsVector* v = (*theLambdaTable)[i]; 00495 if(v) { 00496 G4cout << " Lambda table from " 00497 << G4BestUnit(minKinEnergy,"Energy") 00498 << " to " 00499 << G4BestUnit(v->GetMaxEnergy(),"Energy") 00500 << " in " << v->GetVectorLength()-1 00501 << " bins, spline: " 00502 << splineFlag 00503 << G4endl; 00504 break; 00505 } 00506 } 00507 } 00508 if(minKinEnergyPrim < maxKinEnergy) { 00509 size_t length = theLambdaTablePrim->length(); 00510 for(size_t i=0; i<length; ++i) { 00511 G4PhysicsVector* v = (*theLambdaTablePrim)[i]; 00512 if(v) { 00513 G4cout << " LambdaPrime table from " 00514 << G4BestUnit(minKinEnergyPrim,"Energy") 00515 << " to " 00516 << G4BestUnit(maxKinEnergy,"Energy") 00517 << " in " << v->GetVectorLength()-1 00518 << " bins " 00519 << G4endl; 00520 break; 00521 } 00522 } 00523 } 00524 PrintInfo(); 00525 modelManager->DumpModelList(verboseLevel); 00526 } 00527 00528 if(verboseLevel > 2 && buildLambdaTable) { 00529 G4cout << " LambdaTable address= " << theLambdaTable << G4endl; 00530 if(theLambdaTable) { G4cout << (*theLambdaTable) << G4endl; } 00531 } 00532 }
G4double G4VEmProcess::RecalculateLambda | ( | G4double | kinEnergy, | |
const G4MaterialCutsCouple * | couple | |||
) | [inline, protected] |
Definition at line 507 of file G4VEmProcess.hh.
References SelectModel().
00508 { 00509 DefineMaterial(couple); 00510 SelectModel(e, currentCoupleIndex); 00511 return fFactor*ComputeCurrentLambda(e); 00512 }
G4bool G4VEmProcess::RetrievePhysicsTable | ( | const G4ParticleDefinition * | , | |
const G4String & | directory, | |||
G4bool | ascii | |||
) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 821 of file G4VEmProcess.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetPhysicsTableFileName(), G4VProcess::GetProcessName(), G4LossTableManager::Instance(), G4PhysicsTable::length(), CLHEP::detail::n, G4PhysicsTableHelper::RetrievePhysicsTable(), and G4VProcess::verboseLevel.
00824 { 00825 if(1 < verboseLevel) { 00826 G4cout << "G4VEmProcess::RetrievePhysicsTable() for " 00827 << part->GetParticleName() << " and process " 00828 << GetProcessName() << G4endl; 00829 } 00830 G4bool yes = true; 00831 00832 if((!buildLambdaTable && minKinEnergyPrim > maxKinEnergy) 00833 || particle != part) { return yes; } 00834 00835 const G4String particleName = part->GetParticleName(); 00836 G4String filename; 00837 00838 if(buildLambdaTable) { 00839 filename = GetPhysicsTableFileName(part,directory,"Lambda",ascii); 00840 yes = G4PhysicsTableHelper::RetrievePhysicsTable(theLambdaTable, 00841 filename,ascii); 00842 if ( yes ) { 00843 if (0 < verboseLevel) { 00844 G4cout << "Lambda table for " << particleName 00845 << " is Retrieved from <" 00846 << filename << ">" 00847 << G4endl; 00848 } 00849 if((G4LossTableManager::Instance())->SplineFlag()) { 00850 size_t n = theLambdaTable->length(); 00851 for(size_t i=0; i<n; ++i) { 00852 if((* theLambdaTable)[i]) { 00853 (* theLambdaTable)[i]->SetSpline(true); 00854 } 00855 } 00856 } 00857 } else { 00858 if (1 < verboseLevel) { 00859 G4cout << "Lambda table for " << particleName << " in file <" 00860 << filename << "> is not exist" 00861 << G4endl; 00862 } 00863 } 00864 } 00865 if(minKinEnergyPrim < maxKinEnergy) { 00866 filename = GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii); 00867 yes = G4PhysicsTableHelper::RetrievePhysicsTable(theLambdaTablePrim, 00868 filename,ascii); 00869 if ( yes ) { 00870 if (0 < verboseLevel) { 00871 G4cout << "Lambda table prim for " << particleName 00872 << " is Retrieved from <" 00873 << filename << ">" 00874 << G4endl; 00875 } 00876 if((G4LossTableManager::Instance())->SplineFlag()) { 00877 size_t n = theLambdaTablePrim->length(); 00878 for(size_t i=0; i<n; ++i) { 00879 if((* theLambdaTablePrim)[i]) { 00880 (* theLambdaTablePrim)[i]->SetSpline(true); 00881 } 00882 } 00883 } 00884 } else { 00885 if (1 < verboseLevel) { 00886 G4cout << "Lambda table prim for " << particleName << " in file <" 00887 << filename << "> is not exist" 00888 << G4endl; 00889 } 00890 } 00891 } 00892 00893 return yes; 00894 }
const G4ParticleDefinition * G4VEmProcess::SecondaryParticle | ( | ) | const [inline] |
G4VEmModel * G4VEmProcess::SelectModel | ( | G4double & | kinEnergy, | |
size_t | index | |||
) | [inline, protected] |
Definition at line 442 of file G4VEmProcess.hh.
References G4EmModelManager::SelectModel(), and G4VEmModel::SetCurrentCouple().
Referenced by G4NuclearStopping::AlongStepDoIt(), ComputeCrossSectionPerAtom(), CrossSectionPerVolume(), GetLambda(), PostStepDoIt(), PostStepGetPhysicalInteractionLength(), and RecalculateLambda().
00443 { 00444 if(1 < numberOfModels) { 00445 currentModel = modelManager->SelectModel(kinEnergy, index); 00446 } 00447 currentModel->SetCurrentCouple(currentCouple); 00448 return currentModel; 00449 }
G4VEmModel * G4VEmProcess::SelectModelForMaterial | ( | G4double | kinEnergy, | |
size_t & | idxRegion | |||
) | const [inline] |
Definition at line 454 of file G4VEmProcess.hh.
References G4EmModelManager::SelectModel().
00456 { 00457 return modelManager->SelectModel(kinEnergy, idxRegion); 00458 }
void G4VEmProcess::SetApplyCuts | ( | G4bool | val | ) | [inline] |
void G4VEmProcess::SetBuildTableFlag | ( | G4bool | val | ) | [inline] |
Definition at line 646 of file G4VEmProcess.hh.
Referenced by G4ComptonScattering::G4ComptonScattering(), G4CoulombScattering::G4CoulombScattering(), G4eplusAnnihilation::G4eplusAnnihilation(), G4GammaConversion::G4GammaConversion(), G4NuclearStopping::G4NuclearStopping(), G4PhotoElectricEffect::G4PhotoElectricEffect(), G4RayleighScattering::G4RayleighScattering(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4MuElecInelastic::InitialiseProcess(), G4MuElecElastic::InitialiseProcess(), G4eplusPolarizedAnnihilation::InitialiseProcess(), G4eeToHadrons::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAElectronSolvatation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), and G4CoulombScattering::InitialiseProcess().
Definition at line 1028 of file G4VEmProcess.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), and G4VProcess::verboseLevel.
01029 { 01030 if(f > 0.0) { 01031 biasFactor = f; 01032 weightFlag = flag; 01033 if(1 < verboseLevel) { 01034 G4cout << "### SetCrossSectionBiasingFactor: for " 01035 << particle->GetParticleName() 01036 << " and process " << GetProcessName() 01037 << " biasFactor= " << f << " weightFlag= " << flag 01038 << G4endl; 01039 } 01040 } 01041 }
void G4VEmProcess::SetEmModel | ( | G4VEmModel * | , | |
G4int | index = 1 | |||
) |
Definition at line 221 of file G4VEmProcess.cc.
References CLHEP::detail::n.
Referenced by G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4RayleighScattering::InitialiseProcess(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PhotoElectricEffect::InitialiseProcess(), G4NuclearStopping::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), G4eplusAnnihilation::InitialiseProcess(), G4DNAVibExcitation::InitialiseProcess(), G4DNAIonisation::InitialiseProcess(), G4DNAExcitation::InitialiseProcess(), G4DNAElectronSolvatation::InitialiseProcess(), G4DNAElastic::InitialiseProcess(), G4DNAChargeIncrease::InitialiseProcess(), G4DNAChargeDecrease::InitialiseProcess(), G4DNAAttachment::InitialiseProcess(), G4CoulombScattering::InitialiseProcess(), and G4ComptonScattering::InitialiseProcess().
00222 { 00223 G4int n = emModels.size(); 00224 if(index >= n) { for(G4int i=n; i<=index; ++i) {emModels.push_back(0);} } 00225 emModels[index] = p; 00226 }
void G4VEmProcess::SetIntegral | ( | G4bool | val | ) | [inline] |
Definition at line 625 of file G4VEmProcess.hh.
Referenced by G4CoulombScattering::G4CoulombScattering(), G4eplusAnnihilation::G4eplusAnnihilation(), and G4eeToHadrons::InitialiseProcess().
void G4VEmProcess::SetLambdaBinning | ( | G4int | nbins | ) | [inline] |
Definition at line 539 of file G4VEmProcess.hh.
Referenced by G4PolarizedCompton::G4PolarizedCompton(), G4PolarizedGammaConversion::G4PolarizedGammaConversion(), and G4eplusPolarizedAnnihilation::InitialiseProcess().
void G4VEmProcess::SetLambdaFactor | ( | G4double | val | ) | [inline] |
void G4VEmProcess::SetMaxKinEnergy | ( | G4double | e | ) |
Definition at line 1100 of file G4VEmProcess.cc.
References G4lrint().
Referenced by G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4PolarizedCompton::G4PolarizedCompton(), G4PolarizedGammaConversion::G4PolarizedGammaConversion(), G4eplusPolarizedAnnihilation::InitialiseProcess(), and G4eeToHadrons::InitialiseProcess().
01101 { 01102 nLambdaBins = G4lrint(nLambdaBins*std::log(e/minKinEnergy) 01103 /std::log(maxKinEnergy/minKinEnergy)); 01104 maxKinEnergy = e; 01105 }
void G4VEmProcess::SetMinKinEnergy | ( | G4double | e | ) |
Definition at line 1091 of file G4VEmProcess.cc.
References G4lrint().
Referenced by G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4GammaConversion::G4GammaConversion(), G4PolarizedCompton::G4PolarizedCompton(), G4PolarizedGammaConversion::G4PolarizedGammaConversion(), G4PolarizedGammaConversion::InitialiseProcess(), G4GammaConversion::InitialiseProcess(), and G4eplusPolarizedAnnihilation::InitialiseProcess().
01092 { 01093 nLambdaBins = G4lrint(nLambdaBins*std::log(maxKinEnergy/e) 01094 /std::log(maxKinEnergy/minKinEnergy)); 01095 minKinEnergy = e; 01096 }
void G4VEmProcess::SetMinKinEnergyPrim | ( | G4double | e | ) | [inline] |
Definition at line 567 of file G4VEmProcess.hh.
Referenced by G4ComptonScattering::G4ComptonScattering(), G4PhotoElectricEffect::G4PhotoElectricEffect(), and G4RayleighScattering::G4RayleighScattering().
void G4VEmProcess::SetModel | ( | G4VEmModel * | , | |
G4int | index = 1 | |||
) |
Definition at line 192 of file G4VEmProcess.cc.
References G4cout, G4endl, and CLHEP::detail::n.
Referenced by G4EmDNAPhysicsChemistry::ConstructProcess(), G4MuElecInelastic::InitialiseProcess(), and G4MuElecElastic::InitialiseProcess().
00193 { 00194 ++warn; 00195 if(warn < 10) { 00196 G4cout << "### G4VEmProcess::SetModel is obsolete method and will be " 00197 << "removed for the next release." << G4endl; 00198 G4cout << " Please, use SetEmModel" << G4endl; 00199 } 00200 G4int n = emModels.size(); 00201 if(index >= n) { for(G4int i=n; i<=index; ++i) {emModels.push_back(0);} } 00202 emModels[index] = p; 00203 }
void G4VEmProcess::SetParticle | ( | const G4ParticleDefinition * | p | ) | [inline, protected] |
Definition at line 660 of file G4VEmProcess.hh.
Referenced by G4eeToHadrons::InitialiseProcess(), and PreparePhysicsTable().
void G4VEmProcess::SetPolarAngleLimit | ( | G4double | a | ) | [inline] |
Definition at line 574 of file G4VEmProcess.hh.
References G4INCL::Math::pi.
00575 { 00576 if(val < 0.0) { polarAngleLimit = 0.0; } 00577 else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; } 00578 else { polarAngleLimit = val; } 00579 }
void G4VEmProcess::SetSecondaryParticle | ( | const G4ParticleDefinition * | p | ) | [inline, protected] |
Definition at line 668 of file G4VEmProcess.hh.
Referenced by G4ComptonScattering::G4ComptonScattering(), G4CoulombScattering::G4CoulombScattering(), G4eplusAnnihilation::G4eplusAnnihilation(), G4GammaConversion::G4GammaConversion(), G4PhotoElectricEffect::G4PhotoElectricEffect(), G4PolarizedPhotoElectricEffect::InitialiseProcess(), G4PolarizedGammaConversion::InitialiseProcess(), G4PolarizedCompton::InitialiseProcess(), G4eplusPolarizedAnnihilation::InitialiseProcess(), and G4eeToHadrons::InitialiseProcess().
void G4VEmProcess::SetSplineFlag | ( | G4bool | val | ) | [inline, protected] |
Definition at line 682 of file G4VEmProcess.hh.
Referenced by G4ComptonScattering::G4ComptonScattering(), G4CoulombScattering::G4CoulombScattering(), and G4RayleighScattering::G4RayleighScattering().
void G4VEmProcess::SetStartFromNullFlag | ( | G4bool | val | ) | [inline, protected] |
Definition at line 675 of file G4VEmProcess.hh.
Referenced by G4ComptonScattering::G4ComptonScattering(), G4CoulombScattering::G4CoulombScattering(), G4eplusAnnihilation::G4eplusAnnihilation(), G4GammaConversion::G4GammaConversion(), G4RayleighScattering::G4RayleighScattering(), G4eplusPolarizedAnnihilation::InitialiseProcess(), and G4CoulombScattering::InitialiseProcess().
void G4VEmProcess::StartTracking | ( | G4Track * | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 536 of file G4VEmProcess.cc.
References DBL_MAX, G4Track::GetParentID(), G4Track::GetParticleDefinition(), G4EmBiasingManager::ResetForcedInteraction(), and G4VProcess::theNumberOfInteractionLengthLeft.
00537 { 00538 // reset parameters for the new track 00539 currentParticle = track->GetParticleDefinition(); 00540 theNumberOfInteractionLengthLeft = -1.0; 00541 //currentInteractionLength = -1.0; 00542 // theInitialNumberOfInteractionLength=-1.0; 00543 mfpKinEnergy = DBL_MAX; 00544 00545 // forced biasing only for primary particles 00546 if(biasManager) { 00547 if(0 == track->GetParentID()) { 00548 // primary particle 00549 biasFlag = true; 00550 biasManager->ResetForcedInteraction(); 00551 } 00552 } 00553 }
G4bool G4VEmProcess::StorePhysicsTable | ( | const G4ParticleDefinition * | , | |
const G4String & | directory, | |||
G4bool | ascii = false | |||
) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 774 of file G4VEmProcess.cc.
References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetPhysicsTableFileName(), G4VProcess::GetProcessName(), and G4PhysicsTable::StorePhysicsTable().
00777 { 00778 G4bool yes = true; 00779 00780 if ( theLambdaTable && part == particle) { 00781 const G4String name = 00782 GetPhysicsTableFileName(part,directory,"Lambda",ascii); 00783 yes = theLambdaTable->StorePhysicsTable(name,ascii); 00784 00785 if ( yes ) { 00786 G4cout << "Physics table is stored for " << particle->GetParticleName() 00787 << " and process " << GetProcessName() 00788 << " in the directory <" << directory 00789 << "> " << G4endl; 00790 } else { 00791 G4cout << "Fail to store Physics Table for " 00792 << particle->GetParticleName() 00793 << " and process " << GetProcessName() 00794 << " in the directory <" << directory 00795 << "> " << G4endl; 00796 } 00797 } 00798 if ( theLambdaTablePrim && part == particle) { 00799 const G4String name = 00800 GetPhysicsTableFileName(part,directory,"LambdaPrim",ascii); 00801 yes = theLambdaTablePrim->StorePhysicsTable(name,ascii); 00802 00803 if ( yes ) { 00804 G4cout << "Physics table prim is stored for " << particle->GetParticleName() 00805 << " and process " << GetProcessName() 00806 << " in the directory <" << directory 00807 << "> " << G4endl; 00808 } else { 00809 G4cout << "Fail to store Physics Table Prim for " 00810 << particle->GetParticleName() 00811 << " and process " << GetProcessName() 00812 << " in the directory <" << directory 00813 << "> " << G4endl; 00814 } 00815 } 00816 return yes; 00817 }
Definition at line 239 of file G4VEmProcess.cc.
References G4EmModelManager::UpdateEmModel().
00241 { 00242 modelManager->UpdateEmModel(nam, emin, emax); 00243 }
Definition at line 374 of file G4VEmProcess.hh.
Referenced by G4eplusPolarizedAnnihilation::AtRestDoIt(), G4eplusAnnihilation::AtRestDoIt(), G4VEmProcess(), GetParticleChange(), and PostStepDoIt().