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,