6 void plPRL_Jpeak(TString cCore=
"WAL_PRL_Jpeak") {
7 TString iPath=
"joeBackgMar18/";
8 TString fullInpName=iPath+
"bkgd_histos_pos_final.root";
9 fdP=
new TFile(fullInpName); assert(fdP->IsOpen());
10 TString fullInpName=iPath+
"bkgd_histos_neg_final.root";
11 fdN=
new TFile(fullInpName); assert(fdN->IsOpen());
15 const Char_t *title =
"W boson signal";
16 c=
new TCanvas(cCore,title,400,450);
17 setPadPaperSize(245.0);
21 gPad->SetPad(0,(((245.0*c->GetWh()/c->GetWw())-26.0)*(0.5 + 0.5*(10.0/170.0)) + 26.0)/(245.0*c->GetWh()/c->GetWw()),1,1);
22 setPadMarginWidthPoint(gPad, 32, 1, 1, 0, gPad);
23 setPadLineWidthPoint(gPad, 0.5);
26 gPad->SetPad(0,0,1,(((245.0*c->GetWh()/c->GetWw())-26.0)*(0.5 + 0.5*(10.0/170.0)) + 26.0)/(245.0*c->GetWh()/c->GetWw()));
27 setPadMarginWidthPoint(gPad, 32, 0, 1, (2.0*12.0) + 2, gPad);
28 setPadLineWidthPoint(gPad, 0.5);
31 doJob1(fdN,
"W^{-}",1);
33 doJob1(fdP,
"W^{+}",0);
37 void doJob1(TFile *fd, TString charge,
int q) {
38 gStyle->SetPalette(1,0);
39 gStyle->SetEndErrorSize(0);
40 gStyle->SetFillStyle(0);
45 if(q==1) fileEnd=
"_r";
48 TH1F *hRaw2= (TH1F*) fd->Get(Form(
"raw_stat_err2%s",fileEnd.Data())); assert(hRaw2);
49 TH1F *hEemcBack2= (TH1F*) fd->Get(Form(
"eemc_stat_err2%s",fileEnd.Data())); assert(hEemcBack2);
50 TH1F *hTauBack2= (TH1F*) fd->Get(Form(
"tau_stat_err2%s",fileEnd.Data())); assert(hTauBack2);
51 TH1F *hQcdBack2= (TH1F*) fd->Get(Form(
"QCD_stat_err2%s",fileEnd.Data())); assert(hQcdBack2);
53 hRaw[q]= (TH1F*) fd->Get(Form(
"signal2%s",fileEnd.Data())); assert(hRaw[q]);
54 hFinW[q]= (TH1F*) fd->Get(Form(
"signal_final3%s",fileEnd.Data())); assert(hFinW[q]);
55 hRaw[q]->SetAxisRange(8,74);
57 hRaw[q]->SetMaximum(79.999);
58 hRaw[q]->SetMinimum(-9.999);
61 hRaw[q]->SetMaximum(69.999);
62 hRaw[q]->SetMinimum(-9.999);
64 hRaw[q]->SetStats(
false);
66 zeroline =
new TLine(hRaw[q]->GetXaxis()->GetBinLowEdge(hRaw[q]->GetXaxis()->GetFirst()), 0, hRaw[q]->GetXaxis()->GetBinUpEdge(hRaw[q]->GetXaxis()->GetLast()), 0);
67 zeroline->SetLineColor(kBlack);
68 setLineWidthPoint(zeroline, 0.5);
71 setLineWidthPoint(hRaw[q], 0.5);
77 setHistFontSize(h, 10.0);
78 setLineWidthPoint(h, 0.5);
79 setHistTickLength(h, 4.0, 4.0);
80 setHistTitleLabelOffset(h, 2.0*12.0 - 3.0, 23, 12.0 - 2.0, 4.5 - 2.0);
83 TH1F * hBack=(TH1F*) hRaw[q]->Clone(); hBack->SetNameTitle(
"totBackg",
"totBackg");
85 hBack->Add(hFinW[q],-1.);
86 setLineWidthPoint(hBack, 0.5);
87 setMarkerSizePoint(hBack, 3.5);
89 hBack->SetLineColor(kBlue);
90 hBack->SetMarkerColor(kBlue);
94 hFinW[q]->SetMarkerStyle(8);
95 hFinW[q]->SetLineColor(kBlack);
96 hFinW[q]->SetFillColor(kYellow);
97 setMarkerSizePoint(hFinW[q], 3.5);
98 setLineWidthPoint(hFinW[q], 0.5);
99 if(stage > 2) hFinW[q]->Draw(
"same h");
101 if(q==1) startLine=3;
104 hBack->Draw(
"h same");
112 ln=
new TLine(25,0.,25,yy); ln->SetLineColor(kRed); ln->SetLineStyle(2);
113 setLineWidthPoint(ln, 1); ln->Draw();
115 ln=
new TLine(50,0.,50,yy);
116 ln->SetLineColor(kRed);
118 setLineWidthPoint(ln, 1);
124 float xpos[50],ypos[50],err[50];
125 for(
int ibin=startbin;ibin<hRaw[q]->GetNbinsX();ibin++){
126 float eemcBack2=hEemcBack2->GetBinContent(ibin);
127 float tauBack2=hTauBack2->GetBinContent(ibin);
128 float qcdBack2=hQcdBack2->GetBinContent(ibin);
129 float rawErr2=hRaw[q]->GetBinContent(ibin);
130 float backToterr=sqrt(eemcBack2+tauBack2+qcdBack2);
131 float finToterr=sqrt(eemcBack2+tauBack2+qcdBack2+rawErr2);
132 hBack->SetBinError(ibin,backToterr);
133 xpos[ibin-startbin]=hBack->GetBinCenter(ibin);
134 ypos[ibin-startbin]=hFinW[q]->GetBinContent(ibin);
135 err[ibin-startbin]=finToterr;
137 TGraphErrors *errors =
new TGraphErrors(50,xpos,ypos,0,err);
138 errors->SetMarkerStyle(8);
140 setMarkerSizePoint(errors, 3.5);
141 errors->SetLineColor(kBlack);
142 if(stage > 2) errors->Draw(
"p");
145 lg=
new TLegend(0.72,0.35,0.98,0.82);
146 if(!q) lg=
new TLegend(0.72,0.50,0.98,0.82);
147 if(q==0) lg->SetHeader(
" Positron #font[122]{|}_{_{ }}#eta_{_{ }}#font[122]{|}_{ }_{_{ }}<_{ }1");
148 else lg->SetHeader(
" Electron #font[122]{|}_{_{ }}#eta_{_{ }}#font[122]{|}_{ }_{_{ }}<_{ }1");
150 lg->AddEntry(hRaw[q],
"Candidates",
"lf");
151 lg->AddEntry(hBack,
"Backg. est.",
"l e");
152 lg->AddEntry(hFinW[q],
"Signal",
"lfep");
154 lg->SetFillColor(kWhite);
155 lg->SetLineColor(kWhite);
156 lg->SetShadowColor(kWhite);
159 setTextFontSize(lg, 10.0);
163 TLatex *lat2 =
new TLatex(0.36,0.88,SYMBOL_pplusp +
"_{ }#rightarrow_{ }#font[12]{W}^{#font[122]{+}}^{}#rightarrow_{ }#font[12]{e}^{#font[122]{+}}_{ }#font[122]{+}_{ }#nu_{#font[12]{e}}");
165 setTextFontSize(lat2, 10.0);
168 TLatex *lat2 =
new TLatex(0.36,0.88,SYMBOL_pplusp +
"_{ }#rightarrow_{ }#font[12]{W}^{#font[122]{-}}^{}#rightarrow_{ }#font[12]{e}^{#font[122]{-}}_{ }#font[122]{+}_{ }#bar{#nu}_{#font[12]{e}}");
169 setLineWidthPoint(lat2, 0.5);
171 setTextFontSize(lat2, 10.0);
174 lat2->SetNDC(); lat2->Draw(
"same");
178 tx=
new TLatex(14,3,
"Software threshold"); tx->Draw();
179 tx->SetTextAngle(90); stripCmdLatex(tx); setTextFontSize(tx, 10.0);
183 tx=
new TLatex(58,61,
"STAR 2009"); tx->Draw();
184 stripCmdLatex(tx); setTextFontSize(tx, 10.0);
188 hRaw[q]->SetTitle(
"; E^{e}_{T} (" + SYMBOL_GeV +
");Counts");
190 hRaw[q]->SetTitle(
";;Counts");
191 hRaw[q]->GetXaxis()->CenterTitle(
true);
192 hRaw[q]->GetYaxis()->CenterTitle(
true);
195 ln=
new TLine(7.5,0.,75,0); setLineWidthPoint(ln, 0.5); ln->Draw();
201 float getSum(TH1F* h) {
202 h->SetAxisRange(thresET,100);
203 float sum=h->Integral();
204 h->SetAxisRange(0,100);