min(couplingValues) * scale, max(couplingValues) * scale)) hists[-1].SetMarkerColor(styles[proc]["color"]) hists[-1].SetLineColor(styles[proc]["color"]) hists[-1].SetLineWidth(1) hists[-1].SetMarkerStyle(styles[p.process]["marker"]) hists[-1].GetXaxis().SetTitle(args.coupling) hists[-1].GetYaxis().SetTitle("#sigma_{NP+SM}/#sigma_{SM}") for i, cv in enumerate(couplingValues): modified_couplings = {args.coupling: cv} config = Configuration(model_name=model_name, modified_couplings=modified_couplings) logger.info("Working on process %s", p.process) p = Process(process=proc, nEvents=1, config=config) if p.hasXSec(): ratio = p.xsec() / SM_xsec[proc] else: ratio = u_float(0.) i_bin = hists[-1].FindBin(cv * scale) hists[-1].SetBinContent(i_bin, ratio.val) hists[-1].SetBinError(i_bin, ratio.sigma) hists[-1].SetStats(0) # hists[-1].Draw(printCmd) # printCmd = "e1p same" # Do the fits fits.append( ROOT.TF1("f_%s" % proc, "[0] + [1]*x + [2]*x**2", 0, len(couplingValues))) fits[-1].SetParameters(2, -1) fits[-1].SetLineWidth(2) fits[-1].SetLineStyle(1)
for x in points[comb[0]]: for y in points[comb[1]]: modified_couplings = { fixedPoints[0]: v, fixedPoints[1]: w, comb[0]: x, comb[1]: y } #logger.info("Couplings: %s", ", ".join( [ "%s=%5.4f" % c for c in modified_couplings.items()] )) # Create configuration class config = Configuration(model_name=model_name) p = Process(process=proc, nEvents=50000, config=config) if p.hasXSec(modified_couplings=modified_couplings): logger.debug( "Couplings: %s", ", ".join([ "%s=%5.4f" % c for c in modified_couplings.items() ])) xsec_val = p.xsec( modified_couplings=modified_couplings) ratio = xsec_val / SM_xsec[proc] x_list.append(x) y_list.append(y) z_list.append(ratio.val) else: ratio = u_float(-1.) config.cleanup()