284{
286 if (verboseLevel > 3) {
287 G4cout <<
"G4LivermorePhotoElectricModel::SampleSecondaries() Egamma(keV)= "
288 << gammaEnergy / keV <<
G4endl;
289 }
290
291
294
295
297 if (fWater && (material == fWater || material->
GetBaseMaterial() == fWater)) {
298 if (gammaEnergy <= fWaterEnergyLimit) {
300 return;
301 }
302 }
303
304
306
307
310
311
312
313
314
317 return;
318 }
319
320
321 std::size_t shellIdx = 0;
322 std::size_t
nn = fNShellsUsed[Z];
323 if (nn > 1) {
324 if (gammaEnergy >= (*(fParamHigh[Z]))[0]) {
330 std::size_t idx =
nn * 7 - 5;
331
332
333
336 ((*(fParamHigh[Z]))[idx] + x1 * (*(fParamHigh[Z]))[idx + 1]
337 + x2 * (*(fParamHigh[Z]))[idx + 2] + x3 * (*(fParamHigh[Z]))[idx + 3]
338 + x4 * (*(fParamHigh[Z]))[idx + 4] + x5 * (*(fParamHigh[Z]))[idx + 5]);
339
340 for (shellIdx = 0; shellIdx <
nn; ++shellIdx) {
341 idx = shellIdx * 7 + 2;
342 if (gammaEnergy > (*(fParamHigh[Z]))[idx - 1]) {
343 G4double cs = (*(fParamHigh[Z]))[idx] + x1 * (*(fParamHigh[Z]))[idx + 1]
344 + x2 * (*(fParamHigh[Z]))[idx + 2] + x3 * (*(fParamHigh[Z]))[idx + 3]
345 + x4 * (*(fParamHigh[Z]))[idx + 4] + x5 * (*(fParamHigh[Z]))[idx + 5];
346
347 if (cs >= cs0) {
348 break;
349 }
350 }
351 }
352 if (shellIdx >= nn) {
354 }
355 }
356 else if (gammaEnergy >= (*(fParamLow[Z]))[0]) {
362 std::size_t idx =
nn * 7 - 5;
363
364
366 ((*(fParamLow[Z]))[idx] + x1 * (*(fParamLow[Z]))[idx + 1]
367 + x2 * (*(fParamLow[Z]))[idx + 2] + x3 * (*(fParamLow[Z]))[idx + 3]
368 + x4 * (*(fParamLow[Z]))[idx + 4] + x5 * (*(fParamLow[Z]))[idx + 5]);
369 for (shellIdx = 0; shellIdx <
nn; ++shellIdx) {
370 idx = shellIdx * 7 + 2;
371 if (gammaEnergy > (*(fParamLow[Z]))[idx - 1]) {
372 G4double cs = (*(fParamLow[Z]))[idx] + x1 * (*(fParamLow[Z]))[idx + 1]
373 + x2 * (*(fParamLow[Z]))[idx + 2] + x3 * (*(fParamLow[Z]))[idx + 3]
374 + x4 * (*(fParamLow[Z]))[idx + 4] + x5 * (*(fParamLow[Z]))[idx + 5];
375 if (cs >= cs0) {
376 break;
377 }
378 }
379 }
380 if (shellIdx >= nn) {
382 }
383 }
384 else {
385
386
388
389 if (gammaEnergy >= (*(fParamHigh[Z]))[1]) {
390
392 }
393 else {
394
396 }
397
400 if (gammaEnergy > (*(fParamLow[Z]))[7 * shellIdx + 1]) {
402 }
403 if (cs <= 0.0 || j + 1 == (
G4int)nn) {
404 break;
405 }
406 }
407 }
408 }
409
410
413
414
415 if (fDeexcitationActive && shellIdx + 1 < nn) {
418 }
419
420
421
422 if (gammaEnergy < bindingEnergy) {
424 return;
425 }
426
427
430
431
434
435
438 fvect->push_back(electron);
439
440
441 if (nullptr != shell) {
444 std::size_t nbefore = fvect->size();
445
447 std::size_t nafter = fvect->size();
448 if (nafter > nbefore) {
450 for (std::size_t j = nbefore; j < nafter; ++j) {
451 G4double e = ((*fvect)[j])->GetKineticEnergy();
452 if (esec + e > edep) {
453
454 e = edep - esec;
455 ((*fvect)[j])->SetKineticEnergy(e);
456 esec += e;
457
458 for (std::size_t jj = nafter - 1; jj > j; --jj) {
459 delete (*fvect)[jj];
460 fvect->pop_back();
461 }
462 break;
463 }
464 esec += e;
465 }
466 edep -= esec;
467 }
468 }
469 }
470
471 if (edep > 0.0) {
473 }
474}
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetComponentID(G4int Z, std::size_t idx) const
G4double GetValueForComponent(G4int Z, std::size_t idx, G4double kinEnergy) const
const G4Material * GetMaterial() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double Value(const G4double energy, std::size_t &lastidx) const
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)