Beispiel #1
0
c = ROOT.TCanvas()
frame = DE.plot_on_frame()
frame.Draw()

# Make pull distribution for the fit
c_pull = ROOT.TCanvas()
frame_pull = DE.plot_pull()
frame_pull.Draw()

# Plot likelihood profiles
c_ll = ROOT.TCanvas()
frame_ll = DE.plot_ll(poi=N_sig)
frame_ll.Draw()

# Check whether there is bias in the fit
frame_var, frame_err, frame_pull = DE.check_fit_bias(param_to_study=N_sig,
                                                     N_toys=100)
c_var = ROOT.TCanvas()
frame_var.Draw()
c_error = ROOT.TCanvas()
frame_err.Draw()
c_pull = ROOT.TCanvas()
frame_pull.Draw()

# Export data and model to workspace
w = DE.write_to_workspace(poi=N_sig, nuisances=[exp_par, mean, sigma, N_bkgr])

# Calculate statistical significance of signal observation with asymptotic approximation
asympt_rrr = DE.asympt_signif(w=w)
# DE.asympt_signif_ll(w=w) # another method

# Do chi^2 goodness-of-fit test and print fit and test status