9 #include "RooWorkspace.h" 10 #include "RooDataSet.h" 11 #include "RooProdPdf.h" 12 #include "RooNLLVar.h" 13 #include "RooMinuit.h" 14 #include "RooFitResult.h" 19 string file_path =
"wspace_nosyst_nokappa_nor4_T1tttt_mGluino-1700_mLSP-100_xsecNom.root";
24 static struct option long_options[] = {
25 {
"file", required_argument, 0,
'f'},
31 opt = getopt_long(argc, argv,
"f:", long_options, &option_index);
41 optname = long_options[option_index].name;
44 printf(
"Bad option! Found option name %s\n", optname.c_str());
48 printf(
"Bad option! getopt_long returned character code 0%o\n", opt);
53 int main(
int argc,
char *argv[]){
57 RooWorkspace *w =
static_cast<RooWorkspace*
>(in_file.Get(
"w"));
58 RooDataSet *data_obs =
static_cast<RooDataSet*
>(w->data(
"data_obs"));
59 RooProdPdf *model_b =
static_cast<RooProdPdf*
>(w->pdf(
"model_b"));
61 RooNLLVar nll(
"nll",
"nll", *model_b, *data_obs);
63 RooMinuit minuit(nll);
65 minuit.setPrintLevel(99999);
66 minuit.setVerbose(
true);
67 minuit.setStrategy(2);
68 minuit.optimizeConst(
true);
74 minuit.save()->Print(
"v");
void GetOptions(int argc, char *argv[])
int main(int argc, char *argv[])