35 def __init__(self, **entries):
36 self.__dict__.
update(entries)
39BayesianMCMCOptions =
Struct(
48optMCMC = BayesianMCMCOptions
51def StandardBayesianMCMCDemo(infile="", workspaceName="combined", modelConfigName="ModelConfig", dataName="obsData"):
59 filename =
"results/example_combined_GaussExample_model.root"
64 print(f
"will run standard hist2workspace example")
67 print(f
"\n\n---------------------")
68 print(f
"Done creating example input")
69 print(f
"---------------------\n\n")
77 print(f
"StandardRooStatsDemoMacro: Input file {filename} is not found")
88 print(f
"workspace not found")
92 mc =
w.obj(modelConfigName)
98 if not data
or not mc:
100 print(f
"data or ModelConfig was not found")
107 # this one is based on the covariance matrix of fit
108 fit = mc.GetPdf().fitTo(data,Save())
110 ph.SetVariables((RooArgSet&)fit.floatParsFinal())
111 ph.SetCovMatrix(fit.covarianceMatrix())
112 ph.SetUpdateProposalParameters(True) # auto-create mean vars and add mappings
114 pf = ph.GetProposalFunction()
175 c1.SaveAs(
"StandardBayesianMCMCDemo.1.IntervalPlot.png")
176 c2.SaveAs(
"StandardBayesianMCMCDemo.2.extraPlots.png")
179StandardBayesianMCMCDemo(
"",
"combined",
"ModelConfig",
"obsData")
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.