added role-by-role SW calculation to AnalysisScript