159 |
|
|
160 |
|
stringstream saveas; |
161 |
|
saveas << "Zplusb_data_over_mc___" << binningx[ix-1] << "to" << binningx[ix]; |
162 |
+ |
DrawPrelim(); |
163 |
|
CompleteSave(agrcan,saveas.str()); |
164 |
|
// agrcan->SaveAs("tester.png"); |
165 |
|
} |
233 |
|
|
234 |
|
|
235 |
|
void new_data_mc_agreement_2d() { |
236 |
+ |
gStyle->SetOptFit(0); |
237 |
|
TCut basecut(ZplusBsel&&LeadingB&&EtaB&&PhiZcut); |
238 |
|
|
239 |
|
const int nalphacuts=5; |
289 |
|
mpf_gr->SetMarkerStyle(21); |
290 |
|
mpf_gr->SetMarkerColor(kBlue); |
291 |
|
mpf_gr->Draw("AP"); |
292 |
< |
mpf_gr->Fit("pol1"); |
292 |
> |
mpf_gr->Fit("pol1","QE"); // quiet, use minos |
293 |
> |
mpf_gr->GetXaxis()->SetTitle("#alpha"); |
294 |
> |
mpf_gr->GetXaxis()->CenterTitle(); |
295 |
> |
mpf_gr->GetYaxis()->SetTitle("data/mc"); |
296 |
> |
mpf_gr->GetYaxis()->CenterTitle(); |
297 |
|
TF1 *mpf_pol=(TF1*)mpf_gr->GetFunction("pol1"); |
298 |
|
float mpf_a=mpf_pol->GetParameter(0); |
299 |
|
float mpf_b=mpf_pol->GetParameter(1); |
303 |
|
MPF_ExtraPolatedResults[ipt]=mpf_a; |
304 |
|
|
305 |
|
stringstream mpf_info; |
306 |
< |
mpf_info << "#splitline{#splitline{" << ptcuts[ipt] << " GeV < p_{T}^{Z} < " << ptcuts[ipt+1] << " GeV }{ (MPF) }}{Extrapolated value: " << std::setprecision(3) << mpf_a << "}"; |
306 |
> |
mpf_info << "#splitline{#splitline{#splitline{" << ptcuts[ipt] << " GeV < p_{T}^{Z} < " << ptcuts[ipt+1] << " GeV }{ (MPF) }}{Extrapolated value: " << std::setprecision(3) << mpf_a << "}}{#chi^{2}/NDF : " << mpf_pol->GetChisquare() << " / " << mpf_pol->GetNDF() << "}"; |
307 |
> |
|
308 |
|
TText *mpf_mark = write_title(mpf_info.str()); |
309 |
|
mpf_mark->SetX(0.75); |
310 |
|
mpf_mark->SetTextSize(0.03); |
313 |
|
|
314 |
|
string filenamebkp=filename.str(); |
315 |
|
filename << "__MPF"; |
316 |
+ |
DrawPrelim(); |
317 |
|
CompleteSave(can,filename.str()); |
318 |
|
cout << "MPF : " << mpf_a << " + " << mpf_b << " * alpha " << endl; |
319 |
|
|
321 |
|
|
322 |
|
rabs_gr->SetMarkerStyle(21); |
323 |
|
rabs_gr->SetMarkerColor(kBlue); |
324 |
+ |
rabs_gr->Fit("pol1","QE"); // quiet, use minos |
325 |
|
rabs_gr->Draw("AP"); |
326 |
< |
rabs_gr->Fit("pol1"); |
326 |
> |
rabs_gr->GetXaxis()->SetTitle("#alpha"); |
327 |
> |
rabs_gr->GetXaxis()->CenterTitle(); |
328 |
> |
rabs_gr->GetYaxis()->SetTitle("data/mc"); |
329 |
> |
rabs_gr->GetYaxis()->CenterTitle(); |
330 |
> |
|
331 |
|
TF1 *rabs_pol=(TF1*)rabs_gr->GetFunction("pol1"); |
332 |
|
float rabs_a=rabs_pol->GetParameter(0); |
333 |
|
float rabs_b=rabs_pol->GetParameter(1); |
334 |
|
RABS_FinalGraph->SetPoint(ipt,0.5*(ptcuts[ipt]+ptcuts[ipt+1]),rabs_a); |
335 |
|
RABS_FinalGraph->SetPointError(ipt,0,rabs_pol->GetParError(0)); |
336 |
+ |
|
337 |
|
cout << "!+!+!+!+!+!+!+!+!+ Just added a point to the final plot : " << rabs_a << " +/- " << rabs_pol->GetParError(0) << endl; |
338 |
|
|
339 |
|
|
340 |
|
stringstream rabs_info; |
341 |
< |
rabs_info << "#splitline{#splitline{" << ptcuts[ipt] << " GeV < p_{T}^{Z} < " << ptcuts[ipt+1] << " GeV }{ (R_{abs}) }}{Extrapolated value: " << std::setprecision(3) << rabs_a << "}"; |
341 |
> |
rabs_info << "#splitline{#splitline{#splitline{" << ptcuts[ipt] << " GeV < p_{T}^{Z} < " << ptcuts[ipt+1] << " GeV }{ (R_{abs}) }}{Extrapolated value: " << std::setprecision(3) << rabs_a << "}}{#chi^{2}/NDF : " << rabs_pol->GetChisquare() << " / " << rabs_pol->GetNDF() << "}"; |
342 |
|
TText *rabs_mark = write_title(rabs_info.str()); |
343 |
|
rabs_mark->SetX(0.75); |
344 |
|
rabs_mark->SetTextSize(0.03); |
345 |
|
rabs_mark->SetY(0.75); |
346 |
|
rabs_mark->Draw(); |
347 |
+ |
|
348 |
+ |
|
349 |
|
|
350 |
|
RABS_ExtraPolatedResults[ipt]=rabs_a; |
351 |
|
filename << filenamebkp << "__RABS"; |
352 |
+ |
DrawPrelim(); |
353 |
|
CompleteSave(can,filename.str()); |
354 |
|
cout << "RABS : " << rabs_a << " + " << rabs_b << " * alpha " << endl; |
355 |
|
} |
356 |
|
|
357 |
|
MPF_FinalGraph->SetMarkerStyle(21); |
358 |
|
MPF_FinalGraph->SetMarkerColor(kRed); |
359 |
< |
MPF_FinalGraph->Fit("pol0"); |
359 |
> |
MPF_FinalGraph->Fit("pol0","QE"); // quiet, use minos |
360 |
> |
|
361 |
|
TF1 *mpf_pol0=(TF1*)MPF_FinalGraph->GetFunction("pol0"); |
362 |
|
MPF_FinalGraph->Draw("AP"); |
363 |
+ |
MPF_FinalGraph->GetXaxis()->SetTitle("p_{T}^{Z}"); |
364 |
+ |
MPF_FinalGraph->GetXaxis()->CenterTitle(); |
365 |
+ |
MPF_FinalGraph->GetYaxis()->SetTitle("data/mc"); |
366 |
+ |
MPF_FinalGraph->GetYaxis()->CenterTitle(); |
367 |
+ |
MPF_FinalGraph->Draw("AP"); |
368 |
+ |
|
369 |
|
stringstream mpf_result; |
370 |
< |
mpf_result << "C_{abs}= " << mpf_pol0->GetParameter(0) << " #pm " << mpf_pol0->GetParError(0); |
370 |
> |
mpf_result << "#splitline{C_{abs}= " << std::setprecision(5) << 1/mpf_pol0->GetParameter(0) << " #pm " << std::setprecision(2) << mpf_pol0->GetParError(0)/(mpf_pol0->GetParameter(0)*mpf_pol0->GetParameter(0)) << "}{ (MPF)}"; |
371 |
|
TText *rmpf_final_mark = write_title(mpf_result.str()); |
372 |
|
rmpf_final_mark->SetX(0.75); |
373 |
|
rmpf_final_mark->SetY(0.75); |
374 |
|
rmpf_final_mark->SetTextSize(0.03); |
375 |
|
rmpf_final_mark->Draw(); |
376 |
+ |
DrawPrelim(); |
377 |
|
|
378 |
|
stringstream filename2; |
379 |
|
filename2 << "Extrapolation/FINAL_RESULT_MPF"; |
383 |
|
RABS_FinalGraph->SetMarkerStyle(21); |
384 |
|
RABS_FinalGraph->SetMarkerStyle(21); |
385 |
|
RABS_FinalGraph->SetMarkerColor(kRed); |
386 |
< |
RABS_FinalGraph->Fit("pol0"); |
386 |
> |
RABS_FinalGraph->Fit("pol0","QE"); // quiet, use minos |
387 |
> |
RABS_FinalGraph->Draw("AP"); |
388 |
> |
RABS_FinalGraph->GetXaxis()->SetTitle("p_{T}^{Z}"); |
389 |
> |
RABS_FinalGraph->GetXaxis()->CenterTitle(); |
390 |
> |
RABS_FinalGraph->GetYaxis()->SetTitle("data/mc"); |
391 |
> |
RABS_FinalGraph->GetYaxis()->CenterTitle(); |
392 |
|
RABS_FinalGraph->Draw("AP"); |
393 |
|
TF1 *rabs_pol0=(TF1*)RABS_FinalGraph->GetFunction("pol0"); |
394 |
|
stringstream rabs_result; |
395 |
< |
rabs_result << "C_{abs}= " << rabs_pol0->GetParameter(0) << " #pm " << rabs_pol0->GetParError(0); |
395 |
> |
rabs_result << "#splitline{C_{abs}= " << std::setprecision(5) << 1/rabs_pol0->GetParameter(0) << " #pm " << std::setprecision(2) << rabs_pol0->GetParError(0)/(rabs_pol0->GetParameter(0)*rabs_pol0->GetParameter(0)) << "}{ (R_{abs})}";; |
396 |
|
TText *rabs_final_mark = write_title(rabs_result.str()); |
397 |
|
rabs_final_mark->SetX(0.75); |
398 |
|
rabs_final_mark->SetY(0.75); |
399 |
|
rabs_final_mark->SetTextSize(0.03); |
400 |
|
rabs_final_mark->Draw(); |
401 |
+ |
DrawPrelim(); |
402 |
|
|
403 |
|
filename2.str(""); |
404 |
|
filename2 << "Extrapolation/FINAL_RESULT_RABS"; |