本文整理汇总了C++中TGraphErrors::SetHistogram方法的典型用法代码示例。如果您正苦于以下问题:C++ TGraphErrors::SetHistogram方法的具体用法?C++ TGraphErrors::SetHistogram怎么用?C++ TGraphErrors::SetHistogram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGraphErrors
的用法示例。
在下文中一共展示了TGraphErrors::SetHistogram方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ttbar_nJet
void ttbar_nJet()
{
//=========Macro generated from canvas: c1/c1
//========= (Sun Dec 11 15:16:19 2016) by ROOT version6.06/01
TCanvas *c1 = new TCanvas("c1", "c1",1,1,1200,1416);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c1->SetHighLightColor(2);
c1->Range(0,0,1,1);
c1->SetFillColor(0);
c1->SetBorderMode(0);
c1->SetBorderSize(2);
c1->SetTickx(1);
c1->SetTicky(1);
c1->SetLeftMargin(0.15);
c1->SetRightMargin(0.05);
c1->SetTopMargin(0.07);
c1->SetBottomMargin(0.13);
c1->SetFrameFillStyle(0);
c1->SetFrameBorderMode(0);
// ------------>Primitives in pad: pad1
TPad *pad1 = new TPad("pad1", "pad1",0,0.3,1,1);
pad1->Draw();
pad1->cd();
pad1->Range(-2.1875,0,9.0625,0.5878968);
pad1->SetFillColor(0);
pad1->SetBorderMode(0);
pad1->SetBorderSize(2);
pad1->SetTickx(1);
pad1->SetTicky(1);
pad1->SetLeftMargin(0.15);
pad1->SetRightMargin(0.05);
pad1->SetTopMargin(0.07);
pad1->SetBottomMargin(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
THStack *h = new THStack();
h->SetName("h");
h->SetTitle("");
h->SetMinimum(0);
h->SetMaximum(0.5207086);
TH1F *h_stack_19 = new TH1F("h_stack_19","",9,-0.5,8.5);
h_stack_19->SetMinimum(0);
h_stack_19->SetMaximum(0.546744);
h_stack_19->SetDirectory(0);
h_stack_19->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#000099");
h_stack_19->SetLineColor(ci);
h_stack_19->GetXaxis()->SetLabelFont(42);
h_stack_19->GetXaxis()->SetLabelOffset(0.007);
h_stack_19->GetXaxis()->SetTitleSize(0.05);
h_stack_19->GetXaxis()->SetTickLength(0.025);
h_stack_19->GetXaxis()->SetTitleFont(42);
h_stack_19->GetYaxis()->SetTitle("a.u.");
h_stack_19->GetYaxis()->SetLabelFont(42);
h_stack_19->GetYaxis()->SetLabelOffset(0.007);
h_stack_19->GetYaxis()->SetTitleSize(0.05);
h_stack_19->GetYaxis()->SetTickLength(0.025);
h_stack_19->GetYaxis()->SetTitleOffset(1.5);
h_stack_19->GetYaxis()->SetTitleFont(42);
h_stack_19->GetZaxis()->SetLabelFont(42);
h_stack_19->GetZaxis()->SetLabelOffset(0.007);
h_stack_19->GetZaxis()->SetTitleSize(0.05);
h_stack_19->GetZaxis()->SetTickLength(0.025);
h_stack_19->GetZaxis()->SetTitleFont(42);
h->SetHistogram(h_stack_19);
TH1D *h_nJet_QCD__217 = new TH1D("h_nJet_QCD__217","",9,-0.5,8.5);
h_nJet_QCD__217->SetBinContent(2,0.001991738);
h_nJet_QCD__217->SetBinContent(3,0.0005078625);
h_nJet_QCD__217->SetBinContent(4,0.006489724);
h_nJet_QCD__217->SetBinContent(5,0.001899386);
h_nJet_QCD__217->SetBinContent(6,0.000696849);
h_nJet_QCD__217->SetBinError(2,0.001424948);
h_nJet_QCD__217->SetBinError(3,0.0005078625);
h_nJet_QCD__217->SetBinError(4,0.00246407);
h_nJet_QCD__217->SetBinError(5,0.001037545);
h_nJet_QCD__217->SetBinError(6,0.0004566736);
h_nJet_QCD__217->SetEntries(25);
h_nJet_QCD__217->SetStats(0);
ci = TColor::GetColor("#cccccc");
h_nJet_QCD__217->SetFillColor(ci);
h_nJet_QCD__217->GetXaxis()->SetTitle("N_{jet}");
h_nJet_QCD__217->GetXaxis()->SetLabelFont(42);
h_nJet_QCD__217->GetXaxis()->SetLabelOffset(0.007);
h_nJet_QCD__217->GetXaxis()->SetTitleSize(0.05);
h_nJet_QCD__217->GetXaxis()->SetTickLength(0.025);
h_nJet_QCD__217->GetXaxis()->SetTitleFont(42);
h_nJet_QCD__217->GetYaxis()->SetTitle("a.u.");
h_nJet_QCD__217->GetYaxis()->SetLabelFont(42);
//.........这里部分代码省略.........
示例2: paraPull_alpha_EL_EFF_Iso_TotalCorrUncertainty_2TeV_2Lep_plots_All
//.........这里部分代码省略.........
0,
0,
0,
0,
0,
0,
0,
0
};
Double_t _fey1009[35] = {
0,
0,
0.6107702,
1.073131,
1.266362,
0.9365976,
0.9916527,
0.9863054,
0.9267238,
0.7691165,
0.9864524,
0.9937947,
0.9917419,
0.9970684,
0.9817834,
0.9376065,
0.9926703,
0.9925594,
1.005011,
0.9933467,
0.9551198,
0.9932276,
0.9929662,
0.9927806,
0.9913159,
0.9909915,
1.097968,
0.9870135,
0.9931711,
0.9930639,
0.9855126,
0.7540343,
0.738039,
0.9909039,
0.7858475
};
TGraphErrors *gre = new TGraphErrors(35,_fx1009,_fy1009,_fex1009,_fey1009);
gre->SetName("");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetMarkerStyle(20);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1009 = new TH1F("Graph_Graph1009","",100,0,35.75);
Graph_Graph1009->SetMinimum(-1.802262);
Graph_Graph1009->SetMaximum(2.167356);
Graph_Graph1009->SetDirectory(0);
Graph_Graph1009->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1009->SetLineColor(ci);
Graph_Graph1009->GetXaxis()->SetLabelFont(42);
Graph_Graph1009->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1009->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1009->GetXaxis()->SetTitleFont(42);
Graph_Graph1009->GetYaxis()->SetLabelFont(42);
Graph_Graph1009->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1009->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1009->GetYaxis()->SetTitleFont(42);
Graph_Graph1009->GetZaxis()->SetLabelFont(42);
Graph_Graph1009->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1009->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1009->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1009);
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.2068675,0.9341608,0.7931325,0.995,"blNDC");
pt->SetName("title");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextFont(42);
TText *AText = pt->AddText("alpha_EL_EFF_Iso_TotalCorrUncertainty");
pt->Draw();
c1->Modified();
c1->cd();
c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_EL_EFF_Iso_TotalCorrUncertainty_2TeV_2Lep_plots_All.C
示例3: 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);
}
示例4: paraPull_alpha_EL_EFF_ID_TotalCorrUncertainty_2TeV_2Lep_plots_All
//.........这里部分代码省略.........
0,
0,
0,
0,
0,
0,
0,
0,
0,
0};
Double_t _fey1008[35] = {
0,
0,
0.6107841,
1.074473,
1.240982,
0.9349467,
0.9916171,
0.986318,
0.9243028,
0.7695058,
0.9864285,
0.9937932,
0.9917505,
0.9970093,
0.9926694,
0.9377343,
0.9931843,
0.9925541,
1.00499,
0.9933467,
0.955117,
0.9932276,
0.9929649,
0.9927283,
0.9913194,
0.9909852,
1.098207,
0.9869476,
0.9931703,
0.9930636,
0.7490083,
0.9854599,
0.7384358,
0.9909053,
0.7843565};
TGraphErrors *gre = new TGraphErrors(35,_fx1008,_fy1008,_fex1008,_fey1008);
gre->SetName("");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetMarkerStyle(20);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1008 = new TH1F("Graph_Graph1008","",100,0,35.75);
Graph_Graph1008->SetMinimum(-1.785321);
Graph_Graph1008->SetMaximum(2.173226);
Graph_Graph1008->SetDirectory(0);
Graph_Graph1008->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1008->SetLineColor(ci);
Graph_Graph1008->GetXaxis()->SetLabelFont(42);
Graph_Graph1008->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1008->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1008->GetXaxis()->SetTitleFont(42);
Graph_Graph1008->GetYaxis()->SetLabelFont(42);
Graph_Graph1008->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1008->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1008->GetYaxis()->SetTitleFont(42);
Graph_Graph1008->GetZaxis()->SetLabelFont(42);
Graph_Graph1008->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1008->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1008->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1008);
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.2133936,0.9341608,0.7866064,0.995,"blNDC");
pt->SetName("title");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextFont(42);
TText *AText = pt->AddText("alpha_EL_EFF_ID_TotalCorrUncertainty");
pt->Draw();
c1->Modified();
c1->cd();
c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_EL_EFF_ID_TotalCorrUncertainty_2TeV_2Lep_plots_All.C
示例5: ttbar_looseLep2Pt_logy
void ttbar_looseLep2Pt_logy()
{
//=========Macro generated from canvas: c1/c1
//========= (Sun Dec 11 15:16:17 2016) by ROOT version6.06/01
TCanvas *c1 = new TCanvas("c1", "c1",1,1,1200,1416);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c1->SetHighLightColor(2);
c1->Range(0,0,1,1);
c1->SetFillColor(0);
c1->SetBorderMode(0);
c1->SetBorderSize(2);
c1->SetTickx(1);
c1->SetTicky(1);
c1->SetLeftMargin(0.15);
c1->SetRightMargin(0.05);
c1->SetTopMargin(0.07);
c1->SetBottomMargin(0.13);
c1->SetFrameFillStyle(0);
c1->SetFrameBorderMode(0);
// ------------>Primitives in pad: pad1
TPad *pad1 = new TPad("pad1", "pad1",0,0.3,1,1);
pad1->Draw();
pad1->cd();
pad1->Range(-93.75,-6.459411,531.25,2.538922);
pad1->SetFillColor(0);
pad1->SetBorderMode(0);
pad1->SetBorderSize(2);
pad1->SetLogy();
pad1->SetTickx(1);
pad1->SetTicky(1);
pad1->SetLeftMargin(0.15);
pad1->SetRightMargin(0.05);
pad1->SetTopMargin(0.07);
pad1->SetBottomMargin(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
pad1->SetFrameFillStyle(0);
pad1->SetFrameBorderMode(0);
THStack *h = new THStack();
h->SetName("h");
h->SetTitle("");
h->SetMinimum(1.61613e-06);
h->SetMaximum(32.94396);
TH1F *h_stack_8 = new TH1F("h_stack_8","",20,0,500);
h_stack_8->SetMinimum(3.472076e-07);
h_stack_8->SetMaximum(81.10342);
h_stack_8->SetDirectory(0);
h_stack_8->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#000099");
h_stack_8->SetLineColor(ci);
h_stack_8->GetXaxis()->SetLabelFont(42);
h_stack_8->GetXaxis()->SetLabelOffset(0.007);
h_stack_8->GetXaxis()->SetTitleSize(0.05);
h_stack_8->GetXaxis()->SetTickLength(0.025);
h_stack_8->GetXaxis()->SetTitleFont(42);
h_stack_8->GetYaxis()->SetTitle("a.u./25 GeV");
h_stack_8->GetYaxis()->SetLabelFont(42);
h_stack_8->GetYaxis()->SetLabelOffset(0.007);
h_stack_8->GetYaxis()->SetTitleSize(0.05);
h_stack_8->GetYaxis()->SetTickLength(0.025);
h_stack_8->GetYaxis()->SetTitleOffset(1.5);
h_stack_8->GetYaxis()->SetTitleFont(42);
h_stack_8->GetZaxis()->SetLabelFont(42);
h_stack_8->GetZaxis()->SetLabelOffset(0.007);
h_stack_8->GetZaxis()->SetTitleSize(0.05);
h_stack_8->GetZaxis()->SetTickLength(0.025);
h_stack_8->GetZaxis()->SetTitleFont(42);
h->SetHistogram(h_stack_8);
TH1D *h_looseLep2Pt_QCD__85 = new TH1D("h_looseLep2Pt_QCD__85","",20,0,500);
h_looseLep2Pt_QCD__85->SetBinContent(1,0.004168645);
h_looseLep2Pt_QCD__85->SetBinContent(2,0.004299542);
h_looseLep2Pt_QCD__85->SetBinContent(3,0.001765161);
h_looseLep2Pt_QCD__85->SetBinContent(4,0.0008868067);
h_looseLep2Pt_QCD__85->SetBinContent(6,0.0004026872);
h_looseLep2Pt_QCD__85->SetBinContent(7,6.27175e-05);
h_looseLep2Pt_QCD__85->SetBinError(1,0.001669574);
h_looseLep2Pt_QCD__85->SetBinError(2,0.002080688);
h_looseLep2Pt_QCD__85->SetBinError(3,0.001425843);
h_looseLep2Pt_QCD__85->SetBinError(4,0.0005754946);
h_looseLep2Pt_QCD__85->SetBinError(6,0.0004026872);
h_looseLep2Pt_QCD__85->SetBinError(7,4.443558e-05);
h_looseLep2Pt_QCD__85->SetEntries(25);
h_looseLep2Pt_QCD__85->SetStats(0);
ci = TColor::GetColor("#cccccc");
h_looseLep2Pt_QCD__85->SetFillColor(ci);
h_looseLep2Pt_QCD__85->GetXaxis()->SetTitle("Sub-leading lep p_{T} [GeV]");
h_looseLep2Pt_QCD__85->GetXaxis()->SetLabelFont(42);
h_looseLep2Pt_QCD__85->GetXaxis()->SetLabelOffset(0.007);
h_looseLep2Pt_QCD__85->GetXaxis()->SetTitleSize(0.05);
h_looseLep2Pt_QCD__85->GetXaxis()->SetTickLength(0.025);
//.........这里部分代码省略.........
示例6: paraPull_alpha_EG_RESOLUTION_ALL_2TeV_2Lep_plots_All
//.........这里部分代码省略.........
0,
0,
0,
0,
0,
0,
0,
0,
0,
0};
Double_t _fey1006[35] = {
0,
0,
0.610768,
1.073217,
1.263173,
0.9362314,
0.9916222,
0.9863048,
0.9259827,
0.7691218,
0.9864552,
0.9937942,
0.9917457,
0.9970139,
0.9818237,
0.9374371,
0.9926691,
0.9931835,
0.9925618,
1.004989,
0.9933467,
0.9550431,
0.9932277,
0.9929666,
0.992751,
0.9913074,
0.9909922,
0.9869917,
0.9931709,
0.9930627,
0.9855153,
0.7535663,
0.9909032,
0.7381565,
0.7858726};
TGraphErrors *gre = new TGraphErrors(35,_fx1006,_fy1006,_fex1006,_fey1006);
gre->SetName("");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetMarkerStyle(20);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1006 = new TH1F("Graph_Graph1006","",100,0,35.75);
Graph_Graph1006->SetMinimum(-1.774861);
Graph_Graph1006->SetMaximum(1.890718);
Graph_Graph1006->SetDirectory(0);
Graph_Graph1006->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1006->SetLineColor(ci);
Graph_Graph1006->GetXaxis()->SetLabelFont(42);
Graph_Graph1006->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1006->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1006->GetXaxis()->SetTitleFont(42);
Graph_Graph1006->GetYaxis()->SetLabelFont(42);
Graph_Graph1006->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1006->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1006->GetYaxis()->SetTitleFont(42);
Graph_Graph1006->GetZaxis()->SetLabelFont(42);
Graph_Graph1006->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1006->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1006->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1006);
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.2831727,0.9341608,0.7168273,0.995,"blNDC");
pt->SetName("title");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextFont(42);
TText *AText = pt->AddText("alpha_EG_RESOLUTION_ALL");
pt->Draw();
c1->Modified();
c1->cd();
c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_EG_RESOLUTION_ALL_2TeV_2Lep_plots_All.C
示例7: paraPull_alpha_FT_EFF_Eigen_C_2_2TeV_2Lep_plots_All
//.........这里部分代码省略.........
0,
0,
0,
0,
0,
0,
0,
0,
0,
0};
Double_t _fey1016[35] = {
0,
0,
0.6106976,
1.071775,
1.302912,
0.9377662,
0.9917154,
0.9862853,
0.9285057,
0.7692815,
0.9864575,
0.9937975,
0.9917326,
0.9971741,
0.9817143,
0.9377042,
0.9926714,
0.9931825,
0.9925538,
1.005041,
0.9933467,
0.9550778,
0.9932274,
0.9929662,
0.9909898,
0.9928538,
0.9913169,
1.097904,
0.9870737,
0.9931716,
0.993064,
0.7378613,
0.9854765,
0.7558564,
0.785907};
TGraphErrors *gre = new TGraphErrors(35,_fx1016,_fy1016,_fex1016,_fey1016);
gre->SetName("");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetMarkerStyle(20);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1016 = new TH1F("Graph_Graph1016","",100,0,35.75);
Graph_Graph1016->SetMinimum(-1.809555);
Graph_Graph1016->SetMaximum(1.90387);
Graph_Graph1016->SetDirectory(0);
Graph_Graph1016->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1016->SetLineColor(ci);
Graph_Graph1016->GetXaxis()->SetLabelFont(42);
Graph_Graph1016->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1016->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1016->GetXaxis()->SetTitleFont(42);
Graph_Graph1016->GetYaxis()->SetLabelFont(42);
Graph_Graph1016->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1016->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1016->GetYaxis()->SetTitleFont(42);
Graph_Graph1016->GetZaxis()->SetLabelFont(42);
Graph_Graph1016->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1016->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1016->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1016);
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.3082731,0.9341608,0.6917269,0.995,"blNDC");
pt->SetName("title");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextFont(42);
TText *AText = pt->AddText("alpha_FT_EFF_Eigen_C_2");
pt->Draw();
c1->Modified();
c1->cd();
c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_FT_EFF_Eigen_C_2_2TeV_2Lep_plots_All.C
示例8: apt_all
void apt_all(){
//=========Macro generated from canvas: MyCanvas/My Canvas
//========= (Thu Dec 3 18:47:52 2009) by ROOT version5.25/04
gROOT->Reset();
gROOT->ProcessLine(".x rootlogon.C");
gStyle->SetTitleYOffset(1.5);
TCanvas *MyCanvas = new TCanvas("MyCanvas", "My Canvas",0,0,550,600);
MyCanvas->SetLogx();
double msize = 2;
TH1D *hDist = new TH1D("hDist","hDist",20,9,10000);
hDist->GetXaxis()->SetRange(1,20);
hDist->SetMinimum(0.3);
//hDist->SetMaximum(0.7);
hDist->SetMaximum(0.6);
hDist->SetLineStyle(0);
hDist->GetXaxis()->SetTitle("#sqrt{s} [GeV]");
hDist->GetYaxis()->SetTitle("#LTp_{T}#GT [GeV/c]");
hDist->GetXaxis()->CenterTitle();
hDist->GetYaxis()->CenterTitle();
hDist->GetYaxis()->SetNdivisions(510);
hDist->Draw("");
// Fit function
//TF1 *func = new TF1("func","0.426-0.0198*log(x^2)+0.00156*log(x^2)^2",18,100000);
//TF1 *func = new TF1("func","0.430-0.0207*log(x^2)+0.00161*log(x^2)^2",18,100000);
TF1 *func = new TF1("func","0.425-0.0197*log(x^2)+0.00156*log(x^2)^2",18,100000);
func->SetLineColor(1);
func->SetLineWidth(2.0);
func->Draw("same");
// ============================= ISR
// OK, from http://www.slac.stanford.edu/spires/find/hep/www?j=NUPHA,B84,269
TGraphErrors *gre = new TGraphErrors(4);
gre->SetName("Graph");
gre->SetTitle("Graph");
gre->SetMarkerStyle(28);
gre->SetMarkerSize(msize);
gre->SetPoint(0,23.32,0.362);// plab = 289
gre->SetPointError(0,0,0.004); // errors are not verified!
gre->SetPoint(1,30.59,0.364);// plab = 498
gre->SetPointError(1,0,0.00497238);
gre->SetPoint(2,44.61,0.366); // plab = 1060
gre->SetPointError(2,0,0.00478821);
gre->SetPoint(3,53.06,0.368); // plab = 1500
gre->SetPointError(3,0,0.00497238);
TH1F *Graph1 = new TH1F("Graph1","Graph",100,19.03788,56.0634);
Graph1->SetMinimum(0.3551011);
Graph1->SetMaximum(0.374549);
gre->SetHistogram(Graph1);
gre->Draw("pz");
TGraph* gre01 = gre->Clone("gre01");
gre01->SetMarkerStyle(0);
// gre01->Draw("pzsame");
// ============================= UA1
// OK, from http://dx.doi.org/10.1016/0550-3213(90)90493-W
gre = new TGraphErrors(7);
gre->SetName("Graph");
gre->SetTitle("Graph");
gre->SetMarkerStyle(3);
gre->SetMarkerSize(msize);
gre->SetPoint(0,200,0.392);
gre->SetPointError(0,0,0.003);
gre->SetPoint(1,260,0.404);
gre->SetPointError(1,0,0.004);
gre->SetPoint(2,380,0.408);
gre->SetPointError(2,0,0.004);
gre->SetPoint(3,500,0.419);
gre->SetPointError(3,0,0.004);
gre->SetPoint(4,620,0.426);
gre->SetPointError(4,0,0.004);
gre->SetPoint(5,790,0.435);
gre->SetPointError(5,0,0.004);
gre->SetPoint(6,900,0.447);
gre->SetPointError(6,0,0.003);
TH1F *Graph2 = new TH1F("Graph2","Graph",100,131.4964,972.7974);
Graph2->SetMinimum(0.3826521);
Graph2->SetMaximum(0.4560221);
gre->SetHistogram(Graph2);
gre->Draw("pz");
TGraph* gre02 = gre->Clone("gre02");
gre02->SetMarkerStyle(0);
//.........这里部分代码省略.........
示例9: paraPull_alpha_FT_EFF_extrapolation_2TeV_2Lep_plots_All
//.........这里部分代码省略.........
0,
0,
0,
0,
0,
0,
0,
0,
0,
0};
Double_t _fey1023[35] = {
0,
0,
0.6107108,
1.073202,
1.262649,
0.9362982,
0.9916356,
0.9862464,
0.9262906,
0.7691235,
0.9864321,
0.9937945,
0.9917446,
0.9970094,
0.9817783,
0.9372476,
0.9926669,
0.9931837,
0.9925578,
1.005003,
0.9933467,
0.9932277,
0.9929663,
0.9927589,
0.9912906,
0.9909611,
1.097757,
0.9869836,
0.993171,
0.9930564,
0.9854803,
0.753601,
0.7380864,
0.9908989,
0.785308};
TGraphErrors *gre = new TGraphErrors(35,_fx1023,_fy1023,_fex1023,_fey1023);
gre->SetName("");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetMarkerStyle(20);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1023 = new TH1F("Graph_Graph1023","",100,0,35.75);
Graph_Graph1023->SetMinimum(-1.799504);
Graph_Graph1023->SetMaximum(2.167994);
Graph_Graph1023->SetDirectory(0);
Graph_Graph1023->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1023->SetLineColor(ci);
Graph_Graph1023->GetXaxis()->SetLabelFont(42);
Graph_Graph1023->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1023->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1023->GetXaxis()->SetTitleFont(42);
Graph_Graph1023->GetYaxis()->SetLabelFont(42);
Graph_Graph1023->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1023->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1023->GetYaxis()->SetTitleFont(42);
Graph_Graph1023->GetZaxis()->SetLabelFont(42);
Graph_Graph1023->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1023->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1023->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1023);
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.2917068,0.9341608,0.7082932,0.995,"blNDC");
pt->SetName("title");
pt->SetBorderSize(0);
pt->SetFillColor(0);
pt->SetFillStyle(0);
pt->SetTextFont(42);
TText *AText = pt->AddText("alpha_FT_EFF_extrapolation");
pt->Draw();
c1->Modified();
c1->cd();
c1->SetSelected(c1);
}
开发者ID:AlexanderMorton,项目名称:NP_Prun,代码行数:101,代码来源:paraPull_alpha_FT_EFF_extrapolation_2TeV_2Lep_plots_All.C
示例10: gyieldsp
//.........这里部分代码省略.........
ci = TColor::GetColor("#ff0000");
grae->SetLineColor(ci);
grae->SetLineWidth(4);
grae->SetMarkerStyle(20);
grae->SetMarkerSize(0);
TH1F *Graph_Graph3021 = new TH1F("Graph_Graph3021","Graph",100,-2.5,2.5);
Graph_Graph3021->SetMinimum(0);
Graph_Graph3021->SetMaximum(140);
Graph_Graph3021->SetDirectory(0);
Graph_Graph3021->SetStats(0);
Graph_Graph3021->SetLineStyle(0);
Graph_Graph3021->SetMarkerStyle(20);
Graph_Graph3021->GetXaxis()->SetNdivisions(505);
Graph_Graph3021->GetXaxis()->SetLabelFont(42);
Graph_Graph3021->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph3021->GetXaxis()->SetLabelSize(0);
Graph_Graph3021->GetXaxis()->SetTitleSize(0.07142857);
Graph_Graph3021->GetXaxis()->SetTitleOffset(1.1);
Graph_Graph3021->GetXaxis()->SetTitleFont(42);
Graph_Graph3021->GetYaxis()->SetTitle("d#sigma (W^{+}#rightarrow#font[12]{l}^{+}#nu) / d#eta_{lab} [nb]");
Graph_Graph3021->GetYaxis()->SetLabelFont(42);
Graph_Graph3021->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph3021->GetYaxis()->SetLabelSize(0.07142857);
Graph_Graph3021->GetYaxis()->SetTitleSize(0.07142857);
Graph_Graph3021->GetYaxis()->SetTitleOffset(1.05);
Graph_Graph3021->GetYaxis()->SetTitleFont(42);
Graph_Graph3021->GetZaxis()->SetLabelFont(42);
Graph_Graph3021->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph3021->GetZaxis()->SetLabelSize(0.05);
Graph_Graph3021->GetZaxis()->SetTitleSize(0.06);
Graph_Graph3021->GetZaxis()->SetTitleFont(42);
grae->SetHistogram(Graph_Graph3021);
grae->Draw("a2");
Double_t Graph1_fx3022[10] = {
2.2,
1.75,
1.25,
0.75,
0.25,
-0.25,
-0.75,
-1.25,
-1.75,
-2.2};
Double_t Graph1_fy3022[10] = {
103.56,
105.744,
103.4081,
100.0093,
97.03688,
94.36609,
90.5471,
82.43278,
65.82142,
43.43165};
Double_t Graph1_felx3022[10] = {
0.2,
0.25,
0.25,
0.25,
0.25,
0.25,
示例11: BSA_InCoherent_xB
//.........这里部分代码省略.........
0.05845869,
0.08718727};
TGraphErrors *gre = new TGraphErrors(9,Graph_fx1134,Graph_fy1134,Graph_fex1134,Graph_fey1134);
gre->SetName("Graph");
gre->SetTitle("Graph");
gre->SetFillColor(1);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#00ff00");
gre->SetMarkerColor(ci);
gre->SetMarkerStyle(21);
TH1F *Graph_Graph1134 = new TH1F("Graph_Graph1134","Graph",100,0,365.7873);
Graph_Graph1134->SetMinimum(-0.2731422);
Graph_Graph1134->SetMaximum(0.3307184);
Graph_Graph1134->SetDirectory(0);
Graph_Graph1134->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1134->SetLineColor(ci);
Graph_Graph1134->GetXaxis()->SetLabelFont(42);
Graph_Graph1134->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1134->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1134->GetXaxis()->SetTitleFont(42);
Graph_Graph1134->GetYaxis()->SetLabelFont(42);
Graph_Graph1134->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1134->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1134->GetYaxis()->SetTitleFont(42);
Graph_Graph1134->GetZaxis()->SetLabelFont(42);
Graph_Graph1134->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1134->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1134->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1134);
TF1 *myfit1135 = new TF1("myfit","[0]*sin(x*3.1416/180.0)/(1 + [1]*cos(x*3.1416/180.0))",0,365.7873);
myfit1135->SetFillColor(19);
myfit1135->SetFillStyle(0);
myfit1135->SetLineColor(2);
myfit1135->SetLineWidth(2);
myfit1135->SetChisquare(10.13595);
myfit1135->SetNDF(7);
myfit1135->GetXaxis()->SetLabelFont(42);
myfit1135->GetXaxis()->SetLabelSize(0.035);
myfit1135->GetXaxis()->SetTitleSize(0.035);
myfit1135->GetXaxis()->SetTitleFont(42);
myfit1135->GetYaxis()->SetLabelFont(42);
myfit1135->GetYaxis()->SetLabelSize(0.035);
myfit1135->GetYaxis()->SetTitleSize(0.035);
myfit1135->GetYaxis()->SetTitleFont(42);
myfit1135->SetParameter(0,0.1205343);
myfit1135->SetParError(0,0.03387604);
myfit1135->SetParLimits(0,0,0);
myfit1135->SetParameter(1,0.6858633);
myfit1135->SetParError(1,0.2646153);
myfit1135->SetParLimits(1,0,0);
gre->GetListOfFunctions()->Add(myfit1135);
TPaveStats *ptstats = new TPaveStats(0.27,0.74,0.9,0.9,"brNDC");
ptstats->SetName("stats");
ptstats->SetBorderSize(1);
ptstats->SetFillColor(0);
ptstats->SetTextAlign(12);
ptstats->SetTextFont(42);
TText *AText = ptstats->AddText("#chi^{2} / ndf = 10.14 / 7");
示例12: calice_photonEff_vs_energy_reclustering_CLIC
void calice_photonEff_vs_energy_reclustering_CLIC()
{
//=========Macro generated from canvas: c1/A Simple Graph Example
//========= (Wed Mar 7 23:11:46 2018) by ROOT version6.08/00
TCanvas *c1 = new TCanvas("c1", "A Simple Graph Example",110,116,800,700);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c1->SetHighLightColor(2);
c1->Range(-25.0682,0.5027027,122.3918,1.043243);
c1->SetFillColor(0);
c1->SetBorderMode(0);
c1->SetBorderSize(2);
c1->SetTickx(1);
c1->SetTicky(1);
c1->SetPhi(150);
c1->SetLeftMargin(0.17);
c1->SetRightMargin(0.08);
c1->SetTopMargin(0.08);
c1->SetBottomMargin(0.18);
c1->SetFrameLineWidth(2);
c1->SetFrameBorderMode(0);
c1->SetFrameLineWidth(2);
c1->SetFrameBorderMode(0);
Double_t Graph0_fx1001[5] = {
5,
10,
20,
50,
100};
Double_t Graph0_fy1001[5] = {
0.9436152,
0.9381309,
0.9310415,
0.9302012,
0.9286163};
Double_t Graph0_fex1001[5] = {
0,
0,
0,
0,
0};
Double_t Graph0_fey1001[5] = {
0.004316943,
0.004290463,
0.00427937,
0.004267022,
0.004261721};
TGraphErrors *gre = new TGraphErrors(5,Graph0_fx1001,Graph0_fy1001,Graph0_fex1001,Graph0_fey1001);
gre->SetName("Graph0");
gre->SetTitle("");
gre->SetLineWidth(2);
gre->SetMarkerStyle(24);
gre->SetMarkerSize(1.2);
TH1F *Graph_Graph1001 = new TH1F("Graph_Graph1001","",100,0,109.5);
Graph_Graph1001->SetMinimum(0.6);
Graph_Graph1001->SetMaximum(1);
Graph_Graph1001->SetDirectory(0);
Graph_Graph1001->SetStats(0);
Graph_Graph1001->SetLineWidth(2);
Graph_Graph1001->SetMarkerSize(1.2);
Graph_Graph1001->GetXaxis()->SetTitle("Energy [GeV]");
Graph_Graph1001->GetXaxis()->SetRange(1,101);
Graph_Graph1001->GetXaxis()->SetNdivisions(506);
Graph_Graph1001->GetXaxis()->SetLabelFont(42);
Graph_Graph1001->GetXaxis()->SetLabelOffset(0.015);
Graph_Graph1001->GetXaxis()->SetLabelSize(0.06);
Graph_Graph1001->GetXaxis()->SetTitleSize(0.07);
Graph_Graph1001->GetXaxis()->SetTitleFont(42);
Graph_Graph1001->GetYaxis()->SetTitle("Efficiency [%]");
Graph_Graph1001->GetYaxis()->SetNdivisions(506);
Graph_Graph1001->GetYaxis()->SetLabelFont(42);
Graph_Graph1001->GetYaxis()->SetLabelOffset(0.015);
Graph_Graph1001->GetYaxis()->SetLabelSize(0.06);
Graph_Graph1001->GetYaxis()->SetTitleSize(0.07);
Graph_Graph1001->GetYaxis()->SetTitleOffset(1.2);
Graph_Graph1001->GetYaxis()->SetTitleFont(42);
Graph_Graph1001->GetZaxis()->SetLabelFont(42);
Graph_Graph1001->GetZaxis()->SetLabelOffset(0.015);
Graph_Graph1001->GetZaxis()->SetLabelSize(0.06);
Graph_Graph1001->GetZaxis()->SetTitleSize(0.07);
Graph_Graph1001->GetZaxis()->SetTitleOffset(1.2);
Graph_Graph1001->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1001);
gre->Draw("alp");
Double_t Graph1_fx1002[5] = {
5,
10,
20,
50,
100};
Double_t Graph1_fy1002[5] = {
0.9521913,
0.9592196,
0.9742399,
0.9853568,
0.984413};
//.........这里部分代码省略.........
示例13: example_plot
//.........这里部分代码省略.........
box_.DrawBox( xx_-bwx_/2, yy_-bwy_/2, xx_+bwx_/2, yy_+bwy_/2 );
latex.DrawLatex(xx_+1.*bwx_,yy_,"Z #rightarrow e^{+}e^{-} (MC)");
canv->cd();
}
{
TGraphErrors *gre = new TGraphErrors(12);
gre->SetName("Graph0");
gre->SetTitle("");
gre->SetFillColor(1);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#0000ff");
gre->SetLineColor(ci);
ci = TColor::GetColor("#0000ff");
gre->SetMarkerColor(ci);
gre->SetMarkerStyle(21);
gre->SetPoint(0,0.1428571,0.943962);
gre->SetPointError(0,0,0.00470259);
gre->SetPoint(1,0.1714286,0.940484);
gre->SetPointError(1,0,0.00447348);
gre->SetPoint(2,0.2,0.935519);
gre->SetPointError(2,0,0.00484668);
gre->SetPoint(3,0.2285714,0.928495);
gre->SetPointError(3,0,0.00504356);
gre->SetPoint(4,0.2571429,0.931586);
gre->SetPointError(4,0,0.00551296);
gre->SetPoint(5,0.2857143,0.924183);
gre->SetPointError(5,0,0.00521949);
gre->SetPoint(6,0.3142857,0.925186);
gre->SetPointError(6,0,0.00541335);
gre->SetPoint(7,0.3428572,0.918469);
gre->SetPointError(7,0,0.00520881);
gre->SetPoint(8,0.3714286,0.926619);
gre->SetPointError(8,0,0.00524148);
gre->SetPoint(9,0.4,0.931496);
gre->SetPointError(9,0,0.00526956);
gre->SetPoint(10,0.4285714,0.932581);
gre->SetPointError(10,0,0.00466349);
gre->SetPoint(11,0.4571429,0.924199);
gre->SetPointError(11,0,0.00348535);
TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","",100,0.1114286,0.4885714);
Graph_Graph1->SetMinimum(0);
Graph_Graph1->SetMaximum(1);
Graph_Graph1->SetDirectory(0);
Graph_Graph1->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1->SetLineColor(ci);
Graph_Graph1->GetXaxis()->SetTitle("Threshold (pC)");
Graph_Graph1->GetXaxis()->CenterTitle(true);
Graph_Graph1->GetXaxis()->SetLabelFont(42);
Graph_Graph1->GetXaxis()->SetLabelSize(0.05);
Graph_Graph1->GetXaxis()->SetTitleSize(0.05);
Graph_Graph1->GetXaxis()->SetTitleFont(42);
Graph_Graph1->GetYaxis()->SetTitle("Efficiency");
Graph_Graph1->GetYaxis()->SetRange(0,1);
Graph_Graph1->GetYaxis()->CenterTitle(true);
Graph_Graph1->GetYaxis()->SetLabelFont(42);
Graph_Graph1->GetYaxis()->SetLabelSize(0.05);
Graph_Graph1->GetYaxis()->SetTitleSize(0.05);
Graph_Graph1->GetYaxis()->SetTitleFont(42);
Graph_Graph1->GetZaxis()->SetLabelFont(42);
Graph_Graph1->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1);
gre->Draw("ap");
}
TLegend *leg = new TLegend(0.55,0.35,0.70,0.50);
leg->SetTextSize(0.035);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(1);
leg->SetFillColor(0);
leg->SetBorderSize(0);
leg->SetHeader("GIF++ test beams 08.2015");
leg->AddEntry(gre, "Low Resistivity Glass RPC", "p");
leg->Draw();
// writing the lumi information and the CMS "logo"
CMS_lumi( canv, iPeriod, iPos );
canv->Update();
canv->RedrawAxis();
canv->GetFrame()->Draw();
canv->Print(canvName+".pdf",".pdf");
canv->Print(canvName+".png",".png");
return canv;
}
示例14: acceptance_cT
//.........这里部分代码省略.........
0.0002638154,
0.0001399232,
0.0001121687,
5.785313e-05,
1.3794e-05,
9.063167e-06};
TGraphErrors *gre = new TGraphErrors(11,Graph0_fx1001,Graph0_fy1001,Graph0_fex1001,Graph0_fey1001);
gre->SetName("Graph0");
gre->SetTitle("Graph");
gre->SetFillColor(1);
gre->SetMarkerStyle(7);
gre->SetMarkerSize(5);
TH1F *Graph_Graph1001 = new TH1F("Graph_Graph1001","Graph",100,0,22);
Graph_Graph1001->SetMinimum(0);
Graph_Graph1001->SetMaximum(0.09629192);
Graph_Graph1001->SetDirectory(0);
Graph_Graph1001->SetStats(0);
ci = TColor::GetColor("#000099");
Graph_Graph1001->SetLineColor(ci);
Graph_Graph1001->GetXaxis()->SetLabelFont(42);
Graph_Graph1001->GetXaxis()->SetLabelSize(0.035);
Graph_Graph1001->GetXaxis()->SetTitleSize(0.035);
Graph_Graph1001->GetXaxis()->SetTitleFont(42);
Graph_Graph1001->GetYaxis()->SetLabelFont(42);
Graph_Graph1001->GetYaxis()->SetLabelSize(0.035);
Graph_Graph1001->GetYaxis()->SetTitleSize(0.035);
Graph_Graph1001->GetYaxis()->SetTitleFont(42);
Graph_Graph1001->GetZaxis()->SetLabelFont(42);
Graph_Graph1001->GetZaxis()->SetLabelSize(0.035);
Graph_Graph1001->GetZaxis()->SetTitleSize(0.035);
Graph_Graph1001->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph1001);
gre->Draw(" pl");
Double_t Graph1_fx1002[9] = {
0,
0.05,
0.1,
0.2,
0.5,
1,
2,
3,
5};
Double_t Graph1_fy1002[9] = {
0.08208333,
0.07862374,
0.06748737,
0.04597222,
0.01659091,
0.005892857,
0.001868687,
0.0009974747,
0.0004419192};
Double_t Graph1_fex1002[9] = {
0,
0,
0,
0,
0,
0,
0,
0,
示例15: TCanvas
plot()
{
//=========Macro generated from canvas: FigExample/FigExample
//========= (Wed Feb 10 18:30:48 2016) by ROOT version5.34/32
TCanvas *FigExample = new TCanvas("FigExample", "FigExample",0,23,1366,720);
gStyle->SetOptFit(1);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
FigExample->Range(1.546456,-0.2025,6.412106,1.485);
FigExample->SetFillColor(0);
FigExample->SetBorderMode(0);
FigExample->SetBorderSize(2);
FigExample->SetLogx();
FigExample->SetLeftMargin(0.12);
FigExample->SetRightMargin(0.04);
FigExample->SetTopMargin(0.08);
FigExample->SetBottomMargin(0.12);
FigExample->SetFrameFillStyle(0);
FigExample->SetFrameBorderMode(0);
FigExample->SetFrameFillStyle(0);
FigExample->SetFrameBorderMode(0);
TGraphErrors *gre = new TGraphErrors(6);
gre->SetName("Graph0");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetLineColor(4);
gre->SetMarkerColor(4);
gre->SetMarkerStyle(22);
gre->SetMarkerSize(1.8);
gre->SetPoint(0,1500000,0.192982);
gre->SetPointError(0,0,0.118988);
gre->SetPoint(1,681818.2,0.704545);
gre->SetPointError(1,0,0.0473106);
gre->SetPoint(2,217391.3,0.943028);
gre->SetPointError(2,0,0.009242);
gre->SetPoint(3,68181.82,0.973359);
gre->SetPointError(3,0,0.00320719);
gre->SetPoint(4,326.0869,0.967568);
gre->SetPointError(4,0,0.0132405);
gre->SetPoint(5,150,0.97559);
gre->SetPointError(5,0,0.00223768);
TH1F *Graph_Graph_Graph11 = new TH1F("Graph_Graph_Graph11","",100,135,1649985);
Graph_Graph_Graph11->SetMinimum(0);
Graph_Graph_Graph11->SetMaximum(1.35);
Graph_Graph_Graph11->SetDirectory(0);
Graph_Graph_Graph11->SetStats(0);
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#000099");
Graph_Graph_Graph11->SetLineColor(ci);
Graph_Graph_Graph11->SetLineStyle(0);
Graph_Graph_Graph11->SetMarkerStyle(20);
Graph_Graph_Graph11->GetXaxis()->SetTitle("Cesium Source Rate ( N_{#gamma}.cm^{-2}.s^{-1} )");
Graph_Graph_Graph11->GetXaxis()->CenterTitle(true);
Graph_Graph_Graph11->GetXaxis()->SetLabelFont(42);
Graph_Graph_Graph11->GetXaxis()->SetLabelOffset(0.007);
Graph_Graph_Graph11->GetXaxis()->SetLabelSize(0.035);
Graph_Graph_Graph11->GetXaxis()->SetTitleSize(0.045);
Graph_Graph_Graph11->GetXaxis()->SetTitleOffset(1.1);
Graph_Graph_Graph11->GetXaxis()->SetTitleFont(42);
Graph_Graph_Graph11->GetYaxis()->SetTitle("#mu detection efficiency");
Graph_Graph_Graph11->GetYaxis()->SetRange(0,1);
Graph_Graph_Graph11->GetYaxis()->CenterTitle(true);
Graph_Graph_Graph11->GetYaxis()->SetLabelFont(42);
Graph_Graph_Graph11->GetYaxis()->SetLabelOffset(0.007);
Graph_Graph_Graph11->GetYaxis()->SetLabelSize(0.035);
Graph_Graph_Graph11->GetYaxis()->SetTitleSize(0.045);
Graph_Graph_Graph11->GetYaxis()->SetTitleOffset(1.1);
Graph_Graph_Graph11->GetYaxis()->SetTitleFont(42);
Graph_Graph_Graph11->GetZaxis()->SetLabelFont(42);
Graph_Graph_Graph11->GetZaxis()->SetLabelOffset(0.007);
Graph_Graph_Graph11->GetZaxis()->SetLabelSize(0.035);
Graph_Graph_Graph11->GetZaxis()->SetTitleSize(0.035);
Graph_Graph_Graph11->GetZaxis()->SetTitleFont(42);
gre->SetHistogram(Graph_Graph_Graph11);
gre->Draw("ap");
gre = new TGraphErrors(6);
gre->SetName("Graph1");
gre->SetTitle("");
gre->SetFillColor(1);
gre->SetLineColor(2);
gre->SetMarkerColor(2);
gre->SetMarkerStyle(3);
gre->SetMarkerSize(1.8);
gre->SetPoint(0,1500000,0);
gre->SetPointError(0,0,0);
gre->SetPoint(1,681818.2,0.0381356);
gre->SetPointError(1,0,0.0638412);
gre->SetPoint(2,217391.3,0.242259);
gre->SetPointError(2,0,0.0371513);
gre->SetPoint(3,68181.82,0.70679);
gre->SetPointError(3,0,0.0113702);
gre->SetPoint(4,326.0869,0.919075);
gre->SetPointError(4,0,0.021681);
gre->SetPoint(5,150,0.929634);
//.........这里部分代码省略.........