diff --git a/data_results/PrCheckerBDefaultThesis.root b/data_results/PrCheckerBDefaultThesis.root new file mode 100644 index 0000000..9f4e7e6 Binary files /dev/null and b/data_results/PrCheckerBDefaultThesis.root differ diff --git a/moore_options/Recent_get_parameterisation_data.py b/moore_options/get_parameterisation_data.py similarity index 70% rename from moore_options/Recent_get_parameterisation_data.py rename to moore_options/get_parameterisation_data.py index 377fabe..bc90cd8 100644 --- a/moore_options/Recent_get_parameterisation_data.py +++ b/moore_options/get_parameterisation_data.py @@ -6,15 +6,23 @@ from PyConf.application import make_data_with_FetchDataFromFile import glob +decay = "test" + options.evt_max = -1 -n_files_per_cat = 1 -decay = "B" -options.ntuple_file = f"data/param_data_{decay}.root" -options.input_type = "ROOT" + +options.ntuple_file = f"data/param_data_{decay}_default.root" + + if decay == "B": options.input_files = glob.glob("/auto/data/guenther/Bd_Kstee/*.xdigi") +elif decay == "BJpsi": + options.input_files = glob.glob("/auto/data/guenther/Bd_JpsiKst_ee/*.xdigi") elif decay == "D": options.input_files = glob.glob("/auto/data/guenther/Dst_D0ee/*.xdigi") +elif decay == "test": + options.input_files = ["/auto/data/guenther/Bd_Kstee/00151673_00000002_1.xdigi"] + +options.input_type = "ROOT" options.dddb_tag = "dddb-20210617" options.conddb_tag = "sim-20210617-vc-md100" @@ -27,7 +35,9 @@ def run_tracking_param_debug(): MCVPHits=mc_unpackers()["MCVPHits"], MCFTHits=mc_unpackers()["MCFTHits"], zRef=8520.0, - TrackInfo=make_data_with_FetchDataFromFile("/Event/MC/TrackInfo"), + TrackInfo=make_data_with_FetchDataFromFile( + "/Event/MC/TrackInfo", "LHCb::MCProperty" + ), ) data = [param_data] diff --git a/moore_options/get_resolution_and_eff_data.py b/moore_options/get_resolution_and_eff_data.py index 59066a2..35124f8 100644 --- a/moore_options/get_resolution_and_eff_data.py +++ b/moore_options/get_resolution_and_eff_data.py @@ -40,7 +40,7 @@ decay = "B" options.evt_max = -1 -options.ntuple_file = f"data/resolutions_and_effs_{decay}_EndVeloP.root" +options.ntuple_file = f"data/resolutions_and_effs_{decay}_endVelo_endUT.root" options.input_type = "ROOT" diff --git a/moore_options/get_tracking_losses.py b/moore_options/get_tracking_losses.py index 6f3c0fa..1e1f786 100644 --- a/moore_options/get_tracking_losses.py +++ b/moore_options/get_tracking_losses.py @@ -59,7 +59,7 @@ options.simulation = True options.input_type = "ROOT" options.ntuple_file = ( - f"data/tracking_losses_ntuple_{decay}_rad_length_beginVelo2endVelo.root" + f"data/tracking_losses_ntuple_{decay}_rad_length_endVelo2endUT.root" ) diff --git a/scripts/MyPrCheckerEfficiency.py b/scripts/MyPrCheckerEfficiency.py index 1206626..c756a0e 100644 --- a/scripts/MyPrCheckerEfficiency.py +++ b/scripts/MyPrCheckerEfficiency.py @@ -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,20 +542,23 @@ def PrCheckerEfficiency( pos = [0.5, 0.25, 1.0, 0.45] else: pos = [0.35, 0.25, 0.85, 0.45] - legend = place_legend( - canvas, *pos, header="LHCb Simulation", option="LPE" - ) - for le in legend.GetListOfPrimitives(): - if "distribution" in le.GetLabel(): - le.SetOption("LF") - legend.SetTextFont(132) - legend.SetTextSize(0.04) - legend.Draw() + if histo == "p": + legend = place_legend( + canvas, *pos, header="LHCb Simulation", option="LPE" + ) + for le in legend.GetListOfPrimitives(): + if "distribution" in le.GetLabel(): + le.SetOption("LF") + legend.SetTextFont(132) + 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"]