本文整理汇总了C++中TVirtualPad::Draw方法的典型用法代码示例。如果您正苦于以下问题:C++ TVirtualPad::Draw方法的具体用法?C++ TVirtualPad::Draw怎么用?C++ TVirtualPad::Draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TVirtualPad
的用法示例。
在下文中一共展示了TVirtualPad::Draw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HighlightFragment
//______________________________________________________________________________
void HighlightFragment()
{
// TODO templates: what and how highlighing
if (!gPad || !gr) return;
// not correct
TVirtualPad *ph = (TVirtualPad *)gPad->FindObject("ph");
if (!ph) {
ph = new TPad("ph", "ph", 0.0, 0.2, 1.0, 1.0);
ph->SetFillColor(kBlue-10);
ph->Draw();
}
Int_t ih = gr->GetHighlightPoint();
if (ih == -1) return;
TRsnFragment *frag = group->FragmentAt(ih);
if (!frag) return;
TVirtualPad *save = gPad;
ph->cd();
TObject *element = frag->FindElement(tagname);
if (!element) ph->Clear();
else element->Draw();
save->cd();
}
示例2: validation
//.........这里部分代码省略.........
legMap[it->first]->AddEntry(hDY,"Official DY#mu#mu","lep");
legMap[it->first]->AddEntry(h1Map[it->first+"t"],"ME^{2} method: Template w/o couplings scale","lep");
if(it->first=="2000")
{
legMap[it->first]->AddEntry(h1Template,"ME^{2} method: Template histogram at #it{g=1} (SSM)","lep");
legMap[it->first]->AddEntry(graphSSM, "ME^{2} method: Template function at #it{g=1} (SSM)","p");
legMap[it->first]->AddEntry(graphDY, "ME^{2} method: Template function at #it{g=0} (DY)","p");
}
if(!doTruth)
{
h1dTlvTmpltMap[it->first]->SetLineColor(kCyan+2);
h1dTlvTmpltMap[it->first]->SetMarkerColor(kCyan+2);
h1dTlvTmpltMap[it->first]->SetMarkerStyle(5);
h1dTlvTmpltMap[it->first]->SetMarkerSize(0.5);
legMap[it->first]->AddEntry(h1dTlvTmpltMap[it->first],"ME^{2} method: DY+Template (no interference)","p");
h1dBrandeisTmpltMap[it->first]->SetLineColor(kRed);
h1dBrandeisTmpltMap[it->first]->SetMarkerColor(kRed);
h1dBrandeisTmpltMap[it->first]->SetMarkerStyle(27);
h1dBrandeisTmpltMap[it->first]->SetMarkerSize(0.5);
legMap[it->first]->AddEntry(h1dBrandeisTmpltMap[it->first],"Flat Z' method: DY+Template (no interference)","p");
}
it->second->Divide(1,2);
TVirtualPad* ph = it->second->cd(1);
TVirtualPad* pr = it->second->cd(2);
ph->SetPad(0.00, 0.35, 1.00, 1.00);
pr->SetPad(0.00, 0.00, 1.00, 0.35);
ph->SetBottomMargin(0.012);
pr->SetBottomMargin(0.20);
pr->SetTopMargin(0.012);
ph->cd();
ph->Draw();
ph->SetTicks(1,1);
ph->SetLogy();
ph->SetLogx();
// h1Map[it->first+"o"]->SetMaximum( h1Map[it->first+"t"]->GetMaximum()*1.5 );
// h1Map[it->first+"o"]->Draw();
TH1D* hTmpNoErr = (TH1D*)resetErrors(h1Map[it->first+"o"])->Clone();
hTmpNoErr->SetMaximum( h1Map[it->first+"t"]->GetMaximum()*1.5 );
hTmpNoErr->SetLineStyle(1);
hTmpNoErr->SetLineColor(kBlack);
hTmpNoErr->SetFillColor(kAzure-9);
hTmpNoErr->Draw();
TH1D* hTmpErr = (TH1D*)ShiftLog(h1Map[it->first+"o"],0.2)->Clone();
hTmpErr->SetFillStyle(4000); //will be transparent
hTmpErr->SetFillColor(0);
hTmpErr->DrawCopy("epx0SAMES");
hDY->Draw("SAMES");
h1Map[it->first+"t"]->Draw("epSAMES");
//poissonGraphMap[it->first]->Draw("pSAMES");
if(it->first=="2000")
{
graphDY->Draw("SAMESp");
graphSSM->Draw("SAMESp");
h1Template->Draw("epSAMES");
}
_INFO("");
h1dTlvTmpltMap[it->first]->Draw("SAMESp");
h1dBrandeisTmpltMap[it->first]->Draw("SAMESp");
TLine* chopline = new TLine(0.12805,getYmin(h1Map[it->first+"o"]),0.12805,7.e5);
chopline->SetLineStyle(2);
chopline->SetLineColor(kBlack);
chopline->Draw("SAMES");