Skip to content

Commit

Permalink
Updata cascade schemes.
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenJAC committed Oct 30, 2023
1 parent 676d9a2 commit 217c961
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 9 deletions.
8 changes: 6 additions & 2 deletions src/module-Cascade-inc-computations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@
linesA::Array{AutoIonization.Line,1}, settings::DecayYield.Settings)
# Identify the level key of the given level also in the lists of radiative and Auger lines
level = outcome.level; levelKey = LevelKey( LevelSymmetry(level.J, level.parity), level.index, level.energy, 0.)
@show levelKey
similarKey = LevelKey(); rateR = 0.; rateA = 0.; NoPhotonLines = 0; NoAugerLines = 0
for line in linesR
compareKey = LevelKey( LevelSymmetry(line.initialLevel.J, line.initialLevel.parity), line.initialLevel.index, line.initialLevel.energy, 0.)
@show compareKey
if Basics.isSimilar(levelKey, compareKey, 1.0e-3) println("** compareKey = $compareKey"); similarKey = deepcopy(compareKey) end
end
if similarKey == LevelKey() error("No similar level found !") end
Expand Down Expand Up @@ -369,7 +371,8 @@
if rProbabilities[subsh] == 0. continue end
idy = Cascade.dumpGeant4Index(subsh)
sa = "$idy "; sa = sa[1:13] * @sprintf("%.6e", rProbabilities[subsh])
en = Defaults.convertUnits("energy: from atomic to eV", subshEnergies[subsh]) * 1.0e-6 ## energies in MeV
en = subshEnergies[holeSubshell] - subshEnergies[subsh]
en = Defaults.convertUnits("energy: from atomic to eV", en) * 1.0e-6 ## energies in MeV
sa = sa * " " * @sprintf("%.6e", abs(en)); println(stream, sa)
end
end
Expand Down Expand Up @@ -408,7 +411,8 @@
if aProbabilities[(subsha, subshb)] == 0. continue end
ida = Cascade.dumpGeant4Index(subsha); idb = Cascade.dumpGeant4Index(subshb)
sa = "$ida $idb "; sa = sa[1:26] * @sprintf("%.6e", aProbabilities[(subsha, subshb)])
en = Defaults.convertUnits("energy: from atomic to eV", subshEnergies[subsha]) * 1.0e-6 ## energies in MeV
en = subshEnergies[holeSubshell] - subshEnergies[subsha] - subshEnergies[subshb]
en = Defaults.convertUnits("energy: from atomic to eV", en) * 1.0e-6 ## energies in MeV
sa = sa * " " * @sprintf("%.6e", abs(en)); println(stream, sa)
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/module-Cascade-inc-stepwise-decay.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"giving now rise to a total of $nt $(string(step.process)) decay lines." ) end
end
#
data = Cascade.DecayData(linesR, linesA)
data = ( Cascade.Data{PhotoEmission.Line}(linesR), Cascade.Data{AutoIonization.Line}(linesA) )
end


Expand Down
5 changes: 2 additions & 3 deletions src/module-DecayYield.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,12 @@ module DecayYield
wa = Cascade.Computation(Cascade.Computation(), name="photon lines", nuclearModel=nm, grid=grid, asfSettings=asfSettings,
scheme=Cascade.StepwiseDecayScheme([Radiative()], 0, Dict{Int64,Float64}(), 0, decayShells, Shell[], Shell[]),
approach=cApproach, initialConfigs=initialConfigs)
@show wa
wb = perform(wa, output=true, outputToFile=false); linesR = wb["decay line data:"].linesR
wb = perform(wa, output=true, outputToFile=false); linesR = wb["decay line data:"][1].lines
println("\nPerform a cascade computation for all (single-electron) Auger decay channels of the levels from the initial configurations:")
wa = Cascade.Computation(Cascade.Computation(), name="Auger lines", nuclearModel=nm, grid=grid, asfSettings=asfSettings,
scheme=Cascade.StepwiseDecayScheme([Auger()], 1, Dict{Int64,Float64}(), 0, decayShells, Shell[], Shell[]),
approach=cApproach, initialConfigs=initialConfigs)
wb = perform(wa, output=true, outputToFile=false); linesA = wb["decay line data:"].linesA
wb = perform(wa, output=true, outputToFile=false); linesA = wb["decay line data:"][2].lines
#
# Calculate all amplitudes and requested properties
newOutcomes = DecayYield.Outcome[]
Expand Down
Loading

0 comments on commit 217c961

Please sign in to comment.