Classes and functions enabling miscellaneous relevant data visualization tasks

get_settings[source]

get_settings()

Returns some nice default settings for matplotlib to be used with matplotlib.pyplot.rc_context.

class cross_section_helper[source]

cross_section_helper(masses, sig_css, bg_css, mass_units='GeV')

Class enabling computations and visualizations relating to signal and background cross sections

Getting up and running

To create an instance of cross_section_helper, you need three things. First, you need to pass a list masses which contains the new particle masses for which you have cross sections. Second, you need to pass list sig_css which has the same length as masses which gives the signal cross section (in pb) associated with the elements of masses. Finally, you need to pass a list bg_css which provides the cross sections for whatever the relevant background processes are.

From these arguments, the instance of cross_section_helper produces a few other variables. These are reasonably intuitive based on the variable name: m2logcsF, for instance, gives an interpolated function mapping a new particle mass to $log_{10}(\sigma_s)$, the log of the associated signal cross section.

Basic Functionality

cross_section_helper.sig_cs[source]

cross_section_helper.sig_cs(masses, who='E')

Given a mass, returns the signal cross section (in pb) through interpolation

cross_section_helper.mass[source]

cross_section_helper.mass(css, who='E')

Given a cross section, returns the particle mass value yielding that signal cross section

cross_section_helper.absolute_max_mass_sens[source]

cross_section_helper.absolute_max_mass_sens(lumi=3000, sig=5)

Given a luminosity and desired signal significance, returns the best-case scenario highest probeable mass (i.e., TPR = 1, FPR = 0)

cross_section_helper.max_mass_sens_versus_tpr_fpr[source]

cross_section_helper.max_mass_sens_versus_tpr_fpr(plot=True, sig=5, lumi=3000, tpr_bounds=(0.1, 1), fpr_bounds=(1e-07, 0.5), res=1000, cvalues=None, clabels=None, manual=None)

For fixed luminosity and desired signal significance, plot the maximum mass sensitivity as a function of a binary classifier's true positive rate and false positive rate.

from bcml4pheno import ttbarzp
masses, sig_css, bg_css = ttbarzp.get_elijah_ttbarzp_cs()
elijah_ttbarzp = cross_section_helper(masses, sig_css, bg_css)
print(np.round(elijah_ttbarzp.absolute_max_mass_sens(),3), elijah_ttbarzp.mass_units)
2363.088 GeV
cvalues = [500, 750, 1000, 1500, 2000]
clabels = [str(val) for val in cvalues]
manual = [(0.85, -1), (0.85, -2), (0.85, -3), (0.85, -3.5), (0.85, -6)]
elijah_ttbarzp.max_mass_sens_versus_tpr_fpr(plot=True, cvalues=cvalues, clabels=clabels, manual=manual);