本文整理汇总了C++中TText::SetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ TText::SetTitle方法的具体用法?C++ TText::SetTitle怎么用?C++ TText::SetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TText
的用法示例。
在下文中一共展示了TText::SetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateBkgTemplates
//.........这里部分代码省略.........
roohist_Z[icat] = new RooDataHist(name,name,x,hZ);
sprintf(name,"Z_mean_CAT%d",counter);
RooRealVar mZ(name,name,95,80,110);
sprintf(name,"Z_sigma_CAT%d",counter);
RooRealVar sZ(name,name,12,9,20);
sprintf(name,"Z_mean_shifted_CAT%d",counter);
RooFormulaVar mZShift(name,"@0*@1",RooArgList(mZ,*(kJES[isel])));
sprintf(name,"Z_sigma_shifted_CAT%d",counter);
RooFormulaVar sZShift(name,"@0*@1",RooArgList(sZ,*(kJER[isel])));
sprintf(name,"Z_a_CAT%d",counter);
RooRealVar aZ(name,name,-1,-10,10);
sprintf(name,"Z_n_CAT%d",counter);
RooRealVar nZ(name,name,1,0,10);
RooRealVar Zb0("Z_b0_CAT"+TString::Format("%d",counter),"Z_b0_CAT"+TString::Format("%d",counter),0.5,0,1.);
RooRealVar Zb1("Z_b1_CAT"+TString::Format("%d",counter),"Z_b1_CAT"+TString::Format("%d",counter),0.5,0,1.);
RooRealVar Zb2("Z_b2_CAT"+TString::Format("%d",counter),"Z_b2_CAT"+TString::Format("%d",counter),0.5,0,1.);
RooBernstein Zbkg("Z_bkg_CAT"+TString::Format("%d",counter),"Z_bkg_CAT"+TString::Format("%d",counter),x,RooArgSet(Zb0,Zb1,Zb2));
RooRealVar fZsig("fZsig_CAT"+TString::Format("%d",counter),"fZsig_CAT"+TString::Format("%d",counter),0.7,0.,1.);
RooCBShape Zcore("Zcore_CAT"+TString::Format("%d",counter),"Zcore_CAT"+TString::Format("%d",counter),x,mZShift,sZShift,aZ,nZ);
RooAddPdf modelZ("Z_model_CAT"+TString::Format("%d",counter),"Z_model_CAT"+TString::Format("%d",counter),RooArgList(Zcore,Zbkg),fZsig);
RooFitResult *resZ = modelZ.fitTo(*roohist_Z[icat],RooFit::Save(),RooFit::SumW2Error(kFALSE),"q");
canZ->cd(icat+1);
RooPlot* frame = x.frame();
roohist_Z[icat]->plotOn(frame);
modelZ.plotOn(frame,RooFit::LineWidth(2));
frame->GetXaxis()->SetTitle("M_{bb} (GeV)");
frame->Draw();
TPaveText *pave = new TPaveText(0.7,0.76,0.9,0.9,"NDC");
pave->SetTextAlign(11);
pave->SetFillColor(0);
pave->SetBorderSize(0);
pave->SetTextFont(62);
pave->SetTextSize(0.045);
pave->AddText(TString::Format("%s selection",SELNAME[isel].Data()));
pave->AddText(TString::Format("CAT%d",counter));
TText *lastline = pave->AddText("Z template");
pave->SetY1NDC(pave->GetY2NDC()-0.055*3);
TPaveText *paveorig = (TPaveText*)pave->Clone();
paveorig->Draw();
sprintf(name,"roohist_T_CAT%d",counter);
if (icat < 3) {
roohist_T[icat] = new RooDataHist(name,name,x,hTopYield);
}
else {
roohist_T[icat] = new RooDataHist(name,name,x,hSTYield);
}
sprintf(name,"Top_mean_CAT%d",counter);
RooRealVar mT(name,name,130,0,200);
sprintf(name,"Top_sigma_CAT%d",counter);
RooRealVar sT(name,name,50,0,200);
sprintf(name,"Top_mean_shifted_CAT%d",counter);
RooFormulaVar mTShift(name,"@0*@1",RooArgList(mT,*(kJES[isel])));
sprintf(name,"Top_sigma_shifted_CAT%d",counter);
RooFormulaVar sTShift(name,"@0*@1",RooArgList(sT,*(kJER[isel])));