diff --git a/src/tally.F90 b/src/tally.F90 index 0b13dbeba4..7034b6d83c 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -62,7 +62,6 @@ contains real(8) :: uvw(3) ! particle direction type(Material), pointer :: mat type(Reaction), pointer :: rxn - real(8) :: multiplicity i = 0 SCORE_LOOP: do q = 1, t % n_user_score_bins @@ -177,7 +176,9 @@ contains ! neutrons exiting a reaction with neutrons in the exit channel if (p % event_MT == ELASTIC .or. p % event_MT == N_LEVEL .or. & (p % event_MT >= N_N1 .and. p % event_MT <= N_NC)) then - multiplicity = ONE + ! Don't waste time on very common reactions we know have multiplicities + ! of one. + score = p % last_wgt else do m = 1, nuclides(p % event_nuclide) % n_reaction ! Check if this is the desired MT @@ -188,17 +189,17 @@ contains end if end do - ! Get multiplicity + ! Get multiplicity and apply to score if (rxn % multiplicity_with_E) then - multiplicity = interpolate_tab1(rxn % multiplicity_E, p % last_E) + ! Then the multiplicity was already incorporated in to p % wgt + ! per the scattering routine, + score = p % wgt else - multiplicity = real(rxn % multiplicity,8) + ! Grab the multiplicity from the rxn + score = p % last_wgt * real(rxn % multiplicity,8) end if end if - ! Apply multiplicity to the last weight - score = p % last_wgt * multiplicity - case (SCORE_NU_SCATTER_PN) ! Only analog estimators are available. @@ -212,7 +213,9 @@ contains ! neutrons exiting a reaction with neutrons in the exit channel if (p % event_MT == ELASTIC .or. p % event_MT == N_LEVEL .or. & (p % event_MT >= N_N1 .and. p % event_MT <= N_NC)) then - multiplicity = ONE + ! Don't waste time on very common reactions we know have multiplicities + ! of one. + score = p % last_wgt else do m = 1, nuclides(p % event_nuclide) % n_reaction ! Check if this is the desired MT @@ -223,17 +226,17 @@ contains end if end do - ! Get multiplicity + ! Get multiplicity and apply to score if (rxn % multiplicity_with_E) then - multiplicity = interpolate_tab1(rxn % multiplicity_E, p % last_E) + ! Then the multiplicity was already incorporated in to p % wgt + ! per the scattering routine, + score = p % wgt else - multiplicity = real(rxn % multiplicity,8) + ! Grab the multiplicity from the rxn + score = p % last_wgt * real(rxn % multiplicity,8) end if end if - ! Apply multiplicity to the last weight - score = p % last_wgt * multiplicity - case (SCORE_NU_SCATTER_YN) ! Only analog estimators are available. @@ -247,7 +250,9 @@ contains ! neutrons exiting a reaction with neutrons in the exit channel if (p % event_MT == ELASTIC .or. p % event_MT == N_LEVEL .or. & (p % event_MT >= N_N1 .and. p % event_MT <= N_NC)) then - multiplicity = ONE + ! Don't waste time on very common reactions we know have multiplicities + ! of one. + score = p % last_wgt else do m = 1, nuclides(p % event_nuclide) % n_reaction ! Check if this is the desired MT @@ -258,17 +263,17 @@ contains end if end do - ! Get multiplicity + ! Get multiplicity and apply to score if (rxn % multiplicity_with_E) then - multiplicity = interpolate_tab1(rxn % multiplicity_E, p % last_E) + ! Then the multiplicity was already incorporated in to p % wgt + ! per the scattering routine, + score = p % wgt else - multiplicity = real(rxn % multiplicity,8) + ! Grab the multiplicity from the rxn + score = p % last_wgt * real(rxn % multiplicity,8) end if end if - ! Apply multiplicity to the last weight - score = p % last_wgt * multiplicity - case (SCORE_TRANSPORT) ! Only analog estimators are available.