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


C++ TLegend::SetLineStyle方法代码示例

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


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

示例1: plot_toys

void plot_toys()
{
  TFile* f = new TFile("/project/atlas/users/tlenz/HWWStatisticsCode_v31/CPmix_kHWW2dot65m_0j_trainv31_v31_allsys_topLumi_toys.root");
  RooWorkspace* w = (RooWorkspace*)f->Get("combined");

  RooDataSet* data = (RooDataSet*)w->data("obsData");
  RooDataSet* toydata = (RooDataSet*)w->data("toyData");
  RooDataSet* toydata2 = (RooDataSet*)w->data("toyData4");
  RooDataSet* thisAsimovData = (RooDataSet*)w->data("asimivData_profiled_for_epsilon_0"); //asimivData_profiled_for_epsilon_0
  
  RooPlot* frame1 = w->var("obs_x_em_signalLike_0j_2012")->frame();
  //  RooPlot* frame2 = w->var("obs_x_em_mainControl_0j_2012")->frame();
  // RooPlot* frame3 = w->var("obs_x_em_zbox_0j_2012")->frame();
  
  data->plotOn(frame1, Name("data"), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_signalLike_0j_2012"));
  //data->plotOn(frame2, Name("data"), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_mainControl_0j_2012"));
  //data->plotOn(frame3, Name("data"), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_zbox_0j_2012"));
  
  toydata->plotOn(frame1, Name("toy1"), LineColor(kRed), MarkerStyle(21), MarkerColor(kRed), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_signalLike_0j_2012"));
  //toydata->plotOn(frame2, Name("toy1"), LineColor(kRed), MarkerStyle(21), MarkerColor(kRed), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_mainControl_0j_2012"));
  //toydata->plotOn(frame3, Name("toy1"), LineColor(kRed), MarkerStyle(21), MarkerColor(kRed), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_zbox_0j_2012"));
  
  toydata2->plotOn(frame1, Name("toy4"), LineColor(kGreen), MarkerStyle(21), MarkerColor(kGreen), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_signalLike_0j_2012"));
  //toydata2->plotOn(frame2, Name("toy4"), LineColor(kGreen), MarkerStyle(21), MarkerColor(kGreen), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_mainControl_0j_2012"));
  //toydata2->plotOn(frame3, Name("toy4"), LineColor(kGreen), MarkerStyle(21), MarkerColor(kGreen), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_zbox_0j_2012"));
  
  thisAsimovData->plotOn(frame1, Name("asimov"), LineColor(kBlue), MarkerStyle(22), MarkerColor(kBlue), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_signalLike_0j_2012"));
  //thisAsimovData->plotOn(frame2, Name("asimov"), LineColor(kBlue), MarkerStyle(22), MarkerColor(kBlue), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_mainControl_0j_2012"));
  //thisAsimovData->plotOn(frame3, Name("asimov"), LineColor(kBlue), MarkerStyle(22), MarkerColor(kBlue), DataError(RooAbsData::Poisson), Cut("merged_cat==merged_cat::em_zbox_0j_2012"));
  
  TCanvas* c = new TCanvas("c","c",1800,600);
  //c->Divide(3,1);
  
  /*c->cd(1);*/ /*gPad->SetLogy();*/ frame1->Draw();
  
  
  //c->cd(2); frame2->Draw();
  //draw legend
  TLegend *leg = new TLegend(0.48, 0.60, 0.84, 0.80, NULL,"brNDC");
  leg->SetBorderSize(0);
  leg->SetTextFont(62);
  leg->SetTextSize(0.04);
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(1);
  leg->SetFillColor(0);
  leg->SetFillStyle(1001);
  leg->SetNColumns(1);
  leg->AddEntry(frame1->findObject("data"),"data","pl");
  leg->AddEntry(frame1->findObject("toy1"),"toy1","pl");
  leg->AddEntry(frame1->findObject("toy4"),"toy4","pl");
  leg->AddEntry(frame1->findObject("asimov"),"asimov","pl");
	leg->Draw();
	//c->cd(3); frame3->Draw();
	c->Print("toys_linear.pdf");
}
开发者ID:nkarast,项目名称:Snippets,代码行数:56,代码来源:plot_toys.C

示例2: overlayPFRatio

void overlayPFRatio(){
  // input is files created by drawR using the "hack to save" qcd only. it creates a ratio in its own root file, both with the same name.
  // run by doing root -l overlayPFRatio.C++

  gROOT->SetStyle("CMS");

  TString name1 = "minDeltaPhiN_HT350_ge1b_qcd";
  TString name2 = "minDeltaPhiN_DJR_HT350_ge1b_qcd";
  //TString name3 = "MET_15-2.7_"+bstring+"b_qcd";

  TFile *f1=TFile::Open("../"+name1+".root","READ");
  TFile *f2=TFile::Open("../"+name2+".root","READ");
  //TFile *f3=TFile::Open(name3+".root","READ");

  TH1D* h1=(TH1D*)f1->Get(name1);
  TH1D* h2=(TH1D*)f2->Get(name2);
  //TH1D* h3=(TH1D*)f3->Get(name3);
  h1->UseCurrentStyle();
  h2->UseCurrentStyle();
  //h3->UseCurrentStyle();
    
  h2->SetLineColor(kRed);
  h2->SetMarkerColor(kRed);
  //h3->SetLineColor(kBlue);
  //h3->SetMarkerColor(kBlue);

  h1->GetYaxis()->SetTitle("N pass / N fail");
  h1->GetXaxis()->SetTitle("MET");
  //h1->SetMaximum(1.);
  h1->SetMinimum(0.);
  
  h1->Draw("hist e");
  h2->Draw("SAME hist e");  
  //h3->Draw("SAME hist e");

  TLegend *leg = new TLegend(0.2,.7,0.6,0.88);
  leg->AddEntry(h1,name1, "P");
  leg->AddEntry(h2, name2, "P");
  //leg->AddEntry(h3, name3, "P");
  leg->SetFillColor(0);
  leg->SetBorderSize(0);
  leg->SetLineStyle(0);
  leg->SetTextFont(42);
  leg->SetFillStyle(0);
  leg->SetTextSize(0.03);
  leg->Draw();

  gPad->SetRightMargin(0.1);
  gPad->Modified();

}
开发者ID:SusyRa2b,项目名称:NtupleTools,代码行数:51,代码来源:overlayPFRatio.C

示例3: TLegend

TLegend *getLegend(double x1, double y1, double x2, double y2)
{
  TLegend *leg = new TLegend(x1,y1,x2,y2,NULL,"BRNDC");
  leg->SetHeader("");
  leg->SetBorderSize(0);
  leg->SetTextFont(42);
  leg->SetTextSize(0.06);
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(1);
  leg->SetFillColor(10);
  leg->SetFillStyle(1001);
  return leg;
}
开发者ID:ilaflott,项目名称:RAA_5p02_code,代码行数:14,代码来源:JRsp.C

示例4: buildLegend

TLegend* buildLegend(double y)
{
  TLegend* leg = new TLegend(0.73,0.55+y,0.85,0.88,NULL,"brNDC");

  leg->SetBorderSize(1);
  leg->SetTextFont(62);
  leg->SetTextSize(0.04);
  leg->SetLineColor(0);
  leg->SetLineStyle(1);
  leg->SetLineWidth(1);
  leg->SetFillColor(0);
  leg->SetFillStyle(1001);

  return leg;
}
开发者ID:YoungKwonJo,项目名称:TTbar2b,代码行数:15,代码来源:makePlotsCSVWeight.C

示例5: DrawHijing2GeV

void DrawHijing2GeV()
{
  TCanvas *c1 = new TCanvas();
TFile *fin = TFile::Open("Gamma_Neutron_Hijing_Energy_Graphs.root");
gROOT->cd();
TH1 *h1lim = new TH1F("h1lim","",1,0,0.1);
TH1 *hjbkg = (TH1 *) fin->Get("hjbkg")->Clone();
TGraph *anti_neutron2GeV = (TGraph *) fin->Get("anti_neutron2GeV")->Clone();
TGraph *neutron2GeV = (TGraph *) fin->Get("neutron2GeV")->Clone();
h1lim->SetStats(0);
h1lim->SetMaximum(0.3);
h1lim->SetTitle("2 GeV Hadronic Showers with HIJING background");
h1lim->GetYaxis()->SetTitle("Deposited Energey [GeV]");
h1lim->GetYaxis()->SetTitleOffset(1.2);
h1lim->GetXaxis()->SetTitle("cone size (#sqrt{#Delta#Phi^{2}+#Delta#Theta^{2}})");
h1lim->GetXaxis()->SetTitleOffset(1.2);
h1lim->Draw();
hjbkg->SetStats(0);
hjbkg->SetLineColor(6);
hjbkg->SetMaximum(5.5);
hjbkg->SetLineWidth(2);
hjbkg->Draw("same");
anti_neutron2GeV->SetLineColor(4);
anti_neutron2GeV->SetLineWidth(2);
anti_neutron2GeV->Draw("same");
neutron2GeV->SetLineColor(2);
neutron2GeV->SetLineWidth(2);
neutron2GeV->Draw("same");
TLine *tl = new TLine();
tl->SetLineStyle(2);
tl->DrawLine(0.024,0,0.024,0.3);
TLegend *legrda = new TLegend(0.67,0.34,0.87,0.54,NULL,"brNDC");
  legrda->SetLineColor(1);
  legrda->SetLineStyle(1);
  legrda->SetLineWidth(1);
  legrda->SetFillColor(10);
  legrda->SetFillStyle(1001);
  legrda->SetBorderSize(0);
//  legrda->SetTextSize(labelsize);
  legrda->AddEntry(hjbkg,"HIJING bkg"); 
  legrda->AddEntry(anti_neutron2GeV,"2 GeV Anti Neutron","l"); 
  legrda->AddEntry(neutron2GeV,"2 GeV Neutron", "l"); 
  legrda->AddEntry(tl,"EMCal tower size","l"); 
  legrda->Draw();
 
fin->Close();
c1->Print("Hijing2GeV.png");
}
开发者ID:kurthill,项目名称:analysis,代码行数:48,代码来源:GammaNeutronEnergyHijing.C

示例6: mdpRatios

void mdpRatios() {

  TGraphAsymmErrors* mdpN = GetCombinedEfficiency("min_delta_phi_met_N>4.","ht50>400&&jet2_pt>70&&jet3_pt>50&&num_reco_veto_electrons==0&&num_reco_veto_muons==0&&num_csvm_jets>0");
  TGraphAsymmErrors* mdp = GetCombinedEfficiency("min_delta_phi_met>0.3","ht50>400&&jet2_pt>70&&jet3_pt>50&&num_reco_veto_electrons==0&&num_reco_veto_muons==0&&num_csvm_jets>0");

  mdpN->SetLineColor(46);
  mdp->SetLineColor(38);
  mdpN->SetMarkerColor(46);
  mdp->SetMarkerColor(38);
  mdpN->SetMarkerStyle(21);
  mdp->SetMarkerStyle(22);
  mdpN->SetLineWidth(2);
  mdp->SetLineWidth(2);


  TCanvas * thecanvas= new TCanvas("thecanvas","the canvas",800,600);
  
  mdp->Draw("AP");
  mdpN->Draw("P");

  mdp->SetTitle("Efficiency of #Delta#phi cuts as a function of E_{T}^{miss};E_{T}^{miss} [GeV];Cut efficiency");
  mdp->GetYaxis()->SetLabelSize(0.028);

  cout << "Dump efficiencies for min_delta_phi_met_N: " << endl;
  mdpN->Print();
  cout << "Dump efficiencies for min_delta_phi_met: " << endl;
  mdp->Print();

  TLegend * leg = new TLegend(0.65,0.75,0.8,0.9);
  leg->SetFillColor(0);
  leg->SetBorderSize(0);
  leg->SetLineStyle(0);
  leg->SetFillStyle(0);
  leg->SetTextFont(132);
  leg->SetTextSize(.04);
  leg->AddEntry(mdpN,"#Delta#hat{#phi}_{N}^{min}>4.","lp");
  leg->AddEntry(mdp,"#Delta#phi_{min}>0.3","lp");

  leg->Draw();

  thecanvas->Print("macros/qcd_control/plots/ratio_test_geq1bm_all_samples.pdf");

  //  delete mdpN;
  // delete leg;
  // delete thecanvas;
}
开发者ID:ald77,项目名称:csa14,代码行数:46,代码来源:mdpRatios.C

示例7: DrawGraphs

void OverlayAnalysis::DrawGraphs()
{
    std::cout << "Drawing graphs" << std::endl;

    for(CanvasMultiGraphMap::iterator graphIter = m_canvasMultiGraphMap.begin(), graphEndIter = m_canvasMultiGraphMap.end() ;
            graphEndIter != graphIter ; ++graphIter)
    {
        graphIter->second.first->cd();

        graphIter->second.second->Draw("ap");
        this->PostDrawMultiGraph(graphIter->first, graphIter->second.second);

        TLegend *pLegend = graphIter->second.first->BuildLegend();
        pLegend->SetBorderSize(0);
        pLegend->SetLineColor(0);
        pLegend->SetLineStyle(1);
        pLegend->SetLineWidth(1);
        pLegend->SetFillColor(0);
        pLegend->SetFillStyle(0);
        pLegend->SetTextSize(0.04);
    }
}
开发者ID:ArborPFA,项目名称:SDHCALArborPFA,代码行数:22,代码来源:OverlayAnalysis.C

示例8: GetPlot

TCanvas* GetPlot(TH1F *data_hist, TH1F* mc_hist, TString NJets)
{
   double MaxY = data_hist->GetMaximum();
   
   TCanvas *c = new TCanvas("c", "", 700, 700);
   c->SetLogy();

   data_hist->GetYaxis()->SetRangeUser(0.001, 2.2 * MaxY);
   data_hist->SetXTitle("N_{Vtx}");
   data_hist->SetYTitle("Prediction / # seed events ");
   data_hist->Draw();
   // mc_hist->SetMarkerColor(kRed);
   mc_hist->SetMarkerStyle(21);
   mc_hist->SetMarkerColor(kAzure-3);
   mc_hist->SetLineColor(kAzure-3);
   mc_hist->Draw("same");

   TLegend *leg = new TLegend(0.5, 0.3, 0.85, 0.42);
   leg->AddEntry( data_hist, "Data" , "lp");
   leg->AddEntry( mc_hist, "QCD madgraph" , "lp");
   leg->SetFillStyle(0);
   leg->SetLineStyle(1);
   leg->SetTextFont(42);
   leg->SetTextSize(0.035);

   leg->Draw("same");

   TPaveText* pt2 = new TPaveText(0.11, 0.855, 0.95, 0.935, "NDC");
   pt2->SetBorderSize(0);
   pt2->SetFillStyle(0);
   pt2->SetTextAlign(12);
   pt2->SetTextSize(0.03);
   pt2->AddText(NJets);
   pt2->AddText("CMS Preliminary, L = 19.5 fb^{  -1}, #sqrt{s} = 8 TeV");
   pt2->Draw();

   return c;
}
开发者ID:kheine,项目名称:macros,代码行数:38,代码来源:PlotPUUncertainty.C

示例9: result_JES_akPu4PF_


//.........这里部分代码省略.........
   25};
   Double_t Graph_fey1003[4] = {
   0.01053149,
   0.005298861,
   0.004412705,
   0.002663901};
   gre = new TGraphErrors(4,Graph_fx1003,Graph_fy1003,Graph_fex1003,Graph_fey1003);
   gre->SetName("Graph");
   gre->SetTitle("some title_2");
   gre->SetFillColor(1);
   gre->SetFillStyle(0);
   gre->SetLineColor(3);
   gre->SetMarkerColor(3);
   
   TH1F *Graph_Graph1003 = new TH1F("Graph_Graph1003","some title_2",100,0,110);
   Graph_Graph1003->SetMinimum(0.9335092);
   Graph_Graph1003->SetMaximum(1.011502);
   Graph_Graph1003->SetDirectory(0);
   Graph_Graph1003->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1003->SetLineColor(ci);
   Graph_Graph1003->GetXaxis()->SetLabelFont(42);
   Graph_Graph1003->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetXaxis()->SetTitleFont(42);
   Graph_Graph1003->GetYaxis()->SetLabelFont(42);
   Graph_Graph1003->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetYaxis()->SetTitleFont(42);
   Graph_Graph1003->GetZaxis()->SetLabelFont(42);
   Graph_Graph1003->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1003->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1003->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1003);
   
   multigraph->Add(gre,"");
   multigraph->Draw("AP");
   multigraph->GetXaxis()->SetTitle("Centrality");
   multigraph->GetXaxis()->SetLabelFont(42);
   multigraph->GetXaxis()->SetLabelSize(0.035);
   multigraph->GetXaxis()->SetTitleSize(0.035);
   multigraph->GetXaxis()->SetTitleFont(42);
   multigraph->GetYaxis()->SetTitle("#mu_{Reco./Gen.}");
   multigraph->GetYaxis()->SetLabelFont(42);
   multigraph->GetYaxis()->SetLabelSize(0.035);
   multigraph->GetYaxis()->SetTitleSize(0.035);
   multigraph->GetYaxis()->SetTitleFont(42);
   
   TLegend *leg = new TLegend(0.68,0.7,0.88,0.85,NULL,"brNDC");
   leg->SetBorderSize(0);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("Graph","allJets","l");
   entry->SetLineColor(1);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("Graph","lightJets","l");
   entry->SetLineColor(2);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   entry=leg->AddEntry("Graph","bJets","l");
   entry->SetLineColor(3);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(42);
   leg->Draw();
   TLatex *   tex = new TLatex(0.25,0.7,"#bf{#color[2]{|#eta_{jet}|<2.0 &75<refpt<120}}");
tex->SetNDC();
   tex->SetTextFont(43);
   tex->SetTextSize(24);
   tex->SetLineWidth(2);
   tex->Draw();
   
   TPaveText *pt = new TPaveText(0.3750575,0.9365254,0.6249425,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   AText = pt->AddText("JES_akPu4PF");
   pt->Draw();
   Can_result_0->Modified();
   Can_result_0->cd();
   Can_result_0->SetSelected(Can_result_0);
}
开发者ID:Jelov,项目名称:JetEnergy_SR,代码行数:101,代码来源:result_JES_akPu4PF_(refpt>+75+&&+refpt+<+120)&&(abs(refeta)<2)_Centrality.C

示例10: DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi

void DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:18:26 2015) by ROOT version6.02/05
   TCanvas *cnv = new TCanvas("cnv", "cnv",1,1,904,904);
   gStyle->SetOptFit(1);
   gStyle->SetOptStat(0);
   gStyle->SetOptTitle(0);
   cnv->SetHighLightColor(2);
   cnv->Range(-5.7,-0.00509322,4.3,0.03408539);
   cnv->SetFillColor(0);
   cnv->SetBorderMode(0);
   cnv->SetBorderSize(2);
   cnv->SetTickx(1);
   cnv->SetTicky(1);
   cnv->SetLeftMargin(0.17);
   cnv->SetRightMargin(0.03);
   cnv->SetTopMargin(0.07);
   cnv->SetBottomMargin(0.13);
   cnv->SetFrameFillStyle(0);
   cnv->SetFrameBorderMode(0);
   cnv->SetFrameFillStyle(0);
   cnv->SetFrameBorderMode(0);
   
   TH1F *h_gammaD_1_Phi_dummy80 = new TH1F("h_gammaD_1_Phi_dummy80","h_gammaD_1_Phi_dummy",80,-4,4);
   h_gammaD_1_Phi_dummy80->SetMaximum(0.03134289);
   h_gammaD_1_Phi_dummy80->SetLineStyle(0);
   h_gammaD_1_Phi_dummy80->SetMarkerStyle(20);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitle("#phi of #gamma_{D} [rad]");
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleOffset(0.95);
   h_gammaD_1_Phi_dummy80->GetXaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitle("Fraction of events / 0.1 rad");
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleOffset(1.35);
   h_gammaD_1_Phi_dummy80->GetYaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetLabelFont(42);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetLabelOffset(0.007);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetTitleSize(0.06);
   h_gammaD_1_Phi_dummy80->GetZaxis()->SetTitleFont(42);
   h_gammaD_1_Phi_dummy80->Draw("");
   
   TH1F *h_gammaD_1_Phi81 = new TH1F("h_gammaD_1_Phi81","h_gammaD_1_Phi",80,-4,4);
   h_gammaD_1_Phi81->SetBinContent(9,0.006925086);
   h_gammaD_1_Phi81->SetBinContent(10,0.01741272);
   h_gammaD_1_Phi81->SetBinContent(11,0.01686271);
   h_gammaD_1_Phi81->SetBinContent(12,0.0160377);
   h_gammaD_1_Phi81->SetBinContent(13,0.01707521);
   h_gammaD_1_Phi81->SetBinContent(14,0.01660021);
   h_gammaD_1_Phi81->SetBinContent(15,0.01686271);
   h_gammaD_1_Phi81->SetBinContent(16,0.0161002);
   h_gammaD_1_Phi81->SetBinContent(17,0.0160127);
   h_gammaD_1_Phi81->SetBinContent(18,0.01698771);
   h_gammaD_1_Phi81->SetBinContent(19,0.0159127);
   h_gammaD_1_Phi81->SetBinContent(20,0.0160377);
   h_gammaD_1_Phi81->SetBinContent(21,0.0160252);
   h_gammaD_1_Phi81->SetBinContent(22,0.0162752);
   h_gammaD_1_Phi81->SetBinContent(23,0.0158877);
   h_gammaD_1_Phi81->SetBinContent(24,0.0161627);
   h_gammaD_1_Phi81->SetBinContent(25,0.01555019);
   h_gammaD_1_Phi81->SetBinContent(26,0.0159502);
   h_gammaD_1_Phi81->SetBinContent(27,0.0161252);
   h_gammaD_1_Phi81->SetBinContent(28,0.0158502);
   h_gammaD_1_Phi81->SetBinContent(29,0.01641271);
   h_gammaD_1_Phi81->SetBinContent(30,0.0161877);
   h_gammaD_1_Phi81->SetBinContent(31,0.01667521);
   h_gammaD_1_Phi81->SetBinContent(32,0.0156127);
   h_gammaD_1_Phi81->SetBinContent(33,0.01521269);
   h_gammaD_1_Phi81->SetBinContent(34,0.0158377);
   h_gammaD_1_Phi81->SetBinContent(35,0.0156252);
   h_gammaD_1_Phi81->SetBinContent(36,0.0157127);
   h_gammaD_1_Phi81->SetBinContent(37,0.01526269);
   h_gammaD_1_Phi81->SetBinContent(38,0.0162752);
   h_gammaD_1_Phi81->SetBinContent(39,0.01507519);
   h_gammaD_1_Phi81->SetBinContent(40,0.0158002);
   h_gammaD_1_Phi81->SetBinContent(41,0.01682521);
   h_gammaD_1_Phi81->SetBinContent(42,0.01663771);
   h_gammaD_1_Phi81->SetBinContent(43,0.0160752);
   h_gammaD_1_Phi81->SetBinContent(44,0.01547519);
   h_gammaD_1_Phi81->SetBinContent(45,0.01653771);
   h_gammaD_1_Phi81->SetBinContent(46,0.0163377);
   h_gammaD_1_Phi81->SetBinContent(47,0.0157627);
   h_gammaD_1_Phi81->SetBinContent(48,0.0159002);
   h_gammaD_1_Phi81->SetBinContent(49,0.01653771);
   h_gammaD_1_Phi81->SetBinContent(50,0.0157002);
   h_gammaD_1_Phi81->SetBinContent(51,0.0160877);
   h_gammaD_1_Phi81->SetBinContent(52,0.0157377);
   h_gammaD_1_Phi81->SetBinContent(53,0.01538769);
   h_gammaD_1_Phi81->SetBinContent(54,0.0163627);
   h_gammaD_1_Phi81->SetBinContent(55,0.01515019);
   h_gammaD_1_Phi81->SetBinContent(56,0.0163377);
   h_gammaD_1_Phi81->SetBinContent(57,0.01542519);
   h_gammaD_1_Phi81->SetBinContent(58,0.01475018);
   h_gammaD_1_Phi81->SetBinContent(59,0.01462518);
   h_gammaD_1_Phi81->SetBinContent(60,0.01502519);
   h_gammaD_1_Phi81->SetBinContent(61,0.0156252);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_100_LHE_gammaD_Phi.C

示例11: DisplayBackground

void DisplayBackground(){



 gROOT->SetStyle("Plain");
 gStyle->SetOptStat(0000);
 //gStyle->SetErrorX(0) 
 gStyle->SetPadGridX(0);
 gStyle->SetPadGridY(0);
 TCanvas * c = new TCanvas("c", "c", 700,700);
 c->SetTickx(1);
 c->SetTicky(1);

 c->SetFrameFillStyle(4000);
 c->SetFrameFillColor(0);
 c->cd();

   gStyle->SetPadGridX(0);
   gStyle->SetPadGridY(0);
   gROOT->SetStyle("Plain");


  double totalLuminosity=2190; // /pb
  
  double xsec_ttbar=831.76;
  double xsec_qcd[8]={27850000,1717000,351300,31630.,6802.,1206.,120.4,25.24};

  TFile *ttbar=new TFile("Histograms_TT_TuneCUETP8M1_13TeV-amcatnlo-pythia8_Skim.root"); 	
  /*std::vector<TFile*> qcd;
  qcd.push_back(new TFile ("Histograms_QCD_HT100to200_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT200to300_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT300to500_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT500to700_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT700to1000_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT1000to1500_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT1500to2000_Skim.root"));
  qcd.push_back(new TFile("Histograms_QCD_HT2000toInf_Skim.root"));



  double init_ttbar=((TH1F*)ttbar->Get("Count"))->GetBinContent(1);
  double init_qcd[8];

  double scale_qcd[8];
  double scale_ttbar=totalLuminosity*xsec_ttbar/init_ttbar;

  for(int l=0; l<8;l++){
	  init_qcd[l]=((TH1F*)qcd.at(l)->Get("Count"))->GetBinContent(1);
	  scale_qcd[l]=totalLuminosity*xsec_qcd[l]/init_qcd[l];

  }	


*/


  double init_ttbar=((TH1F*)ttbar->Get("Count"))->GetBinContent(1);
  double scale_ttbar=totalLuminosity*xsec_ttbar/init_ttbar;


  TH1F * h_bkg = new TH1F("h_bkg","h_bkg",  50, 0., 2000.);
  THStack hs("hs","test stacked histograms");
  hs.SetTitle("");
  //c->cd();
  TH1F* h_mX_SB_kinFit=(TH1F*)ttbar->Get("h_mX_SB_kinFit");	
  h_mX_SB_kinFit->Scale(scale_ttbar);
  h_mX_SB_kinFit->Rebin(40);	
  h_bkg->Add(h_mX_SB_kinFit);
  h_mX_SB_kinFit->SetLineColor(kBlue+1);
  h_mX_SB_kinFit->SetFillColor(kBlue+1);

  TLegend *leg = new TLegend(0.55625,0.7321654,0.8765625,0.8603839,NULL,"brNDC");
  leg->SetBorderSize(0);
  leg->SetTextSize(0.035);
  leg->SetTextFont(42);	
  leg->SetLineColor(1);
  leg->SetLineStyle(1);
  leg->SetLineWidth(2);
  leg->SetFillColor(0);
  leg->SetFillStyle(0);



  double integral =0 ;
  integral = integral + h_mX_SB_kinFit->Integral(0, 200);
  std::cout<< "integral tt " << integral<<std::endl;

  leg->AddEntry(h_mX_SB_kinFit, "t#bar{t} ", "f");

  h_mX_SB_kinFit->Draw("");
  hs.Add(h_mX_SB_kinFit,"hist");
/*  double integralQCD =0;
  for(int m=0; m<8;m++){
	  TH1F* h_mX_SB_kinFitQ=(TH1F*)qcd.at(m)->Get("h_mX_SB_kinFit");
	  h_mX_SB_kinFitQ->Scale(scale_qcd[m]);
	  h_mX_SB_kinFitQ->Rebin(40);
	  h_bkg->Add(h_mX_SB_kinFitQ);
	  h_mX_SB_kinFitQ->Draw("same");
	  h_mX_SB_kinFitQ->SetLineColor(kRed+1);
	  h_mX_SB_kinFitQ->SetFillColor(kRed+1);
//.........这里部分代码省略.........
开发者ID:fnechans,项目名称:HbbHbb_Run2,代码行数:101,代码来源:DisplayBackground.c

示例12: DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p

void DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p()
{
//=========Macro generated from canvas: cnv/cnv
//=========  (Sun May 24 15:17:57 2015) by ROOT version6.02/05
    TCanvas *cnv = new TCanvas("cnv", "cnv",1,1,904,904);
    gStyle->SetOptFit(1);
    gStyle->SetOptStat(0);
    gStyle->SetOptTitle(0);
    cnv->SetHighLightColor(2);
    cnv->Range(-21.25,-0.006229087,103.75,0.04168697);
    cnv->SetFillColor(0);
    cnv->SetBorderMode(0);
    cnv->SetBorderSize(2);
    cnv->SetTickx(1);
    cnv->SetTicky(1);
    cnv->SetLeftMargin(0.17);
    cnv->SetRightMargin(0.03);
    cnv->SetTopMargin(0.07);
    cnv->SetBottomMargin(0.13);
    cnv->SetFrameFillStyle(0);
    cnv->SetFrameBorderMode(0);
    cnv->SetFrameFillStyle(0);
    cnv->SetFrameBorderMode(0);

    TH1F *h_dimuon_1_p_dummy132 = new TH1F("h_dimuon_1_p_dummy132","h_dimuon_1_p_dummy",100,0,100);
    h_dimuon_1_p_dummy132->SetMaximum(0.03833284);
    h_dimuon_1_p_dummy132->SetLineStyle(0);
    h_dimuon_1_p_dummy132->SetMarkerStyle(20);
    h_dimuon_1_p_dummy132->GetXaxis()->SetTitle("p of #mu#mu [GeV]");
    h_dimuon_1_p_dummy132->GetXaxis()->SetLabelFont(42);
    h_dimuon_1_p_dummy132->GetXaxis()->SetLabelOffset(0.007);
    h_dimuon_1_p_dummy132->GetXaxis()->SetTitleSize(0.06);
    h_dimuon_1_p_dummy132->GetXaxis()->SetTitleOffset(0.95);
    h_dimuon_1_p_dummy132->GetXaxis()->SetTitleFont(42);
    h_dimuon_1_p_dummy132->GetYaxis()->SetTitle("Fraction of events / 1 GeV");
    h_dimuon_1_p_dummy132->GetYaxis()->SetLabelFont(42);
    h_dimuon_1_p_dummy132->GetYaxis()->SetLabelOffset(0.007);
    h_dimuon_1_p_dummy132->GetYaxis()->SetTitleSize(0.06);
    h_dimuon_1_p_dummy132->GetYaxis()->SetTitleOffset(1.35);
    h_dimuon_1_p_dummy132->GetYaxis()->SetTitleFont(42);
    h_dimuon_1_p_dummy132->GetZaxis()->SetLabelFont(42);
    h_dimuon_1_p_dummy132->GetZaxis()->SetLabelOffset(0.007);
    h_dimuon_1_p_dummy132->GetZaxis()->SetTitleSize(0.06);
    h_dimuon_1_p_dummy132->GetZaxis()->SetTitleFont(42);
    h_dimuon_1_p_dummy132->Draw("");

    TH1F *h_dimuon_1_p133 = new TH1F("h_dimuon_1_p133","h_dimuon_1_p",101,0,101);
    h_dimuon_1_p133->SetBinContent(4,3.64385e-05);
    h_dimuon_1_p133->SetBinContent(5,0.000145754);
    h_dimuon_1_p133->SetBinContent(6,0.0002004118);
    h_dimuon_1_p133->SetBinContent(7,0.0004008235);
    h_dimuon_1_p133->SetBinContent(8,0.0006012353);
    h_dimuon_1_p133->SetBinContent(9,0.0009656203);
    h_dimuon_1_p133->SetBinContent(10,0.001657952);
    h_dimuon_1_p133->SetBinContent(11,0.001967679);
    h_dimuon_1_p133->SetBinContent(12,0.002477818);
    h_dimuon_1_p133->SetBinContent(13,0.003206588);
    h_dimuon_1_p133->SetBinContent(14,0.00413577);
    h_dimuon_1_p133->SetBinContent(15,0.004700567);
    h_dimuon_1_p133->SetBinContent(16,0.005283582);
    h_dimuon_1_p133->SetBinContent(17,0.006832219);
    h_dimuon_1_p133->SetBinContent(18,0.007816059);
    h_dimuon_1_p133->SetBinContent(19,0.008052909);
    h_dimuon_1_p133->SetBinContent(20,0.009437571);
    h_dimuon_1_p133->SetBinContent(21,0.01118662);
    h_dimuon_1_p133->SetBinContent(22,0.01244375);
    h_dimuon_1_p133->SetBinContent(23,0.01186073);
    h_dimuon_1_p133->SetBinContent(24,0.01373732);
    h_dimuon_1_p133->SetBinContent(25,0.01473937);
    h_dimuon_1_p133->SetBinContent(26,0.01512198);
    h_dimuon_1_p133->SetBinContent(27,0.01619691);
    h_dimuon_1_p133->SetBinContent(28,0.01687103);
    h_dimuon_1_p133->SetBinContent(29,0.01738117);
    h_dimuon_1_p133->SetBinContent(30,0.01690746);
    h_dimuon_1_p133->SetBinContent(31,0.01783665);
    h_dimuon_1_p133->SetBinContent(32,0.01896624);
    h_dimuon_1_p133->SetBinContent(33,0.01947638);
    h_dimuon_1_p133->SetBinContent(34,0.02062419);
    h_dimuon_1_p133->SetBinContent(35,0.01967679);
    h_dimuon_1_p133->SetBinContent(36,0.0210068);
    h_dimuon_1_p133->SetBinContent(37,0.02217283);
    h_dimuon_1_p133->SetBinContent(38,0.02055131);
    h_dimuon_1_p133->SetBinContent(39,0.0208246);
    h_dimuon_1_p133->SetBinContent(40,0.02208173);
    h_dimuon_1_p133->SetBinContent(41,0.02321132);
    h_dimuon_1_p133->SetBinContent(42,0.02208173);
    h_dimuon_1_p133->SetBinContent(43,0.02133474);
    h_dimuon_1_p133->SetBinContent(44,0.02189954);
    h_dimuon_1_p133->SetBinContent(45,0.02020515);
    h_dimuon_1_p133->SetBinContent(46,0.01984076);
    h_dimuon_1_p133->SetBinContent(47,0.01860186);
    h_dimuon_1_p133->SetBinContent(48,0.01734473);
    h_dimuon_1_p133->SetBinContent(49,0.01747226);
    h_dimuon_1_p133->SetBinContent(50,0.01475759);
    h_dimuon_1_p133->SetBinContent(51,0.01444787);
    h_dimuon_1_p133->SetBinContent(52,0.01415636);
    h_dimuon_1_p133->SetBinContent(53,0.01381019);
    h_dimuon_1_p133->SetBinContent(54,0.0126806);
    h_dimuon_1_p133->SetBinContent(55,0.01191539);
    h_dimuon_1_p133->SetBinContent(56,0.01129594);
//.........这里部分代码省略.........
开发者ID:tahuang1991,项目名称:MuJetAnalysis,代码行数:101,代码来源:DarkSusy_mH_125_mGammaD_2000_cT_10_LHE_dimuon_p.C

示例13: SegX_2016B_June22all_sameYrange_fullIntegral_10k9k

void SegX_2016B_June22all_sameYrange_fullIntegral_10k9k()
{
//=========Macro generated from canvas: SegX/SegX
//=========  (Fri Aug  5 09:22:37 2016) by ROOT version6.06/01
   TCanvas *SegX = new TCanvas("SegX", "SegX",0,0,500,500);
   gStyle->SetOptStat(0);
   SegX->SetHighLightColor(2);
   SegX->Range(-125,-2.848556,125,2.626708);
   SegX->SetFillColor(0);
   SegX->SetBorderMode(0);
   SegX->SetBorderSize(2);
   SegX->SetLogy();
   SegX->SetFrameBorderMode(0);
   SegX->SetFrameBorderMode(0);
   
   TH1D *SegX_1__19 = new TH1D("SegX_1__19","SegX",100,-100,100);
   SegX_1__19->SetBinContent(0,399.7427);
   SegX_1__19->SetBinContent(39,0.0007394809);
   SegX_1__19->SetBinContent(40,0.01109221);
   SegX_1__19->SetBinContent(41,0.02366339);
   SegX_1__19->SetBinContent(42,0.04880574);
   SegX_1__19->SetBinContent(43,0.09613251);
   SegX_1__19->SetBinContent(44,0.5671818);
   SegX_1__19->SetBinContent(45,1.913037);
   SegX_1__19->SetBinContent(46,3.895585);
   SegX_1__19->SetBinContent(47,8.348);
   SegX_1__19->SetBinContent(48,11.60985);
   SegX_1__19->SetBinContent(49,11.7363);
   SegX_1__19->SetBinContent(50,12.04171);
   SegX_1__19->SetBinContent(51,12.05058);
   SegX_1__19->SetBinContent(52,11.89159);
   SegX_1__19->SetBinContent(53,11.26081);
   SegX_1__19->SetBinContent(54,8.149079);
   SegX_1__19->SetBinContent(55,3.796495);
   SegX_1__19->SetBinContent(56,1.839089);
   SegX_1__19->SetBinContent(57,0.5302078);
   SegX_1__19->SetBinContent(58,0.09835096);
   SegX_1__19->SetBinContent(59,0.05472159);
   SegX_1__19->SetBinContent(60,0.02292391);
   SegX_1__19->SetBinContent(61,0.008873771);
   SegX_1__19->SetBinContent(62,0.005176366);
   SegX_1__19->SetMinimum(0.005);
   SegX_1__19->SetMaximum(120);
   SegX_1__19->SetEntries(675802);
   SegX_1__19->SetStats(0);

   Int_t ci;      // for color index setting
   TColor *color; // for color definition with alpha
   ci = TColor::GetColor("#ff00ff");
   SegX_1__19->SetLineColor(ci);

   ci = TColor::GetColor("#ff00ff");
   SegX_1__19->SetMarkerColor(ci);
   SegX_1__19->GetXaxis()->SetTitle("cm");
   SegX_1__19->GetYaxis()->SetTitle("scaled number of entries");
   SegX_1__19->Draw("H");
   
   TLegend *leg = new TLegend(0.5,0.7,0.9,0.9,NULL,"brNDC");
   leg->SetBorderSize(1);
   leg->SetTextFont(62);
   leg->SetTextSize(0.02);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(1001);
   TLegendEntry *entry=leg->AddEntry("SegX_1","ME11A: mean:-0.0cm;RMS:5.4cm","l");

   ci = TColor::GetColor("#ff00ff");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(62);
   entry=leg->AddEntry("SegX_2","ME11B: mean:-0.1cm;RMS:8.4cm","l");

   ci = TColor::GetColor("#ff9999");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(62);
   entry=leg->AddEntry("SegX_3","ME12+13: mean:-0.1cm;RMS:17.6cm","l");
   entry->SetLineColor(1);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
   entry->SetMarkerColor(1);
   entry->SetMarkerStyle(21);
   entry->SetMarkerSize(1);
   entry->SetTextFont(62);
   entry=leg->AddEntry("SegX_4","ME2: mean:-0.1cm;RMS:23.2cm","l");

   ci = TColor::GetColor("#ff0000");
   entry->SetLineColor(ci);
   entry->SetLineStyle(1);
   entry->SetLineWidth(1);
//.........这里部分代码省略.........
开发者ID:senka,项目名称:CSC_eff_808,代码行数:101,代码来源:SegX_2016B_June22all_sameYrange_fullIntegral_10k9k.C

示例14: paraPull_alpha_MUON_ISO_SYS_2TeV_2Lep_plots_All


//.........这里部分代码省略.........
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0};
   Double_t _fey1033[35] = {
   0,
   0,
   0.6105177,
   1.072963,
   1.274131,
   0.9350411,
   0.9915346,
   0.9862834,
   0.9243374,
   0.769056,
   0.9864216,
   0.9937953,
   0.9917567,
   0.9969205,
   0.9819024,
   0.9371645,
   0.9926625,
   0.9931845,
   0.9925671,
   1.004991,
   0.9933467,
   0.9551202,
   0.9932281,
   0.9929675,
   0.9926546,
   0.9909755,
   0.9913131,
   1.098392,
   0.9868992,
   0.9931708,
   0.9930622,
   0.7376817,
   0.7516033,
   0.9909095,
   0.7841002};
   TGraphErrors *gre = new TGraphErrors(35,_fx1033,_fy1033,_fex1033,_fey1033);
   gre->SetName("");
   gre->SetTitle("");
   gre->SetFillColor(1);
   gre->SetMarkerStyle(20);
   gre->SetMarkerSize(1.2);
   
   TH1F *Graph_Graph1033 = new TH1F("Graph_Graph1033","",100,0,35.75);
   Graph_Graph1033->SetMinimum(-1.813084);
   Graph_Graph1033->SetMaximum(2.169243);
   Graph_Graph1033->SetDirectory(0);
   Graph_Graph1033->SetStats(0);

   ci = TColor::GetColor("#000099");
   Graph_Graph1033->SetLineColor(ci);
   Graph_Graph1033->GetXaxis()->SetLabelFont(42);
   Graph_Graph1033->GetXaxis()->SetLabelSize(0.035);
   Graph_Graph1033->GetXaxis()->SetTitleSize(0.035);
   Graph_Graph1033->GetXaxis()->SetTitleFont(42);
   Graph_Graph1033->GetYaxis()->SetLabelFont(42);
   Graph_Graph1033->GetYaxis()->SetLabelSize(0.035);
   Graph_Graph1033->GetYaxis()->SetTitleSize(0.035);
   Graph_Graph1033->GetYaxis()->SetTitleFont(42);
   Graph_Graph1033->GetZaxis()->SetLabelFont(42);
   Graph_Graph1033->GetZaxis()->SetLabelSize(0.035);
   Graph_Graph1033->GetZaxis()->SetTitleSize(0.035);
   Graph_Graph1033->GetZaxis()->SetTitleFont(42);
   gre->SetHistogram(Graph_Graph1033);
   
   gre->Draw("p");
   
   TLegend *leg = new TLegend(0.1,0.4,0.4,0.95,NULL,"brNDC");
   leg->SetBorderSize(0);
   leg->SetTextFont(72);
   leg->SetTextSize(0.015);
   leg->SetLineColor(1);
   leg->SetLineStyle(1);
   leg->SetLineWidth(1);
   leg->SetFillColor(0);
   leg->SetFillStyle(0);
   leg->Draw();
   
   TPaveText *pt = new TPaveText(0.3293574,0.9341608,0.6706426,0.995,"blNDC");
   pt->SetName("title");
   pt->SetBorderSize(0);
   pt->SetFillColor(0);
   pt->SetFillStyle(0);
   pt->SetTextFont(42);
   TText *AText = pt->AddText("alpha_MUON_ISO_SYS");
   pt->Draw();
   c1->Modified();
   c1->cd();
   c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_MUON_ISO_SYS_2TeV_2Lep_plots_All.C

示例15: fit7_testbkg_withtail


//.........这里部分代码省略.........
   98.47262,
   97.92296,
   97.3748,
   96.82813,
   96.28296,
   95.73929,
   95.19711,
   94.65642,
   94.11724,
   93.57954,
   93.04335,
   92.50865,
   91.97544,
   91.44373,
   90.91352,
   90.3848,
   89.85758,
   89.33185,
   88.80762,
   88.28489,
   87.76365,
   87.2439,
   86.72566,
   86.20891,
   85.69365,
   85.17989,
   84.66762,
   84.66762};
   graph = new TGraph(102,bkg_fx4,bkg_fy4);
   graph->SetName("bkg");
   graph->SetTitle("Projection of totalPdf");
   graph->SetFillColor(1);
   graph->SetLineColor(2);
   graph->SetLineStyle(2);
   graph->SetLineWidth(3);
   graph->SetMarkerStyle(20);
   
   TH1F *Graph_bkg4 = new TH1F("Graph_bkg4","Projection of totalPdf",102,4250,4850);
   Graph_bkg4->SetMinimum(78.80459);
   Graph_bkg4->SetMaximum(149.161);
   Graph_bkg4->SetDirectory(0);
   Graph_bkg4->SetStats(0);
   Graph_bkg4->SetLineWidth(2);
   Graph_bkg4->SetMarkerStyle(20);
   Graph_bkg4->GetXaxis()->SetNdivisions(505);
   Graph_bkg4->GetXaxis()->SetLabelFont(132);
   Graph_bkg4->GetXaxis()->SetLabelOffset(0.01);
   Graph_bkg4->GetXaxis()->SetLabelSize(0.06);
   Graph_bkg4->GetXaxis()->SetTitleSize(0.072);
   Graph_bkg4->GetXaxis()->SetTitleOffset(0.95);
   Graph_bkg4->GetXaxis()->SetTitleFont(132);
   Graph_bkg4->GetYaxis()->SetLabelFont(132);
   Graph_bkg4->GetYaxis()->SetLabelOffset(0.01);
   Graph_bkg4->GetYaxis()->SetLabelSize(0.06);
   Graph_bkg4->GetYaxis()->SetTitleSize(0.072);
   Graph_bkg4->GetYaxis()->SetTitleOffset(0.95);
   Graph_bkg4->GetYaxis()->SetTitleFont(132);
   Graph_bkg4->GetZaxis()->SetLabelFont(132);
   Graph_bkg4->GetZaxis()->SetLabelSize(0.06);
   Graph_bkg4->GetZaxis()->SetTitleSize(0.072);
   Graph_bkg4->GetZaxis()->SetTitleOffset(1.2);
   Graph_bkg4->GetZaxis()->SetTitleFont(132);
   graph->SetHistogram(Graph_bkg4);
   
   graph->Draw("l");
   
开发者ID:goi42,项目名称:LbJpsipPi,代码行数:66,代码来源:fit7_testbkg_withtail.C


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