506 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeIonisationModel" <<
G4endl;
539 G4Exception(
"G4PenelopeIonisationModel::SamplingSecondaries()",
547 G4cout <<
"G4PenelopeIonisationModel::SamplingSecondaries() for " <<
559 G4double dirx = sint * std::cos(phiPrimary);
560 G4double diry = sint * std::sin(phiPrimary);
564 electronDirection1.rotateUz(particleDirection0);
576 G4double ionEnergyInPenelopeDatabase =
591 if (Z > 0 && shFlag<30)
593 shell = transitionManager->
Shell(Z,shFlag-1);
603 G4double localEnergyDeposit = bindingEnergy;
628 size_t nBefore = fvect->size();
630 size_t nAfter = fvect->size();
632 if (nAfter > nBefore)
634 for (
size_t j=nBefore;j<nAfter;j++)
636 G4double itsEnergy = ((*fvect)[j])->GetKineticEnergy();
637 localEnergyDeposit -= itsEnergy;
639 energyInFluorescence += itsEnergy;
641 energyInAuger += itsEnergy;
653 G4double xEl = sinThetaE * std::cos(phiEl);
654 G4double yEl = sinThetaE * std::sin(phiEl);
657 eDirection.rotateUz(particleDirection0);
660 fvect->push_back(electron);
668 if (localEnergyDeposit < 0)
671 <<
"G4PenelopeIonisationModel::SampleSecondaries - Negative energy deposit" 673 localEnergyDeposit=0.;
679 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
680 G4cout <<
"Energy balance from G4PenelopeIonisation" <<
G4endl;
681 G4cout <<
"Incoming primary energy: " << kineticEnergy0/
keV <<
" keV" <<
G4endl;
682 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
685 if (energyInFluorescence)
686 G4cout <<
"Fluorescence x-rays: " << energyInFluorescence/
keV <<
" keV" <<
G4endl;
688 G4cout <<
"Auger electrons: " << energyInAuger/
keV <<
" keV" <<
G4endl;
689 G4cout <<
"Local energy deposit " << localEnergyDeposit/
keV <<
" keV" <<
G4endl;
691 localEnergyDeposit+energyInAuger)/
keV <<
693 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
699 localEnergyDeposit+energyInAuger-kineticEnergy0);
700 if (energyDiff > 0.05*
keV)
701 G4cout <<
"Warning from G4PenelopeIonisation: problem with energy conservation: " <<
703 " keV (final) vs. " <<
704 kineticEnergy0/
keV <<
" keV (initial)" << G4endl;
G4double cosThetaSecondary
G4VAtomDeexcitation * fAtomDeexcitation
G4PenelopeOscillatorTable * GetOscillatorTableIonisation(const G4Material *)
G4bool CheckDeexcitationActiveRegion(G4int coupleIndex)
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
std::ostringstream G4ExceptionDescription
const G4Material * GetMaterial() const
void SampleFinalStateElectron(const G4Material *, G4double cutEnergy, G4double kineticEnergy)
G4PenelopeOscillatorManager * oscManager
static G4Electron * Definition()
G4double fIntrinsicLowEnergyLimit
G4double GetKineticEnergy() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static const double twopi
G4ParticleChangeForLoss * fParticleChange
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4Positron * Positron()
const G4ThreeVector & GetMomentumDirection() const
void GenerateParticles(std::vector< G4DynamicParticle *> *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
static G4Electron * Electron()
G4ParticleDefinition * GetDefinition() const
G4double BindingEnergy() const
void SampleFinalStatePositron(const G4Material *, G4double cutEnergy, G4double kineticEnergy)
static G4AtomicTransitionManager * Instance()
static G4Gamma * Definition()