T2tt_obs_down.Reset() from StopsDilepton.tools.xSecSusy import xSecSusy xSecSusy_ = xSecSusy() for ix in range(T2tt_obs.GetNbinsX()): for iy in range(T2tt_obs.GetNbinsY()): mStop = T2tt_obs.GetXaxis().GetBinLowEdge(ix) mNeu = T2tt_obs.GetYaxis().GetBinLowEdge(iy) v = T2tt_obs.GetBinContent(T2tt_obs.FindBin(mStop, mNeu)) if v>0: scaleup = xSecSusy_.getXSec(channel='stop13TeV',mass=mStop,sigma=1)/xSecSusy_.getXSec(channel='stop13TeV',mass=mStop,sigma=0) scaledown = xSecSusy_.getXSec(channel='stop13TeV',mass=mStop,sigma=-1)/xSecSusy_.getXSec(channel='stop13TeV',mass=mStop,sigma=0) T2tt_obs_UL.SetBinContent(T2tt_obs.FindBin(mStop, mNeu), v*xSecSusy_.getXSec(channel='stop13TeV',mass=mStop,sigma=0)) T2tt_obs_up.SetBinContent(T2tt_obs.FindBin(mStop, mNeu), v*scaleup) T2tt_obs_down.SetBinContent(T2tt_obs.FindBin(mStop, mNeu), v*scaledown) T2tt_obs_int = interpolate(T2tt_obs) T2tt_obs_UL_int = interpolate(T2tt_obs_UL) T2tt_obs_up_int = interpolate(T2tt_obs_up) T2tt_obs_down_int = interpolate(T2tt_obs_down) T2tt_exp_int = interpolate(T2tt_exp) T2tt_exp_up_int = interpolate(T2tt_exp_up) T2tt_exp_down_int = interpolate(T2tt_exp_down) T2tt_obs_smooth = T2tt_obs_int.Clone("T2tt_obs_smooth") T2tt_obs_up_smooth = T2tt_obs_up_int.Clone("T2tt_obs_up_smooth") T2tt_obs_down_smooth = T2tt_obs_down_int.Clone("T2tt_obs_down_smooth") T2tt_exp_smooth = T2tt_exp_int.Clone("T2tt_exp_smooth") T2tt_exp_up_smooth = T2tt_exp_up_int.Clone("T2tt_exp_up_smooth") T2tt_exp_down_smooth = T2tt_exp_down_int.Clone("T2tt_exp_down_smooth") for i in range(1):
for ofilename in ofilenames: if not os.path.exists(os.path.dirname(ofilename)): os.makedirs(os.path.dirname(ofilename)) files = [] legendNames={} for f in options.filenames.split(','): if ":" in f: n,f=f.split(":") files.append(f) legendNames[f]=n contours = {} for i, f in enumerate(files): T2tt_exp = getObjFromFile(f, "T2tt_exp") T2tt_exp_int = interpolate(T2tt_exp) T2tt_exp_smooth = T2tt_exp_int.Clone("T2tt_exp_smooth") T2tt_exp_smooth.Smooth() T2tt_exp_smooth.SetName("T2tt_exp_smooth") contours_exp = getContours(T2tt_exp_smooth) contour_exp = max(contours_exp , key=lambda x:x.GetN()).Clone("contour_exp") if contours_exp else None if not contour_exp: continue cleanContour(contour_exp) contours[f]=contour_exp contours[f].SetLineColor(ROOT_colors[i]) contours[f].SetFillColor(0) contours[f].SetMarkerStyle(0) contours[f].SetMarkerColor(ROOT_colors[i]) ROOT.gStyle.SetPadRightMargin(0.15)