Functions enabling a manual optimization of signal significance for a phenomenological problem (primarily for the purposes of comparison with the performance of a machine learning algorithm)
manual_significance
(S
, Bs
, se
, bes
)
Returns signal significance given yield and efficiency for signal and background
points2hrs
(points
, points2sec
=0.168
)
Returns number of hours required to compute significance for given number of points
maxhrs2points
(maxhrs
, points2sec
=0.168
)
Returns maximal number of points capable of being computed during a given number of hours
sig_grid
(signal
, backgrounds
, numS
, numBs
, cuts
)
Computes signal significance for a high-dimensional grid of event selection criteria.
signal
should contain 2D signal data, backgrounds
should be a list where the $i$th element
contains 2D background data for the $i$th background type, numS
should give signal yield,
numBs
should be a list of background yields for each background type, and cuts
should
take the following form.
Each row of cuts
should take the form [index, isCutBelow, vals]
where index
gives the index of the feature being cut on
in the signal/background data, isCutBelow
is a boolean specifying
if that variable should involve removing data points below (True) or
above (False) the given values, and vals
is a list of values to cut at
opt_sig
(signal
, backgrounds
, numS
, numBs
, cuts
, num_iter
=3
)
Iteratively calls sig_grid
with finer and finer spectra of event selection criteria
(kinematic cuts) to check