3 TString iPathMC,iPathData;
5 void prd2009Cuts2plots(
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 TString cCore=
"WprdCuts";
12 TString dataFinalRoot=iPathData+
"run9setABCD.wana.hist.root";
13 TString mcFinalRoot=iPathMC+
"Wplus.wana.hist.root";
15 fd=
new TFile(dataFinalRoot); assert(fd->IsOpen()); assert(fd->IsOpen());
16 fdmc=
new TFile(mcFinalRoot); assert(fd->IsOpen()); assert(fdmc->IsOpen());
18 gStyle->SetPalette(1,0);
19 gStyle->SetOptStat(0);
20 gStyle->SetOptDate(0);
22 const Char_t *title =
"Selection of W events";
24 c=
new TCanvas(cCore,title,500*canvasScale,300*canvasScale);
28 const Int_t Number = 2;
29 Double_t Red[Number] = { 0.9, 0.00};
30 Double_t Green[Number] = { 0.9, 0.00};
31 Double_t Blue[Number] = { 0.9, 0.00};
32 Double_t Length[Number] = { 0.00, 1.00};
34 TColor::CreateGradientColorTable(Number,Length,Red,Green,Blue,nb);
39 TPad *cL =
new TPad(
"padD",
"apdD",0,0,xx1,1.); cL->Draw();
40 TPad *cR =
new TPad(
"padD",
"apdD",xx1,0,1.,1.); cR->Draw();
44 gPad->SetGridy(
false); gPad->SetGridx(
false);
45 gPad->SetRightMargin(0.0); gPad->SetTopMargin(0.01);
46 gPad->SetBottomMargin(0.12);
47 gPad->SetLeftMargin(0.18);
48 h2=(TH2F*)fd->Get(
"musPtBalance_clust");
53 h2->SetAxisRange(8,70,
"x");h2->SetAxisRange(-40,60,
"y");
54 h2->GetXaxis()->SetNdivisions(5);
55 h2->SetTitle(
"; E^{e}_{T} (GeV); Signed P_{T}- balance (GeV/c) ");
56 h2->GetXaxis()->CenterTitle(
true);
57 h2->GetXaxis()->SetLabelSize(0.05);
58 h2->GetXaxis()->SetTitleSize(0.06);
59 h2->GetXaxis()->SetTitleOffset(0.9);
60 h2->GetYaxis()->CenterTitle(
true);
61 h2->GetYaxis()->SetLabelSize(0.05);
62 h2->GetYaxis()->SetTitleSize(0.06);
63 h2->GetYaxis()->SetTitleOffset(1.2);
65 TList *list=h2->GetListOfFunctions();
66 TLine* ln = (TLine*)list->At(0);
67 ln->SetX1(8);ln->SetX2(72); ln->SetLineStyle(2); ln->SetLineWidth(1.5);
68 tx=
new TLatex(54,-33,
"STAR 2009 Data"); tx->Draw();
72 gPad->SetGridy(
false); gPad->SetGridx(
false);
73 gPad->SetRightMargin(0.12); gPad->SetTopMargin(0.01);
74 gPad->SetBottomMargin(0.12);
75 gPad->SetLeftMargin(0.0);
76 h2mc=(TH2F*)fdmc->Get(
"musPtBalance_clust");
80 h2mc->Rebin2D(); h2mc->Scale(h2->GetMaximum()/h2mc->GetMaximum());
81 h2mc->SetAxisRange(8,70,
"x");h2mc->SetAxisRange(-40,60,
"y");
82 h2mc->GetXaxis()->SetNdivisions(5);
83 h2mc->SetTitle(
"; E^{e}_{T} (GeV);");
85 h2mc->GetXaxis()->CenterTitle(
true);
86 h2mc->GetXaxis()->SetLabelSize(0.0518);
87 h2mc->GetXaxis()->SetTitleSize(0.062);
88 h2mc->GetXaxis()->SetTitleOffset(0.9);
89 h2mc->GetYaxis()->CenterTitle(
true);
90 h2mc->GetYaxis()->SetLabelSize(0);
91 h2mc->GetYaxis()->SetLabelColor(0);
92 h2mc->GetYaxis()->SetTitleSize(0.062);
93 h2mc->GetYaxis()->SetTitleOffset(1.15);
95 TList *list=h2mc->GetListOfFunctions();
96 TLine* ln = (TLine*)list->At(0);
97 ln->SetX1(8);ln->SetX2(72); ln->SetLineStyle(2); ln->SetLineWidth(1.5);
98 tx=
new TLatex(58,-33,
"W #rightarrow e#nu MC"); tx->Draw();
102 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/sPtBalcutColor.eps");
103 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/sPtBalcutColor.png");
106 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/sPtBalcutBW.eps");
107 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/sPtBalcutBW.png");
111 c2=
new TCanvas(
"isoCuts",
"isoCuts",500*canvasScale,250*canvasScale);
112 if(!colorPlot) c2->SetGrayscale();
115 TPad *cL2 =
new TPad(
"padL2",
"padL2",0,0,xx2,1.);
116 TPad *cR2 =
new TPad(
"padR2",
"padR2",xx2,0,1,1.);
122 gPad->SetGridy(
false); gPad->SetGridx(
false);
123 gPad->SetBottomMargin(0.16);gPad->SetTopMargin(0.02);
124 gPad->SetLeftMargin(0.2); gPad->SetRightMargin(0.00);
125 h=(TH1F*)fd->Get(
"muBclET24R"); h->Draw();
127 hmc=(TH1F*)fdmc->Get(
"muBclET24R"); hmc->Draw(
"same");
128 hmc->SetFillColor(93); hmc->Scale(0.7); hmc->SetLineColor(93);
130 h->SetTitle(
";E^{e}_{T} / E^{4#times4}_{T} ;Counts ");
131 h->GetYaxis()->SetNdivisions(5);
132 h->GetYaxis()->CenterTitle(
true);
133 h->GetYaxis()->SetTitleSize(0.07);
134 h->GetYaxis()->SetTitleOffset(1.4);
135 h->GetYaxis()->SetLabelSize(0.06);
136 h->GetXaxis()->SetNdivisions(3);
137 h->GetXaxis()->CenterTitle(
true);
138 h->GetXaxis()->SetTitleSize(0.07);
139 h->GetXaxis()->SetTitleOffset(1.0);
140 h->GetXaxis()->SetRangeUser(0.02,1.1);
141 h->GetXaxis()->SetLabelSize(0.06);
143 list=h->GetListOfFunctions();
144 hmc->GetListOfFunctions()->Delete();
145 ln = (TLine*)list->At(0);
146 ln->SetY2(h->GetMaximum()*1.02);ln->SetLineStyle(2); ln->SetLineWidth(1.5);
147 lnclone = (TLine*)ln->Clone(); lnclone->Draw(
"same");
148 TLine *lnAxis =
new TLine(0,0,1.1,0);
149 lnAxis->Draw(
"same");
151 TLegend *leg =
new TLegend(0.3,0.68,0.6,0.85);
152 leg->SetEntrySeparation(0.01);
154 leg->SetFillColor(0);
155 leg->SetTextSize(0.058);
156 leg->SetLineColor(0);
157 leg->AddEntry(h,
" STAR 2009 Data",
"l");
158 leg->AddEntry(hmc,
" W #rightarrow e#nu MC",
"f");
163 gPad->SetGridy(
false); gPad->SetGridx(
false);
164 gPad->SetBottomMargin(0.16); gPad->SetTopMargin(0.02);
165 gPad->SetLeftMargin(0.0); gPad->SetRightMargin(0.01);
166 h=(TH1F*)fd->Get(
"muBjetETR"); h->Draw();
168 hmc=(TH1F*)fdmc->Get(
"muBjetETR"); hmc->Draw(
"same");
169 hmc->SetFillColor(93); hmc->Scale(.2); hmc->SetLineColor(93);
171 h->SetTitle(
";E^{e}_{T} / E^{#DeltaR<0.7}_{T} ");
172 h->GetXaxis()->SetNdivisions(3);
173 h->GetXaxis()->CenterTitle(
true);
174 h->GetXaxis()->SetTitleSize(0.07);
175 h->GetXaxis()->SetTitleOffset(1.0);
176 h->GetXaxis()->SetLabelSize(0.06);
177 h->GetXaxis()->SetRangeUser(0.02,1.1);
178 h->GetYaxis()->SetNdivisions(4);
179 h->GetYaxis()->SetLabelSize(0.06);
180 h->GetYaxis()->SetLabelOffset(-0.13);
183 list=h->GetListOfFunctions();
184 hmc->GetListOfFunctions()->Delete();
185 ln = (TLine*)list->At(0);
186 ln->SetY2(h->GetMaximum()*1.02); ln->SetLineStyle(2); ln->SetLineWidth(1.5);
187 lnclone = (TLine*)ln->Clone(); lnclone->Draw(
"same");
188 lnAxis->Draw(
"same");
191 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/isoCutsColor.eps");
192 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/isoCutsColor.png");
195 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/isoCutsBW.eps");
196 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/isoCutsBW.png");
202 TPad *cT =
new TPad(
"padT",
"apdT",0,yy1,1,1.);
203 TPad *cB =
new TPad(
"padB",
"apdB",0,0.0,1,yy1);
210 gPad->SetGridy(
false); gPad->SetGridx(
false);
211 gPad->SetBottomMargin(0.0);gPad->SetTopMargin(0.02);
212 gPad->SetLeftMargin(xx3); gPad->SetRightMargin(0.01);
213 h=(TH1F*)fd->Get(
"muBclET24R"); h->Draw();
214 hmc=(TH1F*)fdmc->Get(
"muBclET24R"); hmc->Draw(
"same");
215 hmc->SetFillColor(93); hmc->Scale(0.85);
217 h->SetTitle(
"; ;Counts ");
218 h->GetYaxis()->SetNdivisions(0);
219 h->GetYaxis()->CenterTitle(
true);
220 h->GetYaxis()->SetTitleSize(0.085);
221 h->GetYaxis()->SetTitleOffset(0.55);
222 h->GetXaxis()->SetNdivisions(3);
224 list=h->GetListOfFunctions();
225 hmc->GetListOfFunctions()->Delete();
226 ln = (TLine*)list->At(0);
227 ln->SetY2(h->GetMaximum()*1.02);ln->SetLineStyle(2); ln->SetLineWidth(1.5);
229 tx=
new TLatex(0.4,500,
" E^{e}_{T} / E^{4#times4}_{T} "); tx->SetTextSize(0.09); tx->Draw();
230 tx->SetTextAlign(21);
232 tx=
new TLatex(-0.02,15,
"0"); tx->SetTextSize(0.07); tx->Draw();
233 tx->SetTextAlign(21);
235 tx=
new TLatex(-0.05,3000,
"3000"); tx->SetTextSize(0.07); tx->Draw();
236 tx->SetTextAlign(21);
238 tx=
new TLatex(0.125,2960,
"a)"); tx->SetTextSize(0.09); tx->Draw();
239 tx->SetTextAlign(21);
243 gPad->SetGridy(
false); gPad->SetGridx(
false);
244 gPad->SetBottomMargin(0.15); gPad->SetTopMargin(0.00);
245 gPad->SetLeftMargin(xx3); gPad->SetRightMargin(0.01);
246 h=(TH1F*)fd->Get(
"muBjetETR"); h->Draw();
247 hmc=(TH1F*)fdmc->Get(
"muBjetETR"); hmc->Draw(
"same");
248 hmc->SetFillColor(93); hmc->Scale(.2);
250 h->SetTitle(
"; E^{e}_{T} / E^{#DeltaR<0.7}_{T} ;Counts");
251 h->GetXaxis()->SetNdivisions(3); h->GetXaxis()->CenterTitle(
true);
252 h->GetXaxis()->SetTitleSize(0.06); h->GetXaxis()->SetTitleOffset(0.9);
253 h->GetYaxis()->SetNdivisions(4); h->GetYaxis()->CenterTitle(
true);
254 h->GetYaxis()->SetTitleSize(0.06); h->GetYaxis()->SetTitleOffset(0.8);
255 h->GetYaxis()->SetLabelSize(0.055); h->GetXaxis()->SetLabelSize(0.055);
257 list=h->GetListOfFunctions();
258 hmc->GetListOfFunctions()->Delete();
259 ln = (TLine*)list->At(0);
260 ln->SetY2(h->GetMaximum()*1.02); ln->SetLineStyle(2); ln->SetLineWidth(1.5);
262 tx=
new TLatex(0.125,275,
"b)"); tx->SetTextSize(0.07); tx->Draw();
263 tx->SetTextAlign(30);
266 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/isoCutsColor.eps");
267 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/isoCutsColor.png");
270 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/isoCutsBW.eps");
271 c2->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/isoCutsBW.png");