51 minGammaEnergy(100.*
eV),
52 minElectronEnergy(100.*
eV),
62 std::vector<G4DynamicParticle*>* vectorOfParticles;
64 vectorOfParticles =
new std::vector<G4DynamicParticle*>;
66 G4int provShellId = 0;
77 provShellId = SelectTypeOfTransition(Z, givenShellId);
83 aParticle = GenerateFluorescence(Z,givenShellId,provShellId);
86 else if ( provShellId == -1)
88 aParticle = GenerateAuger(Z, givenShellId);
93 G4Exception(
"G4RDAtomicDeexcitation::GenerateParticles()",
95 "Starting shell uncorrect: check it!");
102 provShellId = SelectTypeOfTransition(Z,newShellId);
110 aParticle = GenerateFluorescence(Z,newShellId,provShellId);
113 else if ( provShellId == -1)
115 aParticle = GenerateAuger(Z, newShellId);
120 G4Exception(
"G4RDAtomicDeexcitation::GenerateParticles()",
122 "Starting shell uncorrect: check it!");
126 if (aParticle != 0) {vectorOfParticles->push_back(aParticle);}
127 else {provShellId = -2;}
131 while (provShellId > -2);
133 return vectorOfParticles;
136 G4int G4RDAtomicDeexcitation::SelectTypeOfTransition(
G4int Z,
G4int shellId)
140 G4Exception(
"G4RDAtomicDeexcitation::SelectTypeOfTransition()",
142 "Zero or negative shellId!");
147 G4int provShellId = -1;
159 if ( shellId <= refShell->FinalShellId())
163 if(shellNum ==maxNumOfShells-1)
184 while(transProb < trSize){
188 if(partialProb <= partSum)
222 G4double newsinTh = std::sqrt(1.-newcosTh*newcosTh);
225 G4double xDir = newsinTh*std::sin(newPhi);
226 G4double yDir = newsinTh*std::cos(newPhi);
235 while (shellId != transitionManager->
236 ReachableShell(Z,shellNum)->FinalShellId())
238 if(shellNum == maxNumOfShells-1)
245 size_t transitionSize = transitionManager->
246 ReachableShell(Z,shellNum)->OriginatingShellIds().size();
252 while (provShellId != transitionManager->
253 ReachableShell(Z,shellNum)->OriginatingShellId(index))
255 if(index == transitionSize-1)
262 G4double transitionEnergy = transitionManager->
263 ReachableShell(Z,shellNum)->TransitionEnergy(index);
267 newShellId = transitionManager->
268 ReachableShell(Z,shellNum)->OriginatingShellId(index);
279 if(!fAuger)
return 0;
289 G4Exception(
"G4RDAtomicDeexcitation::GenerateAuger()",
291 "Zero or negative shellId!");
311 if ( shellId <= refAugerTransition->FinalShellId() )
316 if (shellId != pippo ) {
319 if(shellNum == maxNumOfShells)
348 G4int transitionLoopShellIndex = 0;
356 G4int transitionSize =
358 while (transitionLoopShellIndex < transitionSize) {
360 std::vector<G4int>::const_iterator
pos =
363 G4int transitionLoopShellId = *(pos+transitionLoopShellIndex);
364 G4int numberOfPossibleAuger =
366 G4int augerIndex = 0;
370 if (augerIndex < numberOfPossibleAuger) {
375 transitionLoopShellId);
379 }
while (augerIndex < numberOfPossibleAuger);
381 transitionLoopShellIndex++;
409 G4double totalVacancyAugerProbability = partSum;
413 G4int transitionRandomShellIndex = 0;
414 G4int transitionRandomShellId = 1;
415 G4int augerIndex = 0;
420 G4int numberOfPossibleAuger =
424 while (transitionRandomShellIndex < transitionSize) {
426 std::vector<G4int>::const_iterator pos =
429 transitionRandomShellId = *(pos+transitionRandomShellIndex);
432 numberOfPossibleAuger = (anAugerTransition->
433 AugerTransitionProbabilities(transitionRandomShellId))->size();
435 while (augerIndex < numberOfPossibleAuger) {
437 transitionRandomShellId);
441 if (partSum >= (partialProb*totalVacancyAugerProbability) ) {
447 if (partSum >= (partialProb*totalVacancyAugerProbability) ) {
break;}
448 transitionRandomShellIndex++;
455 if (!foundFlag) {
return 0;}
459 G4double newsinTh = std::sqrt(1.-newcosTh*newcosTh);
462 G4double xDir = newsinTh*std::sin(newPhi);
463 G4double yDir = newsinTh*std::cos(newPhi);
480 newShellId = transitionRandomShellId;
484 newElectronDirection,
499 minGammaEnergy = cut;
504 minElectronEnergy = cut;
const G4RDFluoTransition * ReachableShell(G4int Z, size_t shellIndex) const
G4double TransitionProbability(G4int index) const
G4double AugerTransitionProbability(G4int index, G4int startShellId) const
G4double AugerTransitionEnergy(G4int index, G4int startShellId) const
void SetCutForSecondaryPhotons(G4double cut)
std::vector< G4DynamicParticle * > * GenerateParticles(G4int Z, G4int shellId)
const G4DataVector & TransitionProbabilities() const
void ActivateAugerElectronProduction(G4bool val)
~G4RDAtomicDeexcitation()
const std::vector< G4int > * TransitionOriginatingShellIds() const
G4int NumberOfReachableAugerShells(G4int Z) const
G4int NumberOfReachableShells(G4int Z) const
static G4RDAtomicTransitionManager * Instance()
G4int FinalShellId() const
const G4RDAugerTransition * ReachableAugerShell(G4int Z, G4int shellIndex) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int OriginatingShellId(G4int index) const
void SetCutForAugerElectrons(G4double cut)
static G4Electron * Electron()
G4int FinalShellId() const
const G4DataVector * AugerTransitionProbabilities(G4int startShellId) const