当前位置: 首页>>代码示例>>C++>>正文


C++ TLine::Clone方法代码示例

本文整理汇总了C++中TLine::Clone方法的典型用法代码示例。如果您正苦于以下问题:C++ TLine::Clone方法的具体用法?C++ TLine::Clone怎么用?C++ TLine::Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TLine的用法示例。


在下文中一共展示了TLine::Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if


//.........这里部分代码省略.........
  c1->SetTicky(1);
  c1->SetLeftMargin(0.122807);
  c1->SetRightMargin(0.05012531);
  c1->SetTopMargin(0.06947891);
  c1->SetBottomMargin(0.1104218);
  c1->SetFrameFillStyle(0);
  c1->SetFrameBorderMode(0);
  c1->SetFrameFillStyle(0);
  c1->SetFrameBorderMode(0);

  TCanvas *c2 = new TCanvas("c2", "c2",561,482,800,830);
  gStyle->SetOptFit(1);
  gStyle->SetOptStat(0);
  gStyle->SetOptTitle(0);
  c2->Range(0.644391,-0.1480839,3.167468,1.19299);
  c2->SetFillColor(0);
  c2->SetBorderMode(0);
  c2->SetBorderSize(2);
  c2->SetLogx();
  c2->SetTickx(1);
  c2->SetTicky(1);
  c2->SetLeftMargin(0.122807);
  c2->SetRightMargin(0.05012531);
  c2->SetTopMargin(0.06947891);
  c2->SetBottomMargin(0.1104218);
  c2->SetFrameFillStyle(0);
  c2->SetFrameBorderMode(0);
  c2->SetFrameFillStyle(0);
  c2->SetFrameBorderMode(0);

  TGraphAsymmErrors *WJets_MET = NULL, *WJets_MuonPt = NULL;

  c1->cd ();
  (WJets_MET = (TGraphAsymmErrors *) triggerEfficiency.at ("WJets_MET")->Clone ())->Draw ("ap");
  pt1->Clone ()->Draw ("same");
  pt2->Clone ()->Draw ("same");
  pt3->Clone ()->Draw ("same");
  WJets_MET->GetYaxis ()->SetRangeUser (0.0, YMAX);

  c2->cd ();
  (WJets_MuonPt = (TGraphAsymmErrors *) triggerEfficiency.at ("WJets_MuonPt")->Clone ())->Draw ("ap");
  pt1->Clone ()->Draw ("same");
  pt2->Clone ()->Draw ("same");
  pt4->Clone ()->Draw ("same");
  WJets_MuonPt->GetYaxis ()->SetRangeUser (0.0, YMAX);

  TLine *l = new TLine (1.0e1, 1.0, 1.1e3, 1.0);
  l->SetLineWidth (3);
  l->SetLineStyle (2);

  c1->cd ();
  l->SetX1 (WJets_MET->GetXaxis ()->GetXmin ());
  l->SetX2 (WJets_MET->GetXaxis ()->GetXmax ());
  l->Clone ()->Draw ("same");

  c2->cd ();
  l->SetX1 (WJets_MuonPt->GetXaxis ()->GetXmin ());
  l->SetX2 (WJets_MuonPt->GetXaxis ()->GetXmax ());
  l->Clone ()->Draw ("same");

  if (!doFit)
    return;

  TF1 *f0 = new TF1 ("f0", normCDF, 1.0e1, 1.0e3, 4),
      *f1 = new TF1 ("f1", normCDF, 1.0e1, 1.0e3, 4);
开发者ID:srimanob,项目名称:DisappTrks,代码行数:66,代码来源:plotTriggerTurnOnForData.C

示例2: diphomva_inputs


//.........这里部分代码省略.........
  c_bdtin_1->cd(2);
  sf = pho2_phoidMva_cat0_Data->Integral()/pho2_phoidMva_cat0_DYJetsToLL->Integral();
  pho2_phoidMva_cat0_DYJetsToLL->Scale(sf);
  pho2_phoidMva_cat0_Data->GetXaxis()->SetRangeUser(-0.3,0.6);
  pho2_phoidMva_cat0_Data->Draw("e");
  pho2_phoidMva_cat0_DYJetsToLL->Draw("hist,same");
  pho2_phoidMva_cat0_Data->Draw("e,same");
  gPad->RedrawAxis();
  leg->Draw();

  c_bdtin_1->cd(3);
  gPad->SetLogy();
  sf = vtxProb_cat0_Data->Integral()/vtxProb_cat0_DYJetsToLL->Integral();
  vtxProb_cat0_DYJetsToLL->Scale(sf);
  //vtxProb_cat0_Data->GetXaxis()->SetRangeUser(0.2,1.);
  vtxProb_cat0_Data->Draw("e");
  vtxProb_cat0_DYJetsToLL->Draw("hist,same");
  vtxProb_cat0_Data->Draw("e,same");
  gPad->RedrawAxis();
  leg2->Draw();

  c_bdtin_1->cd(4);
  gPad->SetLogy();
  sf = cosDeltaPhi_cat0_Data->Integral()/cosDeltaPhi_cat0_DYJetsToLL->Integral();
  cosDeltaPhi_cat0_DYJetsToLL->Scale(sf);
  cosDeltaPhi_cat0_Data->Draw("e");
  cosDeltaPhi_cat0_DYJetsToLL->Draw("hist,same");
  cosDeltaPhi_cat0_Data->Draw("e,same");
  gPad->RedrawAxis();
  leg->Draw();

  c_bdtin_1->cd(5);
  plotRatio(pho1_phoidMva_cat0_Data,pho1_phoidMva_cat0_DYJetsToLL);
  line1 = (TLine*)line->Clone();
  line1->SetX1(-0.3);
  line1->SetX2(0.6);
  line1->Draw();

  c_bdtin_1->cd(6);
  plotRatio(pho2_phoidMva_cat0_Data,pho2_phoidMva_cat0_DYJetsToLL);
  line1->Draw();

  c_bdtin_1->cd(7);
  plotRatio(vtxProb_cat0_Data,vtxProb_cat0_DYJetsToLL);
  line->Draw();

  c_bdtin_1->cd(8);
  plotRatio(cosDeltaPhi_cat0_Data,cosDeltaPhi_cat0_DYJetsToLL);
  line->Draw();

  c_bdtin_1->SaveAs("bdtin_1.png");

  //------------------------------------------------------------------------------

  TCanvas *c_bdtin_2 = new TCanvas("c_bdtin_2","BDT input variables",1500,900);
  c_bdtin_2->Divide(4,3);
  c_bdtin_2->cd(1);

  sf = sigmaMOverM_cat0_Data->Integral()/sigmaMOverM_cat0_DYJetsToLL->Integral();
  sigmaMOverM_cat0_DYJetsToLL->Scale(sf);
  sigmaMOverM_cat0_Data->Draw("e");
  sigmaMOverM_cat0_DYJetsToLL->Draw("hist,same");
  sigmaMOverM_cat0_Data->Draw("e,same");
  gPad->RedrawAxis();
  leg->Draw();
开发者ID:ETHZ,项目名称:h2gglobe,代码行数:66,代码来源:diphomva_inputs.C


注:本文中的TLine::Clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。