limitHistos = rt.TFile.Open('T2tt-plots-0.root') limit = limitHistos.Get('Limits') susyNLO = limit.Clone('susyNLO') susyNLO.Reset() crossSec = rt.TFile.Open('referenceXSecs.root') stop = crossSec.Get('stop') #rt.gROOT.Macro('/Users/wreece/Downloads/SMS_30_04_12/INCL/T2tt/sigma_limit_HAD.C') #rt.gROOT.Macro('/Users/wreece/Downloads/SMS_30_04_12/INCL/T2tt/sigma_limit_combined.C') #rt.gROOT.Macro('/Users/wreece/Downloads/SMS_30_04_12/BJET/T2tt/sigma_limit_combined.C') rt.gROOT.Macro('/Users/wreece/Downloads/SMS_30_04_12/BJET/T2tt/sigma_limit_HAD.C') incHad = rt.gDirectory.Get('plot_me_13') for point in sorted(norms.keys()): #we exclude if xsec is less than th xs = getBinContent(limit, point[0], point[1]) inc = getBinContent(incHad, point[0], point[1]) th = getBinContent1D(stop,point[0]) if xs < inc: print point, xs, inc, th setBinContent(susyNLO, point[0], point[1], xs/inc) else: setBinContent(susyNLO, point[0], point[1], 1e-4) limitFile = rt.TFile.Open('T2tt-Inc-ratio.root','recreate') susyNLO.Write() limitFile.Close()
susyNLO = limit.Clone('susyNLO') susyNLO.Reset() susyNLOThree = limit.Clone('susyNLOThree') susyNLOThree.Reset() susyNLOThird = limit.Clone('susyNLOThird') susyNLOThird.Reset() crossSec = rt.TFile.Open('referenceXSecs.root') stop = crossSec.Get('stop') for point in sorted(norms.keys()): #we exclude if xsec is less than th xs = getBinContent(limit, point[0], point[1]) th = getBinContent1D(stop,point[0]) def changePlot(plot, t, x): excluded = (t >= x) if True: setBinContent(plot, point[0], point[1], t/x) changePlot(susyNLO,th,xs) changePlot(susyNLOThree,3*th,xs) changePlot(susyNLOThird,0.33333*th, xs) limitFile = rt.TFile.Open('T2tt-SUSY-limit.root','recreate') susyNLO.Write() susyNLOThree.Write() susyNLOThird.Write() limitFile.Close()