本文整理汇总了C++中RooFitResult::SetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ RooFitResult::SetTitle方法的具体用法?C++ RooFitResult::SetTitle怎么用?C++ RooFitResult::SetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RooFitResult
的用法示例。
在下文中一共展示了RooFitResult::SetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bkg
//.........这里部分代码省略.........
}
if (TPRegexp("s4fix").Match(command)!=0){//----------------------
sigma4.setConstant();printf("sigma 4 set constant%s\n","");
}
if (TPRegexp("s5fix").Match(command)!=0){//----------------------
sigma5.setConstant();printf("sigma 5 set constant%s\n","");
}
if (TPRegexp("s6fix").Match(command)!=0){//----------------------
sigma6.setConstant();printf("sigma 6 set constant%s\n","");
}
RooAbsPdf* model = (RooAbsPdf*) cust.build(kTRUE) ; //build a clone...comment on changes...
// model->Print("t") ;
//delete model ; // eventualy delete the model...
/*
* DISPLAY RESULTS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*/
TPad *orig_gpad=(TPad*)gPad;
TCanvas *c;
c=(TCanvas*)gROOT->GetListOfCanvases()->FindObject("fitresult");
if (c==NULL){
printf("making new canvas\n%s","");
c=new TCanvas("fitresult",h2->GetName(),1000,700);
}else{
printf("using old canvas\n%s","");
c->SetTitle( h2->GetName() );
}
c->Clear();
printf(" canvas cleared\n%s","");
c->Divide(1,2) ;
printf(" canvas divided\n%s","");
c->Modified();c->Update();
RooDataHist datah("datah","datah with x",x,h2);
RooPlot* xframe = x.frame();
datah.plotOn(xframe, DrawOption("logy") );
// return;
if (TPRegexp("chi2").Match(command)!=0){//----------------------CHI2
//from lorenzo moneta
// TH1 * h1 = datah.createHistogram(x);
// TF1 * f = model->asTF(RooArgList(x) , parameters ); //???
// h2->Fit(f);
//It will work but you need to create a THNSparse and fit it
//or use directly the ROOT::Fit::BinData class to create a ROOT::Fit::Chi2Function to minimize.
// THIS CANNOT DO ZERO BINS
fitresult = model->chi2FitTo( datah , Save() );
}else{
// FIT FIT FIT FIT FIT FIT FIT FIT FIT FIT
fitresult = model->fitTo( datah , Save() );
}
fitresult->SetTitle( h2->GetName() ); // I PUT histogram name to global fitresult
// will be done by printResult ... fitresult->Print("v") ;
//duplicite fitresult->floatParsFinal().Print("s") ;
// later - after parsfinale .... : printResult();
// model->Print(); // not interesting........