281{
283 if (verboseLevel > 3) {
284 G4cout <<
"G4LivermorePhotoElectricModel::SampleSecondaries() Egamma(keV)= "
285 << gammaEnergy/keV <<
G4endl;
286 }
287
288
291
292
294 if(fWater && (material == fWater ||
296 if(gammaEnergy <= fWaterEnergyLimit) {
298 return;
299 }
300 }
301
302
304
305
306
309
310
311
312
313
314 if(Z >= maxZ) { Z = maxZ-1; }
315
316
317 if(!fCrossSection[Z]) {
319 return;
320 }
321
322
323 size_t shellIdx = 0;
324 size_t nn = fNShellsUsed[Z];
325 if(nn > 1)
326 {
327 if(gammaEnergy >= (*(fParamHigh[Z]))[0])
328 {
335
336
337
339 G4double cs0 = rand*( (*(fParamHigh[Z]))[idx]
340 + x1*(*(fParamHigh[Z]))[idx+1]
341 + x2*(*(fParamHigh[Z]))[idx+2]
342 + x3*(*(fParamHigh[Z]))[idx+3]
343 + x4*(*(fParamHigh[Z]))[idx+4]
344 + x5*(*(fParamHigh[Z]))[idx+5]);
345
346 for(shellIdx=0; shellIdx<
nn; ++shellIdx)
347 {
348 idx = shellIdx*7 + 2;
349 if(gammaEnergy > (*(fParamHigh[Z]))[idx-1])
350 {
352 (*(fParamHigh[Z]))[idx]
353 + x1*(*(fParamHigh[Z]))[idx+1]
354 + x2*(*(fParamHigh[Z]))[idx+2]
355 + x3*(*(fParamHigh[Z]))[idx+3]
356 + x4*(*(fParamHigh[Z]))[idx+4]
357 + x5*(*(fParamHigh[Z]))[idx+5];
358
359 if(cs >= cs0) { break; }
360 }
361 }
362 if(shellIdx >= nn) { shellIdx =
nn-1; }
363 }
364 else if(gammaEnergy >= (*(fParamLow[Z]))[0])
365 {
372
373
375 + x1*(*(fParamLow[Z]))[idx+1]
376 + x2*(*(fParamLow[Z]))[idx+2]
377 + x3*(*(fParamLow[Z]))[idx+3]
378 + x4*(*(fParamLow[Z]))[idx+4]
379 + x5*(*(fParamLow[Z]))[idx+5]);
380 for(shellIdx=0; shellIdx<
nn; ++shellIdx)
381 {
382 idx = shellIdx*7 + 2;
383 if(gammaEnergy > (*(fParamLow[Z]))[idx-1])
384 {
385 G4double cs = (*(fParamLow[Z]))[idx] + x1*(*(fParamLow[Z]))[idx+1]
386 + x2*(*(fParamLow[Z]))[idx+2] + x3*(*(fParamLow[Z]))[idx+3]
387 + x4*(*(fParamLow[Z]))[idx+4]+ x5*(*(fParamLow[Z]))[idx+5];
388 if(cs >= cs0) { break; }
389 }
390 }
391 if(shellIdx >= nn) {shellIdx =
nn-1;}
392 }
393 else
394 {
395
396
398
399 if(gammaEnergy >= (*(fParamHigh[Z]))[1]) {
400
401 cs*= (fCrossSection[Z])->
Value(gammaEnergy);
402 }
403 else
404 {
405
406 cs *= (fCrossSectionLE[Z])->
Value(gammaEnergy);
407 }
408
409 for(
size_t j=0; j<
nn; ++j) {
410
412 if(gammaEnergy > (*(fParamLow[Z]))[7*shellIdx+1]) {
414 }
415 if(cs <= 0.0 || j+1 == nn) {break;}
416 }
417 }
418 }
419
420
422
423
424
425
426
428
429
430 if(fDeexcitationActive && shellIdx + 1 < nn) {
433 }
434
435
436
437 if(gammaEnergy < bindingEnergy) {
439 return;
440 }
441
442
445
446
449 eKineticEnergy,
450 shellIdx,
452
453
455 electronDirection,
456 eKineticEnergy);
457 fvect->push_back(electron);
458
459
460 if(shell) {
463 G4int nbefore = fvect->size();
464
466 G4int nafter = fvect->size();
467 if(nafter > nbefore) {
469 for (
G4int j=nbefore; j<nafter; ++j) {
470
471 G4double e = ((*fvect)[j])->GetKineticEnergy();
472 if(esec + e > edep) {
473
474 e = edep - esec;
475 ((*fvect)[j])->SetKineticEnergy(e);
476 esec += e;
477
478 for (
G4int jj=nafter-1; jj>j; --jj) {
479 delete (*fvect)[jj];
480 fvect->pop_back();
481 }
482 break;
483 }
484 esec += e;
485 }
486 edep -= esec;
487 }
488 }
489 }
490
491 if(edep > 0.0) {
493 }
494}
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetComponentID(G4int Z, size_t idx)
G4double GetValueForComponent(G4int Z, size_t idx, G4double kinEnergy)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4VEmAngularDistribution * GetAngularDistribution()
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)