function getPlus_overlapRaising(nSwitches, bVal, dat) result(plusWeight)
real(dp), intent(in) :: nSwitches, bVal
type(WeightData_t), intent(in) :: dat
real(dp) :: plusWeight
character(*), parameter :: this_routine = "getPlus_overlapRaising"
ASSERT(nSwitches >= 0.0_dp)
if (near_zero(bVal)) then
plusWeight = 0.0_dp
else
!plusWeight = dat%G*(dat%zero*dat%plus + (1.0_dp - dat%F)*dat%minus) + &
! nSwitches*dat%F/bVal * (dat%minus + (1.0_dp - dat%G)*dat%plus)
plusWeight = dat%G * (dat%plus + (1.0_dp - dat%F) * dat%minus) + &
nSwitches * dat%F / bVal * (dat%minus + (1.0_dp - dat%G) * dat%plus)
end if
ASSERT(plusWeight >= 0.0_dp)
end function getPlus_overlapRaising