86 transitionManager = 0;
93 delete anaPIXEshellCS;
103 G4cout <<
"### === G4UAtomicDeexcitation::InitialiseForNewRun()" <<
G4endl;
130 G4cout <<
"### G4UAtomicDeexcitation::InitialiseForNewRun WARNING "
133 <<
" is unknown, Analytical cross section will be used" <<
G4endl;
184 G4cout <<
"### G4UAtomicDeexcitation::InitialiseForNewRun WARNING "
187 <<
" is unknown, PIXE is disabled" <<
G4endl;
230 return transitionManager->
Shell(Z,
size_t(shell));
234 std::vector<G4DynamicParticle*>* vectorOfParticles,
244 minGammaEnergy = gammaCut;
245 minElectronEnergy = eCut;
252 G4int provShellId = 0;
267 provShellId = SelectTypeOfTransition(Z, givenShellId);
271 aParticle = GenerateFluorescence(Z,givenShellId,provShellId);
274 else if ( provShellId == -1)
277 aParticle = GenerateAuger(Z, givenShellId);
282 G4Exception(
"G4UAtomicDeexcitation::GenerateParticles()",
"de0002",
JustWarning,
"Energy deposited locally");
289 provShellId = SelectTypeOfTransition(Z,newShellId);
292 aParticle = GenerateFluorescence(Z,newShellId,provShellId);
295 else if ( provShellId == -1)
298 aParticle = GenerateAuger(Z, newShellId);
303 G4Exception(
"G4UAtomicDeexcitation::GenerateParticles()",
"de0002",
JustWarning,
"Energy deposited locally");
309 vectorOfParticles->push_back(aParticle);
312 else {provShellId = -2;}
314 while (provShellId > -2);
318 G4Exception(
"G4UAtomicDeexcitation::GenerateParticles()",
"de0001",
JustWarning,
"Energy deposited locally");
339 if(Z > 93 || Z < 6 ) {
return xsec; }
344 if(pdef == theElectron || pdef == thePositron) {
345 xsec = ePIXEshellCS->
CrossSection(Z,shellEnum,kineticEnergy,0.0,mat);
357 escaled = kineticEnergy*mass/(pdef->
GetPDGMass());
367 if(PIXEshellCS) { xsec = PIXEshellCS->
CrossSection(Z,shellEnum,escaled,mass,mat); }
370 xsec = anaPIXEshellCS->
CrossSection(Z,shellEnum,escaled,mass,mat);
374 if (q2) {xsec *= q2;}
381 minGammaEnergy = cut;
386 minElectronEnergy = cut;
403 G4Exception(
"G4UAtomicDeexcitation::SelecttypeOfTransition()",
"de0002",
JustWarning,
"Energy deposited locally");
408 G4int provShellId = -1;
417 if ( shellId <= refShell->FinalShellId())
421 if(shellNum ==maxNumOfShells-1)
442 while(transProb < trSize){
446 if(partialProb <= partSum)
469 G4UAtomicDeexcitation::GenerateFluorescence(
G4int Z,
G4int shellId,
478 G4Exception(
"G4UAtomicDeexcitation::GenerateFluorescence()",
"de0002",
JustWarning,
"Energy deposited locally");
485 G4double newsinTh = std::sqrt((1.-newcosTh)*(1. + newcosTh));
488 G4double xDir = newsinTh*std::sin(newPhi);
489 G4double yDir = newsinTh*std::cos(newPhi);
498 while (shellId != transitionManager->
499 ReachableShell(Z,shellNum)->FinalShellId())
501 if(shellNum == maxNumOfShells-1)
508 size_t transitionSize = transitionManager->
509 ReachableShell(Z,shellNum)->OriginatingShellIds().size();
515 while (provShellId != transitionManager->
516 ReachableShell(Z,shellNum)->OriginatingShellId(index))
518 if(index == transitionSize-1)
525 G4double transitionEnergy = transitionManager->
526 ReachableShell(Z,shellNum)->TransitionEnergy(index);
528 if (transitionEnergy < minGammaEnergy)
return 0;
532 newShellId = transitionManager->
533 ReachableShell(Z,shellNum)->OriginatingShellId(index);
570 if ( shellId <= refAugerTransition->FinalShellId() )
575 if (shellId != pippo ) {
578 if(shellNum == maxNumOfShells)
595 G4int transitionLoopShellIndex = 0;
603 G4int transitionSize =
605 while (transitionLoopShellIndex < transitionSize) {
607 std::vector<G4int>::const_iterator
pos =
610 G4int transitionLoopShellId = *(pos+transitionLoopShellIndex);
611 G4int numberOfPossibleAuger =
613 G4int augerIndex = 0;
617 if (augerIndex < numberOfPossibleAuger) {
622 transitionLoopShellId);
626 }
while (augerIndex < numberOfPossibleAuger);
628 transitionLoopShellIndex++;
656 G4double totalVacancyAugerProbability = partSum;
660 G4int transitionRandomShellIndex = 0;
661 G4int transitionRandomShellId = 1;
662 G4int augerIndex = 0;
667 G4int numberOfPossibleAuger = 0;
671 while (transitionRandomShellIndex < transitionSize) {
673 std::vector<G4int>::const_iterator pos =
676 transitionRandomShellId = *(pos+transitionRandomShellIndex);
679 numberOfPossibleAuger = (anAugerTransition->
680 AugerTransitionProbabilities(transitionRandomShellId))->size();
682 while (augerIndex < numberOfPossibleAuger) {
684 transitionRandomShellId);
688 if (partSum >= (partialProb*totalVacancyAugerProbability) ) {
694 if (partSum >= (partialProb*totalVacancyAugerProbability) ) {
break;}
695 transitionRandomShellIndex++;
710 G4double newsinTh = std::sqrt(1.-newcosTh*newcosTh);
713 G4double xDir = newsinTh*std::sin(newPhi);
714 G4double yDir = newsinTh*std::cos(newPhi);
729 if (transitionEnergy < minElectronEnergy) {
738 newShellId = transitionRandomShellId;
741 newElectronDirection,
G4double AugerTransitionProbability(G4int index, G4int startShellId) const
void SetPIXEElectronCrossSectionModel(const G4String &)
static G4LossTableManager * Instance()
G4bool IsFluoActive() const
virtual G4double GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)
G4bool IsPIXEActive() const
const G4AugerTransition * ReachableAugerShell(G4int Z, G4int shellIndex) const
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4int NumberOfReachableShells(G4int Z) const
virtual void InitialiseForExtraAtom(G4int Z)
const G4String & GetName() const
G4double AugerTransitionEnergy(G4int index, G4int startShellId) const
void SetPIXECrossSectionModel(const G4String &)
const G4DataVector & TransitionProbabilities() const
virtual G4double ComputeShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=0)
const G4String & GetParticleName() const
G4bool IsAugerActive() const
G4int FinalShellId() const
G4int OriginatingShellId(G4int index) const
const G4String & PIXEElectronCrossSectionModel() const
virtual void InitialiseForNewRun()
void SetCutForSecondaryPhotons(G4double cut)
G4GLOB_DLL std::ostream G4cout
void SetCutForAugerElectrons(G4double cut)
G4EmCorrections * EmCorrections()
G4int NumberOfReachableAugerShells(G4int Z) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)
static G4Positron * Positron()
G4double GetPDGMass() const
G4double TransitionProbability(G4int index) const
const G4FluoTransition * ReachableShell(G4int Z, size_t shellIndex) const
static G4Electron * Electron()
const std::vector< G4int > * TransitionOriginatingShellIds() const
const G4String & PIXECrossSectionModel() const
virtual void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4double gammaCut, G4double eCut)
virtual ~G4UAtomicDeexcitation()
const G4DataVector * AugerTransitionProbabilities(G4int startShellId) const
G4double GetPDGCharge() const
G4int FinalShellId() const
static G4AtomicTransitionManager * Instance()
virtual G4double CrossSection(G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat)=0
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
static G4int GetNumberOfShells(G4int Z)