You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RelVal/README.md
+6-24Lines changed: 6 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ There are 2 ROOT macros which can in principle be used as-is. Their functionalit
12
12
13
13
This macro allows to compare 2 ROOT files that contain `TH1` objects. Objects are considered to correspond to each other if they have the same name.
14
14
At the moment, 3 different comparisons are implemented:
15
-
1.`chi2`: Chi2 test of compared histograms,
16
-
1.`bin_cont`: relative difference of normalised bin content of both histograms,
15
+
1.`chi2`: Chi2 test of compared histograms (see also the [ROOT documentation](https://root.cern.ch/doc/master/classTH1.html#ab7d63c7c177ccbf879b5dc31f2311b27)),
16
+
1.`kolmogorov`: shape comparison using Kolmogorov test (see also the [ROOT documentation](https://root.cern.ch/doc/master/classTH1.html#aeadcf087afe6ba203bcde124cfabbee4)),
17
17
1.`num_entries`: relative difference in the number of entries.
18
18
19
19
The first 2 tests are considered critical, hence if the threshold is exceeded, the comparison result is named `BAD`. Also the third test is considered critical in case efficiencies are compared coming from `TEfficiency` objects.
This performs all of the above mentioned tests. If only certain tests should be performed, this can be achieved with the flags `--with-test-<which-test>` where `<which-test>` is one of
61
61
1.`chi2`,
62
-
1.`bin-cont`,
62
+
1.`kolmogorov`,
63
63
1.`num-entries`.
64
64
65
65
By default, all of them are switched on.
@@ -96,10 +96,10 @@ There are various plots created during the RelVal run. For each compared file th
96
96
97
97
## More details of `rel-val` command
98
98
99
-
As mentioned above, the basic usage of the `rel-val` sub-command is straightforward. But there are quite a few more options available and some of them will be explained briefly below.
99
+
As mentioned above, the basic usage of the `rel-val` sub-command is straightforward. But there are quite a few more options available and some of them will be explained briefly below. In fact, most of them also apply to the `inspect` sub-command.
100
100
101
101
### Setting new/custom thresholds from another RelVal run
102
-
Each RelVal run produces a `Summary.json` file in the corresponding output directories. Among other things, it contains the computed values of all tests for each compared histogram pair. Such a `Summary.json` can now be used as a input file for a future RelVal to set all thresholds according to the values. In fact, multiple such files can be passed and for each historgam-test combination, the mean or max of the previously calculated values can be used to set the new thresholds.
102
+
Each RelVal run produces a `Summary.json` file in the corresponding output directories. Among other things, it contains the computed values of all tests for each compared histogram pair. Such a `Summary.json` can now be used as a input file for a future RelVal to set all thresholds according to the values. In fact, multiple such files can be passed and for each histogram-test combination, the mean or max of the previously calculated values can be used to set the new thresholds.
@@ -114,23 +114,5 @@ There is an ongoing effort to unify the names of QC objects inside MC and data Q
114
114
115
115
MC QC objects are usually distributed over multiple files while those from data are all contained in one single file. It is possible to directly compare them with
**This is still under development and does not yet work when e.g. comparing an MC directory to a data directory.**
123
-
124
-
In addition to simply comparing 2 ROOT files, the script offers the possibility of comparing 2 corresponding directories that contain simulation artifacts (and potentially QC and analysis results). It is not foreseen to run over everything inside those directories but the files must be specifiec via a small config file. See [this example](config/rel_val_sim_dirs_default.json). It is passed via the option `--dirs-config`. In addition, top-level keys can be enabled(disabled) with `--dirs-config-enable <keys>`(`dirs-config-disable <keys>`) where disabling takes precedence.
125
-
126
-
**NOTE** That each single one of the comparisons is only done if mutual files were found in the 2 corresponding directories. As an example, one could do
common_flags_parser.add_argument("--flags", nargs="*", help="extract all objects which have at least one test with this severity flag", choices=list(REL_VAL_SEVERITY_MAP.keys()))
1096
1099
common_flags_parser.add_argument("--flags-summary", dest="flags_summary", nargs="*", help="extract all objects which have this severity flag as overall test result", choices=list(REL_VAL_SEVERITY_MAP.keys()))
rel_val_parser.add_argument("--dir-config", dest="dir_config", help="What to take into account in a given directory")
1101
1107
rel_val_parser.add_argument("--dir-config-enable", dest="dir_config_enable", nargs="*", help="only enable these top keys in your dir-config")
1102
1108
rel_val_parser.add_argument("--dir-config-disable", dest="dir_config_disable", nargs="*", help="disable these top keys in your dir-config (precedence over dir-config-enable)")
1103
-
rel_val_parser.add_argument("--include-dirs", dest="include_dirs", nargs="*", help="only inlcude directories; note that each pattern is assumed to start in the top-directory (at the moment no regex or *)")
1109
+
rel_val_parser.add_argument("--include-dirs", dest="include_dirs", nargs="*", help="only include directories; note that each pattern is assumed to start in the top-directory (at the moment no regex or *)")
1104
1110
rel_val_parser.add_argument("--add", action="store_true", help="If given and there is already a RelVal in the output directory, extracted objects will be added to the existing ones")
inspect_parser.add_argument("path", help="either complete file path to a Summary.json or SummaryGlobal.json or directory where one of the former is expected to be")
1110
1116
inspect_parser.add_argument("--plot", action="store_true", help="Plot the summary grid")
1111
1117
inspect_parser.add_argument("--output", "-o", help="output directory, by default points to directory where the Summary.json was found")
0 commit comments