![]() |
Belle II Software development
|
Public Member Functions | |
| __init__ (self, object_a, object_b, Optional[MetaOptionParser] mop=None, debug=False) | |
| ensure_compute (self) | |
| comparison_result (self) | |
| comparison_result_long (self) | |
| can_compare (self) | |
Public Attributes | |
| object_a = object_a | |
| store the first object to compare | |
| object_b = object_b | |
| store the second object to compare | |
| mop = mop | |
| MetaOptionParser. | |
| debug = debug | |
| enable debug? | |
| bool | computed = False |
| used to store, whether the quantities have already been compared | |
Protected Member Functions | |
| str | _get_comparison_result (self) |
| str | _get_comparison_result_long (self) |
| _compute (self) | |
| bool | _has_correct_types (self) |
| None | _raise_has_correct_types (self) |
| bool | _has_compatible_bins (self) |
| None | _raise_has_compatible_bins (self) |
Static Protected Member Functions | |
| _convert_teff_to_hist (teff_a) | |
Protected Attributes | |
| str | _comparison_result = "not_compared" |
| Comparison result, i.e. | |
| str | _comparison_result_long = "" |
| Longer description of the comparison result (e.g. | |
Base class for all comparison implementations. Follows 3 steps: 1. Initialize the class together with two ROOT objects of different revisions (that are to be compared) and the metaoptions (given in the corresponding validation (steering) file), that determine how to compare them. 2. The Comparison class saves the ROOT objects and the metaoptions internally, but does not compute anything yet 3. If :meth:`ensure_compute` is called, or any property is accessed that depends on computation, the internal implementation :meth:`_compute` (to be implemented in the subclass) is called. 4. :meth:`_compute` ensures that all values, like chi2, p-value etc. are computed 5. Two properties :meth:`comparison_result` (pass/warning/error) and :meth:`comparison_result_long` (longer description of the comparison result) allow to access the results.
Definition at line 95 of file validationcomparison.py.
| __init__ | ( | self, | |
| object_a, | |||
| object_b, | |||
| Optional[MetaOptionParser] | mop = None, | ||
| debug = False ) |
Initialize ComparisonBase class :param object_a: :param object_b: :param mop: MetaOptionParser :param debug (bool): Debug mode enabled?
Definition at line 121 of file validationcomparison.py.
|
protected |
This method performs the actual computations.
Reimplemented in AndersonDarlingTest, Chi2Test, KolmogorovTest, and PvalueTest.
Definition at line 222 of file validationcomparison.py.
|
staticprotected |
Convert the content of a TEfficiency plot to a histogram and set the bin content and errors
Definition at line 313 of file validationcomparison.py.
|
protected |
Used to format the value of :attr:`_comparison_result`.
Reimplemented in PvalueTest.
Definition at line 202 of file validationcomparison.py.
|
protected |
Used to format the value of :attr:`_comparison_result_long`.
Reimplemented in AndersonDarlingTest, Chi2Test, KolmogorovTest, and PvalueTest.
Definition at line 206 of file validationcomparison.py.
|
protected |
Check if both ROOT objects have the same amount of bins @return: True if the bins are equal, otherwise False
Definition at line 275 of file validationcomparison.py.
|
protected |
@return: True if the two objects have a) a type supported for
comparison and b) can be compared with each other
Definition at line 231 of file validationcomparison.py.
|
protected |
Raise Exception if not both ROOT objects have the same amount of bins @return: None
Definition at line 293 of file validationcomparison.py.
|
protected |
Raise Exception if not the two objects have a) a type supported for comparison and b) can be compared with each other @return: None
Definition at line 254 of file validationcomparison.py.
| can_compare | ( | self | ) |
@return: True if the two objects can be compared, False otherwise
Definition at line 225 of file validationcomparison.py.
| comparison_result | ( | self | ) |
Comparison result, i.e. pass/warning/error
Definition at line 210 of file validationcomparison.py.
| comparison_result_long | ( | self | ) |
Longer description of the comparison result
Definition at line 216 of file validationcomparison.py.
| ensure_compute | ( | self | ) |
Ensure all required quantities get computed and are cached inside the class
Definition at line 159 of file validationcomparison.py.
|
protected |
|
protected |
Longer description of the comparison result (e.g.
'performed Chi2 Test ... with chi2 = ...').
Definition at line 157 of file validationcomparison.py.
| bool computed = False |
used to store, whether the quantities have already been compared
Definition at line 151 of file validationcomparison.py.
| debug = debug |
enable debug?
Definition at line 148 of file validationcomparison.py.
| mop = mop |
Definition at line 145 of file validationcomparison.py.
| object_a = object_a |
store the first object to compare
Definition at line 137 of file validationcomparison.py.
| object_b = object_b |
store the second object to compare
Definition at line 140 of file validationcomparison.py.