var_cut¶
Documentation for the var_cut.var_cut.var_cut() function:
- var_cut.var_cut.var_cut(rootpaths=('/home/docs/checkouts/readthedocs.org/user_builds/cmepda-pikclassifier/checkouts/latest/utilities/../data/root_files/B0PiPi_MC.root', '/home/docs/checkouts/readthedocs.org/user_builds/cmepda-pikclassifier/checkouts/latest/utilities/../data/root_files/B0sKK_MC.root', '/home/docs/checkouts/readthedocs.org/user_builds/cmepda-pikclassifier/checkouts/latest/utilities/../data/root_files/Bhh_data.root'), tree='t_M0pipi;1', cut_var='M0_Mpipi', eff=0.9, error_optimization=True, inverse_mode=False, specificity_mode=False, savefig=False, figpath='')[source]¶
Estimates the signal fraction in the data set by performing a cut on a specified variable in the MC sets.
- Parameters:
rootpaths (tuple[str]) – Tuple containing three .root file paths, for the “background” set (flag=0), the “signal” set (flag=1) and the data one, in this order.
tree (str) – Name of the tree from which to load the events.
cut_var (str) – Variable to load and test.
eff (float) – Sensitivity required from the test (specificity in specificity mode).
error_optimization (bool) – Performs error optimization instead of using a fixed efficiency value.
inverse_mode (bool) – Set to
Trueif the signal events have lower values of the cut variable than the background ones (if it is not manually set when needed to make the cut unbiased, the function gives a warning and does so by itself).specificity_mode (bool) – Set to
Trueif the efficiency given is the specificity.savefig (bool) – Draw the figure of the variable distribution for the two MC sets and the cut performed.
figpath (str) – Path to where to save the figure.
- Returns:
Estimated fraction of signal (with uncertainties), parameters of the cut algorithm and MC sets of the variable used.
- Return type:
tuple[float], tuple[float], tuple[numpy.array[float]]