5 void prd2009Zstack(
bool x=
false,TString y=
"/star/data01/pwg/stevens4/wAnalysis/xSecPaper/sl11b/data/",
float canvasScale=1.0){
10 gStyle->SetOptStat(00000);
11 gStyle->SetOptDate(0);
15 f=
new TFile(Form(
"%srun9setABCD.wana.hist.root",iPathData.Data())); assert(f->IsOpen());
24 int lineColor[mxHist]={kBlack,kGreen,kRed,kBlue};
25 int fillColor[mxHist]={0,kGreen,kRed,kBlue};
28 int lineColor[mxHist]={1,kGray+2,kGray,kGray+3};
29 int fillColor[mxHist]={0,kGray+2,kGray,kGray+3};
32 for(
int i=0; i<mxHist; i++){
34 if(i==1) j=2;
if(i==2) j=1;
35 h[i]=(TH1F*)f->Get(Form(
"_Z_ZmassUnlike%d",j));
38 h[i]->SetTitle(
"; m_{#scale[1.3]{e^{#font[52]{+}}e^{#font[52]{#scale[1.2]{-}}}}} (GeV/c^{2}); Counts ");
40 h[i]->GetXaxis()->SetRangeUser(25,125);
41 h[i]->GetXaxis()->CenterTitle();
42 h[i]->SetFillColor(fillColor[j]); h[i]->SetLineColor(lineColor[j]);
43 h[i]->GetYaxis()->SetTitleOffset(0.9);
44 h[i]->GetYaxis()->CenterTitle();
47 TCanvas *c=
new TCanvas(
"aa",
"bb",500*canvasScale,300*canvasScale);
48 c->SetTopMargin(0.05); c->SetBottomMargin(0.13);
49 c->SetLeftMargin(0.08); c->SetRightMargin(0.04);
50 gPad->SetGridy(
false); gPad->SetGridx(
false);
51 if(!colorPlot) c->SetGrayscale();
54 h[0]->GetXaxis()->SetTitleOffset(0.9);
55 h[0]->GetXaxis()->CenterTitle();
56 h[0]->GetXaxis()->SetTitleSize(0.06);
57 h[0]->GetXaxis()->SetLabelSize(0.05);
58 h[0]->GetYaxis()->SetTitleOffset(0.6);
59 h[0]->GetYaxis()->CenterTitle();
60 h[0]->GetYaxis()->SetTitleSize(0.06);
61 h[0]->GetYaxis()->SetLabelSize(0.05);
62 for(
int i=1; i<mxHist; i++){
63 h[i]->GetXaxis()->SetLabelSize(0.06);
64 h[i]->GetYaxis()->SetLabelSize(0.06);
68 TLegend *leg =
new TLegend(0.55,0.6,0.90,0.93);
69 leg->SetEntrySeparation(0.01);
72 leg->SetTextSize(0.045);
74 leg->AddEntry(h[0],
" #splitline{Candidate track and BEMC}{ cluster reconstructed}",
"l");
75 leg->AddEntry(h[1],
" E_{T}^{e} > 15 GeV and |#Deltar| < 0.7 cm",
"f");
76 leg->AddEntry(h[2],
" E_{T}^{e}/E_{T}^{4#times4} > 0.95",
"f");
77 leg->AddEntry(h[3],
" E_{T}^{e}/E_{T}^{#DeltaR<0.7} > 0.88",
"f");
82 c->Print(Form(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/zStack%sColor.eps",like));
83 c->Print(Form(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/zStack%sColor.png",like));
86 c->Print(Form(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/zStack%sBW.eps",like));
87 c->Print(Form(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/zStack%sBW.png",like));