本文整理汇总了C++中TPad::UseCurrentStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ TPad::UseCurrentStyle方法的具体用法?C++ TPad::UseCurrentStyle怎么用?C++ TPad::UseCurrentStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPad
的用法示例。
在下文中一共展示了TPad::UseCurrentStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: makePlot
//.........这里部分代码省略.........
histoSignal3->Scale(lumi);
//
// BACKGROUND MC
//
THStack stack("Background MC","");
setPlotTitle(stack, lumi);
// Add all different background MC to this stack
TLegend *legend= new TLegend(0.5,0.6,0.85,0.85);
totalBkgMCIntegral = addBackgroundHistos(anaType, histoName, stack, legend, lumi, minIntegral, maxIntegral);
// if ( histoName=="nMinus1_isolationLeptonH_removedLifetimeCuts" || histoName=="nMinus1_relIsolationLeptonH_removedLifetimeCuts" ) {
// std::cout << "Integral of background between " << minIntegral << " and " << maxIntegral << " : " << totalBkgMCIntegral << std::endl;
// }
// Output histograms to file
outputFile->cd();
// Setup canvas
TCanvas canvas(histoName);
canvas.cd();
// Draw one or two pads
TPad * up = new TPad("u","u",0.01,0.25,0.99,0.99);
up->SetNumber(1);
up->Draw();
TPad * dp = new TPad("d","d",0.01,0.01,0.99,0.25);
if ( drawRatioPlot ) {
dp->SetNumber(2);
dp->UseCurrentStyle();
dp->Draw();
}
else {
up->SetPad(0.01,0.01,0.99,0.99);
up->Draw();
}
if ( logY ) up->SetLogy();
canvas.Draw();
canvas.cd(1);
up->cd();
canvas.SetFillColor(kWhite);
canvas.SetBorderMode(0);
// Draw background MC
// There may be zero entries, which will mess up drawing options
// Not a good fix at the moment
bool axesExist=false;
if (totalBkgMCIntegral>0) {
axesExist=true;
stack.Draw("HISTE");
stack.GetXaxis()->SetRangeUser(xMin, xMax);
stack.SetMaximum(yMax);
stack.SetMinimum(yMin);
stack.GetXaxis()->SetTitle(xTitle);
stack.GetYaxis()->SetTitle("Entries");
}
std::cout << "Drawing signal histos" << std::endl;