![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, filename, label=None, color_index=0, additional_information=None) | |
get_figure_of_merits (self) | |
get_figures_of_merit_latex (self) | |
plot_efficiency_point (self) | |
grouped_by_pt_data (self, mc_data=None) | |
plot (self, data_x, data_y, loc=4, yerr=None) | |
plot_finding_efficiency (self, data=None) | |
plot_hit_efficiency (self, data=None) | |
print_useful_information (self) | |
append_to_dataframe (self, df) | |
Static Public Member Functions | |
from_calculations (calculations, key="output_file_name", parameter_part=None) | |
Public Attributes | |
filename = filename | |
The root filename. | |
pr_data = uproot.open(self.filename)["pr_tree/pr_tree"].arrays(library="pd") | |
The pr data. | |
mc_data = uproot.open(self.filename)["mc_tree/mc_tree"].arrays(library="pd") | |
the mc data | |
mc_prompts = self.mc_data[self.mc_data.is_prompt == 1] | |
the mc prompt data | |
pr_prompts = self.pr_data[self.pr_data.is_prompt == 1] | |
the pr prompt data | |
label = label | |
the label | |
color = colors[color_index % len(colors)] | |
the color index | |
finding_efficiency = None | |
the finding efficiency | |
hit_efficiency = None | |
the hit efficiency | |
fake_rate = None | |
the fake rate | |
clone_rate = None | |
the clone rate | |
additional_information = additional_information | |
the additional information | |
This class represents a loaded validation root file. It has methods for plotting the typically needed graphs.
Definition at line 15 of file root_handler.py.
__init__ | ( | self, | |
filename, | |||
label = None, | |||
color_index = 0, | |||
additional_information = None ) |
Create a new validation result from the given filename. Additional options for plotting (e.g. color or label) can be given.
Definition at line 18 of file root_handler.py.
append_to_dataframe | ( | self, | |
df ) |
Append the main results to a already consisting dataframe.
Definition at line 179 of file root_handler.py.
|
static |
Create validation results from an ipython calculation.
Definition at line 60 of file root_handler.py.
get_figure_of_merits | ( | self | ) |
Return the figures of merit from the file. Mostly used for internal setting of the properties.
Definition at line 77 of file root_handler.py.
get_figures_of_merit_latex | ( | self | ) |
Print out the figures of merit as a LaTeX-ready table.
Definition at line 97 of file root_handler.py.
grouped_by_pt_data | ( | self, | |
mc_data = None ) |
Convenience function to return the input data (or the internal mc_data) grouped by pt.
Definition at line 120 of file root_handler.py.
plot | ( | self, | |
data_x, | |||
data_y, | |||
loc = 4, | |||
yerr = None ) |
Plot data_y over data_x with the correct settings for this result. Mostly used internally.
Definition at line 130 of file root_handler.py.
plot_efficiency_point | ( | self | ) |
Plot a point in the finding-efficiency/hit-efficiency plane.
Definition at line 113 of file root_handler.py.
plot_finding_efficiency | ( | self, | |
data = None ) |
Plot the finding efficiency over pt.
Definition at line 143 of file root_handler.py.
plot_hit_efficiency | ( | self, | |
data = None ) |
Plot the hit efficiency over pt.
Definition at line 152 of file root_handler.py.
print_useful_information | ( | self | ) |
Print mostfully useful information about this result.
Definition at line 161 of file root_handler.py.
additional_information = additional_information |
the additional information
Definition at line 57 of file root_handler.py.
clone_rate = None |
the clone rate
Definition at line 53 of file root_handler.py.
color = colors[color_index % len(colors)] |
the color index
Definition at line 44 of file root_handler.py.
fake_rate = None |
the fake rate
Definition at line 51 of file root_handler.py.
filename = filename |
The root filename.
Definition at line 22 of file root_handler.py.
finding_efficiency = None |
the finding efficiency
Definition at line 47 of file root_handler.py.
hit_efficiency = None |
the hit efficiency
Definition at line 49 of file root_handler.py.
label = label |
the label
Definition at line 42 of file root_handler.py.
mc_data = uproot.open(self.filename)["mc_tree/mc_tree"].arrays(library="pd") |
the mc data
Definition at line 28 of file root_handler.py.
mc_prompts = self.mc_data[self.mc_data.is_prompt == 1] |
the mc prompt data
Definition at line 33 of file root_handler.py.
pr_data = uproot.open(self.filename)["pr_tree/pr_tree"].arrays(library="pd") |
The pr data.
Definition at line 24 of file root_handler.py.
pr_prompts = self.pr_data[self.pr_data.is_prompt == 1] |
the pr prompt data
Definition at line 35 of file root_handler.py.