def finish_with_systematic(self): wrp = wrappers.Wrapper(name=self.name) wrp.formula = "abs(new - old) / old" for calc in xsec_calc_name_iter(): self.calc_uncert(calc, wrp) diskio.write(wrp, settings.dir_result + "sys_uncert_result.info") settings.persistent_dict[self.name] = wrp
def finished(self): res = {} for q in result_quantities: for calc in xsec_calc_name_iter(): name = calc + "_" + q res[name] = sum( (getattr(settings.persistent_dict[t.name], name))**2 for t in self.tool_chain )**.5 self.store_result(res, "(sum( sys deviations**2 ))**.5") super(SysGroupAdd, self).finished()
def finished(self): res = {} for q in result_quantities: for calc in xsec_calc_name_iter(): name = calc + "_" + q res[name] = max( abs(getattr(settings.persistent_dict[t.name], name)) for t in self.tool_chain ) self.store_result(res, "max( sys deviations )") super(SysGroupMax, self).finished()
def prepare_for_systematic(self): if self.preparation_func: self.preparation_func() for calc in xsec_calc_name_iter(): setattr(self, calc, settings.post_proc_dict[calc])