2 #include "systematics/systematics_pp.h"
4 double pqcdlowpt(
double *x,
double *par)
6 double ret=par[0]*pow(1.+x[0],par[1]);
9 double pqcdhighpt(
double *x,
double *par)
11 double ret=par[0]*pow(1.+x[0],par[1]);
14 double sumpqcd(
double *x,
double *par)
18 double SW=1. - 1./(1.+exp(fabs(par[4])*(x[0]-par[5])));
19 double ret=SW*pqcdhighpt(x,&par[2]);
20 ret+=(1.-SW)*pqcdlowpt(x,par);
24 void printPoints(TGraphErrors *g)
26 for(Int_t i=0;i<g->GetN();i++){
30 cout<<x<<
" "<<y<<
" "<<ey<<endl;
33 void divideGraphWithFunction(TGraphErrors *graph,TF1 *func)
35 for(
int i=0;i<graph->GetN();i++){
38 graph->GetPoint(i,x,y);
39 double ey=graph->GetErrorY(i);
40 graph->SetPoint(i,x,y/func->Eval(x));
41 graph->SetPointError(i,0.,ey/func->Eval(x));
44 void divideGraphWithGraph(TGraphErrors *graph,TGraph *denom)
46 for(
int i=0;i<graph->GetN();i++){
49 graph->GetPoint(i,x,y);
50 double ey=graph->GetErrorY(i);
51 graph->SetPoint(i,x,y/denom->Eval(x));
52 graph->SetPointError(i,0.,ey/denom->Eval(x));
55 void getRatio(TH1F* h_ratio,TH1F* h_eff,TH1F* h_effSingle,TF1 *f_piondecay)
58 TH1F *h_eff_copy=
new TH1F(*h_eff);
59 for(
int i=1;i<=h_eff->GetNbinsX();i++){
60 h_eff->SetBinError(i,0.);
62 TH1F *h_effSingle_copy=
new TH1F(*h_effSingle);
63 for(
int i=1;i<=h_effSingle->GetNbinsX();i++){
64 h_effSingle_copy->SetBinError(i,0.);
67 h_ratio->Add(f_piondecay,-1.);
68 for(
int i=1;i<=h_ratio->GetNbinsX();i++){
72 h_eff_copy->Divide(h_effSingle_copy);
73 h_ratio->Multiply(h_eff_copy);
74 h_ratio->Add(f_piondecay);
76 void removeThesePoints(TGraphErrors *g,
int trig)
82 g->RemovePoint(g->GetN()-1);
89 g->RemovePoint(g->GetN()-1);
90 g->RemovePoint(g->GetN()-1);
100 void getSpectrumPP05(
const char *pid)
102 gStyle->SetOptStat(0);
103 gStyle->SetOptFit(0);
105 gStyle->SetErrorX(0);
109 bool subtractNEUTRONS=kTRUE;
115 double B[]={0.3,0.23,0.072,0.061};
117 double T[]={0.205,0.215,0.179,0.173};
119 double n[]={11.00,12.55,10.87,10.49};
122 double c_feeddown=0.8+0.2*BR;
124 TF1 *f_nbar=
new TF1(
"f_nbar",
"[3]*[4]*[0]/pow((1.+(sqrt(x*x+1.) - 1.)/([1]*[2])),[2])",0.,15.);
125 f_nbar->SetParameters(B[3],T[3],n[3],c_feeddown,CPVloss);
128 ifstream pQCDphotons(
"./datapoints/pQCD_Werner/rhic_cteq6_gamma_inv_sc1.dat");
132 cout<<
"pqcd photons:"<<endl;
134 if(!pQCDphotons.good())
break;
136 pQCDphotons>>ppx[iii]>>dummy>>dummy>>ppy[iii];
140 TGraph *g_dirgamma=
new TGraph(iii,ppx,ppy);
142 ifstream pQCDphotons05(
"./datapoints/pQCD_Werner/rhic_cteq6_gamma_inv_sc05.dat");
147 if(!pQCDphotons05.good())
break;
149 pQCDphotons05>>ppx05[iii05]>>dummy>>dummy>>ppy05[iii05];
150 ppy05[iii05]*=1.e-09;
153 TGraph *g_dirgamma05=
new TGraph(iii05,ppx05,ppy05);
156 ifstream pQCDphotons2(
"./datapoints/pQCD_Werner/rhic_cteq6_gamma_inv_sc2.dat");
161 if(!pQCDphotons2.good())
break;
163 pQCDphotons2>>ppx2[iii2]>>dummy>>dummy>>ppy2[iii2];
167 TGraph *g_dirgamma2=
new TGraph(iii2,ppx2,ppy2);
169 ifstream phenix(
"./datapoints/phenix_xsec_pp.dat");
174 if(!phenix.good())
break;
175 phenix>>phex[iphe]>>phey[iphe];
179 TGraphErrors *phenix_pp=
new TGraphErrors(iphe,phex,phey);
180 phenix_pp->SetMarkerStyle(24);
181 phenix_pp->SetLineWidth(6);
182 phenix_pp->SetName(
"phenix_pp");
185 ifstream frank(
"./datapoints/frank_pp05_new.dat");
192 if(!frank.good())
break;
193 frank>>frx[ifr]>>fry[ifr]>>frey[ifr];
197 TGraphErrors *frank_pp=
new TGraphErrors(ifr,frx,fry,frex,frey);
198 frank_pp->SetMarkerStyle(25);
199 frank_pp->SetMarkerColor(4);
200 frank_pp->SetName(
"frank_pp");
203 float x_pp2005_sasha[]={1.20358,1.70592,2.21238,2.71916,3.4032,4.4224,5.43571,6.44468,7.45056,8.83794,10.8659,12.8831,15.2692 };
204 float xe_pp2005_sasha[]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
205 float y_pp2005_sasha[]={0.212971,0.0337464,0.00811345,0.00248195,0.000467495,6.37683e-05,1.4487e-05,3.67539e-06,1.26723e-06,3.3676e-07,8.01941e-08,1.93813e-08,5.56059e-09};
206 float ye_pp2005_sasha[]={0.00463771,0.000949529,0.000323778,0.000139023,3.68181e-05,7.61527e-07,2.28359e-07,9.19064e-08,4.93116e-08,8.16844e-09,3.66273e-09,1.75057e-09,7.36722e-10};
208 TGraphErrors *sasha_pp05=
new TGraphErrors(13,x_pp2005_sasha,y_pp2005_sasha,xe_pp2005_sasha,ye_pp2005_sasha);
209 sasha_pp05->SetMarkerStyle(8);
210 sasha_pp05->SetMarkerColor(TColor::GetColor(8,80,8));
211 sasha_pp05->SetName(
"sasha_pp05");
214 ifstream pQCDpions(
"./datapoints/pQCD_Werner/klaus_pi0inv_200_kkp_1.dat");
219 if(!pQCDpions.good())
break;
220 pQCDpions>>pionx[ipion]>>piony[ipion];
221 piony[ipion]*=1.e-09;
224 TGraphErrors *kkp=
new TGraphErrors(ipion,pionx,piony);
225 kkp->SetLineColor(54);
229 ifstream pQCDpions05(
"./datapoints/pQCD_Werner/klaus_pi0inv_200_kkp_05.dat");
234 if(!pQCDpions05.good())
break;
235 pQCDpions05>>pionx05[ipion05]>>piony05[ipion05];
236 piony05[ipion05]*=1.e-09;
239 TGraphErrors *kkp05=
new TGraphErrors(ipion05,pionx05,piony05);
240 kkp05->SetLineStyle(2);
241 kkp05->SetLineColor(54);
242 kkp05->SetName(
"kkp05");
245 ifstream pQCDpions2(
"./datapoints/pQCD_Werner/klaus_pi0inv_200_kkp_2.dat");
250 if(!pQCDpions2.good())
break;
251 pQCDpions2>>pionx2[ipion2]>>piony2[ipion2];
252 piony2[ipion2]*=1.e-09;
255 TGraphErrors *kkp2=
new TGraphErrors(ipion2,pionx2,piony2);
256 kkp2->SetLineStyle(2);
257 kkp2->SetLineColor(54);
258 kkp2->SetName(
"kkp2");
260 TFile *f_decaybg=
new TFile(
"~/MyDecay/gammaDecayPPSum.root",
"OPEN");
261 TH1F *h_decaybg=(TH1F*)f_decaybg->Get(
"gamma");
262 TH1F *h_decaypion=(TH1F*)f_decaybg->Get(
"gamma_pion");
263 TF1 *fit_decay=
new TF1(
"fit_decay",
"[0]/pow(x,[1])+[2]",.3,15.);
264 TF1 *fit_piondecay=
new TF1(*fit_decay);
265 fit_decay->SetParameters(1.,1.,.5);
266 fit_piondecay->SetParameters(1.,1.,.5);
267 h_decaybg->Fit(fit_decay,
"R0Q");
268 h_decaypion->Fit(fit_piondecay,
"R0Q");
271 for(Int_t i=0;i<iii;i++){
272 ppy[i]=ppy[i]/piony[i];
273 ppy[i]=ppy[i]/fit_decay->Eval(ppx[i]);
275 ppy05[i]=ppy05[i]/piony05[i];
276 ppy05[i]=ppy05[i]/fit_decay->Eval(ppx05[i]);
278 ppy2[i]=ppy2[i]/piony2[i];
279 ppy2[i]=ppy2[i]/fit_decay->Eval(ppx2[i]);
282 TGraphErrors *g_photonpqcd=
new TGraphErrors(iii,ppx,ppy);
283 g_photonpqcd->SetName(
"g_photonpqcd");
284 TGraphErrors *g_photonpqcd05=
new TGraphErrors(iii05,ppx05,ppy05);
285 g_photonpqcd05->SetName(
"g_photonpqcd05");
286 TGraphErrors *g_photonpqcd2=
new TGraphErrors(iii2,ppx2,ppy2);
287 g_photonpqcd2->SetName(
"g_photonpqcd2");
290 TString dir(
"/star/u/russcher/gamma/analysis/output/pp05/");
295 TString psout_eta=dir;
299 TString eFileGamma=dir;
301 TString nbarFile=dir;
304 eFile.Append(
"pion_eff.root");
305 eFileGamma.Append(
"gamma_eff.root");
306 pi0File.Append(
"pi0_pp05.root");
307 nbarFile.Append(
"antineutron_eff.root");
308 nbarOut.Append(
"nbar_contam.ps");
309 psout2.Append(
"correctedspec.ps");
310 psout_eta.Append(
"/dev/null");
311 psout.Append(
"invmassplots.ps");
314 gSystem->Load(
"$HOME/MyEvent/MyEvent");
315 gSystem->Load(
"$HOME/gamma/analysis/lib/AnaCuts");
316 gSystem->Load(
"$HOME/gamma/analysis/lib/EventMixer");
317 gSystem->Load(
"$HOME/gamma/analysis/lib/Pi0Analysis");
323 TFile f(pi0File.Data(),
"OPEN");
324 TH2F *h_mb=
new TH2F(*h_minvMB);
325 TH2F *h_ht1=
new TH2F(*h_minvHT1);
326 TH2F *h_ht2=
new TH2F(*h_minvHT2);
327 TH1F *h_ev=
new TH1F(*h_events);
330 TFile *file_nbar=
new TFile(nbarFile,
"OPEN");
331 TH1F *h_nbarEffMB=
new TH1F(*h_effMB);
332 h_nbarEffMB->Sumw2();
333 TH1F *h_nbarEffHT1=
new TH1F(*h_effHT1);
334 h_nbarEffHT1->Sumw2();
335 TH1F *h_nbarEffHT2=
new TH1F(*h_effHT2);
336 h_nbarEffHT2->Sumw2();
343 for(Int_t i=1;i<=h_ev->GetNbinsX();i++)
345 trigger=(Int_t)h_ev->GetBinCenter(i);
346 if(trigger&1) numberOfMB+=(Int_t)h_ev->GetBinContent(i);
347 if(trigger&2) numberOfHT1+=(Int_t)h_ev->GetBinContent(i);
348 if(trigger&4) numberOfHT2+=(Int_t)h_ev->GetBinContent(i);
351 cout<<
"number of mb: "<<numberOfMB<<endl;
360 float nMBwithHT=328871;
363 TFile g(eFile.Data(),
"OPEN");
364 TH1F *h_emb=
new TH1F(*h_effMB);
365 TH1F *h_eht1=
new TH1F(*h_effHT1);
366 TH1F *h_eht2=
new TH1F(*h_effHT2);
369 TFile binf(
"~/BinWidth/bincorrectionsPP.root",
"OPEN");
370 TH1F *h_binmb=
new TH1F(*h4mb);
371 TH1F *h_binht1=
new TH1F(*h4ht1);
372 TH1F *h_binht2=
new TH1F(*h4ht2);
376 for(Int_t i=1;i<=h_binmb->GetNbinsX();i++) h_binmb->SetBinError(i,0);
377 for(Int_t i=1;i<=h_binht1->GetNbinsX();i++) h_binht1->SetBinError(i,0);
378 for(Int_t i=1;i<=h_binht2->GetNbinsX();i++) h_binht2->SetBinError(i,0);
382 TF1 *pion_cpv_corrMB=
new TF1(
"pion_cpv_corrMB",
"1./(1.-0.01*(0.3+0.0*x))",0.,15.);
383 TF1 *pion_cpv_corrHT1=
new TF1(
"pion_cpv_corrHT1",
"1./(1.-0.01*(-0.1+0.16*x))",0.,15.);
384 TF1 *pion_cpv_corrHT2=
new TF1(
"pion_cpv_corrHT2",
"1./(1.-0.01*(-0.2+0.18*x))",0.,15.);
386 TF1 *gamma_cpv_corrMB=
new TF1(
"gamma_cpv_corrMB",
"1./(1.-0.01*(2.8+0.0*x))",0.,15.);
387 TF1 *gamma_cpv_corrHT1=
new TF1(
"gamma_cpv_corrHT1",
"1./(1.-0.01*(0.2+1.1*x))",0.,15.);
388 TF1 *gamma_cpv_corrHT2=
new TF1(
"gamma_cpv_corrHT2",
"1./(1.-0.01*(0.4+1.1*x))",0.,15.);
389 TF1 *gamma_cont_corrMB=
new TF1(
"gamma_cont_corrMB",
"0.985",0.,15.);
390 TF1 *gamma_cont_corrHT1=
new TF1(
"gamma_cont_corrHT1",
"0.98",0.,15.);
391 TF1 *gamma_cont_corrHT2=
new TF1(
"gamma_cont_corrHT2",
"0.96",0.,15.);
395 TF1 *pion_conv_corrMB=
new TF1(
"pion_conv_corrMB",
"1.1",0.,15.);
396 TF1 *pion_conv_corrHT1=
new TF1(
"pion_conv_corrHT1",
"1.1",0.,15.);
397 TF1 *pion_conv_corrHT2=
new TF1(
"pion_conv_corrHT2",
"1.1",0.,15.);
399 TF1 *gamma_conv_corrMB=
new TF1(
"gamma_conv_corrMB",
"1.05",0.,15.);
400 TF1 *gamma_conv_corrHT1=
new TF1(
"gamma_conv_corrHT1",
"1.05",0.,15.);
401 TF1 *gamma_conv_corrHT2=
new TF1(
"gamma_conv_corrHT2",
"1.05",0.,15.);
406 pi0->init(
"/dev/null");
407 TH1F *pionYieldMB=
new TH1F(*pi0->getYield(h_mb,
"mb"));
408 TH1F *pionYieldHT1=
new TH1F(*pi0->getYield(h_ht1,
"ht1"));
409 TH1F *pionYieldHT2=
new TH1F(*pi0->getYield(h_ht2,
"ht2"));
410 pi0->storeCanvases((dir+
"canvases.root").Data());
413 cout<<
"***************************************"<<endl;
414 cout<<
"got yield, dividing by rapidity bite!!!"<<endl;
415 float dy_gamma=cuts->rapidityMaxCUT - cuts->rapidityMinCUT;
416 float dy_pion=cuts->rapPionMaxCUT - cuts->rapPionMinCUT;
417 cout<<
"***************************************"<<endl;
419 cout<<
" pion bite is "<<dy_pion<<endl;
420 cout<<
" gamma bite is "<<dy_gamma<<endl;
422 cout<<
"***************************************"<<endl;
424 pionYieldMB->Scale(1./dy_pion);
425 pionYieldHT1->Scale(1./dy_pion);
426 pionYieldHT2->Scale(1./dy_pion);
456 pionYieldMB->SetMarkerStyle(8);
457 pionYieldMB->SetMarkerSize(1.0);
458 pionYieldHT1->SetMarkerStyle(8);
459 pionYieldHT1->SetMarkerSize(1.0);
460 pionYieldHT1->SetMarkerColor(4);
461 pionYieldHT2->SetMarkerStyle(8);
462 pionYieldHT2->SetMarkerSize(1.0);
463 pionYieldHT2->SetMarkerColor(2);
465 TF1 *scale=
new TF1(
"scale",
"x",0.,15.);
467 pionYieldMB->SetNameTitle(
"pionYieldMB",
"corrected yield MB");
468 pionYieldMB->Divide(h_emb);
469 pionYieldMB->Scale(psMB/(psMB*numberOfMB*2.*TMath::Pi()));
470 pionYieldMB->Divide(scale);
471 pionYieldMB->Multiply(h_binmb);
472 pionYieldMB->Multiply(pion_cpv_corrMB);
473 pionYieldMB->Multiply(pion_conv_corrMB);
475 pionYieldHT1->SetNameTitle(
"pionYieldHT1",
"corrected yield HT1");
476 pionYieldHT1->Divide(h_eht1);
477 pionYieldHT1->Scale(psHT1/(psMB*nMBwithHT*2.*TMath::Pi()));
478 pionYieldHT1->Divide(scale);
479 pionYieldHT1->Multiply(h_binht1);
480 pionYieldHT1->Multiply(pion_cpv_corrHT1);
481 pionYieldHT1->Multiply(pion_conv_corrHT1);
483 pionYieldHT2->SetNameTitle(
"pionYieldHT2",
"corrected yield HT2");
484 pionYieldHT2->Divide(h_eht2);
485 pionYieldHT2->Scale(psHT2/(psMB*nMBwithHT*2.*TMath::Pi()));
486 pionYieldHT2->Divide(scale);
487 pionYieldHT2->Multiply(h_binht2);
488 pionYieldHT2->Multiply(pion_cpv_corrHT2);
489 pionYieldHT2->Multiply(pion_conv_corrHT2);
492 TH1F *pionYieldMBratio=
new TH1F(*pionYieldMB);
493 TH1F *pionYieldHT1ratio=
new TH1F(*pionYieldHT1);
494 TH1F *pionYieldHT2ratio=
new TH1F(*pionYieldHT2);
497 TH1F *pionXsMB=
new TH1F(*pionYieldMB);
498 TH1F *pionXsHT1=
new TH1F(*pionYieldHT1);
499 TH1F *pionXsHT2=
new TH1F(*pionYieldHT2);
500 pionXsMB->Scale((26.1/0.85));
501 pionXsHT1->Scale((26.1/0.85));
502 pionXsHT2->Scale((26.1/0.85));
505 TH1F *pionXsMBnoErr=
new TH1F(*pionXsMB);
506 TH1F *pionXsHT1noErr=
new TH1F(*pionXsHT1);
507 TH1F *pionXsHT2noErr=
new TH1F(*pionXsHT2);
508 for(
int i=1;i<=pionXsMBnoErr->GetNbinsX();i++){
509 pionXsMBnoErr->SetBinError(i,0.);
511 for(
int i=1;i<=pionXsHT1noErr->GetNbinsX();i++){
512 pionXsHT1noErr->SetBinError(i,0.);
514 for(
int i=1;i<=pionXsHT2noErr->GetNbinsX();i++){
515 pionXsHT2noErr->SetBinError(i,0.);
518 TGraphErrors *g_pionXsMB=
new TGraphErrors(pionXsMB);
519 g_pionXsMB->SetName(
"g_pionXsMB");
520 removeThesePoints(g_pionXsMB,1);
522 TGraphErrors *g_pionXsHT1=
new TGraphErrors(pionXsHT1);
523 g_pionXsHT1->SetName(
"g_pionXsHT1");
524 removeThesePoints(g_pionXsHT1,2);
526 TGraphErrors *g_pionXsHT2=
new TGraphErrors(pionXsHT2);
527 g_pionXsHT2->SetName(
"g_pionXsHT2");
528 removeThesePoints(g_pionXsHT2,3);
531 cout<<endl<<
"xsec: x y ex ey"<<endl;
532 cout<<
"minbias"<<endl;
533 printPoints(g_pionXsMB);
534 cout<<endl<<
"hightower-1"<<endl;
535 printPoints(g_pionXsHT1);
536 cout<<endl<<
"hightower-2"<<endl;
537 printPoints(g_pionXsHT2);
542 TMultiGraph *m_pions_fit=
new TMultiGraph();
543 m_pions_fit->SetName(
"m_pions_fit");
544 m_pions_fit->SetMinimum(5.0e-9);
545 m_pions_fit->SetMaximum(0.99);
548 m_pions_fit->Add(g_pionXsMB);
549 m_pions_fit->Add(g_pionXsHT1);
550 m_pions_fit->Add(g_pionXsHT2);
552 TF1 *fitQCD=
new TF1(
"fitQCD",sumpqcd,1.,15.,6);
553 fitQCD->SetParameters(600.,-8.2,4.,-8.5,2.,2.);
554 fitQCD->FixParameter(4,2.);
555 m_pions_fit->Fit(fitQCD,
"R");
557 bool inclPhenix=
false;
558 bool inclFrank=
false;
559 bool inclSasha=
false;
562 TCanvas *compare=
new TCanvas(
"compare",
"compare;p_{T}:xsec (mb)",600,750);
565 TPad *padt=
new TPad(
"padt",
"",0.0,0.3,1.,1.0);
566 padt->SetBottomMargin(0.001);
567 padt->SetLeftMargin(0.15);
568 TPad *padb=
new TPad(
"padb",
"",0.0,0.0,1.,0.3);
569 padb->SetTopMargin(0.001);
570 padb->SetBottomMargin(0.25);
571 padb->SetLeftMargin(0.15);
577 TMultiGraph *m_pions=
new TMultiGraph();
578 m_pions->SetName(
"m_pions");
581 m_pions->Add(kkp,
"c");
582 m_pions->Add(kkp05,
"c");
583 m_pions->Add(kkp2,
"c");
586 m_pions->Add(sasha_pp05);
589 m_pions->Add(frank_pp);
592 m_pions->Add(phenix_pp);
602 m_pions->Add(g_pionXsMB);
603 m_pions->Add(g_pionXsHT1);
604 m_pions->Add(g_pionXsHT2);
606 m_pions->SetMinimum(1.0e-9);
607 m_pions->SetMaximum(1.);
613 m_pions->GetXaxis()->SetLabelSize(0.);
614 m_pions->GetYaxis()->SetTitle(
"Ed^{3}#sigma/dp^{3} (mb GeV^{-2}c^{2})");
616 TLegend *leg=
new TLegend(.5,.5,.85,.85);
618 if(inclPhenix) leg->AddEntry(phenix_pp,
"PHENIX p+p",
"p");
619 if(inclFrank) leg->AddEntry(frank_pp,
"STAR preliminary (upd.)",
"p");
620 if(inclSasha) leg->AddEntry(sasha_pp05,
"O.Grebenyuk p+p",
"p");
621 leg->AddEntry(g_pionXsMB,
"p+p minimum bias",
"p");
622 leg->AddEntry(g_pionXsHT1,
"hightower 1",
"p");
623 leg->AddEntry(g_pionXsHT2,
"hightower 2",
"p");
625 leg->AddEntry(kkp,
"kkp + CTEQ6m, #mu=p_{T}",
"l");
626 leg->AddEntry(kkp2,
"#mu=2p_{T},p_{T}/2",
"l");
630 leg->SetFillColor(0);
637 TGraphErrors *sasha_pp05_overPqcd=
new TGraphErrors(*sasha_pp05);
638 divideGraphWithGraph(sasha_pp05_overPqcd,kkp);
639 TGraphErrors *phenix_pp05_overPqcd=
new TGraphErrors(*phenix_pp);
640 divideGraphWithGraph(phenix_pp05_overPqcd,kkp);
641 TGraphErrors *g_pionXsMB_overPqcd=
new TGraphErrors(*g_pionXsMB);
642 divideGraphWithGraph(g_pionXsMB_overPqcd,kkp);
643 TGraphErrors *g_pionXsHT1_overPqcd=
new TGraphErrors(*g_pionXsHT1);
644 divideGraphWithGraph(g_pionXsHT1_overPqcd,kkp);
645 TGraphErrors *g_pionXsHT2_overPqcd=
new TGraphErrors(*g_pionXsHT2);
646 divideGraphWithGraph(g_pionXsHT2_overPqcd,kkp);
647 TGraphErrors *frank_pp05_overPqcd=
new TGraphErrors(*frank_pp);
648 divideGraphWithGraph(frank_pp05_overPqcd,kkp);
650 TGraphErrors *kkp05_ratio=
new TGraphErrors(*kkp05);
651 divideGraphWithGraph(kkp05_ratio,kkp);
652 TGraphErrors *kkp_ratio=
new TGraphErrors(*kkp);
653 divideGraphWithGraph(kkp_ratio,kkp);
654 TGraphErrors *kkp2_ratio=
new TGraphErrors(*kkp2);
655 divideGraphWithGraph(kkp2_ratio,kkp);
658 TGraphErrors *g_pionXsMB_sys=
new TGraphErrors(*g_pionXsMB_overPqcd);
659 set_sys_pp_pion(g_pionXsMB_sys);
660 TGraphErrors *g_pionXsHT1_sys=
new TGraphErrors(*g_pionXsHT1_overPqcd);
661 set_sys_pp_pion(g_pionXsHT1_sys);
662 TGraphErrors *g_pionXsHT2_sys=
new TGraphErrors(*g_pionXsHT2_overPqcd);
663 set_sys_pp_pion(g_pionXsHT2_sys);
665 TMultiGraph *m_pions_over_pqcd=
new TMultiGraph();
667 m_pions_over_pqcd->SetMinimum(0.0);
668 m_pions_over_pqcd->SetMaximum(2.5);
671 m_pions_over_pqcd->Add(kkp05_ratio,
"c");
672 m_pions_over_pqcd->Add(kkp_ratio,
"c");
673 m_pions_over_pqcd->Add(kkp2_ratio,
"c");
675 m_pions_over_pqcd->Add(g_pionXsMB_overPqcd);
676 m_pions_over_pqcd->Add(g_pionXsHT1_overPqcd);
677 m_pions_over_pqcd->Add(g_pionXsHT2_overPqcd);
681 if(inclPhenix) m_pions_over_pqcd->Add(phenix_pp05_overPqcd);
682 if(inclFrank) m_pions_over_pqcd->Add(frank_pp05_overPqcd);
683 if(inclSasha) m_pions_over_pqcd->Add(sasha_pp05_overPqcd);
688 compare->SaveAs((dir+
"pionxsec_pp.eps").Data());
689 compare->SaveAs((dir+
"pionxsec_pp.root").Data());
692 TMultiGraph *m_pions_over_fit=
new TMultiGraph();
693 m_pions_over_fit->SetMinimum(0.01);
694 m_pions_over_fit->SetMaximum(1.99);
696 TGraphErrors *g_pionXsMB_overFit=
new TGraphErrors(*g_pionXsMB);
697 divideGraphWithFunction(g_pionXsMB_overFit,fitQCD);
698 TGraphErrors *g_pionXsHT1_overFit=
new TGraphErrors(*g_pionXsHT1);
699 divideGraphWithFunction(g_pionXsHT1_overFit,fitQCD);
700 TGraphErrors *g_pionXsHT2_overFit=
new TGraphErrors(*g_pionXsHT2);
701 divideGraphWithFunction(g_pionXsHT2_overFit,fitQCD);
703 m_pions_over_fit->Add(g_pionXsMB_overFit);
704 m_pions_over_fit->Add(g_pionXsHT1_overFit);
705 m_pions_over_fit->Add(g_pionXsHT2_overFit);
707 m_pions_over_fit->Draw(
"ap");
709 compare->SaveAs((dir+
"pionxsec_pp_overfit.eps").Data());
710 compare->SaveAs((dir+
"pionxsec_pp_overfit.root").Data());
714 TCanvas *compare2=
new TCanvas(
"compare2",
"compare2;p_{T};yield divided by fit",600,300);
718 TGraphErrors *frank_pp2=
new TGraphErrors(*frank_pp);
719 divideGraphWithFunction(frank_pp2,fitQCD);
720 TGraphErrors *sasha_pp2=
new TGraphErrors(*sasha_pp05);
721 divideGraphWithFunction(sasha_pp2,fitQCD);
722 TGraphErrors *phenix_pp2=
new TGraphErrors(*phenix_pp);
723 divideGraphWithFunction(phenix_pp2,fitQCD);
724 TGraphErrors *g_pionXsMBcopy=
new TGraphErrors(*g_pionXsMB);
725 divideGraphWithFunction(g_pionXsMBcopy,fitQCD);
726 TGraphErrors *g_pionXsHT1copy=
new TGraphErrors(*g_pionXsHT1);
727 divideGraphWithFunction(g_pionXsHT1copy,fitQCD);
728 TGraphErrors *g_pionXsHT2copy=
new TGraphErrors(*g_pionXsHT2);
729 divideGraphWithFunction(g_pionXsHT2copy,fitQCD);
736 TMultiGraph *m_pions2=
new TMultiGraph();
737 m_pions2->SetName(
"m_pions2");
738 if(inclSasha) m_pions2->Add(sasha_pp2);
739 if(inclFrank) m_pions2->Add(frank_pp2);
740 if(inclPhenix) m_pions2->Add(phenix_pp2);
742 m_pions2->Add(g_pionXsMBcopy);
743 m_pions2->Add(g_pionXsHT1copy);
744 m_pions2->Add(g_pionXsHT2copy);
746 m_pions2->SetMinimum(0.000001);
747 m_pions2->SetMaximum(3.);
748 m_pions2->Draw(
"ap");
750 TLegend *legg=
new TLegend(.25,.55,.65,.85);
751 legg->AddEntry(g_pionXsMBcopy,
"minimum bias",
"p");
752 legg->AddEntry(g_pionXsHT1copy,
"hightower 1",
"p");
753 legg->AddEntry(g_pionXsHT2copy,
"hightower 2",
"p");
754 if(inclFrank) legg->AddEntry(frank_pp2,
"Frank's p+p (upd.)",
"p");
755 if(inclSasha) legg->AddEntry(sasha_pp2,
"Sasha's p+p",
"p");
756 if(inclPhenix) legg->AddEntry(phenix_pp,
"PHENIX p+p",
"p");
758 legg->SetFillColor(0);
761 compare2->SaveAs((dir+
"pionxsec_pp_ratio.eps").Data());
762 compare2->SaveAs((dir+
"pionxsec_pp_ratio.root").Data());
770 TFile gg(eFile.Data(),
"OPEN");
771 TH1F *effGammaMB=
new TH1F(*h_effDaughtersMB);
772 TH1F *effGammaHT1=
new TH1F(*h_effDaughtersHT1);
773 TH1F *effGammaHT2=
new TH1F(*h_effDaughtersHT2);
776 TFile gg_single(eFileGamma.Data(),
"OPEN");
777 TH1F *effGammaSingleMB=
new TH1F(*h_effMB);
778 TH1F *effGammaSingleHT1=
new TH1F(*h_effHT1);
779 TH1F *effGammaSingleHT2=
new TH1F(*h_effHT2);
782 TFile ff(pi0File.Data(),
"OPEN");
783 TH1F *gammaYieldMB=
new TH1F(*h_gammaMB);
784 TH1F *gammaYieldHT1=
new TH1F(*h_gammaHT1);
785 TH1F *gammaYieldHT2=
new TH1F(*h_gammaHT2);
788 gammaYieldMB->Scale(1./dy_gamma);
789 gammaYieldHT1->Scale(1./dy_gamma);
790 gammaYieldHT2->Scale(1./dy_gamma);
793 for(Int_t i=1;i<=gammaYieldMB->GetNbinsX();i++){
794 gammaYieldMB->SetBinContent(i,gammaYieldMB->GetBinContent(i)/gammaYieldMB->GetXaxis()->GetBinWidth(i));
795 gammaYieldMB->SetBinError(i,gammaYieldMB->GetBinError(i)/gammaYieldMB->GetXaxis()->GetBinWidth(i));
797 gammaYieldMB->Scale(psMB/(psMB*numberOfMB*2.*TMath::Pi()));
798 gammaYieldMB->Divide(scale);
799 gammaYieldMB->Multiply(h_binmb);
800 gammaYieldMB->Divide(effGammaMB);
801 gammaYieldMB->Multiply(gamma_cpv_corrMB);
802 gammaYieldMB->Multiply(gamma_cont_corrMB);
803 gammaYieldMB->Multiply(gamma_conv_corrMB);
805 gammaYieldMB->SetMarkerStyle(8);
806 gammaYieldMB->SetMarkerSize(1.);
807 TGraphErrors *g_inclPhotonsMB=
new TGraphErrors(gammaYieldMB);
810 for(Int_t i=1;i<=gammaYieldHT1->GetNbinsX();i++){
811 gammaYieldHT1->SetBinContent(i,gammaYieldHT1->GetBinContent(i)/gammaYieldHT1->GetXaxis()->GetBinWidth(i));
812 gammaYieldHT1->SetBinError(i,gammaYieldHT1->GetBinError(i)/gammaYieldHT1->GetXaxis()->GetBinWidth(i));
814 gammaYieldHT1->Scale(psHT1/(psMB*nMBwithHT*2.*TMath::Pi()));
815 gammaYieldHT1->Divide(scale);
816 gammaYieldHT1->Multiply(h_binht1);
817 gammaYieldHT1->Divide(effGammaHT1);
818 gammaYieldHT1->Multiply(gamma_cpv_corrHT1);
819 gammaYieldHT1->Multiply(gamma_cont_corrHT1);
820 gammaYieldHT1->Multiply(gamma_conv_corrHT1);
822 gammaYieldHT1->SetMarkerStyle(8);
823 gammaYieldHT1->SetMarkerSize(1.);
824 gammaYieldHT1->SetMarkerColor(4);
825 TGraphErrors *g_inclPhotonsHT1=
new TGraphErrors(gammaYieldHT1);
827 for(Int_t i=1;i<=gammaYieldHT2->GetNbinsX();i++){
828 gammaYieldHT2->SetBinContent(i,gammaYieldHT2->GetBinContent(i)/gammaYieldHT2->GetXaxis()->GetBinWidth(i));
829 gammaYieldHT2->SetBinError(i,gammaYieldHT2->GetBinError(i)/gammaYieldHT2->GetXaxis()->GetBinWidth(i));
831 gammaYieldHT2->Scale(psHT2/(psMB*nMBwithHT*2.*TMath::Pi()));
832 gammaYieldHT2->Divide(scale);
833 gammaYieldHT2->Multiply(h_binht2);
834 gammaYieldHT2->Divide(effGammaHT2);
835 gammaYieldHT2->Multiply(gamma_cpv_corrHT2);
836 gammaYieldHT2->Multiply(gamma_cont_corrHT2);
837 gammaYieldHT2->Multiply(gamma_conv_corrHT2);
839 gammaYieldHT2->SetMarkerStyle(8);
840 gammaYieldHT2->SetMarkerSize(1.);
841 gammaYieldHT2->SetMarkerColor(2);
842 TGraphErrors *g_inclPhotonsHT2=
new TGraphErrors(gammaYieldHT2);
844 removeThesePoints(g_inclPhotonsMB,1);
845 removeThesePoints(g_inclPhotonsHT1,2);
846 removeThesePoints(g_inclPhotonsHT2,2);
848 TMultiGraph *m_incl=
new TMultiGraph();
849 m_incl->SetName(
"m_incl");
850 m_incl->SetTitle(
"inclusive photon invariant yield 0<y<1;p_{T} (GeV/c);#frac{1}{2#piNp_{T}} #frac{d^{2}N}{dydp_{T}}");
851 m_incl->Add(g_inclPhotonsMB);
852 m_incl->Add(g_inclPhotonsHT1);
853 m_incl->Add(g_inclPhotonsHT2);
855 m_incl->Fit(fitQCD,
"R0");
857 m_incl->SetMinimum(1.e-11);
858 m_incl->SetMaximum(10.);
859 TCanvas *c_incl=
new TCanvas(
"c_incl",
"c_incl",600,400);
862 c_incl->SaveAs((dir+
"inclPhotonYield.eps").Data());
863 c_incl->SaveAs((dir+
"inclPhotonYield.root").Data());
868 TH1F *gammaYieldMBratio=
new TH1F(*gammaYieldMB);
869 gammaYieldMBratio->SetName(
"gammaYieldMBratio");
870 TH1F *gammaYieldHT1ratio=
new TH1F(*gammaYieldHT1);
871 gammaYieldHT1ratio->SetName(
"gammaYieldHT1ratio");
872 TH1F *gammaYieldHT2ratio=
new TH1F(*gammaYieldHT2);
873 gammaYieldHT2ratio->SetName(
"gammaYieldHT2ratio");
875 gammaYieldMBratio->Divide(pionYieldMBratio);
876 gammaYieldHT1ratio->Divide(pionYieldHT1ratio);
877 gammaYieldHT2ratio->Divide(pionYieldHT2ratio);
881 getRatio(gammaYieldMBratio,effGammaMB,effGammaSingleMB,fit_piondecay);
882 getRatio(gammaYieldHT1ratio,effGammaHT1,effGammaSingleHT1,fit_piondecay);
883 getRatio(gammaYieldHT2ratio,effGammaHT2,effGammaSingleHT2,fit_piondecay);
885 TH1F *gammaYieldMBratio_incl=
new TH1F(*gammaYieldMBratio);
886 TH1F *gammaYieldHT1ratio_incl=
new TH1F(*gammaYieldHT1ratio);
887 TH1F *gammaYieldHT2ratio_incl=
new TH1F(*gammaYieldHT2ratio);
889 TH1F *gammaYieldMBratioNoErr=
new TH1F(*gammaYieldMBratio);
890 TH1F *gammaYieldHT1ratioNoErr=
new TH1F(*gammaYieldHT1ratio);
891 TH1F *gammaYieldHT2ratioNoErr=
new TH1F(*gammaYieldHT2ratio);
892 for(
int i=1;i<=gammaYieldMBratioNoErr->GetNbinsX();i++){
893 gammaYieldMBratioNoErr->SetBinError(i,0.);
895 for(
int i=1;i<=gammaYieldHT1ratioNoErr->GetNbinsX();i++){
896 gammaYieldHT1ratioNoErr->SetBinError(i,0.);
898 for(
int i=1;i<=gammaYieldHT2ratioNoErr->GetNbinsX();i++){
899 gammaYieldHT2ratioNoErr->SetBinError(i,0.);
902 TGraphErrors *g_ratioMB=
new TGraphErrors(gammaYieldMBratio);
903 g_ratioMB->SetName(
"g_ratioMB");
904 TGraphErrors *g_ratioHT1=
new TGraphErrors(gammaYieldHT1ratio);
905 g_ratioHT1->SetName(
"g_ratioHT1");
906 TGraphErrors *g_ratioHT2=
new TGraphErrors(gammaYieldHT2ratio);
907 g_ratioHT2->SetName(
"g_ratioHT2");
910 removeThesePoints(g_ratioMB,1);
911 removeThesePoints(g_ratioHT1,2);
912 removeThesePoints(g_ratioHT2,3);
915 TCanvas *c_ratio=
new TCanvas(
"c_ratio",
"c_ratio",400,200);
917 TMultiGraph *m_ratio=
new TMultiGraph(
"m_ratio",
"p+p 2005;p_{T};#gamma/#pi^{0}");
918 m_ratio->Add(g_ratioMB);
919 m_ratio->Add(g_ratioHT1);
920 m_ratio->Add(g_ratioHT2);
923 m_ratio->SetMinimum(.001);
924 m_ratio->SetMaximum(1.5);
926 TLegend *leg3=
new TLegend(.35,.65,.65,.85);
927 leg3->AddEntry(g_ratioMB,
"minimum bias",
"p");
928 leg3->AddEntry(g_ratioHT1,
"hightower 1",
"p");
929 leg3->AddEntry(g_ratioHT2,
"hightower 2",
"p");
930 leg3->AddEntry(fit_decay,
"decay background (total)",
"l");
931 leg3->AddEntry(fit_piondecay,
"decay background (#pi^{0})",
"l");
932 leg3->SetFillColor(0);
935 fit_decay->SetLineColor(13);
936 fit_decay->SetLineWidth(1);
937 fit_decay->SetLineColor(1);
938 fit_decay->Draw(
"same");
939 fit_piondecay->SetLineColor(13);
940 fit_piondecay->SetLineWidth(1);
941 fit_piondecay->SetLineStyle(2);
942 fit_piondecay->SetLineColor(1);
943 fit_piondecay->Draw(
"same");
945 c_ratio->SaveAs((dir+
"gammaOverPion.eps").Data());
946 c_ratio->SaveAs((dir+
"gammaOverPion.root").Data());
950 gammaYieldMBratio_incl->Multiply(pionYieldMBratio);
951 gammaYieldHT1ratio_incl->Multiply(pionYieldHT1ratio);
952 gammaYieldHT2ratio_incl->Multiply(pionYieldHT2ratio);
957 TGraphErrors *g_incl_corrMB=
new TGraphErrors(gammaYieldMBratio_incl);
958 TGraphErrors *g_incl_corrHT1=
new TGraphErrors(gammaYieldHT1ratio_incl);
959 TGraphErrors *g_incl_corrHT2=
new TGraphErrors(gammaYieldHT2ratio_incl);
961 TCanvas *c_incl_corr=
new TCanvas(
"c_incl_corr",
"c_incl_corr",400,300);
963 TMultiGraph *m_incl_corr=
new TMultiGraph();
964 m_incl_corr->Add(g_incl_corrMB);
965 m_incl_corr->Add(g_incl_corrHT1);
966 m_incl_corr->Add(g_incl_corrHT2);
968 m_incl_corr->SetMinimum(1.e-11);
969 m_incl_corr->SetMaximum(1.);
971 m_incl_corr->Draw(
"apX");
972 c_incl_corr->SaveAs((dir+
"inclPhotonYieldCorr.eps").Data());
973 c_incl_corr->SaveAs((dir+
"inclPhotonYieldCorr.root").Data());
977 TCanvas *c_doubleratio=
new TCanvas(
"c_doubleratio",
"c_doubleratio",400,300);
978 gStyle->SetOptStat(0);
979 c_doubleratio->cd(1);
981 TH1F *gammaYieldMBdoubleratio=
new TH1F(*gammaYieldMBratio);
982 TH1F *gammaYieldHT1doubleratio=
new TH1F(*gammaYieldHT1ratio);
983 TH1F *gammaYieldHT2doubleratio=
new TH1F(*gammaYieldHT2ratio);
985 gammaYieldMBdoubleratio->Divide(fit_decay);
986 gammaYieldHT1doubleratio->Divide(fit_decay);
987 gammaYieldHT2doubleratio->Divide(fit_decay);
989 TGraphErrors *g_doubleRatioMB=
new TGraphErrors(gammaYieldMBdoubleratio);
990 g_doubleRatioMB->SetName(
"g_doubleRatioMB");
991 g_doubleRatioMB->SetMarkerStyle(8);
992 TGraphErrors *g_doubleRatioHT1=
new TGraphErrors(gammaYieldHT1doubleratio);
993 g_doubleRatioHT1->SetName(
"g_doubleRatioHT1");
994 g_doubleRatioHT1->SetMarkerStyle(8);
995 TGraphErrors *g_doubleRatioHT2=
new TGraphErrors(gammaYieldHT2doubleratio);
996 g_doubleRatioHT2->SetName(
"g_doubleRatioHT2");
997 g_doubleRatioHT2->SetMarkerStyle(8);
999 removeThesePoints(g_doubleRatioMB,1);
1000 removeThesePoints(g_doubleRatioHT1,2);
1001 removeThesePoints(g_doubleRatioHT2,3);
1003 TMultiGraph *m_doubleratio=
new TMultiGraph();
1004 m_doubleratio->SetName(
"m_doubleratio");
1005 m_doubleratio->SetMinimum(.5);
1006 m_doubleratio->SetMaximum(2.75);
1009 g_doubleRatioHT1->Print();
1011 g_doubleRatioHT2->Print();
1015 m_doubleratio->Add(g_doubleRatioHT1,
"p");
1016 m_doubleratio->Add(g_doubleRatioHT2,
"p");
1018 g_photonpqcd->SetLineWidth(2);
1019 g_photonpqcd->SetLineColor(2);
1020 g_photonpqcd05->SetLineWidth(2);
1021 g_photonpqcd05->SetLineColor(2);
1022 g_photonpqcd05->SetLineStyle(2);
1023 g_photonpqcd2->SetLineWidth(2);
1024 g_photonpqcd2->SetLineColor(2);
1025 g_photonpqcd2->SetLineStyle(2);
1027 m_doubleratio->Add(g_photonpqcd,
"c");
1028 m_doubleratio->Add(g_photonpqcd05,
"c");
1029 m_doubleratio->Add(g_photonpqcd2,
"c");
1032 TF1 *fitGamma2=
new TF1(
"fitGamma2",
"1.+[0]*pow(x,[1])",2.,15.);
1033 g_photonpqcd->Fit(fitGamma2,
"R0");
1035 m_doubleratio->Draw(
"a");
1037 m_doubleratio->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1038 m_doubleratio->GetYaxis()->SetTitle(
"1 + #gamma_{dir}/#gamma_{incl}");
1039 m_doubleratio->GetXaxis()->SetRangeUser(2.,16.);
1042 TLegend *leg5=
new TLegend(.15,.6,.6,.8);
1043 leg5->AddEntry(g_doubleRatioHT1,
"hightower-1",
"p");
1044 leg5->AddEntry(g_doubleRatioHT2,
"hightower-2",
"p");
1045 leg5->AddEntry(g_photonpqcd,
"NLO (CTEQ6+KKP) #mu=p_{T}",
"l");
1046 leg5->AddEntry(g_photonpqcd05,
"#mu=2p_{T}, #mu=p_{T}/2",
"l");
1047 leg5->SetFillColor(0);
1050 c_doubleratio->cd(0);
1051 c_doubleratio->SaveAs((dir+
"gammaDoubleRatio.eps").Data());
1052 c_doubleratio->SaveAs((dir+
"gammaDoubleRatio.root").Data());
1055 TCanvas *c_dirphoton=
new TCanvas(
"c_dirphoton",
"c_dirphoton",400,300);
1056 gStyle->SetOptStat(0);
1059 TH1F *dirphotonYieldMB=
new TH1F(*gammaYieldMBdoubleratio);
1060 TH1F *dirphotonYieldHT1=
new TH1F(*gammaYieldHT1doubleratio);
1061 TH1F *dirphotonYieldHT2=
new TH1F(*gammaYieldHT2doubleratio);
1063 TH1F *dirphotonYieldMBnoErr=
new TH1F(*dirphotonYieldMB);
1064 for(
int i=1;i<=dirphotonYieldMBnoErr->GetNbinsX();i++){
1065 dirphotonYieldMBnoErr->SetBinError(i,0.);
1067 TH1F *dirphotonYieldHT1noErr=
new TH1F(*dirphotonYieldHT1);
1068 for(
int i=1;i<=dirphotonYieldHT1noErr->GetNbinsX();i++){
1069 dirphotonYieldHT1noErr->SetBinError(i,0.);
1071 TH1F *dirphotonYieldHT2noErr=
new TH1F(*dirphotonYieldHT2);
1072 for(
int i=1;i<=dirphotonYieldHT1noErr->GetNbinsX();i++){
1073 dirphotonYieldHT2noErr->SetBinError(i,0.);
1076 TF1 *f_unity=
new TF1(
"f_unity",
"1.",0.,15.);
1077 dirphotonYieldMB->Add(f_unity,-1.);
1078 dirphotonYieldHT1->Add(f_unity,-1.);
1079 dirphotonYieldHT2->Add(f_unity,-1.);
1082 dirphotonYieldMB->Divide(dirphotonYieldMBnoErr);
1083 dirphotonYieldHT1->Divide(dirphotonYieldHT1noErr);
1084 dirphotonYieldHT2->Divide(dirphotonYieldHT2noErr);
1085 dirphotonYieldMB->Multiply(gammaYieldMBratioNoErr);
1086 dirphotonYieldHT1->Multiply(gammaYieldHT1ratioNoErr);
1087 dirphotonYieldHT2->Multiply(gammaYieldHT2ratioNoErr);
1088 dirphotonYieldMB->Multiply(pionXsMBnoErr);
1089 dirphotonYieldHT1->Multiply(pionXsHT1noErr);
1090 dirphotonYieldHT2->Multiply(pionXsHT2noErr);
1093 TGraphErrors *g_dirphotonMB=
new TGraphErrors(dirphotonYieldMB);
1094 g_dirphotonMB->SetName(
"g_dirphotonMB");
1095 g_dirphotonMB->SetMarkerStyle(8);
1096 TGraphErrors *g_dirphotonHT1=
new TGraphErrors(dirphotonYieldHT1);
1097 g_dirphotonHT1->SetName(
"g_dirphotonHT1");
1098 g_dirphotonHT1->SetMarkerStyle(8);
1099 TGraphErrors *g_dirphotonHT2=
new TGraphErrors(dirphotonYieldHT2);
1100 g_dirphotonHT2->SetName(
"g_dirphotonHT2");
1101 g_dirphotonHT2->SetMarkerStyle(8);
1104 removeThesePoints(g_dirphotonMB,1);
1105 removeThesePoints(g_dirphotonHT1,2);
1106 removeThesePoints(g_dirphotonHT2,3);
1110 TMultiGraph *m_dirphoton=
new TMultiGraph();
1111 m_dirphoton->SetName(
"m_dirphoton");
1112 m_dirphoton->SetMinimum(1.0e-11);
1113 m_dirphoton->SetMaximum(0.1);
1115 m_dirphoton->Add(g_dirgamma,
"c");
1116 m_dirphoton->Add(g_dirgamma05,
"c");
1117 m_dirphoton->Add(g_dirgamma2,
"c");
1119 cout<<
"direct photons:"<<endl;
1120 g_dirphotonHT1->Print();
1122 g_dirphotonHT2->Print();
1125 m_dirphoton->Add(g_dirphotonHT1,
"p");
1126 m_dirphoton->Add(g_dirphotonHT2,
"p");
1128 m_dirphoton->Draw(
"a");
1130 m_dirphoton->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1131 m_dirphoton->GetYaxis()->SetTitle(
"1 - R^{-1}");
1132 m_dirphoton->GetXaxis()->SetRangeUser(2.,16.);
1135 TLegend *leg5=
new TLegend(.15,.6,.6,.8);
1136 leg5->AddEntry(g_dirphotonHT1,
"hightower-1",
"p");
1137 leg5->AddEntry(g_dirphotonHT2,
"hightower-2",
"p");
1138 leg5->SetFillColor(0);
1142 c_dirphoton->SaveAs((dir+
"gammaDirPhoton.eps").Data());
1143 c_dirphoton->SaveAs((dir+
"gammaDirPhoton.root").Data());