3 TString iPathMC,iPathData;
5 void prd2009ZdataMC(
bool x=
false,TString y=
"/star/u/stevens4/wAnalysis/efficXsec/outEmb/gainUp2/",TString z=
"/star/data01/pwg/stevens4/wAnalysis/xSecPaper/sl11b/data/",
float canvasScale=1.0){
11 char* core0=
"Ze+e-Interf";
13 gStyle->SetOptStat(0);
14 gStyle->SetOptDate(0);
17 TString fullInpName=iPathMC; fullInpName+=core0;
18 fullInpName+=
".wana.hist.root";
19 fd=
new TFile(fullInpName);
21 printf(
"ERROR: input histo file not found, quit\n",fullInpName.Data());
24 printf(
"Opened: %s\n",fullInpName.Data());
28 fdata=
new TFile(Form(
"%srun9setABCD.wana.hist.root",iPathData.Data()));
29 TCanvas *c=
new TCanvas(
"zData/MC",
"zData/MC",500*canvasScale,300*canvasScale);
30 c->SetTopMargin(0.05); c->SetBottomMargin(0.13);
31 c->SetRightMargin(0.04); c->SetLeftMargin(0.08);
32 gPad->SetGridy(
false); gPad->SetGridx(
false);
33 if(!colorPlot) c->SetGrayscale();
34 TH1F*
data = (TH1F*)fdata->Get(
"_Z_ZmassUnlike");
35 TH1F* mc = (TH1F*)fd->Get(
"_Z_ZmassUnlike"); mc->Sumw2();
36 mc->Scale(13.18/531.9);
39 TList *LxMC; TList *LxData;
40 LxMC=mc->GetListOfFunctions(); LxMC->Delete();
41 LxData=data->GetListOfFunctions(); LxData->Delete();
43 mc->SetTitle(
";m_{e^{#font[52]{+}}e^{#font[52]{#scale[1.2]{-}}}} (GeV/c^{2}) ; Counts");
44 mc->SetLineStyle(2); mc->SetLineColor(kMagenta);
45 mc->SetLineWidth(2); mc->SetFillColor(0);
46 mc->Rebin(4); mc->SetMaximum(13.99.);
47 mc->GetXaxis()->SetTitleOffset(0.9);
48 mc->GetXaxis()->CenterTitle();
49 mc->GetXaxis()->SetRangeUser(30,120);
50 mc->GetXaxis()->SetTitleSize(0.06);
51 mc->GetXaxis()->SetLabelSize(0.05);
52 mc->GetYaxis()->SetTitleOffset(0.6);
53 mc->GetYaxis()->CenterTitle();
54 mc->GetYaxis()->SetTitleSize(0.06);
55 mc->GetYaxis()->SetLabelSize(0.05);
57 data->SetFillColor(0); data->SetLineWidth(2);
59 data->GetXaxis()->SetRangeUser(30,120);
60 data->GetXaxis()->SetLabelSize(0.06);
61 data->GetYaxis()->SetLabelSize(0.06);
64 TLegend *leg =
new TLegend(0.2,0.72,0.4,0.87);
65 leg->SetEntrySeparation(0.01);
68 leg->SetTextSize(0.05);
70 leg->AddEntry(data,
" STAR 2009 Data",
"l");
71 leg->AddEntry(mc,
" Z #rightarrow ee MC",
"l");
75 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/zDataMCcolor.eps");
76 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/zDataMCcolor.png");
79 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/zDataMCbw.eps");
80 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/zDataMCbw.png");