298 G4cout <<
"Calling SamplingSecondaries() of G4PenelopePhotoElectricModel" <<
G4endl;
334 G4cout <<
"Selected shell " << shellIndex <<
" of element " << anElement->
GetName() <<
G4endl;
345 size_t numberOfShells = (size_t) transitionManager->
NumberOfShells(Z);
346 if (shellIndex >= numberOfShells)
347 shellIndex = numberOfShells-1;
359 bindingEnergy = 0.*
eV;
366 G4double eKineticEnergy = photonEnergy - bindingEnergy;
370 if (eKineticEnergy > 0.)
375 G4double sinTheta = std::sqrt(1-cosTheta*cosTheta);
377 G4double dirx = sinTheta * std::cos(phi);
378 G4double diry = sinTheta * std::sin(phi);
381 electronDirection.rotateUz(photonDirection);
385 fvect->push_back(electron);
388 bindingEnergy = photonEnergy;
402 size_t nBefore = fvect->size();
404 size_t nAfter = fvect->size();
406 if (nAfter > nBefore)
408 for (
size_t j=nBefore;j<nAfter;j++)
410 G4double itsEnergy = ((*fvect)[j])->GetKineticEnergy();
411 bindingEnergy -= itsEnergy;
413 energyInFluorescence += itsEnergy;
415 energyInAuger += itsEnergy;
422 localEnergyDeposit += bindingEnergy;
424 if (localEnergyDeposit < 0)
427 <<
"G4PenelopePhotoElectricModel::SampleSecondaries() - Negative energy deposit" 429 localEnergyDeposit = 0;
436 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
437 G4cout <<
"Energy balance from G4PenelopePhotoElectric" <<
G4endl;
440 G4cout <<
"Incoming photon energy: " << photonEnergy/
keV <<
" keV" <<
G4endl;
441 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
443 G4cout <<
"Outgoing electron " << eKineticEnergy/
keV <<
" keV" <<
G4endl;
444 if (energyInFluorescence)
445 G4cout <<
"Fluorescence x-rays: " << energyInFluorescence/
keV <<
" keV" <<
G4endl;
447 G4cout <<
"Auger electrons: " << energyInAuger/
keV <<
" keV" <<
G4endl;
448 G4cout <<
"Local energy deposit " << localEnergyDeposit/
keV <<
" keV" <<
G4endl;
449 G4cout <<
"Total final state: " <<
450 (eKineticEnergy+energyInFluorescence+localEnergyDeposit+energyInAuger)/
keV <<
452 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
457 std::fabs(eKineticEnergy+energyInFluorescence+localEnergyDeposit+energyInAuger-photonEnergy);
458 if (energyDiff > 0.05*
keV)
460 G4cout <<
"Warning from G4PenelopePhotoElectric: problem with energy conservation: " <<
461 (eKineticEnergy+energyInFluorescence+localEnergyDeposit+energyInAuger)/
keV 462 <<
" keV (final) vs. " <<
463 photonEnergy/
keV <<
" keV (initial)" << G4endl;
464 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
465 G4cout <<
"Energy balance from G4PenelopePhotoElectric" <<
G4endl;
468 G4cout <<
"Incoming photon energy: " << photonEnergy/
keV <<
" keV" <<
G4endl;
469 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
471 G4cout <<
"Outgoing electron " << eKineticEnergy/
keV <<
" keV" <<
G4endl;
472 if (energyInFluorescence)
473 G4cout <<
"Fluorescence x-rays: " << energyInFluorescence/
keV <<
" keV" <<
G4endl;
475 G4cout <<
"Auger electrons: " << energyInAuger/
keV <<
" keV" <<
G4endl;
476 G4cout <<
"Local energy deposit " << localEnergyDeposit/
keV <<
" keV" <<
G4endl;
477 G4cout <<
"Total final state: " <<
478 (eKineticEnergy+energyInFluorescence+localEnergyDeposit+energyInAuger)/
keV <<
480 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
const G4Material * GetMaterial() const
G4ParticleChangeForGamma * fParticleChange
static G4Electron * Definition()
const G4AtomicTransitionManager * fTransitionManager
G4double fIntrinsicLowEnergyLimit
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
static const double twopi
const G4String & GetName() const
const G4ThreeVector & GetMomentumDirection() const
G4VAtomDeexcitation * fAtomDeexcitation
void GenerateParticles(std::vector< G4DynamicParticle *> *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
size_t SelectRandomShell(G4int Z, G4double energy)
static G4Electron * Electron()
G4double BindingEnergy() const
const G4String & GetName() const
G4int NumberOfShells(G4int Z) const
static G4AtomicTransitionManager * Instance()
G4double SampleElectronDirection(G4double energy)
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
static G4Gamma * Definition()
static G4Gamma * GammaDefinition()
G4String WriteTargetShell(size_t shellID)