|
|
@ -111,7 +111,12 @@ def get_elec_colors(): |
|
|
|
|
|
|
|
def get_markers(): |
|
|
|
# [20, 24, 21, 22, 23, 25] |
|
|
|
return [20, 21, 24, 25, 22, 23, 26, 32] |
|
|
|
return [20, 21, 22, 23, 24, 25, 26, 32] |
|
|
|
|
|
|
|
|
|
|
|
def get_elec_markers(): |
|
|
|
# [20, 24, 21, 22, 23, 25] |
|
|
|
return [24, 25, 26, 32, 22, 23, 26, 32] |
|
|
|
|
|
|
|
|
|
|
|
def get_fillstyles(): |
|
|
@ -235,34 +240,34 @@ def get_eff(eff, hist, tf, histoName, label, var): |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " Forward, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " Forward") |
|
|
|
eff[lab].SetTitle(lab + " Forward, not e^{-}") |
|
|
|
if histoName.find("Merged") != -1: |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " MergedMatch, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " MergedMatch") |
|
|
|
eff[lab].SetTitle(lab + " MergedMatch, not e^{-}") |
|
|
|
if histoName.find("DefaultMatch") != -1: |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " DefaultMatch, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " DefaultMatch") |
|
|
|
eff[lab].SetTitle(lab + " DefaultMatch, not e^{-}") |
|
|
|
if histoName.find("Match") != -1: |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " Match, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " Match") |
|
|
|
eff[lab].SetTitle(lab + " Match, not e^{-}") |
|
|
|
if histoName.find("Seed") != -1: |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " Seed, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " Seed") |
|
|
|
eff[lab].SetTitle(lab + " Seed, not e^{-}") |
|
|
|
if histoName.find("BestLong") != -1: |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
eff[lab].SetTitle(lab + " BestLong, e^{-}") |
|
|
|
else: |
|
|
|
eff[lab].SetTitle(lab + " BestLong") |
|
|
|
if histoName.find("EndVelo") != -1: |
|
|
|
eff[lab].SetTitle(eff[lab].GetTitle() + " EndVelo") |
|
|
|
eff[lab].SetTitle(lab + " BestLong, not e^{-}") |
|
|
|
# if histoName.find("EndVelo") != -1: |
|
|
|
# eff[lab].SetTitle(eff[lab].GetTitle() + " EndVelo") |
|
|
|
# if histoName.find("EndUT") != -1: |
|
|
|
# eff[lab].SetTitle(eff[lab].GetTitle() + " EndUT") |
|
|
|
|
|
|
@ -273,8 +278,8 @@ def get_eff(eff, hist, tf, histoName, label, var): |
|
|
|
hist[lab].SetTitle(var + " distribution, stranges") |
|
|
|
if histoName.find("electron") != -1: |
|
|
|
hist[lab].SetTitle(var + " distribution, e^{-}") |
|
|
|
if histoName.find("EndVelo") != -1: |
|
|
|
hist[lab].SetTitle(hist[lab].GetTitle() + ", EndVelo") |
|
|
|
# if histoName.find("EndVelo") != -1: |
|
|
|
# hist[lab].SetTitle(hist[lab].GetTitle() + ", EndVelo") |
|
|
|
# if histoName.find("EndUT") != -1: |
|
|
|
# hist[lab].SetTitle(hist[lab].GetTitle() + ", EndUT") |
|
|
|
|
|
|
@ -324,6 +329,7 @@ def PrCheckerEfficiency( |
|
|
|
setLHCbStyle() |
|
|
|
|
|
|
|
markers = get_markers() |
|
|
|
elec_markers = get_elec_markers() |
|
|
|
colors = get_colors() |
|
|
|
elec_colors = get_elec_colors() |
|
|
|
styles = get_fillstyles() |
|
|
@ -426,14 +432,19 @@ def PrCheckerEfficiency( |
|
|
|
canvas.SetRightMargin(0.1) |
|
|
|
mg = TMultiGraph() |
|
|
|
for i, lab in enumerate(label): |
|
|
|
if not plot_electrons_only and not plot_velo_only: |
|
|
|
if not plot_electrons_only: # and not plot_velo_only: |
|
|
|
mg.Add(eff[lab]) |
|
|
|
set_style(eff[lab], colors[i], markers[i], styles[i]) |
|
|
|
if categories[tracker][cut]["plotElectrons"] and plot_electrons: |
|
|
|
if not plot_velo_only: |
|
|
|
if (not plot_velo_only) or ( |
|
|
|
histo == "phi" or histo == "eta" or histo == "nPV" |
|
|
|
): |
|
|
|
mg.Add(eff_elec[lab]) |
|
|
|
set_style( |
|
|
|
eff_elec[lab], elec_colors[i], markers[i], styles[i] |
|
|
|
eff_elec[lab], |
|
|
|
elec_colors[i], |
|
|
|
elec_markers[i], |
|
|
|
styles[i], |
|
|
|
) |
|
|
|
if ( |
|
|
|
categories[tracker][cut]["plotEndVelo"] |
|
|
@ -442,7 +453,10 @@ def PrCheckerEfficiency( |
|
|
|
): |
|
|
|
mg.Add(eff_velo[lab]) |
|
|
|
set_style( |
|
|
|
eff_velo[lab], kMagenta + 1, markers[i], styles[i] |
|
|
|
eff_velo[lab], |
|
|
|
elec_colors[i], |
|
|
|
elec_markers[i], |
|
|
|
styles[i], |
|
|
|
) |
|
|
|
|
|
|
|
mg.Draw("AP") |
|
|
@ -484,14 +498,18 @@ def PrCheckerEfficiency( |
|
|
|
hist_velo[lab].Scale(scale) |
|
|
|
|
|
|
|
if i == 0: |
|
|
|
if not plot_electrons_only and not plot_velo_only: |
|
|
|
if not plot_electrons_only: # and not plot_velo_only: |
|
|
|
set_style(hist_den[lab], mygray, markers[i], styles[i]) |
|
|
|
gStyle.SetPalette(2, array("i", [mygray - 1, myblue + 1])) |
|
|
|
hist_den[lab].Draw("HIST PLC SAME") |
|
|
|
if categories[tracker][cut]["plotElectrons"] and plot_electrons: |
|
|
|
if not plot_velo_only: |
|
|
|
set_style(hist_elec[lab], myblue, markers[i], styles[i]) |
|
|
|
# hist_elec[lab].SetFillColor(myblue) |
|
|
|
if not plot_velo_only or ( |
|
|
|
histo == "phi" or histo == "eta" or histo == "nPV" |
|
|
|
): |
|
|
|
set_style( |
|
|
|
hist_elec[lab], myblue, elec_markers[i], styles[i] |
|
|
|
) |
|
|
|
hist_elec[lab].SetFillColorAlpha(myblue, 0.5) |
|
|
|
hist_elec[lab].Draw("HIST PLC SAME") |
|
|
|
if ( |
|
|
|
categories[tracker][cut]["plotEndVelo"] |
|
|
@ -499,9 +517,11 @@ def PrCheckerEfficiency( |
|
|
|
and (histo == "p" or histo == "pt") |
|
|
|
): |
|
|
|
set_style( |
|
|
|
hist_velo[lab], mypurple, markers[i], styles[i] |
|
|
|
hist_velo[lab], myblue, elec_markers[i], styles[i] |
|
|
|
) |
|
|
|
hist_velo[lab].SetFillColorAlpha(mypurple, 0.5) |
|
|
|
hist_velo[lab].SetFillColorAlpha( |
|
|
|
myblue, 0.5 |
|
|
|
) # mypurple |
|
|
|
hist_velo[lab].Draw("HIST PLC SAME") |
|
|
|
# else: |
|
|
|
# print( |
|
|
@ -513,7 +533,7 @@ def PrCheckerEfficiency( |
|
|
|
# hist_den[lab].Draw("HIST PLC SAME") |
|
|
|
|
|
|
|
if histo == "p": |
|
|
|
pos = [0.5, 0.3, 1.0, 0.5] # [0.53, 0.4, 1.01, 0.71] |
|
|
|
pos = [0.5, 0.35, 1.0, 0.7] # [0.53, 0.4, 1.01, 0.71] |
|
|
|
elif histo == "pt": |
|
|
|
pos = [0.5, 0.3, 0.99, 0.5] # [0.5, 0.4, 0.98, 0.71] |
|
|
|
elif histo == "phi": |
|
|
@ -522,6 +542,7 @@ def PrCheckerEfficiency( |
|
|
|
pos = [0.5, 0.25, 1.0, 0.45] |
|
|
|
else: |
|
|
|
pos = [0.35, 0.25, 0.85, 0.45] |
|
|
|
if histo == "p": |
|
|
|
legend = place_legend( |
|
|
|
canvas, *pos, header="LHCb Simulation", option="LPE" |
|
|
|
) |
|
|
@ -532,10 +553,12 @@ def PrCheckerEfficiency( |
|
|
|
legend.SetTextSize(0.04) |
|
|
|
legend.Draw() |
|
|
|
for lab in label: |
|
|
|
if not plot_electrons_only and not plot_velo_only: |
|
|
|
if not plot_electrons_only: # and not plot_velo_only: |
|
|
|
eff[lab].Draw("P SAME") |
|
|
|
if categories[tracker][cut]["plotElectrons"] and plot_electrons: |
|
|
|
if not plot_velo_only: |
|
|
|
if not plot_velo_only or ( |
|
|
|
histo == "phi" or histo == "eta" or histo == "nPV" |
|
|
|
): |
|
|
|
eff_elec[lab].Draw("P SAME") |
|
|
|
if ( |
|
|
|
categories[tracker][cut]["plotEndVelo"] |
|
|
|