本文整理汇总了C++中TH1D::SetTitleFont方法的典型用法代码示例。如果您正苦于以下问题:C++ TH1D::SetTitleFont方法的具体用法?C++ TH1D::SetTitleFont怎么用?C++ TH1D::SetTitleFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TH1D
的用法示例。
在下文中一共展示了TH1D::SetTitleFont方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: figure2_0_generator
//.........这里部分代码省略.........
//difference
v2_diff[i] = (v2_neg[i] - v2_pos[i])/(v2_neg[i] + v2_pos[i]);
sum = v2_pos[i] + v2_neg[i];
variance_diff = (4*v2_neg[i]*v2_neg[i]*variance_pos)/(sum*sum*sum*sum)+(4*v2_pos[i]*v2_pos[i]*variance_neg)/(sum*sum*sum*sum);
//error bars
cout << "xcoord " << x[i] << endl;
err_pos[i] = sqrt(variance_pos);
err_neg[i] = sqrt(variance_neg);
err_diff[i] = sqrt(variance_diff);
}
gStyle->SetLegendFont(42);
TH1D* base = new TH1D("base","base",1,-0.15,0.15);
//pPb
//base->GetYaxis()->SetRangeUser(0.065, 0.075);
base->GetYaxis()->SetRangeUser(0.065, 0.075);
//PbPb
//base->GetYaxis()->SetRangeUser(0.093, 0.103);
base->GetXaxis()->SetTitle("Observed A_{ch}");
base->GetYaxis()->SetTitle("v_{2}{2}");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TH1D* base2 = new TH1D("base2","base2",1,-0.15,0.15);
base2->GetYaxis()->SetRangeUser(-0.03, 0.03);
base2->GetXaxis()->SetTitle("Observed A_{ch}");
base2->GetYaxis()->SetTitle(" (v^{#minus}_{2} #minus v^{#plus}_{2})/(v^{#minus}_{2} #plus v^{#plus}_{2}) ");
base2->GetXaxis()->CenterTitle();
base2->GetYaxis()->CenterTitle();
base2->SetTitleSize (0.040,"X");
base2->SetTitleOffset(1.4,"X");
base2->SetTitleFont (42,"X");
base2->SetLabelOffset(0.006,"X");
base2->SetLabelSize (0.040,"X");
base2->SetLabelFont (42 ,"X");
base2->SetTitleSize (0.040,"Y");
base2->SetTitleOffset(2.0,"Y");
base2->SetTitleFont (42,"Y");
base2->SetLabelOffset(0.006,"Y");
base2->SetLabelSize (0.040,"Y");
base2->SetLabelFont (42 ,"Y");
base2->SetLineWidth(0);
示例2: ALICE_Comparison
//.........这里部分代码省略.........
variance_pos = (errmean*errmean)/(4*cmean);
//negative
cmean = c2_neg[i][0] -> GetMean();
v2_neg[i] = sqrt(cmean);
errmean = c2_neg[i][0] -> GetMeanError();
variance_neg = (errmean*errmean)/(4*cmean);
//difference
v2_diff[i] = (v2_neg[i] - v2_pos[i])/(v2_neg[i] + v2_pos[i]);
sum = v2_pos[i] + v2_neg[i];
variance_diff = (4*v2_neg[i]*v2_neg[i]*variance_pos)/(sum*sum*sum*sum)+(4*v2_pos[i]*v2_pos[i]*variance_neg)/(sum*sum*sum*sum);
//error bars
err_pos[i] = sqrt(variance_pos);
err_neg[i] = sqrt(variance_neg);
err_diff[i] = sqrt(variance_diff);
}
gStyle->SetLegendFont(42);
TH1D* base = new TH1D("base","base",1,-0.2,0.2);
//pPb
base->GetYaxis()->SetRangeUser(0.10, 0.11);
base->GetXaxis()->SetTitle("Observed A_{ch}");
base->GetYaxis()->SetTitle("v_{2}{SP}");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TH1D* base2 = new TH1D("base2","base2",1,-0.2,0.2);
base2->GetYaxis()->SetRangeUser(-0.05, 0.05);
base2->GetXaxis()->SetTitle("Observed A_{ch}");
base2->GetYaxis()->SetTitle(" (v^{#minus}_{2} #minus v^{#plus}_{2})/(v^{#minus}_{2} #plus v^{#plus}_{2}) ");
base2->GetXaxis()->CenterTitle();
base2->GetYaxis()->CenterTitle();
base2->SetTitleSize (0.040,"X");
base2->SetTitleOffset(1.4,"X");
base2->SetTitleFont (42,"X");
base2->SetLabelOffset(0.006,"X");
base2->SetLabelSize (0.040,"X");
base2->SetLabelFont (42 ,"X");
base2->SetTitleSize (0.040,"Y");
base2->SetTitleOffset(2.0,"Y");
base2->SetTitleFont (42,"Y");
base2->SetLabelOffset(0.006,"Y");
base2->SetLabelSize (0.040,"Y");
base2->SetLabelFont (42 ,"Y");
base2->SetLineWidth(0);
示例3: slopevscentrality
//.........这里部分代码省略.........
double star_sysplus[] = { 3.152323796820371, 1.1348034014753392, 0.6881948851887814, 0.3091, 0.3775553601791398, 0.6362180836788593, 0.39244649316817704, 1.060086081410373, 4.931994052105091 };
double xsysstar[] = {1,1,1,1,1,1,1,1,1};
for(i=0;i<9;i++){
star_sysminus[i]/=100;
star_sysplus[i]/=100;
}
gStyle->SetLegendFont(42);
TGraphErrors* slopevscent = new TGraphErrors(6,x_centrality,y_slope,NULL,statErr);
TGraphErrors* ALICE = new TGraphErrors(8,x_alice,y_alice,NULL,alice_statErrors);
TGraphErrors* STAR = new TGraphErrors(9,x_star,y_star,NULL,star_statErrors);
TGraphAsymmErrors* ALICE_sys = new TGraphAsymmErrors(8, x_alice, y_alice, xsysalice, xsysalice, alice_sysminus, alice_sysplus);
TGraphAsymmErrors* STAR_sys = new TGraphAsymmErrors(9, x_star, y_star, xsysstar, xsysstar, star_sysminus, star_sysplus);
slopevscent -> SetMarkerStyle(20);
slopevscent -> SetMarkerColor(kBlack);
ALICE -> SetMarkerStyle(25);
ALICE -> SetMarkerColor(kRed);
ALICE -> SetLineColor(kRed);
STAR -> SetMarkerStyle(kOpenStar);
STAR -> SetMarkerColor(kBlue);
STAR -> SetLineColor(kBlue);
TH1D* base = new TH1D("base","base",1,0,100);
base->GetYaxis()->SetRangeUser(0.00,0.06);
base->GetXaxis()->SetTitle("Centrality(%)");
base->GetYaxis()->SetTitle("Slope parameter(v_{2})");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TCanvas* c3 = MakeCanvas("c3","c3");
TLatex* text_a = makeLatex("CMS pPb #sqrt{s_{NN}}=5.02TeV",0.25,0.85) ;
TLatex* text_b = makeLatex("185 #leq N_{trk}^{offline} < 260",0.25,0.80) ;
TLatex* text_c = makeLatex("0.3 < p_{T} < 3 GeV/c",0.25,0.85) ;
TLatex* text_d = makeLatex("|#Delta#eta| > 2",0.25,0.80) ;
text_a->SetTextFont(42);
text_b->SetTextFont(42);
text_c->SetTextFont(42);
text_d->SetTextFont(42);
slopevscent->SetFillStyle(0);
slopevscent->SetFillColor(0);
slopevscent->SetFillStyle(0);
slopevscent->SetFillColor(0);
gStyle->SetOptTitle(0);
TLegend* leg = new TLegend(.58,.70,.93,.90);
leg->SetLineColor(kWhite);
leg->SetFillColor(0);
leg->SetFillStyle(0);
leg->AddEntry(slopevscent, "CMS, Pb-Pb 5.02TeV","p");
leg->AddEntry(ALICE, "ALICE, Pb-Pb 2.76TeV","p");
leg->AddEntry(STAR, "STAR, Au-Au 200GeV","p");
//leg->AddEntry(gr_neg, "neg","p");
c3->cd();
base->Draw("");
ALICE->Draw("PSame");
STAR->Draw("PSame");
slopevscent->Draw("PSame");
// STAR_sys->Draw("2Same");
leg->DrawClone("PSame");
// text_c->DrawClone("Same");
// text_d->DrawClone("Same");
//Define a linear function
//SaveCanvas(c3,"pics","slopevscent_comparison");
}
示例4: CumulantErrGraph_v2_allgraphs_cent
//.........这里部分代码省略.........
//difference
v2_diff[i] = (v2_neg[i] - v2_pos[i])/(v2_neg[i] + v2_pos[i]);
sum = v2_pos[i] + v2_neg[i];
variance_diff = (4*v2_neg[i]*v2_neg[i]*variance_pos)/(sum*sum*sum*sum)+(4*v2_pos[i]*v2_pos[i]*variance_neg)/(sum*sum*sum*sum);
//error bars
cout << "xcoord " << x[i] << endl;
err_pos[i] = sqrt(variance_pos);
err_neg[i] = sqrt(variance_neg);
err_diff[i] = sqrt(variance_diff);
}
gStyle->SetLegendFont(42);
TH1D* base = new TH1D("base","base",1,-0.12,0.12);
//pPb
//base->GetYaxis()->SetRangeUser(0.065, 0.075);
base->GetYaxis()->SetRangeUser(range_start, range_end);
//PbPb
//base->GetYaxis()->SetRangeUser(0.093, 0.103);
base->GetXaxis()->SetTitle("Corrected A_{ch}");
base->GetYaxis()->SetTitle("v_{2}{2}");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TH1D* base2 = new TH1D("base2","base2",1,-0.12,0.12);
base2->GetYaxis()->SetRangeUser(-0.03, 0.03);
base2->GetXaxis()->SetTitle("Corrected A_{ch}");
base2->GetYaxis()->SetTitle(" (v^{#minus}_{2} #minus v^{#plus}_{2})/(v^{#minus}_{2} #plus v^{#plus}_{2}) ");
base2->GetXaxis()->CenterTitle();
base2->GetYaxis()->CenterTitle();
base2->SetTitleSize (0.040,"X");
base2->SetTitleOffset(1.4,"X");
base2->SetTitleFont (42,"X");
base2->SetLabelOffset(0.006,"X");
base2->SetLabelSize (0.040,"X");
base2->SetLabelFont (42 ,"X");
base2->SetTitleSize (0.040,"Y");
base2->SetTitleOffset(2.0,"Y");
base2->SetTitleFont (42,"Y");
base2->SetLabelOffset(0.006,"Y");
base2->SetLabelSize (0.040,"Y");
base2->SetLabelFont (42 ,"Y");
base2->SetLineWidth(0);
示例5: figure2_0_generate
//.........这里部分代码省略.........
gr_pos->Write();
gr_neg->Write();
gr_diff->Write();
/*
gr_pos->RemovePoint(0);
gr_pos->RemovePoint(5);
gr_neg->RemovePoint(0);
gr_neg->RemovePoint(5);
gr_diff->RemovePoint(0);
gr_diff->RemovePoint(5);
*/
gStyle->SetLegendFont(42);
TH1D* base = new TH1D("base","base",1,-0.20,0.20);
//pPb
//base->GetYaxis()->SetRangeUser(0.065, 0.075);
base->GetYaxis()->SetRangeUser(0.06, 0.12);
//PbPb
//base->GetYaxis()->SetRangeUser(0.093, 0.103);
base->GetXaxis()->SetTitle("Observed A_{ch}");
base->GetYaxis()->SetTitle("v_{2}{2}");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TH1D* base2 = new TH1D("base2","base2",1,-0.2,0.2);
base2->GetYaxis()->SetRangeUser(-0.03, 0.03);
base2->GetXaxis()->SetTitle("Observed A_{ch}");
base2->GetYaxis()->SetTitle(" (v^{#minus}_{2} #minus v^{#plus}_{2})/(v^{#minus}_{2} #plus v^{#plus}_{2}) ");
base2->GetXaxis()->CenterTitle();
base2->GetYaxis()->CenterTitle();
base2->SetTitleSize (0.040,"X");
base2->SetTitleOffset(1.4,"X");
base2->SetTitleFont (42,"X");
base2->SetLabelOffset(0.006,"X");
base2->SetLabelSize (0.040,"X");
base2->SetLabelFont (42 ,"X");
base2->SetTitleSize (0.040,"Y");
base2->SetTitleOffset(2.0,"Y");
base2->SetTitleFont (42,"Y");
base2->SetLabelOffset(0.006,"Y");
base2->SetLabelSize (0.040,"Y");
base2->SetLabelFont (42 ,"Y");
base2->SetLineWidth(0);
示例6: CumulantErrGraph_v2_normalized
//.........这里部分代码省略.........
//error bars
err_pos[i] = sqrt(variance_pos);
err_neg[i] = sqrt(variance_neg);
err_diff[i] = sqrt(variance_diff);
}
cout << low << upp << endl;
for(i=0;i<NAchBins;i++){
cout << x[i] << ", ";
}
cout << endl << "v2" << endl;
for(i=0;i<NAchBins;i++){
cout << v2_diff[i] << ", ";
}
cout << endl << "v2 error" <<endl;
for(i=0;i<NAchBins;i++){
cout << "error is: " << err_pos[i] << endl;
}
gStyle->SetLegendFont(42);
TH1D* base = new TH1D("base","base",1,-0.3,0.3);
//pPb
//base->GetYaxis()->SetRangeUser(0.065, 0.075);
//PbPb
base->GetYaxis()->SetRangeUser(0.018, 0.03);
base->GetXaxis()->SetTitle("Observed A_{ch}");
base->GetYaxis()->SetTitle("v_{3}{2}");
base->GetXaxis()->CenterTitle();
base->GetYaxis()->CenterTitle();
base->SetTitleSize (0.040,"X");
base->SetTitleOffset(1.4,"X");
base->SetTitleFont (42,"X");
base->SetLabelOffset(0.006,"X");
base->SetLabelSize (0.040,"X");
base->SetLabelFont (42 ,"X");
base->SetTitleSize (0.040,"Y");
base->SetTitleOffset(2.2,"Y");
base->SetTitleFont (42,"Y");
base->SetLabelOffset(0.006,"Y");
base->SetLabelSize (0.040,"Y");
base->SetLabelFont (42 ,"Y");
base->SetLineWidth(0);
TH1D* base2 = new TH1D("base2","base2",1,-0.4,0.4);
base2->GetYaxis()->SetRangeUser(-0.06, 0.06);
base2->GetXaxis()->SetTitle("Observed A_{ch}");
base2->GetYaxis()->SetTitle(" #frac{ v_{3}^{#minus} #minus v_{3}^{#plus} }{ v_{3}^{#minus} #plus v_{3}^{#plus} } ");
base2->GetXaxis()->CenterTitle();
base2->GetYaxis()->CenterTitle();
base2->SetTitleSize (0.040,"X");
base2->SetTitleOffset(1.4,"X");
base2->SetTitleFont (42,"X");
base2->SetLabelOffset(0.006,"X");
base2->SetLabelSize (0.040,"X");
base2->SetLabelFont (42 ,"X");
base2->SetTitleSize (0.040,"Y");
base2->SetTitleOffset(2.0,"Y");
base2->SetTitleFont (42,"Y");
base2->SetLabelOffset(0.006,"Y");
base2->SetLabelSize (0.040,"Y");
base2->SetLabelFont (42 ,"Y");
base2->SetLineWidth(0);