|
ra4_macros
bede988c286599a3a84b77a4d788ac0a971e89f9
|
Functions | |
| def | get_weighted_entries (chain, cuts) |
Variables | |
| tuple | parser = argparse.ArgumentParser() |
| tuple | args = parser.parse_args() |
| topo = args.topology | |
| outdir = args.babydir | |
| tuple | minnum = int(args.first) |
| tuple | maxnum = int(args.last) |
| skipcalc = True | |
| infile = args.input | |
| outfile = args.outfilename | |
| tuple | bdir = os.getcwd() |
| float | lumi = 2.3 |
| tuple | masspoints = set([x.split(topo+"_").pop().split("_Tune")[0] for x in glob.glob(outdir+"/baby_SMS-"+topo+"*.root")]) |
| With the fake dataset names: More... | |
| tuple | npoints = len(masspoints) |
| list | bg = [3.5,0.5,2.7,0.5,0.8,0.1,1.3,0.3,0.5,0.1] |
| list | bindefs = ["njets<=8&&nbm==1&&met<=400","njets>=9&&nbm==1&&met<=400","njets<=8&&nbm==2&&met<=400","njets>=9&&nbm==2&&met<=400","njets<=8&&nbm>=3&&met<=400","njets>=9&&nbm>=3&&met<=400","njets<=8&&nbm==1&&met>400","njets>=9&&nbm==1&&met>400","njets<=8&&nbm>=2&&met>400","njets>=9&&nbm>=2&&met>400"] |
| list | cosmeticbindefs = [cut.replace("<="," #leq ").replace(">="," #geq ").replace(">"," > ").replace("=="," = ").replace("&&",", ").replace("met", "MET").replace("ht", "H_{T}").replace("njets","n_{jets}").replace("nleps","n_{lep}").replace("nbm","n_{b}") for cut in bindefs] |
| list | glumass = [] |
| list | lspmass = [] |
| list | effs = [[] for i in range(2+len(bindefs))] |
| list | yields = [[] for i in range(2+len(bindefs))] |
| int | sofar = 0 |
| tuple | ch = ROOT.TChain("tree") |
| if sofar>10: continue More... | |
| tuple | glu = float(m.split("mGluino-").pop().split("_")[0]) |
| tuple | lsp = float(m.split("mLSP-").pop().split("_")[0]) |
| int | tot = 1000 |
| tuple | reg4 = float(get_weighted_entries(ch,"mj>400&&mt>140")) |
| tuple | reg3 = float(get_weighted_entries(ch,"mj<=400&&mt>140")) |
| tuple | num = float(get_weighted_entries(ch,"mj>400&&mt>140&&"+cut)) |
| tuple | outputFile = ROOT.TFile("plots/maps/"+outfile+".root","recreate") |
| list | graphs = [] |
| list | hist = graphs[-1] |
| tuple | val1 = hist.GetBinContent(hist.FindBin(700,0)) |
| tuple | val2 = hist.GetBinContent(hist.FindBin(600,100)) |
| list | graphTitles = [] |
| Get histograms from root file to allow reading of input to use same code for original calculation and cosmetic re-runs. More... | |
| int | maxfrac = 0 |
| int | maxyield = 0 |
| tuple | graph = outputFile.Get(name) |
| tuple | frame = ROOT.TH2F("frame","",100,700,1950,152,0,1450) |
| tuple | npx = int((1950-700)/17.68) |
| tuple | npy = int(1450/17.68) |
| tuple | c = ROOT.TCanvas() |
| tuple | tla = ROOT.TLatex() |
| string | outname = outfile+"efficiency_" |
| def efficiency_map.get_weighted_entries | ( | chain, | |
| cuts | |||
| ) |
Definition at line 23 of file efficiency_map.py.
| tuple efficiency_map.args = parser.parse_args() |
Definition at line 21 of file efficiency_map.py.
| tuple efficiency_map.bdir = os.getcwd() |
Definition at line 101 of file efficiency_map.py.
| list efficiency_map.bg = [3.5,0.5,2.7,0.5,0.8,0.1,1.3,0.3,0.5,0.1] |
Definition at line 124 of file efficiency_map.py.
| list efficiency_map.bindefs = ["njets<=8&&nbm==1&&met<=400","njets>=9&&nbm==1&&met<=400","njets<=8&&nbm==2&&met<=400","njets>=9&&nbm==2&&met<=400","njets<=8&&nbm>=3&&met<=400","njets>=9&&nbm>=3&&met<=400","njets<=8&&nbm==1&&met>400","njets>=9&&nbm==1&&met>400","njets<=8&&nbm>=2&&met>400","njets>=9&&nbm>=2&&met>400"] |
Definition at line 127 of file efficiency_map.py.
| tuple efficiency_map.c = ROOT.TCanvas() |
Definition at line 306 of file efficiency_map.py.
Referenced by DrawPie(), gsl_ran_gamma(), main(), and styles.testGlobalStyle().
| tuple efficiency_map.ch = ROOT.TChain("tree") |
if sofar>10: continue
Definition at line 143 of file efficiency_map.py.
Referenced by makeCSVHist(), and outputHistograms().
| list efficiency_map.cosmeticbindefs = [cut.replace("<="," #leq ").replace(">="," #geq ").replace(">"," > ").replace("=="," = ").replace("&&",", ").replace("met", "MET").replace("ht", "H_{T}").replace("njets","n_{jets}").replace("nleps","n_{lep}").replace("nbm","n_{b}") for cut in bindefs] |
Definition at line 128 of file efficiency_map.py.
| list efficiency_map.effs = [[] for i in range(2+len(bindefs))] |
Definition at line 132 of file efficiency_map.py.
| tuple efficiency_map.frame = ROOT.TH2F("frame","",100,700,1950,152,0,1450) |
Definition at line 274 of file efficiency_map.py.
| tuple efficiency_map.glu = float(m.split("mGluino-").pop().split("_")[0]) |
Definition at line 149 of file efficiency_map.py.
| list efficiency_map.glumass = [] |
Definition at line 130 of file efficiency_map.py.
| tuple efficiency_map.graph = outputFile.Get(name) |
Definition at line 264 of file efficiency_map.py.
Referenced by MakeROC(), and plotKappa().
| list efficiency_map.graphs = [] |
Definition at line 193 of file efficiency_map.py.
Referenced by DrawROC(), and MakeGraph().
| list efficiency_map.graphTitles = [] |
Get histograms from root file to allow reading of input to use same code for original calculation and cosmetic re-runs.
Definition at line 238 of file efficiency_map.py.
| list efficiency_map.hist = graphs[-1] |
Definition at line 214 of file efficiency_map.py.
Referenced by main(), and outputHistograms().
| efficiency_map.infile = args.input |
Definition at line 71 of file efficiency_map.py.
Referenced by GetVariables(), and main().
| tuple efficiency_map.lsp = float(m.split("mLSP-").pop().split("_")[0]) |
Definition at line 150 of file efficiency_map.py.
Referenced by do_MJ_validation(), doN1_R4(), doSignal(), main(), plot_distributions(), and plotROC().
| list efficiency_map.lspmass = [] |
Definition at line 131 of file efficiency_map.py.
| float efficiency_map.lumi = 2.3 |
Definition at line 103 of file efficiency_map.py.
Referenced by getYields(), and main().
| tuple efficiency_map.masspoints = set([x.split(topo+"_").pop().split("_Tune")[0] for x in glob.glob(outdir+"/baby_SMS-"+topo+"*.root")]) |
With the fake dataset names:
Definition at line 115 of file efficiency_map.py.
| int efficiency_map.maxfrac = 0 |
Definition at line 259 of file efficiency_map.py.
| tuple efficiency_map.maxnum = int(args.last) |
Definition at line 61 of file efficiency_map.py.
| int efficiency_map.maxyield = 0 |
Definition at line 260 of file efficiency_map.py.
| tuple efficiency_map.minnum = int(args.first) |
Definition at line 57 of file efficiency_map.py.
| tuple efficiency_map.npoints = len(masspoints) |
Definition at line 120 of file efficiency_map.py.
Referenced by MakePlots().
| tuple efficiency_map.npx = int((1950-700)/17.68) |
Definition at line 285 of file efficiency_map.py.
| tuple efficiency_map.npy = int(1450/17.68) |
Definition at line 286 of file efficiency_map.py.
| tuple efficiency_map.num = float(get_weighted_entries(ch,"mj>400&&mt>140&&"+cut)) |
Definition at line 180 of file efficiency_map.py.
Referenced by errorFun(), main(), MakePlots(), plot_distributions(), and RoundNumber().
| string efficiency_map.outdir = args.babydir |
Definition at line 39 of file efficiency_map.py.
| efficiency_map.outfile = args.outfilename |
Definition at line 77 of file efficiency_map.py.
| string efficiency_map.outname = outfile+"efficiency_" |
Definition at line 339 of file efficiency_map.py.
Referenced by main().
| tuple efficiency_map.outputFile = ROOT.TFile("plots/maps/"+outfile+".root","recreate") |
Definition at line 191 of file efficiency_map.py.
| tuple efficiency_map.parser = argparse.ArgumentParser() |
Definition at line 14 of file efficiency_map.py.
| tuple efficiency_map.reg3 = float(get_weighted_entries(ch,"mj<=400&&mt>140")) |
Definition at line 168 of file efficiency_map.py.
| tuple efficiency_map.reg4 = float(get_weighted_entries(ch,"mj>400&&mt>140")) |
Definition at line 167 of file efficiency_map.py.
| efficiency_map.skipcalc = True |
Definition at line 70 of file efficiency_map.py.
| int efficiency_map.sofar = 0 |
Definition at line 134 of file efficiency_map.py.
| tuple efficiency_map.tla = ROOT.TLatex() |
Definition at line 324 of file efficiency_map.py.
Referenced by main(), and plot_distributions().
| efficiency_map.topo = args.topology |
Definition at line 32 of file efficiency_map.py.
| int efficiency_map.tot = 1000 |
Definition at line 159 of file efficiency_map.py.
| tuple efficiency_map.val1 = hist.GetBinContent(hist.FindBin(700,0)) |
Definition at line 216 of file efficiency_map.py.
| tuple efficiency_map.val2 = hist.GetBinContent(hist.FindBin(600,100)) |
Definition at line 217 of file efficiency_map.py.
| list efficiency_map.yields = [[] for i in range(2+len(bindefs))] |
Definition at line 133 of file efficiency_map.py.
1.8.11