本文整理汇总了C++中TBox::SetFillStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ TBox::SetFillStyle方法的具体用法?C++ TBox::SetFillStyle怎么用?C++ TBox::SetFillStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBox
的用法示例。
在下文中一共展示了TBox::SetFillStyle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw_ALICEFor_JPsi_RaaVsNpart
void Draw_ALICEFor_JPsi_RaaVsNpart(TLegend *lgd)
{
int nbinsALICE=9;
Double_t NPartALICE[10]={357,262,187,128,86,53,30,16,8};
Double_t ErrNPartALICE[10]={0};
Double_t RaaALICE[10] = {0.47,0.48,0.51,0.51,0.52,0.61,0.70,0.74,0.94};
Double_t SystErrALICE[10] = {0.03,0.02,0.02,0.02,0.03,0.05,0.06,0.09,0.1};
TGraphErrors *grRaaALICE = new TGraphErrors(nbinsALICE, NPartALICE, RaaALICE, ErrNPartALICE, SystErrALICE);
grRaaALICE->SetMarkerStyle(20);
grRaaALICE->SetMarkerColor(4);
grRaaALICE->GetYaxis()->SetRangeUser(0,1.7);
TAxis *Xaxis2 = grRaaALICE->GetXaxis();
Xaxis2->SetLimits(0.,430.0);
grRaaALICE->GetXaxis()->SetTitle("N_{Part}");
grRaaALICE->GetYaxis()->SetTitle("R_{AA}");
grRaaALICE->Draw("AP");
TLine *lh3 = new TLine(0.0,1.0,420,1.0);
lh3->SetLineColor(1);
lh3->SetLineStyle(1);
lh3->SetLineWidth(1.5);
lh3->Draw("same");
//TLatex *tb= new TLatex;
//tb->SetNDC();
//tb->SetTextAlign(12);
//tb->SetTextColor(1);
//tb->SetTextSize(0.040);
//tb->DrawLatex(0.22,0.22,"PbPb #sqrt{s_{NN}} = 2.76 TeV");
//tb->DrawLatex(0.22,0.16,"J/#psi #rightarrow #mu^{+} #mu^{-}, p_{T}^{J/#psi} > 0.0 GeV/c");
TBox *RaaJPsiALICESys[12];
for(int j=0;j<9;j++){
RaaJPsiALICESys[j] = new TBox(NPartALICE[j]-3, RaaALICE[j]-SystErrALICE[j], NPartALICE[j]+3, RaaALICE[j]+SystErrALICE[j]);
}
for(int j=0;j<9;j++){
RaaJPsiALICESys[j]->SetFillStyle(0000);
RaaJPsiALICESys[j]->SetLineColor(4);
RaaJPsiALICESys[j]->Draw("same");
}
TBox *ALICEGlobalSysJPsi;
ALICEGlobalSysJPsi = new TBox(400-5, 1 - 0.14, 400+5, 1 + 0.14);
ALICEGlobalSysJPsi->SetFillStyle(3001);
ALICEGlobalSysJPsi->SetLineColor(4);
ALICEGlobalSysJPsi->SetFillColor(4);
ALICEGlobalSysJPsi->Draw("same");
Draw_ALICEMid_JPsi_RaaVsNpart(lgd);
lgd->AddEntry(grRaaALICE,"ALICE Data p_{T}^{J/#psi} > 0.0 GeV/c, 2.5 #leq y^{J/#psi} #leq 4.0","P");
}
示例2: Draw_ALICEMid_JPsi_RaaVsNpart
void Draw_ALICEMid_JPsi_RaaVsNpart(TLegend *lgd)
{
//ALICE MID rapidity
int nbinsALICEMid=3;
Double_t NPartALICEMid[3]={357,193,46};
Double_t ErrNPartALICEMid[3]={0};
Double_t RaaALICEMid[3] = {0.82,0.65,0.73};
Double_t SystErrALICEMid[3] = {0.15,0.10,0.16};
TGraphErrors *grRaaALICEMid = new TGraphErrors(nbinsALICEMid, NPartALICEMid, RaaALICEMid, ErrNPartALICEMid, SystErrALICEMid);
grRaaALICEMid->SetMarkerStyle(20);
grRaaALICEMid->SetMarkerColor(2);
//grRaaALICEMid->SetLineColor(2);
grRaaALICEMid->GetYaxis()->SetRangeUser(0,1.5);
TAxis *Xaxis = grRaaALICEMid->GetXaxis();
Xaxis->SetLimits(0.,430.0);
grRaaALICEMid->GetXaxis()->SetTitle("N_{Part}");
grRaaALICEMid->GetYaxis()->SetTitle("R_{AA}");
grRaaALICEMid->Draw("Psame");
//TLatex *tb= new TLatex;
//tb->SetNDC();
//tb->SetTextAlign(12);
//tb->SetTextColor(1);
//tb->SetTextSize(0.040);
//tb->DrawLatex(0.55,0.90,"PbPb #sqrt{s_{NN}} = 2.76 TeV");
//tb->DrawLatex(0.22,0.16,"J/#psi #rightarrow #mu^{+} #mu^{-}, p_{T}^{J/#psi} > 0.0 GeV/c");
//tb->DrawLatex(0.55,0.85,"p_{T}^{J/#psi} > 0.0 GeV/c");
TLine *lh3 = new TLine(0.0,1.0,420,1.0);
lh3->SetLineColor(1);
lh3->SetLineStyle(1);
lh3->SetLineWidth(1.5);
lh3->Draw("same");
TBox *RaaJPsiALICEMidSys[12];
for(int j=0;j<3;j++){
RaaJPsiALICEMidSys[j] = new TBox(NPartALICEMid[j]-3, RaaALICEMid[j]-SystErrALICEMid[j], NPartALICEMid[j]+3, RaaALICEMid[j]+SystErrALICEMid[j]);
}
for(int j=0;j<3;j++){
RaaJPsiALICEMidSys[j]->SetFillStyle(0000);
RaaJPsiALICEMidSys[j]->SetLineColor(2);
RaaJPsiALICEMidSys[j]->Draw("same");
}
TBox *ALICEMidGlobalSysJPsi;
ALICEMidGlobalSysJPsi = new TBox(385-5, 1 - 0.26, 385+5, 1 + 0.26);
ALICEMidGlobalSysJPsi->SetFillStyle(3001);
ALICEMidGlobalSysJPsi->SetLineColor(2);
ALICEMidGlobalSysJPsi->SetFillColor(2);
ALICEMidGlobalSysJPsi->Draw("same");
lgd->AddEntry(grRaaALICEMid,"ALICE Data p_{T}^{J/#psi} > 0.0 GeV/c, |y^{J/#psi}| #leq 1.0","P");
}
示例3: Draw_CMS_Y1S_RaaVsRap
void Draw_CMS_Y1S_RaaVsRap(TLegend *lgd)
{
const int nbinsRap=6;
Double_t RapCMS[nbinsRap]={0.2,0.6,1.0,1.4,1.8,2.2};
Double_t ErrRapCMS[nbinsRap]={0};
Double_t RaaRapCMS[nbinsRap] = {0.402,0.377,0.452,0.461,0.466,0.35};
Double_t RaaRapStatErrCMS[nbinsRap] = {0.025,0.025,0.030,0.034,0.039,0.053};
Double_t RaaRapSystErrCMS[nbinsRap] = {0.0404,0.038,0.046,0.0466,0.0484,0.0373};
TGraphErrors *grRaaRapCMS = new TGraphErrors(nbinsRap, RapCMS, RaaRapCMS, ErrRapCMS, RaaRapStatErrCMS);
grRaaRapCMS->SetMarkerStyle(20);
grRaaRapCMS->SetMarkerColor(4);
grRaaRapCMS->GetYaxis()->SetRangeUser(0,3.0);
grRaaRapCMS->GetXaxis()->SetTitle("p_{T}(GeV/c)");
grRaaRapCMS->GetYaxis()->SetTitle("R_{AA}");
TAxis *Xaxis2 = grRaaRapCMS->GetXaxis();
Xaxis2->SetLimits(0.,2.4);
grRaaRapCMS->Draw("AP");
TLine *lh4 = new TLine(0.0,1.0,20.0,1.0);
lh4->SetLineColor(1);
lh4->SetLineStyle(1);
lh4->SetLineWidth(2);
lh4->Draw("same");
TLatex *tb= new TLatex;
tb->SetNDC();
tb->SetTextAlign(12);
tb->SetTextColor(1);
tb->SetTextSize(0.040);
//tb->DrawLatex(0.55,0.22,"PbPb #sqrt{s_{NN}} = 2.76 TeV");
//tb->DrawLatex(0.55,0.16,"#varUpsilon #rightarrow #mu^{+} #mu^{-}, p_{T}^{#varUpsilon} > 0.0 GeV/c");
TBox *RaaRapCMSSys[nbinsRap];
for(int j=0;j<nbinsRap;j++){
RaaRapCMSSys[j] = new TBox(RapCMS[j]-0.1, RaaRapCMS[j]-RaaRapSystErrCMS[j], RapCMS[j]+0.1, RaaRapCMS[j]+RaaRapSystErrCMS[j]);
}
for(int j=0;j<nbinsRap;j++){
RaaRapCMSSys[j]->SetFillStyle(0000);
RaaRapCMSSys[j]->SetLineColor(4);
RaaRapCMSSys[j]->Draw("same");
}
TBox *CMSGlobalSysRap;
CMSGlobalSysRap = new TBox(18-0.2, 1 - 0.083, 18+0.2, 1 + 0.083);
CMSGlobalSysRap->SetFillStyle(3001);
CMSGlobalSysRap->SetLineColor(4);
CMSGlobalSysRap->SetFillColor(4);
//CMSGlobalSysRap->Draw("same");
lgd->AddEntry(grRaaRapCMS,"CMS Data", "P");
}
示例4: Draw_CMS_JPsi_RaaVsRap
void Draw_CMS_JPsi_RaaVsRap(TLegend *lgd)
{
//=============== CMS Raa Vs Rap Data ===============================================================//
//AvpT 10.92,9.65,8.92
int nbinsRapCMS=3;
Double_t RapCMSD[3]={0.6,1.4,2.0};
Double_t ErrRapCMS[3]={0.6,0.2,0.4};
Double_t RaaRapCMS[3] = {0.31,0.33,0.36};
Double_t RaaRapStatErrCMS[3] = {0.02,0.03,0.03};
Double_t RaaRapSystErrCMS[3] = {0.03,0.04,0.04};
TGraphErrors *grRaaRapCMS = new TGraphErrors(nbinsRapCMS, RapCMSD, RaaRapCMS, ErrRapCMS, RaaRapStatErrCMS);
grRaaRapCMS->SetMarkerStyle(20);
grRaaRapCMS->SetMarkerColor(2);
grRaaRapCMS->GetYaxis()->SetRangeUser(0,1.5);
grRaaRapCMS->GetXaxis()->SetTitle("|y|");
grRaaRapCMS->GetYaxis()->SetTitle("R_{AA}");
TAxis *XaxisgrRaaRapCMS = grRaaRapCMS->GetXaxis();
XaxisgrRaaRapCMS->SetLimits(0.0,2.4);
grRaaRapCMS->Draw("AP");
TLine *lh_grRaaRapCMS = new TLine(0.0,1.0,2.4,1.0);
lh_grRaaRapCMS->SetLineColor(1);
lh_grRaaRapCMS->SetLineStyle(1);
lh_grRaaRapCMS->SetLineWidth(1.5);
lh_grRaaRapCMS->Draw("same");
TLatex *tb= new TLatex;
tb->SetNDC();
tb->SetTextAlign(12);
tb->SetTextColor(1);
tb->SetTextSize(0.040);
tb->DrawLatex(0.20,0.20,"Pb+Pb #sqrt{s_{NN}} = 2.76 TeV");
tb->DrawLatex(0.20,0.15,"J/#psi #rightarrow #mu^{+} #mu^{-}, p_{T}^{J/#psi} > 6.5 GeV/c");
TBox *RaaRapJPsiCMSSys[4];
for(int j=0;j<3;j++){
RaaRapJPsiCMSSys[j] = new TBox(RapCMSD[j]-0.05, RaaRapCMS[j]-RaaRapSystErrCMS[j], RapCMSD[j]+0.05, RaaRapCMS[j]+RaaRapSystErrCMS[j]);
}
for(int j=0;j<3;j++){
RaaRapJPsiCMSSys[j]->SetFillStyle(0000);
RaaRapJPsiCMSSys[j]->SetLineColor(2);
RaaRapJPsiCMSSys[j]->Draw("same");
}
TBox *CMSGlobalSysJPsiRap;
CMSGlobalSysJPsiRap = new TBox(0.2-0.05, 1 - 0.05, 0.2+0.05, 1 + 0.05);
CMSGlobalSysJPsiRap->SetFillStyle(3001);
CMSGlobalSysJPsiRap->SetLineColor(2);
CMSGlobalSysJPsiRap->SetFillColor(2);
CMSGlobalSysJPsiRap->Draw("same");
lgd->AddEntry(grRaaRapCMS,"CMS Data", "P");
}
示例5: PlotBF
void HiggsPlot::PlotBF(int iDecay, double tBmH_max, double BF_max){
if(iDecay<0 || iDecay>2) {cout<<"iDecay must be 0, 1 or 2"<<endl; return;}
styles style; style.setPadsStyle(-1); style.setDefaultStyle();
int nBins = 1000;
TString hName, epsName = "public_html/Higgs_BF_TEMP_BaBar.eps", label, Llabel, Rlabel;
TString yTitle[] = {"BF(B#rightarrow#tau#nu) (10^{-5})", "R(D)", "R(D*)"};
TString TagDecay[] = {"BF", "R(D)", "R(D*)"};
TCanvas can;
TH1F *hBF[2];
for(int his=0; his<1; his++) {
hName = "hBF"; hName += his;
hBF[his] = new TH1F(hName,"",nBins,0,tBmH_max);
}
double tBmH, BF[2];
for(int bin=1; bin<=nBins; bin++){
tBmH = hBF[0]->GetBinCenter(bin);
Compute(tBmH,BF,iDecay);
hBF[0]->SetBinContent(bin, BF[0]);
hBF[0]->SetBinError(bin, BF[1]);
}
hBF[0]->SetFillColor(2); hBF[0]->SetLineColor(2);
hName += "1";
hBF[1] = static_cast<TH1F*>(hBF[0]->Clone(hName));
for(int bin=1; bin<=nBins; bin++)hBF[1]->SetBinError(bin,0);
hBF[1]->SetFillColor(0);hBF[1]->SetLineColor(1); hBF[1]->SetLineWidth(2);
TBox box; box.SetLineColor(4);box.SetFillColor(4);
TLine line; line.SetLineStyle(1); line.SetLineColor(4); line.SetLineWidth(3);
if(BF_max>0) hBF[0]->SetMaximum(BF_max);
hBF[0]->Draw("e3");
box.SetFillStyle(3002);
box.DrawBox(0,Measurement[iDecay][0]-Measurement[iDecay][1],
tBmH_max,Measurement[iDecay][0]+Measurement[iDecay][1]);
line.DrawLine(0,Measurement[iDecay][0],tBmH_max,Measurement[iDecay][0]);
hBF[0]->Draw("e3 same");
hBF[1]->Draw("c same");
Compute(0,BF,iDecay);
label = "#splitline{"; label += TagDecay[iDecay]; label += "_{SM} = ";
if(iDecay==0){
label+="(";label+=RoundNumber(BF[0],1); label+=" #pm ";
label+=RoundNumber(BF[1],1); label+=")#times10^{-5}}{BF_{exp} = (";
label+=RoundNumber(Measurement[iDecay][0],1); label+=" #pm ";
label+=RoundNumber(Measurement[iDecay][1],1); label+=")#times10^{-5}}";
Llabel = ""; Rlabel = label;
} else {
label+=RoundNumber(BF[0],3); label+=" #pm ";
label+=RoundNumber(BF[1],3); label+="}{"; label += TagDecay[iDecay]; label += "_{exp} = ";
label+=RoundNumber(Measurement[iDecay][0],3); label+=" #pm ";
label+=RoundNumber(Measurement[iDecay][1],3); label+="}";
Rlabel = ""; Llabel = label;
}
style.setTitles(hBF[0],"tan#beta/m_{H^{+}} (GeV^{-1})",yTitle[iDecay],Llabel,Rlabel);
epsName.ReplaceAll("TEMP",DecayName[iDecay]);
can.SaveAs(epsName);
for(int his=0; his<2; his++) hBF[his]->Delete();
}
示例6: Draw_CMS_JPsi_RaaVsNpart
void Draw_CMS_JPsi_RaaVsNpart(TLegend *lgd)
{
int nbins = 12;
Double_t RaaCMS[20]={0.23,0.24,0.29,0.33,0.38,0.40,0.45,0.41,0.52,0.52,0.64,0.64};
Double_t StatErrCMS[20]={0.01,0.01,0.02,0.02,0.02,0.03,0.03,0.03,0.04,0.04,0.05,0.05};
Double_t SystErrCMS[20]={0.02,0.03,0.03,0.03,0.04,0.04,0.05,0.04,0.05,0.05,0.07,0.13};
Double_t NPartCMS[20]={Npart(0,2),Npart(2,4),Npart(4,6),Npart(6,8),Npart(8,10),Npart(10,12),
Npart(12,14),Npart(14,16),Npart(16,18),Npart(18,20),Npart(20,24),
Npart(24,40)};
Double_t ErrNPartCMS[20]={0};
TGraphErrors *grRaaCMS = new TGraphErrors(nbins, NPartCMS, RaaCMS, ErrNPartCMS, StatErrCMS);
grRaaCMS->SetMarkerStyle(21);
grRaaCMS->SetMarkerColor(2);
grRaaCMS->GetYaxis()->SetRangeUser(0,1.7);
grRaaCMS->GetXaxis()->SetTitle("N_{Part}");
grRaaCMS->GetYaxis()->SetTitle("R_{AA}");
grRaaCMS->Draw("AP");
TBox *RaaJPsiSys[12];
for(int j=0;j<12;j++){
RaaJPsiSys[j] = new TBox(NPartCMS[j]-3, RaaCMS[j]-SystErrCMS[j], NPartCMS[j]+3, RaaCMS[j]+SystErrCMS[j]);
}
for(int j=0;j<12;j++){
RaaJPsiSys[j]->SetFillStyle(0000);
RaaJPsiSys[j]->SetLineColor(6);
RaaJPsiSys[j]->Draw("same");
}
TLine *lh2 = new TLine(0.0,1.0,400,1.0);
lh2->SetLineColor(1);
lh2->SetLineStyle(1);
lh2->SetLineWidth(2);
lh2->Draw("same");
TBox *GlobalSysJPsi;
GlobalSysJPsi = new TBox(400-5, 1 - 0.06, 400+5, 1 + 0.06);
GlobalSysJPsi->SetFillStyle(3001);
GlobalSysJPsi->SetLineColor(6);
GlobalSysJPsi->SetFillColor(6);
GlobalSysJPsi->Draw("same");
TLatex *tb= new TLatex;
tb->SetNDC();
tb->SetTextAlign(12);
tb->SetTextColor(1);
tb->SetTextSize(0.040);
tb->DrawLatex(0.17,0.23,"PbPb #sqrt{s_{NN}} = 2.76 TeV");
tb->DrawLatex(0.17,0.17,"p_{T}^{J/#psi} > 6.5 GeV/c");
lgd->AddEntry(grRaaCMS,"CMS Data", "P");
}
示例7: DrawTargetBoundaries
//--------------------------
// DrawTargetBoundaries
//--------------------------
void DrawTargetBoundaries(int color=target_color)
{
double Zlo = 50.0;
double Zhi = Zlo + 30.0;
double Rlo = 0.0;
double Rhi = Rlo + 1.5;
if (full) { Rlo=-1.5; Rhi=Rlo+3; }
TBox *box = new TBox(Zlo, Rlo, Zhi, Rhi);
box->SetLineWidth(2.0);
if (fill_detectors) { box->SetFillColor(color); box->SetFillStyle(1001); }
else box->SetFillStyle(0);
box->SetLineColor(color);
box->Draw();
TLatex *lab = new TLatex(Zlo-5, 0, "target");
if (full) lab->SetTextAlign(32); else lab->SetTextAlign(31);
lab->SetTextSize(0.02);
lab->SetTextColor(color);
lab->Draw();
}
示例8: drawTransition
void drawTransition(){
TBox *bTrans = new TBox(0., 0., 0.97, 0.97);
if(iColor)bTrans->SetFillColor(kYellow-9);
if (! iColor)bTrans->SetFillStyle(4017);
bTrans->Draw();
TEllipse *eTrans1 = new TEllipse(0., 0., 0.9, 0.7, 70., 90., 0.);
eTrans1->SetNoEdges();
eTrans1->SetFillColor(17);
eTrans1->SetLineWidth(2);
eTrans1->SetLineStyle(7);
eTrans1->Draw();
TEllipse *eTrans2 = new TEllipse(0., 0., 0.9, 0.7, 0., 70., 0.);
eTrans2->SetNoEdges();
eTrans2->SetFillColor(17);
eTrans2->SetLineWidth(2);
eTrans2->Draw();
TMarker *mCrit = new TMarker(0.29, 0.6625, 20);
mCrit->SetMarkerSize(1.4);
mCrit->Draw();
}
示例9: drawXS
//.........这里部分代码省略.........
gLumi->SetLineColor (kBlue);
gLumi->SetLineWidth (2);
gLumi->SetMarkerSize (1.3);
gLumi->SetMarkerStyle(kFullCircle);
// Draw
//----------------------------------------------------------------------------
TString suffix = "7TeV_" + sCharge[theCharge];
TCanvas* canvas = new TCanvas("ratioNLO_" + suffix, "ratioNLO_" + suffix);
canvas->SetLeftMargin(canvas->GetRightMargin());
Double_t xmin = 0.0;
Double_t xmax = 2.0;
Double_t ylegend = 1.2;
Double_t ymin = -0.6;
Double_t ymax = nChannel + ymin + ylegend;
TH2F* h2 = new TH2F("h2_" + suffix, "", 100, xmin, xmax, 100, ymin, ymax);
h2->Draw();
// NLO WZ cross-section
//----------------------------------------------------------------------------
TBox* nlo = new TBox(1. - xs_nlo_left [theCharge] / xs_nlo[theCharge], ymin,
1. + xs_nlo_right[theCharge] / xs_nlo[theCharge], ymax - ylegend);
nlo->SetLineColor(0);
nlo->SetFillColor(kGray);
nlo->SetFillStyle(1001);
nlo->Draw("e2,same");
TLine* line = new TLine(1., ymin, 1., ymax - ylegend);
line->SetLineColor(kGray+1);
line->SetLineWidth(2);
line->Draw("same");
// Cross sections
//----------------------------------------------------------------------------
gLumi->Draw("p,same");
gSyst->Draw("p,same");
gStat->Draw("p,same");
// Labels
//----------------------------------------------------------------------------
for (UInt_t i=0; i<nChannel; i++) {
Double_t x = gStat->GetX()[i];
Double_t y = gStat->GetY()[i];
Double_t gStatError = gStat->GetErrorX(i);
Double_t gSystError = gSyst->GetErrorX(i);
Double_t gLumiError = gLumi->GetErrorX(i);
DrawTLatex(42, xmin+0.06, y+0.15, 0.035, 12,
Form("%s %.2f #pm %.2f",
lChannel[i].Data(), x, gLumiError), 0);
示例10: categories_sig
//.........这里部分代码省略.........
bdtout_cat2_tot->SetMarkerSize(0.7);
bdtout_cat3_tot->SetMarkerSize(0.7);
bdtout_passCiC_all_tot->SetLineColor(1);
bdtout_passCiC_cat0_tot->SetLineColor(2);
bdtout_passCiC_cat1_tot->SetLineColor(3);
bdtout_passCiC_cat2_tot->SetLineColor(4);
bdtout_passCiC_cat3_tot->SetLineColor(6);
bdtout_passCiC_lowPt_cat0_tot->SetLineColor(2);
bdtout_passCiC_lowPt_cat1_tot->SetLineColor(3);
bdtout_passCiC_lowPt_cat2_tot->SetLineColor(4);
bdtout_passCiC_lowPt_cat3_tot->SetLineColor(6);
bdtout_passCiC_highPt_cat0_tot->SetLineColor(2);
bdtout_passCiC_highPt_cat1_tot->SetLineColor(3);
bdtout_passCiC_highPt_cat2_tot->SetLineColor(4);
bdtout_passCiC_highPt_cat3_tot->SetLineColor(6);
bdtout_failpresel_all_tot->SetLineColor(1);
bdtout_failpresel_cat0_tot->SetLineColor(2);
bdtout_failpresel_cat1_tot->SetLineColor(3);
bdtout_failpresel_cat2_tot->SetLineColor(4);
bdtout_failpresel_cat3_tot->SetLineColor(6);
bdtout_all_tot->GetXaxis()->SetTitle("di-photon MVA output");
float boundaries[4] = {-0.05,0.49,0.79,.91};
float max = bdtout_all_tot->GetMaximum();
TBox* box = new TBox(-1.,0.,boundaries[0],max*1.05);
box->SetFillColor(38);
box->SetFillStyle(3002);
bdtout_all_tot->Draw("hist");
box->Draw("hist,same");
bdtout_all_tot->Draw("hist,same");
bdtout_cat0_tot->Draw("hist,same");
bdtout_cat1_tot->Draw("hist,same");
bdtout_cat2_tot->Draw("hist,same");
bdtout_cat3_tot->Draw("hist,same");
TLegend *leg;
leg = new TLegend(.14,.6,.46,.87);
leg->SetBorderSize(0);
leg->SetFillColor(10);
leg->SetTextSize(.035);
leg->AddEntry(bdtout_all_tot,"All");
leg->AddEntry(bdtout_cat0_tot,"both EB, both R9>0.94");
leg->AddEntry(bdtout_cat1_tot,"both EB, !both R9>0.94");
leg->AddEntry(bdtout_cat2_tot,"!both EB, both R9>0.94");
leg->AddEntry(bdtout_cat3_tot,"!both EB, !both R9>0.94");
leg->Draw("hist");
TLine* line[4];
for (int i=0; i<4; i++) {
line[i] = new TLine(boundaries[i],0.,boundaries[i],max*1.05);
line[i]->SetLineColor(4);
line[i]->SetLineWidth(2);
line[i]->SetLineStyle(9);
line[i]->Draw("hist");
}
gPad->RedrawAxis();
示例11: FakePhotonSystematic
//.........这里部分代码省略.........
HSigMCRSCl->SetFillColor(0);HSigMCRSCl->SetLineColor(1);
C.Clear();
HDataRSCl->GetYaxis()->SetRangeUser(0,HDataRSCl->GetMaximum()*1.3);
//HDataRSCl->SetTitle(TString("Data Sig =")+(long)(Nw/Ntot)+"."+(long)(1000*(Nw/Ntot-1.)));
HDataRSCl->SetTitle("");
HDataRSCl->GetXaxis()->SetTitle("Reconstruction Multiplicity");
delete HDataRSCl->FindObject("stats");
HDataRSCl->SetStats(0);
HDataRSCl->Draw("pe");
HSigMCRSCl->SetStats(0);
HSigMCRSCl->Draw("same");
C.Print("FakePhotonSystematic.ps");
TH1F*HDataSigMCSigDiff=new TH1F("HDataSigMCSigDiff","",HDataRS->GetXaxis()->GetNbins(),
HDataRS->GetXaxis()->GetXmin(),HDataRS->GetXaxis()->GetXmax());
HDataSigMCSigDiff->Add(HDataRSCl);
HDataSigMCSigDiff->Add(HSigMCRSCl,-1);
C.Clear();
delete HDataSigMCSigDiff->FindObject("stats");
HDataSigMCSigDiff->SetStats(0);
HDataSigMCSigDiff->Draw("");
C.Print("FakePhotonSystematic.ps");
//Signal multiplicity for modified photon backgrounds
C.Clear();
HSigMCRSCl->SetFillColor(0);HSigMCRSCl->SetLineColor(1);
HSigMCRSCl->GetYaxis()->SetRangeUser(0,HSigMCRSCl->GetMaximum()*1.1);
HSigMCRSCl->GetXaxis()->SetRangeUser(.5,3.5);
HSigMCRSCl->SetStats(0);
HSigMCRSCl->Draw("l");
TGraph GMult;
Int_t npts=0;
TH1F* HDiff[21];
TH1F* HSigMCRSMod[21];
for(Int_t m=0;m<11;m++){
HSigMCRSMod[m]=(TH1F*)FMCRSSig.Get(TString("HEvtMultiplicitySigMod")+(long)m);
if(HSigMCRSMod[m]->Integral()>0){
GMult.SetPoint(npts,1+(m-10)*.01,HSigMCRSMod[m]->GetMean());
npts++;
HSigMCRSMod[m]->Scale(HDataRSCl->Integral()/HSigMCRSMod[m]->Integral());
}
HSigMCRSMod[m]->SetLineColor(4);
HSigMCRSMod[m]->SetStats(0);
HSigMCRSMod[m]->Draw("lsame");
HDiff[m]=(TH1F*)HSigMCRSMod[m]->Clone(TString("HEvtMultiplicitySigModCl")+(long)m);
HDiff[m]->Add(HSigMCRSCl,-1);
}
HSigMCRSCl->Draw("lsame");
HDataRSCl->SetLineColor(2);
HDataRSCl->SetStats(0);
HDataRSCl->Draw("lsame");
C.Print("FakePhotonSystematic.ps");
//fix the multiplicity on the plus side
GMult.SetPoint(npts,1.1,HSigMCRSMod[10]->GetMean()+(HSigMCRSMod[10]->GetMean()-HSigMCRSMod[0]->GetMean()));
TH1F* HDataDiff=(TH1F*)HDataRSCl->Clone("HDataDiff");
HDataDiff->Add(HSigMCRSCl,-1);
TH1F* HMCDiff=(TH1F*)HSigMCRSCl->Clone("HMCDiff");
HMCDiff->Add(HSigMCRSCl,-1);
C.Clear();
HMCDiff->GetYaxis()->SetRangeUser(-6000,3000);
HMCDiff->Draw("l");
for(Int_t m=0;m<11;m++) HDiff[m]->Draw("lsame");
HMCDiff->Draw("lsame");
HDataDiff->Draw("lsame");
C.Print("FakePhotonSystematic.ps");
GMult.GetXaxis()->SetTitle("Amount of Fake Photon Background");
GMult.GetYaxis()->SetTitle("Avg. Reconstruction Multiplicity");
C.Clear(); //just the map
GMult.Draw("apl");
C.Print("FakePhotonSystematic.ps");
//no Data error
C.Clear();
GMult.Draw("apl");
TLine line;
line.SetLineColor(2); line.SetLineWidth(2);
line.DrawLine(.9,Nw/Ntot,1.1,Nw/Ntot);
C.Print("FakePhotonSystematic.ps");
//with Data error
C.Clear();
GMult.Draw("apl");
TBox box;
box.SetLineColor(0);
box.SetFillColor(3);
box.SetFillStyle(1001);
box.DrawBox(.9,Nw/Ntot-(1.769-1.763),1.1,Nw/Ntot+(1.769-1.763));
line.DrawLine(.9,Nw/Ntot,1.1,Nw/Ntot);
GMult.Draw("plsame");
C.Print("FakePhotonSystematic.ps");
C.Print("FakePhotonSystematic.ps]");
}
示例12: Draw_Phenix_JPsi_RaaVspT
void Draw_Phenix_JPsi_RaaVspT(TLegend *legend_ratio)
{
//================= Phenix Forward Rapidity Raa Vs Pt ===================================//
//r_aa at forward rapidity (|y| in [1.2,2.2])
//"J/psi Production vs Centrality, Transverse Momentum, and Rapidity in Au+Au Collisions at s(NN)**(1/2) = 200-GeV"
//Preprint: nucl-ex/0611020 inSPIRE, Citations
//Submitted: 2006-11-12
//Published: Phys. Rev. Lett. 98, 232301 (2007) , 2007-06-07
Double_t PtPhenix[7]={0.50,1.50,2.50,3.50,4.50};
Double_t ErrPtPhenix[7]={0};
// 0-20%
//int nbinsPtPhenix=6;
//Double_t RaaPtPhenix[7] = {0.18,0.18,0.19,0.17,0.60,0.26};
//Double_t RaaPtStatErrPhenix[7] = {0.03,0.03,0.04,0.07,0.17,0.06};
//Double_t RaaPtSystErrPhenix[7] = {0.03,0.02,0.03,0.02,0.08,0.05};
// 0-93%
int nbinsPtPhenix=5;
Double_t RaaPtPhenix[7] = {0.152,0.207,0.352,0.323,0.499};
Double_t RaaPtStatErrPhenix[7] = {0.016,0.016,0.024,0.036,0.071};
Double_t RaaPtSystErrPhenix[7] = {0.015,0.020,0.035,0.032,0.049};
TGraphErrors *grRaaPtPhenix = new TGraphErrors(nbinsPtPhenix, PtPhenix, RaaPtPhenix, ErrPtPhenix, RaaPtStatErrPhenix);
grRaaPtPhenix->SetMarkerStyle(34);
grRaaPtPhenix->SetMarkerColor(kGreen+2);
grRaaPtPhenix->SetMarkerSize(1.3);
grRaaPtPhenix->SetLineColor(1);
TLine *lh4 = new TLine(0.0,1.0,7.6,1.0);
lh4->SetLineColor(1);
lh4->SetLineStyle(1);
lh4->SetLineWidth(1.5);
//lh4->Draw("same");
TLatex *tb= new TLatex;
tb->SetNDC();
tb->SetTextAlign(12);
tb->SetTextColor(1);
tb->SetTextSize(0.040);
TBox *RaaPtJPsiPhenixSys[12];
for(int j=0;j<nbinsPtPhenix;j++){
RaaPtJPsiPhenixSys[j] = new TBox(PtPhenix[j]-0.4, RaaPtPhenix[j]-RaaPtSystErrPhenix[j], PtPhenix[j]+0.4, RaaPtPhenix[j]+RaaPtSystErrPhenix[j]);
}
for(int j=0;j<nbinsPtPhenix;j++){
RaaPtJPsiPhenixSys[j]->SetFillStyle(1001);
RaaPtJPsiPhenixSys[j]->SetFillColor(kGreen+6);
RaaPtJPsiPhenixSys[j]->SetLineColor(1);
}
TBox *PhenixGlobalSysJPsiPtFor;
PhenixGlobalSysJPsiPtFor = new TBox(28.42,0.88,29.0,1.16);
PhenixGlobalSysJPsiPtFor->SetFillStyle(3001);
PhenixGlobalSysJPsiPtFor->SetLineColor(1);
PhenixGlobalSysJPsiPtFor->SetFillColor(1);
grRaaPtPhenix->Draw("sameP");
for(int j=0;j<nbinsPtPhenix;j++) RaaPtJPsiPhenixSys[j]->Draw("sameL");
grRaaPtPhenix->Draw("Psame");
//PhenixGlobalSysJPsiPtFor->Draw("sameL");
//tb->DrawLatex(0.22,0.16,"J/#psi #rightarrow #mu^{+} #mu^{-}, p_{T}^{J/#psi} > 0.0 GeV/c");
legend_ratio->SetTextColor(1);
//legend_ratio->AddEntry(grRaaPtPhenix,"PHENIX: J/#psi #rightarrow #mu^{+} #mu^{-}, 1.2 < |y| < 2.2 & p_{T}^{J/#psi} > 0.0 GeV/c", "P");
legend_ratio->AddEntry(grRaaPtPhenix,"Au+Au #sqrt{s_{NN}} = 200 GeV, J/#psi PHENIX: 1.2 < |y| < 2.2", "P");
}
示例13: plotXY
void plotXY(char* fname){
// input: root file from GBL
gStyle->SetOptStat(0);
Double_t w = 1.2; // number of RMS for gaussian fit
TString filename = fname;
TCanvas *cTop = new TCanvas("cTop","Residuals in lab frame, TOP", 800, 1000);
TCanvas *cBot = new TCanvas("cBot","Residuals in lab frame, BOTTOM",800, 1000);
cTop->SetFillColor(kBlue-10); cTop->SetFillStyle(3001);
cBot->SetFillColor(kMagenta-10); cBot->SetFillStyle(3001);
Double_t halfWid = 38.34/2.;
Double_t halfLen = 98.33/2.;
TBox *module = new TBox(-halfLen, -halfWid, halfLen, halfWid);
module->SetLineColor(kMagenta);
module->SetFillStyle(0);
Int_t ic=0;
TFile *f = new TFile(filename.Data());
// extract string
Int_t idx2 = filename.Index("/");
Int_t idx1 = filename.Index("_");
TString outn = filename(idx1+1,idx2-(idx1+1));
TString outname ="predXY_"; outname += outn.Data(); outname += ".txt";
TString topName ="predXY_"; topName += outn.Data(); topName += "_topO.gif";
TString botName ="predXY_"; botName += outn.Data(); botName += "_botO.gif";
// ofstream outf(outname.Data());
// top
Int_t nrow = 13;
Double_t space = 0.007;
Double_t space1 = 0.03;
Double_t y2 = 1./13*nrow-space1;
Double_t y1 = 1./13*(--nrow)-space1;
TPad *tp1 = new TPad("tp1","tp1",0.33,y1,0.66,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp2 = new TPad("tp2","tp2",0.33,y1,0.66,y2);
y2 = y1-space; y1 = 1./13.*(--nrow)-space1;
TPad *tp3 = new TPad("tp3","tp3",0.33,y1,0.66,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp4 = new TPad("tp4","tp4",0.33,y1,0.66,y2);
y2 = y1-space; y1 = 1./13.*(--nrow)-space1;
TPad *tp5 = new TPad("tp5","tp5",0.33,y1,0.66,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp6 = new TPad("tp6","tp6",0.33,y1,0.66,y2);
y2 = y1-space; y1 = 1./13.*(--nrow)-space1;
Double_t off = 0.12;
off = 0.165;
y1 -= space1; y2 -= space1;
space1 *= 2;
TPad *tp7 = new TPad("tp7","tp7",0.+off,y1,0.33+off,y2);
TPad *tp8 = new TPad("tp8","tp8",0.66-off,y1,1.-off,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp9 = new TPad("tp9","tp9",0.+off,y1,0.33+off,y2);
TPad *tp10 = new TPad("tp10","tp10",0.66-off,y1,1.-off,y2);
y2 = y1-space; y1 = 1./13.*(--nrow)-space1;
TPad *tp11 = new TPad("tp11","tp11",0.+off,y1,0.33+off,y2);
TPad *tp12 = new TPad("tp12","tp12",0.66-off,y1,1.-off,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp13 = new TPad("tp13","tp13",0.+off,y1,0.33+off,y2);
TPad *tp14 = new TPad("tp14","tp14",0.66-off,y1,1.-off,y2);
y2 = y1-space; y1 = 1./13.*(--nrow)-space1;
TPad *tp15 = new TPad("tp15","tp15",0.+off,y1,0.33+off,y2);
TPad *tp16 = new TPad("tp16","tp16",0.66-off,y1,1.-off,y2);
y2 = y1; y1 = 1./13.*(--nrow)-space1;
TPad *tp17 = new TPad("tp17","tp17",0.+off,y1,0.33+off,y2);
TPad *tp18 = new TPad("tp18","tp18",0.66-off,y1,1.-off,y2);
cout << " TOP " << endl;
cTop->cd();
tp1->Draw();
tp2->Draw();
tp3->Draw();
tp4->Draw();
tp5->Draw();
tp6->Draw();
tp7->Draw();
tp8->Draw();
tp9->Draw();
tp10->Draw();
tp11->Draw();
tp12->Draw();
tp13->Draw();
tp14->Draw();
tp15->Draw();
tp16->Draw();
tp17->Draw();
tp18->Draw();
ic = 2;
Int_t ipad=0;
for(Int_t i=1; i<4; i++){
TString hisname = "h_xy_module_L"; hisname += i;
hisname += "t_halfmodule_axial_sensor0";
TString layer = "L"; layer+=i; layer+= "TA";
TH2D *his2 = (TH2D*) f->Get(hisname.Data());
TH1D *his = (TH1D*)his2->ProjectionY();
ipad++;
TString pd = "tp"; pd+=ipad;
TPad *pad = (TPad*) cTop->GetListOfPrimitives()->FindObject(pd.Data());
pad->cd();
//.........这里部分代码省略.........
示例14: PlotgSLTauNu
void HiggsPlot::PlotgSLTauNu(double b, double tBmH_max){
styles style; style.setPadsStyle(-2);
style.PadBottomMargin = 2*b/(1+b);
style.setDefaultStyle();
int nBins = 1000;
double PadLimit[2][2] = {{(1-b)/2.,1}, {0, (1+b)/2.}};
double maxRD[] = {45, 45}, minRD[] = {0., 0.}, TopMargin[] = {0.01, 0};
TString hName, epsName = "public_html/Higgs_TauNu_gSL.eps", label, padName;
TString TagDecay[] = {"BF(B#rightarrow#tau#nu) (10^{-5})", "BF(B#rightarrow#tau#nu) (10^{-5})"};
TBox box; box.SetLineColor(4);box.SetFillColor(4);
TLine line; line.SetLineStyle(1); line.SetLineColor(4); line.SetLineWidth(3);
TCanvas can("can","RD Vs Higgs");
TPad *Pads[2];
TH1F *hBF[4][2];
for(int his=0; his<1; his++) {
for(int isDs=0; isDs<4; isDs++){
hName = "hBF"; hName += his; hName += isDs;
hBF[isDs][his] = new TH1F(hName,"",nBins,0,tBmH_max);
}
}
Vub[1] = 0.0003;
double tBmH, BF[2], gSL;
for(int isDs=0; isDs<2; isDs++){
can.cd(0);
if(isDs==0) Vub[0] = 0.00313; else Vub[0] = 0.00431;
padName = "Pad"; padName += isDs;
Pads[isDs] = new TPad(padName,"",0,PadLimit[isDs][0], 1, PadLimit[isDs][1]);
Pads[isDs]->SetTopMargin(TopMargin[isDs]);
Pads[isDs]->Draw(); Pads[isDs]->cd();
for(int bin=1; bin<=nBins; bin++){
gSL = hBF[isDs][0]->GetBinCenter(bin);
tBmH = sqrt(gSL/4.2);
Compute(tBmH,BF,0);
hBF[isDs][0]->SetBinContent(bin, BF[0]);
hBF[isDs][0]->SetBinError(bin, BF[1]);
}
hBF[isDs][0]->SetFillColor(2); hBF[isDs][0]->SetLineColor(2);
hName += isDs;
hBF[isDs][1] = static_cast<TH1F*>(hBF[isDs][0]->Clone(hName));
for(int bin=1; bin<=nBins; bin++)hBF[isDs][1]->SetBinError(bin,0);
hBF[isDs][1]->SetFillColor(0);hBF[isDs][1]->SetLineColor(1); hBF[isDs][1]->SetLineWidth(2);
hBF[isDs][0]->SetMinimum(minRD[isDs]);
hBF[isDs][0]->SetMaximum(maxRD[isDs]);
hBF[isDs][0]->Draw("e3");
box.SetFillStyle(3002);
box.DrawBox(0,Measurement[0][0]-Measurement[0][1],
tBmH_max,Measurement[0][0]+Measurement[0][1]);
line.DrawLine(0,Measurement[0][0],tBmH_max,Measurement[0][0]);
hBF[isDs][0]->Draw("e3 same");
hBF[isDs][1]->Draw("c same");
_isgS = -1;
for(int bin=1; bin<=nBins; bin++){
gSL = hBF[isDs+2][0]->GetBinCenter(bin);
tBmH = sqrt(gSL/4.2);
Compute(tBmH,BF,0);
hBF[isDs+2][0]->SetBinContent(bin, BF[0]);
hBF[isDs+2][0]->SetBinError(bin, BF[1]);
}
hBF[isDs+2][0]->SetFillColor(8); hBF[isDs][0]->SetLineColor(8);
hName += isDs+2;
hBF[isDs+2][1] = static_cast<TH1F*>(hBF[isDs+2][0]->Clone(hName));
for(int bin=1; bin<=nBins; bin++)hBF[isDs+2][1]->SetBinError(bin,0);
hBF[isDs+2][1]->SetFillColor(0);hBF[isDs+2][1]->SetLineColor(1); hBF[isDs+2][1]->SetLineWidth(2);
hBF[isDs][0]->SetMinimum(minRD[isDs]);
hBF[isDs][0]->SetMaximum(maxRD[isDs]);
hBF[isDs+2][0]->Draw("e3 same");
hBF[isDs+2][0]->Draw("e3 same");
hBF[isDs+2][1]->Draw("c same");
_isgS = 1;
style.setTitles(hBF[isDs][0],"-g (GeV^{-1})",TagDecay[isDs]);
}
can.SaveAs(epsName);
for(int isDs=0; isDs<4; isDs++){
//Pads[isDs]->Delete();
for(int his=0; his<2; his++) hBF[isDs][his]->Delete();
}
}
示例15: Draw_CMS_Y2S_RaaVspT
void Draw_CMS_Y2S_RaaVspT(TLegend *lgd)
{
//================= CMS Y2S Raa Vs Pt ===================================//
const int nbinsPt=3;
Double_t PtCMS[nbinsPt]={2.5,8.5,16.0};
Double_t ErrPtCMS[nbinsPt]={0};
Double_t RaaPtCMS[nbinsPt] = {0.0821,0.0656,0.141};
Double_t RaaPtStatErrCMS[nbinsPt] = {0.0471,0.0457,0.0585};
Double_t RaaPtSystErrCMS[nbinsPt] = {0.0182,0.0115,0.025};
TGraphErrors *grRaaPtCMS = new TGraphErrors(nbinsPt, PtCMS, RaaPtCMS, ErrPtCMS, RaaPtStatErrCMS);
grRaaPtCMS->SetMarkerStyle(20);
grRaaPtCMS->SetMarkerColor(4);
grRaaPtCMS->GetYaxis()->SetRangeUser(-0.2,3.0);
grRaaPtCMS->GetXaxis()->SetTitle("p_{T}(GeV/c)");
grRaaPtCMS->GetYaxis()->SetTitle("R_{AA}");
TAxis *Xaxis2 = grRaaPtCMS->GetXaxis();
Xaxis2->SetLimits(0.,20.0);
grRaaPtCMS->Draw("AP");
TLine *lh4 = new TLine(0.0,1.0,20.0,1.0);
lh4->SetLineColor(1);
lh4->SetLineStyle(1);
lh4->SetLineWidth(2);
lh4->Draw("same");
TLatex *tb= new TLatex;
tb->SetNDC();
tb->SetTextAlign(12);
tb->SetTextColor(1);
tb->SetTextSize(0.040);
//tb->DrawLatex(0.55,0.22,"PbPb #sqrt{s_{NN}} = 2.76 TeV");
//tb->DrawLatex(0.55,0.16,"#varUpsilon #rightarrow #mu^{+} #mu^{-}, p_{T}^{#varUpsilon} > 0.0 GeV/c");
TBox *RaaPtCMSSys[nbinsPt];
for(int j=0;j<nbinsPt;j++){
RaaPtCMSSys[j] = new TBox(PtCMS[j]-0.5, RaaPtCMS[j]-RaaPtSystErrCMS[j], PtCMS[j]+0.5, RaaPtCMS[j]+RaaPtSystErrCMS[j]);
}
for(int j=0;j<nbinsPt;j++){
RaaPtCMSSys[j]->SetFillStyle(0000);
RaaPtCMSSys[j]->SetLineColor(4);
RaaPtCMSSys[j]->Draw("same");
}
TBox *CMSGlobalSysPt;
CMSGlobalSysPt = new TBox(18-0.2, 1 - 0.083, 18+0.2, 1 + 0.083);
CMSGlobalSysPt->SetFillStyle(3001);
CMSGlobalSysPt->SetLineColor(4);
CMSGlobalSysPt->SetFillColor(4);
//CMSGlobalSysPt->Draw("same");
lgd->AddEntry(grRaaPtCMS,"CMS Data", "P");
}