Belle II Software  release-08-01-10
ResolutionAnalysis Class Reference
Inheritance diagram for ResolutionAnalysis:
Collaboration diagram for ResolutionAnalysis:

Public Member Functions

def __init__ (self, quantity_name, bin_spacing, bin_name, bin_unit=None, unit=None, outlier_z_score=None, contact='', plot_name=None, plot_title=None, min_required_entries=None, plot_name_prefix='', plot_name_postfix='', plot_title_postfix='', referenceFileName=None)
 
def analyse (self, bin_values, truths, estimates, which_plots=None, is_expert=None)
 
def contact (self)
 
def contact (self, contact)
 
def write (self, tDirectory=None)
 

Public Attributes

 quantity_name
 cached name of the quantity in the truth-classification analysis
 
 unit
 cached measurement unit for this truth-classification analysis
 
 bin_spacing
 cached value of the histogram bin spacing
 
 bin_name
 cached value of the bin name
 
 bin_unit
 cached value of the bin measurement unit
 
 outlier_z_score
 cached value of the Z-score (for outlier detection)
 
 min_required_entries
 cached value of the minimum number of entries
 
 plot_name
 cached value of the base name of the plot
 
 plot_title
 cached value of the plot title
 
 plot_name_prefix
 cached value of the prefix prepended to the plot name
 
 plot_name_postfix
 cached value of the suffix appended to the plot name
 
 plot_title_postfix
 cached value of the suffix appended to the plot title
 
 plots
 cached value of the dictionary of plots to be created
 
 referenceFileName
 cached value of the reference filename
 
 contact
 Forward the contact to all plots by reassigning the contact.
 

Static Public Attributes

float default_outlier_z_score = 5.0
 default Z-score (for outlier detection)
 
int default_min_required_entries = 50
 default minimum number of entries
 
string default_plot_name = "{plot_name_prefix}_{subplot_name}{plot_name_postfix}"
 default plot name
 
string default_plot_title = "{subplot_title} of {quantity_name}{plot_title_postfix}"
 default plot title
 
list default_which_plots
 default list of plots to create More...
 
bool default_is_expert = True
 by default, create expert plots
 

Private Attributes

 _contact
 cached value of the contact person
 

Detailed Description

Perform resolution analysis

Definition at line 26 of file resolution.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  quantity_name,
  bin_spacing,
  bin_name,
  bin_unit = None,
  unit = None,
  outlier_z_score = None,
  contact = '',
  plot_name = None,
  plot_title = None,
  min_required_entries = None,
  plot_name_prefix = '',
  plot_name_postfix = '',
  plot_title_postfix = '',
  referenceFileName = None 
)
Performs a comparison of an estimated quantity to their truths by generating standardized validation plots.

Definition at line 45 of file resolution.py.

61  ):
62  """Performs a comparison of an estimated quantity to their truths by generating standardized validation plots."""
63 
64 
65  self.quantity_name = quantity_name
66 
67  self.unit = unit or get_unit(quantity_name)
68 
69  self.bin_spacing = bin_spacing
70 
71  self.bin_name = bin_name
72 
73  self.bin_unit = bin_unit
74 
75  if outlier_z_score is None:
76 
77  self.outlier_z_score = self.default_outlier_z_score
78  else:
79  self.outlier_z_score = outlier_z_score
80 
81 
82  self.min_required_entries = min_required_entries
83  if self.min_required_entries is None:
84  self.min_required_entries = self.default_min_required_entries
85 
86 
87  self.plot_name = plot_name
88 
89  self.plot_title = plot_title
90 
91 
92  self.plot_name_prefix = plot_name_prefix or root_save_name(quantity_name)
93 
94  self.plot_name_postfix = plot_name_postfix
95 
96  self.plot_title_postfix = plot_title_postfix
97 
98 
99  self._contact = contact
100 
101  self.plots = collections.OrderedDict()
102 
103 
104  self.referenceFileName = referenceFileName
105 

Member Function Documentation

◆ analyse()

def analyse (   self,
  bin_values,
  truths,
  estimates,
  which_plots = None,
  is_expert = None 
)
Compares the concrete estimate to the truth and generates plots of the resolution

Parameters
----------
bin_values : array_like(float
    The parametr used for binning
truths : array_like(float)
    Sample of the true values
estimates : array_like(float)
    Corresponding estimations

Definition at line 106 of file resolution.py.

◆ contact() [1/2]

def contact (   self)
Get the contact person's name

Definition at line 242 of file resolution.py.

◆ contact() [2/2]

def contact (   self,
  contact 
)
Set the contact person's name

Definition at line 247 of file resolution.py.

◆ write()

def write (   self,
  tDirectory = None 
)
Write all validation plot to the given Root directory

Definition at line 253 of file resolution.py.

Member Data Documentation

◆ default_which_plots

list default_which_plots
static
Initial value:
= [
"resolution",
]

default list of plots to create

Definition at line 38 of file resolution.py.


The documentation for this class was generated from the following file: