Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // >> 23 // $Id: G4VEmProcess.cc,v 1.5 2004/05/17 09:46:57 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-06-02 $ >> 25 // 26 // ------------------------------------------- 26 // ------------------------------------------------------------------- 27 // 27 // 28 // GEANT4 Class file 28 // GEANT4 Class file 29 // 29 // 30 // 30 // 31 // File name: G4VEmProcess 31 // File name: G4VEmProcess 32 // 32 // 33 // Author: Vladimir Ivanchenko on base 33 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 34 // 34 // 35 // Creation date: 01.10.2003 35 // Creation date: 01.10.2003 36 // 36 // 37 // Modifications: by V.Ivanchenko << 37 // Modifications: >> 38 // 38 // 39 // 39 // Class Description: based class for discrete << 40 // Class Description: 40 // 41 // >> 42 // It is the unified process for e+ annililation at rest and in fly. 41 43 42 // ------------------------------------------- 44 // ------------------------------------------------------------------- 43 // 45 // 44 //....oooOO0OOooo........oooOO0OOooo........oo 46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 45 //....oooOO0OOooo........oooOO0OOooo........oo 47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 46 48 47 #include "G4VEmProcess.hh" 49 #include "G4VEmProcess.hh" 48 #include "G4PhysicalConstants.hh" << 49 #include "G4SystemOfUnits.hh" << 50 #include "G4ProcessManager.hh" << 51 #include "G4LossTableManager.hh" 50 #include "G4LossTableManager.hh" 52 #include "G4LossTableBuilder.hh" << 53 #include "G4Step.hh" 51 #include "G4Step.hh" 54 #include "G4ParticleDefinition.hh" 52 #include "G4ParticleDefinition.hh" 55 #include "G4VEmModel.hh" 53 #include "G4VEmModel.hh" >> 54 #include "G4VEmFluctuationModel.hh" 56 #include "G4DataVector.hh" 55 #include "G4DataVector.hh" 57 #include "G4PhysicsTable.hh" 56 #include "G4PhysicsTable.hh" 58 #include "G4EmDataHandler.hh" << 57 #include "G4PhysicsVector.hh" 59 #include "G4PhysicsLogVector.hh" 58 #include "G4PhysicsLogVector.hh" 60 #include "G4VParticleChange.hh" 59 #include "G4VParticleChange.hh" 61 #include "G4ProductionCutsTable.hh" << 62 #include "G4Region.hh" << 63 #include "G4Gamma.hh" 60 #include "G4Gamma.hh" 64 #include "G4Electron.hh" 61 #include "G4Electron.hh" 65 #include "G4Positron.hh" 62 #include "G4Positron.hh" 66 #include "G4PhysicsTableHelper.hh" << 63 #include "G4ProcessManager.hh" 67 #include "G4EmBiasingManager.hh" << 64 #include "G4UnitsTable.hh" 68 #include "G4EmParameters.hh" << 65 #include "G4ProductionCutsTable.hh" 69 #include "G4EmProcessSubType.hh" << 66 #include "G4Region.hh" 70 #include "G4EmTableUtil.hh" << 67 #include "G4RegionStore.hh" 71 #include "G4EmUtility.hh" << 72 #include "G4DNAModelSubType.hh" << 73 #include "G4GenericIon.hh" << 74 #include "G4Log.hh" << 75 #include <iostream> << 76 68 77 //....oooOO0OOooo........oooOO0OOooo........oo 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 78 70 79 G4VEmProcess::G4VEmProcess(const G4String& nam 71 G4VEmProcess::G4VEmProcess(const G4String& name, G4ProcessType type): 80 G4VDiscreteProcess(name, type) << 72 G4VRestDiscreteProcess(name, type), >> 73 theLambdaTable(0), >> 74 theEnergyOfCrossSectionMax(0), >> 75 theCrossSectionMax(0), >> 76 particle(0), >> 77 secondaryParticle(0), >> 78 currentCouple(0), >> 79 nLambdaBins(90), >> 80 lambdaFactor(0.1), >> 81 mfpKinEnergy(0.0), >> 82 integral(true), >> 83 meanFreePath(true) 81 { 84 { 82 theParameters = G4EmParameters::Instance(); << 83 SetVerboseLevel(1); << 84 85 85 // Size of tables << 86 minKinEnergy = 0.1*keV; 86 minKinEnergy = 0.1*CLHEP::keV; << 87 maxKinEnergy = 100.0*GeV; 87 maxKinEnergy = 100.0*CLHEP::TeV; << 88 << 89 // default lambda factor << 90 invLambdaFactor = 1.0/lambdaFactor; << 91 << 92 // particle types << 93 theGamma = G4Gamma::Gamma(); << 94 theElectron = G4Electron::Electron(); << 95 thePositron = G4Positron::Positron(); << 96 << 97 pParticleChange = &fParticleChange; << 98 fParticleChange.SetSecondaryWeightByProcess( << 99 secParticles.reserve(5); << 100 88 101 modelManager = new G4EmModelManager(); 89 modelManager = new G4EmModelManager(); 102 lManager = G4LossTableManager::Instance(); << 90 (G4LossTableManager::Instance())->Register(this); 103 lManager->Register(this); << 104 isTheMaster = lManager->IsMaster(); << 105 G4LossTableBuilder* bld = lManager->GetTable << 106 theDensityFactor = bld->GetDensityFactors(); << 107 theDensityIdx = bld->GetCoupleIndexes(); << 108 } 91 } 109 92 110 //....oooOO0OOooo........oooOO0OOooo........oo 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 111 94 112 G4VEmProcess::~G4VEmProcess() 95 G4VEmProcess::~G4VEmProcess() 113 { 96 { 114 if(isTheMaster) { << 97 if(theLambdaTable) theLambdaTable->clearAndDestroy(); 115 delete theData; << 98 if(theEnergyOfCrossSectionMax) delete [] theEnergyOfCrossSectionMax; 116 delete theEnergyOfCrossSectionMax; << 99 if(theCrossSectionMax) delete [] theCrossSectionMax; 117 } << 100 modelManager->Clear(); 118 delete modelManager; 101 delete modelManager; 119 delete biasManager; << 102 (G4LossTableManager::Instance())->DeRegister(this); 120 lManager->DeRegister(this); << 121 } 103 } 122 104 123 //....oooOO0OOooo........oooOO0OOooo........oo 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 124 106 125 void G4VEmProcess::AddEmModel(G4int order, G4V << 107 void G4VEmProcess::Initialise() 126 const G4Region* << 127 { 108 { 128 if(nullptr == ptr) { return; } << 109 if(theLambdaTable) theLambdaTable->clearAndDestroy(); 129 G4VEmFluctuationModel* fm = nullptr; << 110 if(theEnergyOfCrossSectionMax) delete [] theEnergyOfCrossSectionMax; 130 modelManager->AddEmModel(order, ptr, fm, reg << 111 if(theCrossSectionMax) delete [] theCrossSectionMax; 131 ptr->SetParticleChange(pParticleChange); << 112 theLambdaTable = 0; >> 113 modelManager->Clear(); >> 114 theCuts = modelManager->Initialise(particle,secondaryParticle,2.,verboseLevel); 132 } 115 } 133 116 134 //....oooOO0OOooo........oooOO0OOooo........oo 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 135 118 136 void G4VEmProcess::SetEmModel(G4VEmModel* ptr, << 119 void G4VEmProcess::BuildPhysicsTable(const G4ParticleDefinition& part) 137 { 120 { 138 if(nullptr == ptr) { return; } << 121 if( !particle ) particle = ∂ 139 if(!emModels.empty()) { << 122 currentCouple = 0; 140 for(auto & em : emModels) { if(em == ptr) << 123 preStepLambda = 0.0; >> 124 if(0 < verboseLevel) { >> 125 G4cout << "G4VEmProcess::BuildPhysicsTable() for " >> 126 << GetProcessName() >> 127 << " and particle " << part.GetParticleName() >> 128 << G4endl; >> 129 } >> 130 >> 131 G4bool cutsWasModified = false; >> 132 const G4ProductionCutsTable* theCoupleTable= >> 133 G4ProductionCutsTable::GetProductionCutsTable(); >> 134 size_t numOfCouples = theCoupleTable->GetTableSize(); >> 135 for (size_t j=0; j<numOfCouples; j++){ >> 136 if (theCoupleTable->GetMaterialCutsCouple(j)->IsRecalcNeeded()) { >> 137 cutsWasModified = true; >> 138 break; >> 139 } >> 140 } >> 141 if( !cutsWasModified ) return; >> 142 >> 143 Initialise(); >> 144 theLambdaTable = BuildLambdaTable(); >> 145 PrintInfoDefinition(); >> 146 >> 147 if(0 < verboseLevel && theCuts) { >> 148 G4cout << "G4VEmProcess::BuildPhysicsTable() done for " >> 149 << GetProcessName() >> 150 << " and particle " << part.GetParticleName() >> 151 << G4endl; 141 } 152 } 142 emModels.push_back(ptr); << 143 } 153 } 144 154 145 //....oooOO0OOooo........oooOO0OOooo........oo 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 146 156 147 void G4VEmProcess::PreparePhysicsTable(const G << 157 G4PhysicsTable* G4VEmProcess::BuildLambdaTable() 148 { 158 { 149 if(nullptr == particle) { SetParticle(&part) << 150 << 151 if(part.GetParticleType() == "nucleus" && << 152 part.GetParticleSubType() == "generic") { << 153 159 154 G4String pname = part.GetParticleName(); << 160 if(0 < verboseLevel) { 155 if(pname != "deuteron" && pname != "triton << 161 G4cout << "G4VEnergyLossSTD::BuildLambdaTable() for process " 156 pname != "He3" && pname != "alpha" && p << 162 << GetProcessName() << " and particle " 157 pname != "helium" && pname != "hydrogen << 163 << particle->GetParticleName() 158 << 164 << G4endl; 159 particle = G4GenericIon::GenericIon(); << 160 isIon = true; << 161 } << 162 } 165 } 163 if(particle != &part) { return; } << 164 << 165 lManager->PreparePhysicsTable(&part, this); << 166 << 167 // for new run << 168 currentCouple = nullptr; << 169 preStepLambda = 0.0; << 170 fLambdaEnergy = 0.0; << 171 << 172 InitialiseProcess(particle); << 173 166 174 G4LossTableBuilder* bld = lManager->GetTable << 167 // Access to materials 175 const G4ProductionCutsTable* theCoupleTable= 168 const G4ProductionCutsTable* theCoupleTable= 176 G4ProductionCutsTable::GetProductionCutsTa << 169 G4ProductionCutsTable::GetProductionCutsTable(); 177 theCutsGamma = theCoupleTable->GetEnergyC << 170 size_t numOfCouples = theCoupleTable->GetTableSize(); 178 theCutsElectron = theCoupleTable->GetEnergyC << 179 theCutsPositron = theCoupleTable->GetEnergyC << 180 << 181 // initialisation of the process << 182 if(!actMinKinEnergy) { minKinEnergy = thePar << 183 if(!actMaxKinEnergy) { maxKinEnergy = thePar << 184 << 185 applyCuts = theParameters->ApplyCuts() << 186 lambdaFactor = theParameters->LambdaFacto << 187 invLambdaFactor = 1.0/lambdaFactor; << 188 theParameters->DefineRegParamForEM(this); << 189 << 190 // integral option may be disabled << 191 if(!theParameters->Integral()) { fXSType = f << 192 << 193 // prepare tables << 194 if(isTheMaster) { << 195 if(nullptr == theData) { theData = new G4E << 196 << 197 if(buildLambdaTable) { << 198 theLambdaTable = theData->MakeTable(0); << 199 bld->InitialiseBaseMaterials(theLambdaTa << 200 } << 201 // high energy table << 202 if(minKinEnergyPrim < maxKinEnergy) { << 203 theLambdaTablePrim = theData->MakeTable( << 204 bld->InitialiseBaseMaterials(theLambdaTa << 205 } << 206 } << 207 // models << 208 baseMat = bld->GetBaseMaterialFlag(); << 209 numberOfModels = modelManager->NumberOfModel << 210 currentModel = modelManager->GetModel(0); << 211 if(nullptr != lManager->AtomDeexcitation()) << 212 modelManager->SetFluoFlag(true); << 213 } << 214 // forced biasing << 215 if(nullptr != biasManager) { << 216 biasManager->Initialise(part, GetProcessNa << 217 biasFlag = false; << 218 } << 219 << 220 theCuts = << 221 G4EmTableUtil::PrepareEmProcess(this, part << 222 modelManag << 223 secID, tri << 224 verboseLev << 225 } << 226 171 227 //....oooOO0OOooo........oooOO0OOooo........oo << 172 G4PhysicsTable* theTable = new G4PhysicsTable(numOfCouples); 228 << 173 theEnergyOfCrossSectionMax = new G4double [numOfCouples]; 229 void G4VEmProcess::BuildPhysicsTable(const G4P << 174 theCrossSectionMax = new G4double [numOfCouples]; 230 { << 175 231 if(nullptr == masterProc) { << 176 for(size_t i=0; i<numOfCouples; i++) { 232 if(isTheMaster) { masterProc = this; } << 177 233 else { masterProc = static_cast<const G4VE << 178 // create physics vector and fill it 234 } << 179 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 235 G4int nModels = modelManager->NumberOfModels << 180 G4PhysicsVector* aVector = LambdaPhysicsVector(couple); 236 G4bool isLocked = theParameters->IsPrintLock << 181 modelManager->FillLambdaVector(aVector, couple); 237 G4bool toBuild = (buildLambdaTable || minKin << 182 238 << 183 G4double e, s, emax = 0.0; 239 G4EmTableUtil::BuildEmProcess(this, masterPr << 184 G4bool b; 240 nModels, verbo << 185 G4double smax = 0.0; 241 isLocked, toBu << 186 for (G4int j=0; j<nLambdaBins; j++) { 242 } << 187 e = aVector->GetLowEdgeEnergy(j); 243 << 188 s = aVector->GetValue(e,b); 244 //....oooOO0OOooo........oooOO0OOooo........oo << 189 if(s > smax) { 245 << 190 smax = s; 246 void G4VEmProcess::BuildLambdaTable() << 191 emax = e; 247 { << 248 G4double scale = theParameters->MaxKinEnergy << 249 G4int nbin = << 250 theParameters->NumberOfBinsPerDecade()*G4l << 251 if(actBinning) { nbin = std::max(nbin, nLamb << 252 scale = nbin/G4Log(scale); << 253 << 254 G4LossTableBuilder* bld = lManager->GetTable << 255 G4EmTableUtil::BuildLambdaTable(this, partic << 256 bld, theLamb << 257 minKinEnergy << 258 maxKinEnergy << 259 startFromNul << 260 } << 261 << 262 //....oooOO0OOooo........oooOO0OOooo........oo << 263 << 264 void G4VEmProcess::StreamInfo(std::ostream& ou << 265 const G4ParticleDefinition& << 266 { << 267 G4String indent = (rst ? " " : ""); << 268 out << std::setprecision(6); << 269 out << G4endl << indent << GetProcessName() << 270 if (!rst) { << 271 out << " for " << part.GetParticleName(); << 272 } << 273 if(fXSType != fEmNoIntegral) { out << " XSt << 274 if(applyCuts) { out << " applyCuts:1 "; } << 275 G4int subtype = GetProcessSubType(); << 276 out << " SubType=" << subtype; << 277 if (subtype == fAnnihilation) { << 278 G4int mod = theParameters->PositronAtRestM << 279 const G4String namp[2] = {"Simple", "Allis << 280 out << " AtRestModel:" << namp[mod]; << 281 } << 282 if(biasFactor != 1.0) { out << " BiasingFac << 283 out << " BuildTable=" << buildLambdaTable << << 284 if(buildLambdaTable) { << 285 if(particle == &part) { << 286 for(auto & v : *theLambdaTable) { << 287 if(nullptr != v) { << 288 out << " Lambda table from "; << 289 G4double emin = v->Energy(0); << 290 G4double emax = v->GetMaxEnergy(); << 291 G4int nbin = G4int(v->GetVectorLengt << 292 if(emin > minKinEnergy) { out << "th << 293 else { out << G4BestUnit(emin,"Energ << 294 out << " to " << 295 << G4BestUnit(emax,"Energy") << 296 << ", " << G4lrint(nbin/std::log << 297 << " bins/decade, spline: " << 298 << splineFlag << G4endl; << 299 break; << 300 } << 301 } 192 } 302 } else { << 303 out << " Used Lambda table of " << 304 << particle->GetParticleName() << G4endl << 305 } << 306 } << 307 if(minKinEnergyPrim < maxKinEnergy) { << 308 if(particle == &part) { << 309 for(auto & v : *theLambdaTablePrim) { << 310 if(nullptr != v) { << 311 out << " LambdaPrime table from << 312 << G4BestUnit(v->Energy(0),"Ener << 313 << " to " << 314 << G4BestUnit(v->GetMaxEnergy(), << 315 << " in " << v->GetVectorLength( << 316 << " bins " << G4endl; << 317 break; << 318 } << 319 } << 320 } else { << 321 out << " Used LambdaPrime table of << 322 << particle->GetParticleName() << 323 } 193 } >> 194 theEnergyOfCrossSectionMax[i] = emax; >> 195 theCrossSectionMax[i] = smax; >> 196 >> 197 // Insert vector for this material into the table >> 198 theTable->insert(aVector) ; 324 } 199 } 325 StreamProcessInfo(out); << 326 modelManager->DumpModelList(out, verboseLeve << 327 200 328 if(verboseLevel > 2 && buildLambdaTable) { << 201 if(0 < verboseLevel) { 329 out << " LambdaTable address= " << th << 202 G4cout << "Lambda table is built for " 330 if(theLambdaTable && particle == &part) { << 203 << particle->GetParticleName() 331 out << (*theLambdaTable) << G4endl; << 204 << G4endl; >> 205 if(2 < verboseLevel) { >> 206 G4cout << *theTable << G4endl; 332 } 207 } 333 } 208 } >> 209 >> 210 return theTable; 334 } 211 } 335 212 336 //....oooOO0OOooo........oooOO0OOooo........oo 213 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 337 214 338 void G4VEmProcess::StartTracking(G4Track* trac << 215 void G4VEmProcess::SetParticle(const G4ParticleDefinition* p) 339 { 216 { 340 // reset parameters for the new track << 217 particle = p; 341 currentParticle = track->GetParticleDefiniti << 342 theNumberOfInteractionLengthLeft = -1.0; << 343 mfpKinEnergy = DBL_MAX; << 344 preStepLambda = 0.0; << 345 << 346 if(isIon) { massRatio = proton_mass_c2/curre << 347 << 348 // forced biasing only for primary particles << 349 if(biasManager) { << 350 if(0 == track->GetParentID()) { << 351 // primary particle << 352 biasFlag = true; << 353 biasManager->ResetForcedInteraction(); << 354 } << 355 } << 356 } 218 } 357 219 358 //....oooOO0OOooo........oooOO0OOooo........oo 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 359 221 360 G4double G4VEmProcess::PostStepGetPhysicalInte << 222 void G4VEmProcess::SetSecondaryParticle(const G4ParticleDefinition* p) 361 const G4Track& tr << 223 { 362 G4double previo << 224 secondaryParticle = p; 363 G4ForceCondition* << 364 { << 365 *condition = NotForced; << 366 G4double x = DBL_MAX; << 367 << 368 DefineMaterial(track.GetMaterialCutsCouple() << 369 preStepKinEnergy = track.GetKineticEnergy(); << 370 const G4double scaledEnergy = preStepKinEner << 371 SelectModel(scaledEnergy, currentCoupleIndex << 372 /* << 373 G4cout << "PostStepGetPhysicalInteractionLen << 374 << " couple: " << currentCouple << G << 375 */ << 376 if(!currentModel->IsActive(scaledEnergy)) { << 377 theNumberOfInteractionLengthLeft = -1.0; << 378 currentInteractionLength = DBL_MAX; << 379 mfpKinEnergy = DBL_MAX; << 380 preStepLambda = 0.0; << 381 return x; << 382 } << 383 << 384 // forced biasing only for primary particles << 385 if(biasManager) { << 386 if(0 == track.GetParentID()) { << 387 if(biasFlag && << 388 biasManager->ForcedInteractionRegion( << 389 return biasManager->GetStepLimit((G4in << 390 } << 391 } << 392 } << 393 << 394 // compute mean free path << 395 << 396 ComputeIntegralLambda(preStepKinEnergy, trac << 397 << 398 // zero cross section << 399 if(preStepLambda <= 0.0) { << 400 theNumberOfInteractionLengthLeft = -1.0; << 401 currentInteractionLength = DBL_MAX; << 402 << 403 } else { << 404 << 405 // non-zero cross section << 406 if (theNumberOfInteractionLengthLeft < 0.0 << 407 << 408 // beggining of tracking (or just after << 409 theNumberOfInteractionLengthLeft = -G4Lo << 410 theInitialNumberOfInteractionLength = th << 411 << 412 } else { << 413 << 414 theNumberOfInteractionLengthLeft -= << 415 previousStepSize/currentInteractionLen << 416 theNumberOfInteractionLengthLeft = << 417 std::max(theNumberOfInteractionLengthL << 418 } << 419 << 420 // new mean free path and step limit for t << 421 currentInteractionLength = 1.0/preStepLamb << 422 x = theNumberOfInteractionLengthLeft * cur << 423 } << 424 return x; << 425 } 225 } 426 226 427 //....oooOO0OOooo........oooOO0OOooo........oo 227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 428 228 429 void G4VEmProcess::ComputeIntegralLambda(G4dou << 229 void G4VEmProcess::AddEmModel(G4int order, G4VEmModel* p, >> 230 G4VEmFluctuationModel*, >> 231 const G4Region* region) 430 { 232 { 431 if (fXSType == fEmNoIntegral) { << 233 modelManager->AddEmModel(order, p, 0, region); 432 preStepLambda = GetCurrentLambda(e, LogEki << 234 } 433 << 434 } else if (fXSType == fEmIncreasing) { << 435 if(e*invLambdaFactor < mfpKinEnergy) { << 436 preStepLambda = GetCurrentLambda(e, LogE << 437 mfpKinEnergy = (preStepLambda > 0.0) ? e << 438 } << 439 235 440 } else if(fXSType == fEmDecreasing) { << 236 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 441 if(e < mfpKinEnergy) { << 442 const G4double e1 = e*lambdaFactor; << 443 preStepLambda = GetCurrentLambda(e1); << 444 mfpKinEnergy = e1; << 445 } << 446 237 447 } else if(fXSType == fEmOnePeak) { << 238 void G4VEmProcess::UpdateEmModel(const G4String& nam, G4double emin, 448 const G4double epeak = (*theEnergyOfCrossS << 239 G4double emax) 449 if(e <= epeak) { << 240 { 450 if(e*invLambdaFactor < mfpKinEnergy) { << 241 modelManager->UpdateEmModel(nam, emin, emax); 451 preStepLambda = GetCurrentLambda(e, Lo << 452 mfpKinEnergy = (preStepLambda > 0.0) ? << 453 } << 454 } else if(e < mfpKinEnergy) { << 455 const G4double e1 = std::max(epeak, e*la << 456 preStepLambda = GetCurrentLambda(e1); << 457 mfpKinEnergy = e1; << 458 } << 459 } else { << 460 preStepLambda = GetCurrentLambda(e, LogEki << 461 } << 462 } 242 } 463 243 464 //....oooOO0OOooo........oooOO0OOooo........oo 244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 465 245 466 G4VParticleChange* G4VEmProcess::PostStepDoIt( 246 G4VParticleChange* G4VEmProcess::PostStepDoIt(const G4Track& track, 467 247 const G4Step& step) 468 { 248 { 469 // clear number of interaction lengths in an << 249 aParticleChange.Initialize(track); 470 theNumberOfInteractionLengthLeft = -1.0; << 250 G4double finalT = track.GetKineticEnergy(); 471 mfpKinEnergy = DBL_MAX; << 472 << 473 fParticleChange.InitializeForPostStep(track) << 474 << 475 // Do not make anything if particle is stopp << 476 // should be performed by the AtRestDoIt! << 477 if (track.GetTrackStatus() == fStopButAlive) << 478 << 479 const G4double finalT = track.GetKineticEner << 480 << 481 // forced process - should happen only once << 482 if(biasFlag) { << 483 if(biasManager->ForcedInteractionRegion((G << 484 biasFlag = false; << 485 } << 486 } << 487 << 488 // check active and select model << 489 const G4double scaledEnergy = finalT*massRat << 490 SelectModel(scaledEnergy, currentCoupleIndex << 491 if(!currentModel->IsActive(scaledEnergy)) { << 492 251 493 // Integral approach 252 // Integral approach 494 if (fXSType != fEmNoIntegral) { << 253 if (integral) { 495 const G4double logFinalT = << 254 if(preStepLambda*G4UniformRand() > GetLambda(finalT)) 496 track.GetDynamicParticle()->GetLogKineti << 255 return G4VRestDiscreteProcess::PostStepDoIt(track,step); 497 const G4double lx = std::max(GetCurrentLam << 498 #ifdef G4VERBOSE << 499 if(preStepLambda < lx && 1 < verboseLevel) << 500 G4cout << "WARNING: for " << currentPart << 501 << " and " << GetProcessName() << << 502 << " preLambda= " << preStepLambd << 503 << " < " << lx << " (postLambda) << 504 } << 505 #endif << 506 // if false interaction then use new cross << 507 // if both values are zero - no interactio << 508 if(preStepLambda*G4UniformRand() >= lx) { << 509 return &fParticleChange; << 510 } << 511 } 256 } 512 257 513 // define new weight for primary and seconda << 258 G4VEmModel* currentModel = SelectModel(finalT); 514 G4double weight = fParticleChange.GetParentW << 259 G4double tcut = (*theCuts)[currentMaterialIndex]; 515 if(weightFlag) { << 260 const G4DynamicParticle* dynParticle = track.GetDynamicParticle(); 516 weight /= biasFactor; << 261 517 fParticleChange.ProposeWeight(weight); << 262 /* 518 } << 263 if(0 < verboseLevel) { 519 << 264 const G4ParticleDefinition* pd = dynParticle->GetDefinition(); 520 #ifdef G4VERBOSE << 521 if(1 < verboseLevel) { << 522 G4cout << "G4VEmProcess::PostStepDoIt: Sam 265 G4cout << "G4VEmProcess::PostStepDoIt: Sample secondary; E= " 523 << finalT/MeV 266 << finalT/MeV 524 << " MeV; model= (" << currentModel << 267 << " MeV; model= (" << currentModel->LowEnergyLimit(pd) 525 << ", " << currentModel->HighEnerg << 268 << ", " << currentModel->HighEnergyLimit(pd) << ")" 526 << G4endl; 269 << G4endl; 527 } 270 } 528 #endif << 271 */ 529 << 530 // sample secondaries << 531 secParticles.clear(); << 532 currentModel->SampleSecondaries(&secParticle << 533 currentCoupl << 534 track.GetDyn << 535 (*theCuts)[c << 536 << 537 G4int num0 = (G4int)secParticles.size(); << 538 << 539 // splitting or Russian roulette << 540 if(biasManager) { << 541 if(biasManager->SecondaryBiasingRegion((G4 << 542 G4double eloss = 0.0; << 543 weight *= biasManager->ApplySecondaryBia << 544 secParticles, track, currentModel, &fP << 545 (G4int)currentCoupleIndex, (*theCuts)[ << 546 step.GetPostStepPoint()->GetSafety()); << 547 if(eloss > 0.0) { << 548 eloss += fParticleChange.GetLocalEnerg << 549 fParticleChange.ProposeLocalEnergyDepo << 550 } << 551 } << 552 } << 553 << 554 // save secondaries << 555 G4int num = (G4int)secParticles.size(); << 556 if(num > 0) { << 557 << 558 fParticleChange.SetNumberOfSecondaries(num << 559 G4double edep = fParticleChange.GetLocalEn << 560 G4double time = track.GetGlobalTime(); << 561 << 562 G4int n1(0), n2(0); << 563 if(num0 > mainSecondaries) { << 564 currentModel->FillNumberOfSecondaries(n1 << 565 } << 566 << 567 for (G4int i=0; i<num; ++i) { << 568 G4DynamicParticle* dp = secParticles[i]; << 569 if (nullptr != dp) { << 570 const G4ParticleDefinition* p = dp->Ge << 571 G4double e = dp->GetKineticEnergy(); << 572 G4bool good = true; << 573 if(applyCuts) { << 574 if (p == theGamma) { << 575 if (e < (*theCutsGamma)[currentCou << 576 << 577 } else if (p == theElectron) { << 578 if (e < (*theCutsElectron)[current << 579 << 580 } else if (p == thePositron) { << 581 if (electron_mass_c2 < (*theCutsGa << 582 e < (*theCutsPositron)[current << 583 good = false; << 584 e += 2.0*electron_mass_c2; << 585 } << 586 } << 587 // added secondary if it is good << 588 } << 589 if (good) { << 590 G4Track* t = new G4Track(dp, time, t << 591 t->SetTouchableHandle(track.GetTouch << 592 if (biasManager) { << 593 t->SetWeight(weight * biasManager- << 594 } else { << 595 t->SetWeight(weight); << 596 } << 597 pParticleChange->AddSecondary(t); << 598 << 599 // define type of secondary << 600 if(i < mainSecondaries) { << 601 t->SetCreatorModelID(secID); << 602 if(GetProcessSubType() == fCompton << 603 t->SetCreatorModelID(_ComptonGam << 604 } << 605 } else if(i < mainSecondaries + n1) << 606 t->SetCreatorModelID(tripletID); << 607 } else if(i < mainSecondaries + n1 + << 608 t->SetCreatorModelID(_IonRecoil); << 609 } else { << 610 if(i < num0) { << 611 if(p == theGamma) { << 612 t->SetCreatorModelID(fluoID); << 613 } else { << 614 t->SetCreatorModelID(augerID); << 615 } << 616 } else { << 617 t->SetCreatorModelID(biasID); << 618 } << 619 } << 620 /* << 621 G4cout << "Secondary(post step) has << 622 << ", Ekin= " << t->GetKineti << 623 << GetProcessName() << " fluo << 624 << " augerID= " << augerID << << 625 */ << 626 } else { << 627 delete dp; << 628 edep += e; << 629 } << 630 } << 631 } << 632 fParticleChange.ProposeLocalEnergyDeposit( << 633 } << 634 << 635 if(0.0 == fParticleChange.GetProposedKinetic << 636 fAlive == fParticleChange.GetTrackStatus( << 637 if(particle->GetProcessManager()->GetAtRes << 638 { fParticleChange.ProposeTrackStatus( << 639 else { fParticleChange.ProposeTrackStatus( << 640 } << 641 272 642 return &fParticleChange; << 273 SecondariesPostStep(currentModel,currentCouple,dynParticle,tcut,finalT); >> 274 return &aParticleChange; 643 } 275 } 644 276 645 //....oooOO0OOooo........oooOO0OOooo........oo 277 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 646 278 647 G4bool G4VEmProcess::StorePhysicsTable(const G << 279 void G4VEmProcess::PrintInfoDefinition() 648 const G << 649 G4bool << 650 { 280 { 651 if(!isTheMaster || part != particle) { retur << 281 G4cout << G4endl << GetProcessName() << ": " << G4endl 652 if(G4EmTableUtil::StoreTable(this, part, the << 282 << " Lambda tables from threshold to " 653 directory, "Lambda", << 283 << G4BestUnit(maxKinEnergy,"Energy") 654 verboseLevel, a << 284 << " in " << nLambdaBins << " bins." 655 G4EmTableUtil::StoreTable(this, part, the << 285 << G4endl; 656 directory, "LambdaPrim", << 286 /* 657 verboseLevel, a << 287 G4cout << "DEDXTable address= " << theDEDXTable << G4endl; 658 return true; << 288 if(theDEDXTable) G4cout << (*theDEDXTable) << G4endl; 659 } << 289 G4cout << "RangeTable address= " << theRangeTable << G4endl; 660 return false; << 290 if(theRangeTable) G4cout << (*theRangeTable) << G4endl; 661 } << 291 G4cout << "InverseRangeTable address= " << theInverseRangeTable << G4endl; 662 << 292 if(theInverseRangeTable) G4cout << (*theInverseRangeTable) << G4endl; 663 //....oooOO0OOooo........oooOO0OOooo........oo << 293 */ >> 294 if(0 < verboseLevel) { >> 295 G4cout << "Tables are built for " << particle->GetParticleName() >> 296 << " IntegralFlag= " << integral >> 297 << G4endl; 664 298 665 G4bool G4VEmProcess::RetrievePhysicsTable(cons << 299 if(2 < verboseLevel) { 666 cons << 300 G4cout << "LambdaTable address= " << theLambdaTable << G4endl; 667 G4bo << 301 if(theLambdaTable) G4cout << (*theLambdaTable) << G4endl; 668 { << 302 } 669 if(!isTheMaster || part != particle) { retur << 670 G4bool yes = true; << 671 if(buildLambdaTable) { << 672 yes = G4EmTableUtil::RetrieveTable(this, p << 673 "Lambda << 674 ascii, << 675 } << 676 if(yes && minKinEnergyPrim < maxKinEnergy) { << 677 yes = G4EmTableUtil::RetrieveTable(this, p << 678 "Lambda << 679 ascii, << 680 } 303 } 681 return yes; << 682 } << 683 << 684 //....oooOO0OOooo........oooOO0OOooo........oo << 685 << 686 G4double G4VEmProcess::GetCrossSection(G4doubl << 687 const G << 688 { << 689 CurrentSetup(couple, kinEnergy); << 690 return GetCurrentLambda(kinEnergy, G4Log(kin << 691 } 304 } 692 305 693 //....oooOO0OOooo........oooOO0OOooo........oo 306 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 694 307 695 G4double G4VEmProcess::GetMeanFreePath(const G << 308 G4PhysicsVector* G4VEmProcess::LambdaPhysicsVector(const G4MaterialCutsCouple* couple) 696 G4doubl << 697 G4Force << 698 { 309 { 699 *condition = NotForced; << 310 G4double cut = (*theCuts)[couple->GetIndex()]; 700 return G4VEmProcess::MeanFreePath(track); << 311 G4double tmin = std::max(MinPrimaryEnergy(particle, couple->GetMaterial(), cut), >> 312 minKinEnergy); >> 313 if(tmin >= maxKinEnergy) tmin = 0.5*maxKinEnergy; >> 314 G4PhysicsVector* v = new G4PhysicsLogVector(tmin, maxKinEnergy, nLambdaBins); >> 315 return v; 701 } 316 } 702 317 703 //....oooOO0OOooo........oooOO0OOooo........oo 318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 704 319 705 G4double << 320 G4double G4VEmProcess::MicroscopicCrossSection(G4double kineticEnergy, 706 G4VEmProcess::ComputeCrossSectionPerAtom(G4dou << 321 const G4MaterialCutsCouple* couple) 707 G4dou << 708 { << 709 SelectModel(kinEnergy, currentCoupleIndex); << 710 return (currentModel) ? << 711 currentModel->ComputeCrossSectionPerAtom(c << 712 Z << 713 } << 714 << 715 //....oooOO0OOooo........oooOO0OOooo........oo << 716 << 717 G4PhysicsVector* << 718 G4VEmProcess::LambdaPhysicsVector(const G4Mate << 719 { 322 { >> 323 // Cross section per atom is calculated 720 DefineMaterial(couple); 324 DefineMaterial(couple); 721 G4PhysicsVector* newv = new G4PhysicsLogVect << 325 G4double cross = 0.0; 722 << 326 G4bool b; 723 return newv; << 327 if(theLambdaTable) { 724 } << 328 cross = (((*theLambdaTable)[currentMaterialIndex])-> >> 329 GetValue(kineticEnergy, b)); 725 330 726 //....oooOO0OOooo........oooOO0OOooo........oo << 331 cross /= currentMaterial->GetTotNbOfAtomsPerVolume(); >> 332 } 727 333 728 const G4Element* G4VEmProcess::GetCurrentEleme << 334 return cross; 729 { << 730 return (nullptr != currentModel) ? << 731 currentModel->GetCurrentElement(currentMat << 732 } 335 } 733 336 734 //....oooOO0OOooo........oooOO0OOooo........oo 337 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 735 338 736 const G4Element* G4VEmProcess::GetTargetElemen << 339 G4double G4VEmProcess::MeanFreePath(const G4Track& track, >> 340 G4double s, >> 341 G4ForceCondition* cond) 737 { 342 { 738 return (nullptr != currentModel) ? << 343 return GetMeanFreePath(track, s, cond); 739 currentModel->GetCurrentElement(currentMat << 740 } 344 } 741 345 742 //....oooOO0OOooo........oooOO0OOooo........oo 346 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 743 347 744 const G4Isotope* G4VEmProcess::GetTargetIsotop << 348 G4bool G4VEmProcess::StorePhysicsTable(G4ParticleDefinition* part, >> 349 const G4String& directory, >> 350 G4bool ascii) 745 { 351 { 746 return (nullptr != currentModel) ? << 352 G4bool yes = true; 747 currentModel->GetCurrentIsotope(GetCurrent << 748 } << 749 << 750 //....oooOO0OOooo........oooOO0OOooo........oo << 751 353 752 void G4VEmProcess::SetCrossSectionBiasingFacto << 354 if ( theLambdaTable ) { 753 { << 355 const G4String name = GetPhysicsTableFileName(part,directory,"Lambda",ascii); 754 if(f > 0.0) { << 356 yes = theLambdaTable->StorePhysicsTable(name,ascii); 755 biasFactor = f; << 756 weightFlag = flag; << 757 if(1 < verboseLevel) { << 758 G4cout << "### SetCrossSectionBiasingFac << 759 << particle->GetParticleName() << 760 << " and process " << GetProcessN << 761 << " biasFactor= " << f << " weig << 762 << G4endl; << 763 } << 764 } 357 } 765 } << 766 358 767 //....oooOO0OOooo........oooOO0OOooo........oo << 359 if ( yes ) { 768 << 360 G4cout << "Physics tables are stored for " << particle->GetParticleName() 769 void << 770 G4VEmProcess::ActivateForcedInteraction(G4doub << 771 G4bool << 772 { << 773 if(nullptr == biasManager) { biasManager = n << 774 if(1 < verboseLevel) { << 775 G4cout << "### ActivateForcedInteraction: << 776 << particle->GetParticleName() << 777 << " and process " << GetProcessNam 361 << " and process " << GetProcessName() 778 << " length(mm)= " << length/mm << 362 << " in the directory <" << directory 779 << " in G4Region <" << r << 363 << "> " << G4endl; 780 << "> weightFlag= " << flag << 364 } else { 781 << G4endl; << 365 G4cout << "Fail to store Physics Tables for " << particle->GetParticleName() >> 366 << " and process " << GetProcessName() >> 367 << " in the directory <" << directory >> 368 << "> " << G4endl; 782 } 369 } 783 weightFlag = flag; << 370 return yes; 784 biasManager->ActivateForcedInteraction(lengt << 785 } 371 } 786 372 787 //....oooOO0OOooo........oooOO0OOooo........oo << 373 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 788 374 789 void << 375 G4bool G4VEmProcess::RetrievePhysicsTable(G4ParticleDefinition* part, 790 G4VEmProcess::ActivateSecondaryBiasing(const G << 376 const G4String& directory, 791 G4double factor, << 377 G4bool ascii) 792 G4double energyLimit) << 793 { 378 { 794 if (0.0 <= factor) { << 379 currentCouple = 0; >> 380 preStepLambda = 0.0; >> 381 if(0 < verboseLevel) { >> 382 G4cout << "G4VEmProcess::RetrievePhysicsTable() for " >> 383 << part->GetParticleName() << " and process " >> 384 << GetProcessName() << G4endl; >> 385 } >> 386 G4bool yes = true; 795 387 796 // Range cut can be applied only for e- << 388 const G4String particleName = part->GetParticleName(); 797 if(0.0 == factor && secondaryParticle != G << 389 if( !particle ) particle = part; 798 { return; } << 799 390 800 if(!biasManager) { biasManager = new G4EmB << 391 Initialise(); 801 biasManager->ActivateSecondaryBiasing(regi << 392 802 if(1 < verboseLevel) { << 393 G4String filename; 803 G4cout << "### ActivateSecondaryBiasing: << 394 const G4ProductionCutsTable* theCoupleTable= 804 << " process " << GetProcessName() << 395 G4ProductionCutsTable::GetProductionCutsTable(); 805 << " factor= " << factor << 396 size_t numOfCouples = theCoupleTable->GetTableSize(); 806 << " in G4Region <" << region << 397 807 << "> energyLimit(MeV)= " << energyLimi << 398 filename = GetPhysicsTableFileName(part,directory,"Lambda",ascii); 808 << G4endl; << 399 theLambdaTable = new G4PhysicsTable(numOfCouples); 809 } << 400 yes = theLambdaTable->RetrievePhysicsTable(filename,ascii); >> 401 if ( yes ) { >> 402 if (-1 < verboseLevel) { >> 403 G4cout << "Lambda table for " << particleName << " is retrieved from <" >> 404 << filename << ">" >> 405 << G4endl; >> 406 } >> 407 PrintInfoDefinition(); >> 408 } else { >> 409 theLambdaTable->clearAndDestroy(); >> 410 theLambdaTable = 0; >> 411 if (-1 < verboseLevel) { >> 412 G4cout << "Lambda table for " << particleName << " in file <" >> 413 << filename << "> is not exist" >> 414 << G4endl; >> 415 } 810 } 416 } >> 417 >> 418 return yes; 811 } 419 } 812 420 >> 421 813 //....oooOO0OOooo........oooOO0OOooo........oo 422 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 814 423 815 void G4VEmProcess::SetLambdaBinning(G4int n) << 424 void G4VEmProcess::SetLambdaBinning(G4int nbins) 816 { 425 { 817 if(5 < n && n < 10000000) { << 426 nLambdaBins = nbins; 818 nLambdaBins = n; << 819 actBinning = true; << 820 } else { << 821 G4double e = (G4double)n; << 822 PrintWarning("SetLambdaBinning", e); << 823 } << 824 } 427 } 825 428 826 //....oooOO0OOooo........oooOO0OOooo........oo 429 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 827 430 828 void G4VEmProcess::SetMinKinEnergy(G4double e) 431 void G4VEmProcess::SetMinKinEnergy(G4double e) 829 { 432 { 830 if(1.e-3*eV < e && e < maxKinEnergy) { << 433 minKinEnergy = e; 831 nLambdaBins = G4lrint(nLambdaBins*G4Log(ma << 832 /G4Log(maxKinEnergy/ << 833 minKinEnergy = e; << 834 actMinKinEnergy = true; << 835 } else { PrintWarning("SetMinKinEnergy", e); << 836 } 434 } 837 435 838 //....oooOO0OOooo........oooOO0OOooo........oo 436 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 839 437 840 void G4VEmProcess::SetMaxKinEnergy(G4double e) << 438 G4double G4VEmProcess::MinKinEnergy() const 841 { 439 { 842 if(minKinEnergy < e && e < 1.e+6*TeV) { << 440 return minKinEnergy; 843 nLambdaBins = G4lrint(nLambdaBins*G4Log(e/ << 844 /G4Log(maxKinEnergy/ << 845 maxKinEnergy = e; << 846 actMaxKinEnergy = true; << 847 } else { PrintWarning("SetMaxKinEnergy", e); << 848 } 441 } 849 442 850 //....oooOO0OOooo........oooOO0OOooo........oo 443 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 851 444 852 void G4VEmProcess::SetMinKinEnergyPrim(G4doubl << 445 void G4VEmProcess::SetMaxKinEnergy(G4double e) 853 { 446 { 854 if(theParameters->MinKinEnergy() <= e && << 447 maxKinEnergy = e; 855 e <= theParameters->MaxKinEnergy()) { min << 856 else { PrintWarning("SetMinKinEnergyPrim", e << 857 } 448 } 858 449 859 //....oooOO0OOooo........oooOO0OOooo........oo 450 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 860 451 861 G4VEmProcess* G4VEmProcess::GetEmProcess(const << 452 G4double G4VEmProcess::MaxKinEnergy() const 862 { 453 { 863 return (nam == GetProcessName()) ? this : nu << 454 return maxKinEnergy; 864 } 455 } 865 456 866 //....oooOO0OOooo........oooOO0OOooo........oo 457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 867 458 868 G4double G4VEmProcess::PolarAngleLimit() const << 459 void G4VEmProcess::ActivateFluorescence(G4bool, const G4Region*) 869 { << 460 {} 870 return theParameters->MscThetaLimit(); << 871 } << 872 461 873 //....oooOO0OOooo........oooOO0OOooo........oo 462 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 874 463 875 void G4VEmProcess::PrintWarning(G4String tit, << 464 void G4VEmProcess::ActivateAugerElectronProduction(G4bool, const G4Region*) 876 { << 465 877 G4String ss = "G4VEmProcess::" + tit; << 466 {} 878 G4ExceptionDescription ed; << 879 ed << "Parameter is out of range: " << val << 880 << " it will have no effect!\n" << " Pro << 881 << GetProcessName() << " nbins= " << the << 882 << " Emin(keV)= " << theParameters->MinKi << 883 << " Emax(GeV)= " << theParameters->MaxKi << 884 G4Exception(ss, "em0044", JustWarning, ed); << 885 } << 886 467 887 //....oooOO0OOooo........oooOO0OOooo........oo 468 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 888 469 889 void G4VEmProcess::ProcessDescription(std::ost << 470 void G4VEmProcess::SetLambdaFactor(G4double val) 890 { 471 { 891 if(nullptr != particle) { << 472 if(val > 0.0 && val <= 1.0) lambdaFactor = val; 892 StreamInfo(out, *particle, true); << 893 } << 894 } 473 } 895 474 896 //....oooOO0OOooo........oooOO0OOooo........oo 475 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 897 476