File indexing completed on 2025-08-03 08:13:10
0001 double factorial(int n)
0002 {
0003 double result = 1;
0004 for(int i = n; i>0; i--)
0005 result*=i;
0006
0007 return result;
0008 }
0009
0010 double integral(int nfg,int nbg,float lowerLimit, float upperLimit)
0011 {
0012
0013
0014
0015
0016
0017
0018 int steps = 200;
0019 double intgrl = 0;
0020
0021 double dx=(upperLimit-lowerLimit)/(double)steps;
0022
0023 for(int k = 0; k<=nfg; k++) {
0024 double factorial_up = factorial(nfg+nbg-k);
0025 double factorial_down = factorial(nbg)*factorial(nfg-k)*factorial(k);
0026 double tmp = factorial_up/factorial_down*0.5*pow(0.5, nfg+nbg-k);
0027 for(int itmp=0;itmp<=steps;itmp++)
0028 {
0029 double x=lowerLimit+dx*(float)itmp;
0030 intgrl += tmp*pow(x,k)*exp(-x)*dx;
0031 }
0032 }
0033 return intgrl;
0034 }
0035
0036 void error_fg_bg_pair(int nfg, int nbg, double& err_up,double& err_down)
0037 {
0038
0039
0040
0041
0042
0043 if(nfg+nbg > 170)
0044 {
0045 cout << " error_fg_bg_pair: factorials too large, return symmetric error " << endl;
0046 err_up = sqrt(nfg+nbg);
0047 err_down = err_up;
0048 return;
0049 }
0050
0051 int nmax = 50;
0052 if(nfg-nbg>nmax)
0053 {
0054
0055 err_up = sqrt(nfg+nbg);
0056 err_down = err_up;
0057 return;
0058 }
0059
0060
0061 if(nfg<=nbg)
0062 {
0063
0064 cout << "nfg = " << nfg << " nbg = " << nbg << endl;
0065 err_up=sqrt(nfg+nbg);
0066 err_down = err_up;
0067 return;
0068 }
0069
0070
0071
0072
0073
0074 float maxsignal=0;
0075 if(nfg+nbg < 10)
0076 maxsignal = (nfg+nbg)* 4;
0077 else if(nfg+nbg < 30)
0078 maxsignal = (nfg+nbg)* 3;
0079 else
0080 maxsignal = (nfg+nbg)* 2;
0081
0082 float total=integral(nfg,nbg,0,maxsignal);
0083
0084 float binSize=0.1;
0085
0086 float cl_up, cl_down;
0087 int i = 0;
0088 bool is_cl_down = false;
0089
0090 while(1) {
0091 if(!is_cl_down) err_down = i*binSize;
0092 if(err_down<0) err_down = 0;
0093 cl_down = integral(nfg,nbg,0, err_down)/total;
0094 if(cl_down>=0.159) {
0095 is_cl_down = true;
0096 break;
0097 }
0098 i++;
0099 }
0100
0101 i = 0;
0102 while(1) {
0103 err_up = err_down+i*binSize;
0104 cl_up = cl_down+integral(nfg,nbg,err_down, err_up)/total;
0105 if(cl_up>=0.841) break;
0106 i++;
0107 }
0108
0109
0110
0111
0112
0113 err_down = (nfg-nbg)-err_down;
0114 err_up = err_up - (nfg-nbg);
0115 }
0116
0117
0118 double CBFunction(double *x, double *p)
0119 {
0120 double norm = p[0];
0121 double alpha = p[1];
0122 double n = p[2];
0123 double mu = p[3];
0124 double sigma = p[4];
0125
0126 double A = pow(n/fabs(alpha),n)*TMath::Exp(-pow(fabs(alpha),2)/2.);
0127 double B = n/fabs(alpha) - fabs(alpha);
0128 double k = (x[0]-mu)/sigma;
0129
0130 double val;
0131 if( k > -alpha )
0132 val = norm*TMath::Exp(-0.5*pow(k,2));
0133 else
0134 val = norm*A*pow(B-k,-n);
0135
0136 if( TMath::IsNaN(val) ) val = 0.0;
0137
0138 return val;
0139 }
0140
0141 double TripleCBFunction(double *x, double *p)
0142 {
0143 double norm1 = p[0];
0144 double alpha = p[1];
0145 double n = p[2];
0146 double mu1 = p[3];
0147 double sigma = p[4];
0148 double norm2 = p[5];
0149 double norm3 = p[6];
0150 double mu2 = mu1*1.0595;
0151 double mu3 = mu1*1.0946;
0152
0153 double A = pow(n/fabs(alpha),n)*TMath::Exp(-pow(fabs(alpha),2)/2.);
0154 double B = n/fabs(alpha) - fabs(alpha);
0155 double k1 = (x[0]-mu1)/sigma;
0156 double k2 = (x[0]-mu2)/sigma;
0157 double k3 = (x[0]-mu3)/sigma;
0158
0159 double val,val1,val2,val3;
0160
0161 if( k1 > -alpha ) { val1 = norm1*TMath::Exp(-0.5*pow(k1,2)); }
0162 else { val1 = norm1*A*pow(B-k1,-n); }
0163 if( k2 > -alpha ) { val2 = norm2*TMath::Exp(-0.5*pow(k2,2)); }
0164 else { val2 = norm2*A*pow(B-k2,-n); }
0165 if( k3 > -alpha ) { val3 = norm3*TMath::Exp(-0.5*pow(k3,2)); }
0166 else { val3 = norm3*A*pow(B-k3,-n); }
0167
0168 val = val1 + val2 + val3;
0169
0170 if( TMath::IsNaN(val) ) val = 0.0;
0171
0172 return val;
0173 }
0174
0175 double SandB_CBFunction(double *x, double *p)
0176 {
0177 double norm1 = p[0];
0178 double alpha = p[1];
0179 double n = p[2];
0180 double mu1 = p[3];
0181 double sigma = p[4];
0182 double norm2 = p[5];
0183 double norm3 = p[6];
0184 double mu2 = mu1*1.0595;
0185 double mu3 = mu1*1.0946;
0186
0187 double A = pow(n/fabs(alpha),n)*TMath::Exp(-pow(fabs(alpha),2)/2.);
0188 double B = n/fabs(alpha) - fabs(alpha);
0189 double k1 = (x[0]-mu1)/sigma;
0190 double k2 = (x[0]-mu2)/sigma;
0191 double k3 = (x[0]-mu3)/sigma;
0192
0193 double val,val1,val2,val3;
0194
0195 if( k1 > -alpha ) { val1 = norm1*TMath::Exp(-0.5*pow(k1,2)); }
0196 else { val1 = norm1*A*pow(B-k1,-n); }
0197 if( k2 > -alpha ) { val2 = norm2*TMath::Exp(-0.5*pow(k2,2)); }
0198 else { val2 = norm2*A*pow(B-k2,-n); }
0199 if( k3 > -alpha ) { val3 = norm3*TMath::Exp(-0.5*pow(k3,2)); }
0200 else { val3 = norm3*A*pow(B-k3,-n); }
0201
0202 double bgnorm1 = p[7];
0203 double bgslope1 = p[8];
0204
0205 double bg = exp(bgnorm1+x[0]*bgslope1);
0206
0207 val = val1 + val2 + val3 + bg;
0208 if( TMath::IsNaN(val) ) val = 0.0;
0209
0210 return val;
0211 }
0212
0213
0214
0215
0216
0217 void centrality_newplotbg_newsupp() {
0218
0219
0220
0221
0222 gStyle->SetOptStat(0);
0223 gStyle->SetOptFit(0);
0224
0225 TRandom* myrandom = new TRandom3();
0226 const int nbins = 15;
0227 double eideff = 0.9;
0228 string times = "*";
0229 TLatex* tl[15];
0230 char tlchar[999];
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245 double set_statscale[4] = {3.48, 3.16, 1.42, 1.1};
0246 double set_statscalepp[4] = {0.8, 1.16, 0.35, 0.41};
0247 std::string run_plan[4] = {"5 years/28 cryo-weeks", "5 years/24 cryo-weeks","3 years/28 cryo-weeks","3 years/24 cryo-weeks"};
0248 int scenario = 0;
0249 double statscale = set_statscale[scenario];
0250 double statscalepp = set_statscalepp[scenario];
0251
0252 int auauevts = (int) (statscale * 10.0);
0253
0254 double statscale_lowlim = 7.0;
0255 double statscale_uplim = 14.0;
0256
0257 TF1* fCBpp = new TF1("fCBpp",CBFunction,5.,14.,5);
0258 TF1* fCBauau = new TF1("fCBauau",CBFunction,5.,14.,5);
0259 TF1* fCB1s = new TF1("fCB1s",CBFunction,5.,14.,5);
0260 TF1* fCB2s = new TF1("fCB2s",CBFunction,5.,14.,5);
0261 TF1* fCB3s = new TF1("fCB3s",CBFunction,5.,14.,5);
0262 TF1* fTCB = new TF1("fTCB",TripleCBFunction,5.,14.,7);
0263 TF1* fTCBpp = new TF1("fTCBpp",TripleCBFunction,5.,14.,7);
0264 TF1* fTCBauau = new TF1("fTCBauau",TripleCBFunction,5.,14.,7);
0265 TF1* fSandB = new TF1("fSandB",SandB_CBFunction,5.,14.,9);
0266 TF1* fSandBfordave = new TF1("fSandBfordave",SandB_CBFunction,5.,14.,9);
0267 TF1* fSandBpp = new TF1("fSandBpp",SandB_CBFunction,5.,14.,9);
0268 TF1* fSandBauau = new TF1("fSandBauau",SandB_CBFunction,5.,14.,9);
0269
0270
0271
0272
0273
0274
0275
0276
0277 static const int NCENT = 7;
0278 double centlow[NCENT] = {0,5,10,20,30,40,60};
0279 double centhigh[NCENT] = {5, 10,20,30,40,60,92};
0280 double Ncoll[NCENT] = {1067, 858, 610, 378, 224, 94.2, 14.5};
0281
0282 double raacent_ups1s[NCENT] = {0.527483, 0.544815, 0.581766, 0.644214, 0.721109, 0.853888, 0.998349};
0283 double raacent_ups2s[NCENT] = {0.165314, 0.179333, 0.210351, 0.26748, 0.34664, 0.510807, 0.979886};
0284 double raacent_ups3s[NCENT] = {0.0302562, 0.0362929, 0.047993, 0.0706653, 0.108092, 0.231598, 0.961714};
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317 double centwidth[NCENT];
0318 for(int i=0; i<NCENT; ++i)
0319 {
0320 centwidth[i] = (centhigh[i] - centlow[i]) / 100.0;
0321 cout << " cent bin " << i << " has width " << centwidth[i] << endl;
0322 }
0323
0324 int icent = 6;
0325
0326 double raapt[9],raa1s[9],raa2s[9],raa3s[9];
0327 raapt[0] = 1.5;
0328 raapt[1] = 4.5;
0329 raapt[2] = 7.5;
0330 raapt[3] = 10.5;
0331 raapt[4] = 13.5;
0332 raa1s[0] = raacent_ups1s[icent];
0333 raa1s[1] = raacent_ups1s[icent];
0334 raa1s[2] = raacent_ups1s[icent];
0335 raa1s[3] = raacent_ups1s[icent];
0336 raa1s[4] = raacent_ups1s[icent];
0337 raa2s[0] = raacent_ups2s[icent];
0338 raa2s[1] = raacent_ups2s[icent];
0339 raa2s[2] = raacent_ups2s[icent];
0340 raa2s[3] = raacent_ups2s[icent];
0341 raa2s[4] = raacent_ups2s[icent];
0342 raa3s[0] = raacent_ups3s[icent];
0343 raa3s[1] = raacent_ups3s[icent];
0344 raa3s[2] = raacent_ups3s[icent];
0345 raa3s[3] = raacent_ups3s[icent];
0346 raa3s[4] = raacent_ups3s[icent];
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376 TGraph* grRAA1S = new TGraph(5,raapt,raa1s);
0377 TGraph* grRAA2S = new TGraph(5,raapt,raa2s);
0378 TGraph* grRAA3S = new TGraph(5,raapt,raa3s);
0379
0380 double NNN = statscale * 7780./0.49;
0381 double NNNpp = statscalepp * 12130./0.90;
0382 double ppauaurat = NNNpp/NNN;
0383
0384
0385
0386
0387 double Ncoll_ref = (Ncoll[0] + Ncoll[1]) / 2.0;
0388 double ncollfact = (Ncoll[icent] / Ncoll_ref);
0389 double centwidth_ref = (centwidth[0]+centwidth[1]);
0390 double centwidthfact = (centwidth[icent] / centwidth_ref);
0391 NNN *= ncollfact*centwidthfact;
0392
0393 double frac[3];
0394 frac[0] = 0.7117;
0395 frac[1] = 0.1851;
0396 frac[2] = 0.1032;
0397 double scale[3];
0398 scale[0] = 1.0;
0399 scale[1] = 1.0595;
0400 scale[2] = 1.0946;
0401
0402
0403
0404
0405
0406
0407
0408 int Nups1nosup = int(NNN*eideff*eideff*frac[0]);
0409 int Nups2nosup = int(NNN*eideff*eideff*frac[1]);
0410 int Nups3nosup = int(NNN*eideff*eideff*frac[2]);
0411 int Nups1pp = int(NNNpp*0.90*frac[0]);
0412 int Nups2pp = int(NNNpp*0.90*frac[1]);
0413 int Nups3pp = int(NNNpp*0.90*frac[2]);
0414
0415 int nchan=400;
0416 double start=0.0;
0417 double stop=20.0;
0418
0419 string str_UpsilonPt = "(2.0*3.14159*x*[0]*pow((1 + x*x/(4*[1]) ),-[2]))";
0420 TF1* fUpsilonPt = new TF1("fUpsilonPt",str_UpsilonPt.c_str(),0.,20.);
0421 fUpsilonPt->SetParameters(72.1, 26.516, 10.6834);
0422 double upsnorm = fUpsilonPt->Integral(0.,20.);
0423
0424
0425 double tmpsum1=0.;
0426 double tmpsum2=0.;
0427 double tmpsum3=0.;
0428 for(int j=0; j<nbins; j++) {
0429 double s1 = j*1.0;
0430 double s2 = s1 + 1.0;
0431 tmpsum1 += Nups1nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA1S->Eval((s1+s2)/2.);
0432 tmpsum2 += Nups2nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA2S->Eval((s1+s2)/2.);
0433 tmpsum3 += Nups3nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA3S->Eval((s1+s2)/2.);
0434 }
0435 int Nups1 = int(tmpsum1);
0436 int Nups2 = int(tmpsum2);
0437 int Nups3 = int(tmpsum3);
0438
0439 cout << "Total number of ALL Upsilons in AuAu = " << NNN << endl;
0440 cout << "Total number of ALL Upsilons in pp = " << NNNpp << endl;
0441 cout << "Number of upsilons in pp in acceptance = " << NNNpp*frac[0] << " " << NNNpp*frac[1] << " " << NNNpp*frac[2] << endl;
0442 cout << "Number of upsilons in AuAu in acceptance = " << NNN*frac[0] << " " << NNN*frac[1] << " " << NNN*frac[2] << endl;
0443 cout << "Number of upsilons in AuAu after eID efficiency = " << Nups1nosup << " " << Nups2nosup << " " << Nups3nosup << endl;
0444 cout << "Number of upsilons in AuAu plot = " << Nups1 << " " << Nups2 << " " << Nups3 << endl;
0445 cout << "Number of upsilons in pp plot = " << Nups1pp << " " << Nups2pp << " " << Nups3pp << endl;
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517
0518
0519
0520
0521
0522
0523
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535
0536
0537
0538
0539
0540
0541
0542
0543
0544
0545
0546
0547
0548
0549
0550
0551
0552
0553
0554 double tonypar1 = 0.98;
0555 double tonypar2 = 0.93;
0556
0557 double tonypar3 = 9.448;
0558 double tonypar4 = 0.100;
0559 double tonypar4pp = 0.089;
0560 fCBpp->SetParameter(0,1000.);
0561 fCBpp->SetParameter(1,tonypar1);
0562 fCBpp->SetParameter(2,tonypar2);
0563 fCBpp->SetParameter(3,tonypar3);
0564 fCBpp->SetParameter(4,tonypar4pp);
0565 fCBauau->SetParameter(0,1000.);
0566 fCBauau->SetParameter(1,tonypar1);
0567 fCBauau->SetParameter(2,tonypar2);
0568 fCBauau->SetParameter(3,tonypar3);
0569 fCBauau->SetParameter(4,tonypar4);
0570
0571
0572 char hhname[999];
0573 TH1D* hhups[nbins+1];
0574 TH1D* hhups1[nbins+1];
0575 TH1D* hhups2[nbins+1];
0576 TH1D* hhups3[nbins+1];
0577 TH1D* hhupspp[nbins+1];
0578 TH1D* hhups1pp[nbins+1];
0579 TH1D* hhups2pp[nbins+1];
0580 TH1D* hhups3pp[nbins+1];
0581 for(int i=0; i<nbins+1; i++) {
0582 sprintf(hhname,"hhups_%d",i);
0583 hhups[i] = new TH1D(hhname,"",nchan,start,stop);
0584 hhups[i]->Sumw2();
0585 sprintf(hhname,"hhups1_%d",i);
0586 hhups1[i] = new TH1D(hhname,"",nchan,start,stop);
0587 hhups1[i]->Sumw2();
0588 sprintf(hhname,"hhups2_%d",i);
0589 hhups2[i] = new TH1D(hhname,"",nchan,start,stop);
0590 hhups2[i]->Sumw2();
0591 sprintf(hhname,"hhups3_%d",i);
0592 hhups3[i] = new TH1D(hhname,"",nchan,start,stop);
0593 hhups3[i]->Sumw2();
0594 hhups[i]->SetLineWidth(2);
0595 hhups1[i]->SetLineWidth(2);
0596 hhups2[i]->SetLineWidth(2);
0597 hhups3[i]->SetLineWidth(2);
0598 sprintf(hhname,"hhupspp_%d",i);
0599 hhupspp[i] = new TH1D(hhname,"",nchan,start,stop);
0600 hhupspp[i]->Sumw2();
0601 sprintf(hhname,"hhups1pp_%d",i);
0602 hhups1pp[i] = new TH1D(hhname,"",nchan,start,stop);
0603 hhups1pp[i]->Sumw2();
0604 sprintf(hhname,"hhups2pp_%d",i);
0605 hhups2pp[i] = new TH1D(hhname,"",nchan,start,stop);
0606 hhups2pp[i]->Sumw2();
0607 sprintf(hhname,"hhups3pp_%d",i);
0608 hhups3pp[i] = new TH1D(hhname,"",nchan,start,stop);
0609 hhups3pp[i]->Sumw2();
0610 hhupspp[i]->SetLineWidth(2);
0611 hhups1pp[i]->SetLineWidth(2);
0612 hhups2pp[i]->SetLineWidth(2);
0613 hhups3pp[i]->SetLineWidth(2);
0614 }
0615
0616 for(int j=0; j<nbins; j++) {
0617
0618 double s1 = j*1.0;
0619 double s2 = s1 + 1.0;
0620 double tmpnups1 = Nups1nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA1S->Eval((s1+s2)/2.);
0621 double tmpnups2 = Nups2nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA2S->Eval((s1+s2)/2.);
0622 double tmpnups3 = Nups3nosup*fUpsilonPt->Integral(s1,s2)/upsnorm * grRAA3S->Eval((s1+s2)/2.);
0623
0624
0625
0626 fCBauau->SetParameter(3,tonypar3);
0627 for(int i=0; i<int(tmpnups1+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups1[j]->Fill(myrnd); hhups[j]->Fill(myrnd); }
0628 fCBauau->SetParameter(3,tonypar3*scale[1]);
0629 for(int i=0; i<int(tmpnups2+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups2[j]->Fill(myrnd); hhups[j]->Fill(myrnd); }
0630 fCBauau->SetParameter(3,tonypar3*scale[2]);
0631 for(int i=0; i<int(tmpnups3+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups3[j]->Fill(myrnd); hhups[j]->Fill(myrnd); }
0632
0633 double tmpnups1pp = Nups1pp*fUpsilonPt->Integral(s1,s2)/upsnorm;
0634 double tmpnups2pp = Nups2pp*fUpsilonPt->Integral(s1,s2)/upsnorm;
0635 double tmpnups3pp = Nups3pp*fUpsilonPt->Integral(s1,s2)/upsnorm;
0636 cout << "Nups1pp["<<j<<"]="<<tmpnups1pp<<";"<<endl;
0637 cout << "Nups2pp["<<j<<"]="<<tmpnups2pp<<";"<<endl;
0638 cout << "Nups3pp["<<j<<"]="<<tmpnups3pp<<";"<<endl;
0639 fCBpp->SetParameter(3,tonypar3);
0640 for(int i=0; i<int(tmpnups1pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups1pp[j]->Fill(myrnd); hhupspp[j]->Fill(myrnd); }
0641 fCBpp->SetParameter(3,tonypar3*scale[1]);
0642 for(int i=0; i<int(tmpnups2pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups2pp[j]->Fill(myrnd); hhupspp[j]->Fill(myrnd); }
0643 fCBpp->SetParameter(3,tonypar3*scale[2]);
0644 for(int i=0; i<int(tmpnups3pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups3pp[j]->Fill(myrnd); hhupspp[j]->Fill(myrnd); }
0645
0646 }
0647
0648
0649
0650 fCBpp->SetParameter(3,tonypar3);
0651 fCBauau->SetParameter(3,tonypar3);
0652 for(int i=0; i<int(Nups1+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups1[nbins]->Fill(myrnd); hhups[nbins]->Fill(myrnd); }
0653 for(int i=0; i<int(Nups1pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups1pp[nbins]->Fill(myrnd); hhupspp[nbins]->Fill(myrnd); }
0654 fCBpp->SetParameter(3,tonypar3*scale[1]);
0655 fCBauau->SetParameter(3,tonypar3*scale[1]);
0656 for(int i=0; i<int(Nups2+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups2[nbins]->Fill(myrnd); hhups[nbins]->Fill(myrnd); }
0657 for(int i=0; i<int(Nups2pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups2pp[nbins]->Fill(myrnd); hhupspp[nbins]->Fill(myrnd); }
0658 fCBpp->SetParameter(3,tonypar3*scale[2]);
0659 fCBauau->SetParameter(3,tonypar3*scale[2]);
0660 for(int i=0; i<int(Nups3+0.5); i++) { double myrnd = fCBauau->GetRandom(); hhups3[nbins]->Fill(myrnd); hhups[nbins]->Fill(myrnd); }
0661 for(int i=0; i<int(Nups3pp+0.5); i++) { double myrnd = fCBpp->GetRandom(); hhups3pp[nbins]->Fill(myrnd); hhupspp[nbins]->Fill(myrnd); }
0662
0663
0664
0665 TCanvas* cupspp = new TCanvas("cupspp","Upsilons in p+p",100,100,600,600);
0666 fTCBpp->SetParameter(0,2000.);
0667 fTCBpp->FixParameter(1,tonypar1);
0668 fTCBpp->FixParameter(2,tonypar2);
0669 fTCBpp->SetParameter(3,tonypar3);
0670 fTCBpp->FixParameter(4,tonypar4);
0671 fTCBpp->SetParameter(5,500.);
0672 fTCBpp->SetParameter(6,100.);
0673 hhupspp[nbins]->Fit(fTCBpp,"rl","",7.,11.);
0674 hhupspp[nbins]->SetAxisRange(7.,11.);
0675 hhupspp[nbins]->SetMarkerSize(1.0);
0676 hhupspp[nbins]->GetXaxis()->SetTitle("Invariant mass [GeV/c^{2}]");
0677 hhupspp[nbins]->GetXaxis()->SetTitleOffset(1.0);
0678 double tmpamp1 = hhupspp[nbins]->GetFunction("fTCBpp")->GetParameter(0);
0679 double tmpamp5 = tmpamp1*frac[1]/frac[0];
0680 double tmpamp6 = tmpamp1*frac[2]/frac[0];
0681 hhupspp[nbins]->Draw();
0682
0683 fCB1s->SetLineColor(kBlue);
0684 fCB1s->SetLineWidth(1);
0685 fCB1s->SetParameter(0,fTCBpp->GetParameter(0));
0686 fCB1s->SetParameter(1,fTCBpp->GetParameter(1));
0687 fCB1s->SetParameter(2,fTCBpp->GetParameter(2));
0688 fCB1s->SetParameter(3,fTCBpp->GetParameter(3)*scale[0]);
0689 fCB1s->SetParameter(4,fTCBpp->GetParameter(4));
0690 fCB2s->SetLineColor(kRed);
0691 fCB2s->SetLineWidth(1);
0692 fCB2s->SetParameter(0,tmpamp5);
0693 fCB2s->SetParameter(1,fTCBpp->GetParameter(1));
0694 fCB2s->SetParameter(2,fTCBpp->GetParameter(2));
0695 fCB2s->SetParameter(3,fTCBpp->GetParameter(3)*scale[1]);
0696 fCB2s->SetParameter(4,fTCBpp->GetParameter(4));
0697 fCB3s->SetLineColor(kGreen+2);
0698 fCB3s->SetLineWidth(1);
0699 fCB3s->SetParameter(0,tmpamp6);
0700 fCB3s->SetParameter(1,fTCBpp->GetParameter(1));
0701 fCB3s->SetParameter(2,fTCBpp->GetParameter(2));
0702 fCB3s->SetParameter(3,fTCBpp->GetParameter(3)*scale[2]);
0703 fCB3s->SetParameter(4,fTCBpp->GetParameter(4));
0704 fCB1s->Draw("same");
0705 fCB2s->Draw("same");
0706 fCB3s->Draw("same");
0707
0708
0709
0710 TCanvas* cupsauau = new TCanvas("cupsauau","Upsilons in Au+Au",100,100,600,600);
0711 fTCBauau->SetParameter(0,2000.);
0712 fTCBauau->FixParameter(1,tonypar1);
0713 fTCBauau->FixParameter(2,tonypar2);
0714 fTCBauau->SetParameter(3,tonypar3);
0715 fTCBauau->FixParameter(4,tonypar4);
0716 fTCBauau->SetParameter(5,500.);
0717 fTCBauau->SetParameter(6,100.);
0718 hhups[nbins]->Fit(fTCBauau,"rl","",7.,11.);
0719 hhups[nbins]->SetAxisRange(7.,11.);
0720 hhups[nbins]->SetMarkerSize(1.0);
0721 hhups[nbins]->GetXaxis()->SetTitle("Invariant mass [GeV/c^{2}]");
0722 hhups[nbins]->GetXaxis()->SetTitleOffset(1.0);
0723 tmpamp1 = hhups[nbins]->GetFunction("fTCBauau")->GetParameter(0);
0724 tmpamp5 = tmpamp1*frac[1]/frac[0];
0725 tmpamp6 = tmpamp1*frac[2]/frac[0];
0726 hhups[nbins]->Draw();
0727
0728 TCanvas* cupsvspt = new TCanvas("cupsvspt","Upsilons vs. p_{T}",100,100,1200,900);
0729 cupsvspt->Divide(4,3);
0730 for(int i=0; i<12; i++) {
0731 if(i==0) {cupsvspt->cd(1);}
0732 if(i==1) {cupsvspt->cd(2);}
0733 if(i==2) {cupsvspt->cd(3);}
0734 if(i==3) {cupsvspt->cd(4);}
0735 if(i==4) {cupsvspt->cd(5);}
0736 if(i==5) {cupsvspt->cd(6);}
0737 if(i==6) {cupsvspt->cd(7);}
0738 if(i==7) {cupsvspt->cd(8);}
0739 if(i==8) {cupsvspt->cd(9);}
0740 if(i==9) {cupsvspt->cd(10);}
0741 if(i==10) {cupsvspt->cd(11);}
0742 if(i==11) {cupsvspt->cd(12);}
0743 hhups[i]->SetAxisRange(7.0,11.0); hhups[i]->Draw();
0744 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhups[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
0745 }
0746
0747
0748
0749
0750
0751 TH1D* hhall[nbins+1];
0752 TH1D* hhall_scaled[nbins+1];
0753
0754 TH1D* hhtotbg[nbins+1];
0755 TH1D* hhtotbg_scaled[nbins+1];
0756 TH1D* hhcombbg[nbins+1];
0757 TH1D* hhcombbg_scaled[nbins+1];
0758 TH1D* hhfakefake[nbins+1];
0759 TH1D* hhfakehf[nbins+1];
0760 TH1D* hhbottom[nbins+1];
0761 TH1D* hhcharm[nbins+1];
0762 TH1D* hhdy[nbins+1];
0763 TH1D* hhcorrbg[nbins+1];
0764 TH1D* hhcorrbg_scaled[nbins+1];
0765 TH1D* hhfit[nbins+1];
0766 char tmpname[999];
0767
0768
0769
0770
0771
0772
0773
0774 double corrbgfitpar0;
0775 double corrbgfitpar1;
0776
0777 TFile* f=new TFile("ccbb_eideff09.root");
0778 for(int i=0; i<nbins+1; i++) {
0779 sprintf(tmpname,"hhbottom_%d",i);
0780 hhbottom[i] = (TH1D*)f->Get(tmpname);
0781 hhbottom[i]->SetDirectory(gROOT);
0782 sprintf(tmpname,"hhcharm_%d",i);
0783 hhcharm[i] = (TH1D*)f->Get(tmpname);
0784 hhcharm[i]->SetDirectory(gROOT);
0785 sprintf(tmpname,"hhdy_%d",i);
0786 hhdy[i] = (TH1D*)f->Get(tmpname);
0787 hhdy[i]->SetDirectory(gROOT);
0788 sprintf(tmpname,"hhcorrbg_%d",i);
0789 hhcorrbg[i] = (TH1D*)hhbottom[i]->Clone(tmpname);
0790 hhcorrbg[i]->Add(hhcharm[i]);
0791 hhcorrbg[i]->Add(hhdy[i]);
0792 sprintf(tmpname,"hhcorrbg_scaled_%d",i);
0793 hhcorrbg_scaled[i] = (TH1D*)hhcorrbg[i]->Clone(tmpname);
0794 hhcorrbg[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0795 hhbottom[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0796 hhdy[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0797 if(i==nbins) {
0798 corrbgfitpar0 = hhcorrbg[i]->GetFunction("expo")->GetParameter(0);
0799 corrbgfitpar1 = hhcorrbg[i]->GetFunction("expo")->GetParameter(1);
0800 }
0801 cout << "bgpar0["<< i <<"]="<<hhcorrbg[i]->GetFunction("expo")->GetParameter(0)+TMath::Log(statscale)<<";"<< endl;
0802 cout << "bgpar1["<< i <<"]="<<hhcorrbg[i]->GetFunction("expo")->GetParameter(1)<<";"<< endl;
0803 for(int k=1; k<=hhcorrbg[i]->GetNbinsX(); k++) {
0804 if(hhcorrbg[i]->GetBinLowEdge(k)<statscale_lowlim || (hhcorrbg[i]->GetBinLowEdge(k)+hhcorrbg[i]->GetBinWidth(k))>statscale_uplim) {
0805 hhcorrbg_scaled[i]->SetBinContent(k,0.);
0806 hhcorrbg_scaled[i]->SetBinError(k,0.);
0807 }
0808 else {
0809
0810 double tmp = ncollfact * centwidthfact * statscale * hhcorrbg[i]->GetFunction("expo")->Eval(hhcorrbg[i]->GetBinCenter(k));
0811 double tmprnd = myrandom->Poisson(tmp);
0812 if(tmprnd<0.) { tmprnd=0.; }
0813 hhcorrbg_scaled[i]->SetBinContent(k,tmprnd);
0814 hhcorrbg_scaled[i]->SetBinError(k,sqrt(tmprnd));
0815 }
0816 }
0817 hhcorrbg_scaled[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0818 hhcorrbg[i]->SetDirectory(gROOT);
0819 hhcorrbg_scaled[i]->SetDirectory(gROOT);
0820 }
0821 f->Close();
0822
0823 TCanvas* c2 = new TCanvas("c2","Correlated BG (all p_{T})",100,100,600,600);
0824
0825 hhbottom[nbins]->SetAxisRange(7.0,14.0);
0826 hhbottom[nbins]->SetLineColor(kBlue);
0827 hhbottom[nbins]->SetLineWidth(2);
0828
0829 hhbottom[nbins]->GetXaxis()->SetTitle("Invariant mass [GeV/c^{2}]");
0830 hhbottom[nbins]->GetXaxis()->SetTitleOffset(1.0);
0831 hhbottom[nbins]->GetXaxis()->SetTitleColor(1);
0832 hhbottom[nbins]->GetXaxis()->SetTitleSize(0.040);
0833 hhbottom[nbins]->GetXaxis()->SetLabelSize(0.040);
0834
0835 hhbottom[nbins]->GetYaxis()->SetTitleOffset(1.3);
0836 hhbottom[nbins]->GetYaxis()->SetTitleSize(0.040);
0837 hhbottom[nbins]->GetYaxis()->SetLabelSize(0.040);
0838
0839 hhcorrbg[nbins]->SetAxisRange(7.0,14.0);
0840 hhcorrbg[nbins]->SetMinimum(0.1);
0841 hhcorrbg[nbins]->SetLineColor(kBlack);
0842 hhcorrbg[nbins]->SetLineWidth(2);
0843 hhcorrbg[nbins]->Draw("hist");
0844
0845 hhbottom[nbins]->SetMarkerColor(kBlue);
0846 hhbottom[nbins]->SetLineColor(kBlue);
0847 hhbottom[nbins]->Draw("same");
0848
0849 hhdy[nbins]->SetMarkerColor(kGreen+2);
0850 hhdy[nbins]->SetLineColor(kGreen+2);
0851 hhdy[nbins]->SetLineWidth(2);
0852 hhdy[nbins]->Draw("same");
0853
0854 hhcharm[nbins]->SetMarkerColor(kRed);
0855 hhcharm[nbins]->SetLineColor(kRed);
0856 hhcharm[nbins]->SetLineWidth(2);
0857 hhcharm[nbins]->Draw("same");
0858
0859 TCanvas* c0 = new TCanvas("c0","Correlated BG vs. p_{T} 10B events",100,100,1200,900);
0860 c0->Divide(4,3);
0861 for(int i=0; i<nbins; i++) {
0862 if(i==0) {c0->cd(1);}
0863 if(i==1) {c0->cd(2);}
0864 if(i==2) {c0->cd(3);}
0865 if(i==3) {c0->cd(4);}
0866 if(i==4) {c0->cd(5);}
0867 if(i==5) {c0->cd(6);}
0868 if(i==6) {c0->cd(7);}
0869 if(i==7) {c0->cd(8);}
0870 if(i==8) {c0->cd(9);}
0871 if(i==9) {c0->cd(10);}
0872 if(i==10) {c0->cd(11);}
0873 if(i==11) {c0->cd(12);}
0874 hhcorrbg[i]->SetAxisRange(7.,14.);
0875 hhcorrbg[i]->GetFunction("expo")->SetLineColor(kBlack);
0876 hhbottom[i]->GetFunction("expo")->SetLineColor(kBlue);
0877 hhdy[i]->GetFunction("expo")->SetLineColor(kGreen+2);
0878 hhcorrbg[i]->SetLineColor(kBlack);
0879 hhbottom[i]->SetLineColor(kBlue);
0880 hhdy[i]->SetLineColor(kGreen+2);
0881 hhcorrbg[i]->Draw();
0882 hhbottom[i]->Draw("same");
0883 hhdy[i]->Draw("same");
0884 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhcorrbg[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
0885 }
0886
0887 TCanvas* c0scaled = new TCanvas("c0scaled","SCALED Correlated BG vs. p_{T}",100,100,1200,900);
0888 c0scaled->Divide(4,3);
0889 for(int i=0; i<nbins; i++) {
0890 if(i==0) {c0scaled->cd(1);}
0891 if(i==1) {c0scaled->cd(2);}
0892 if(i==2) {c0scaled->cd(3);}
0893 if(i==3) {c0scaled->cd(4);}
0894 if(i==4) {c0scaled->cd(5);}
0895 if(i==5) {c0scaled->cd(6);}
0896 if(i==6) {c0scaled->cd(7);}
0897 if(i==7) {c0scaled->cd(8);}
0898 if(i==8) {c0scaled->cd(9);}
0899 if(i==9) {c0scaled->cd(10);}
0900 if(i==10) {c0scaled->cd(11);}
0901 if(i==11) {c0scaled->cd(12);}
0902 hhcorrbg_scaled[i]->SetAxisRange(7.0,14.0); hhcorrbg_scaled[i]->Draw();
0903 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhcorrbg_scaled[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
0904 }
0905
0906
0907
0908
0909
0910 TH1D* hhbottom_pp[nbins+1];
0911 TH1D* hhdy_pp[nbins+1];
0912 TH1D* hhcorrbg_pp[nbins+1];
0913 TH1D* hhall_pp[nbins+1];
0914
0915 double ppcorr = 8300./10./962.;
0916 TF1* fbottom_nosup_corr = new TF1("fbottom_nosup_corr","[0]+[1]*x",5.,14.);
0917 fbottom_nosup_corr->SetParameters(-2.13861, 0.683323);
0918
0919 for(int i=0; i<nbins+1; i++) {
0920
0921 sprintf(tmpname,"hhbottom_pp_%d",i);
0922 hhbottom_pp[i] = (TH1D*)hhbottom[i]->Clone(tmpname);
0923 for(int k=1; k<=hhbottom_pp[i]->GetNbinsX(); k++) {
0924 if(hhbottom_pp[i]->GetBinLowEdge(k)<statscale_lowlim || (hhbottom_pp[i]->GetBinLowEdge(k)+hhbottom_pp[i]->GetBinWidth(k))>statscale_uplim) {
0925 hhbottom_pp[i]->SetBinContent(k,0.);
0926 hhbottom_pp[i]->SetBinError(k,0.);
0927 }
0928 else {
0929 double tmp = ppcorr * fbottom_nosup_corr->Eval(hhbottom[i]->GetBinCenter(k)) * hhbottom[i]->GetFunction("expo")->Eval(hhbottom[i]->GetBinCenter(k));
0930 double tmprnd = myrandom->Poisson(tmp);
0931 if(tmprnd<0.) { tmprnd=0.; }
0932 hhbottom_pp[i]->SetBinContent(k,tmprnd);
0933 hhbottom_pp[i]->SetBinError(k,sqrt(tmprnd));
0934 }
0935 }
0936
0937 sprintf(tmpname,"hhdy_pp_%d",i);
0938 hhdy_pp[i] = (TH1D*)hhdy[i]->Clone(tmpname);
0939 for(int k=1; k<=hhdy_pp[i]->GetNbinsX(); k++) {
0940 if(hhdy_pp[i]->GetBinLowEdge(k)<statscale_lowlim || (hhdy_pp[i]->GetBinLowEdge(k)+hhdy_pp[i]->GetBinWidth(k))>statscale_uplim) {
0941 hhdy_pp[i]->SetBinContent(k,0.);
0942 hhdy_pp[i]->SetBinError(k,0.);
0943 }
0944 else {
0945 double tmp = ppcorr * hhdy[i]->GetFunction("expo")->Eval(hhdy[i]->GetBinCenter(k));
0946 double tmprnd = myrandom->Poisson(tmp);
0947 if(tmprnd<0.) { tmprnd=0.; }
0948 hhdy_pp[i]->SetBinContent(k,tmprnd);
0949 hhdy_pp[i]->SetBinError(k,sqrt(tmprnd));
0950 }
0951 }
0952
0953 sprintf(tmpname,"hhcorrbg_pp_%d",i);
0954 hhcorrbg_pp[i] = (TH1D*)hhbottom_pp[i]->Clone(tmpname);
0955 hhcorrbg_pp[i]->Add(hhdy_pp[i]);
0956 hhcorrbg_pp[i]->SetMarkerColor(kBlack);
0957 hhcorrbg_pp[i]->SetLineColor(kBlack);
0958 hhbottom_pp[i]->SetLineColor(kBlue);
0959 hhdy_pp[i]->SetLineColor(kGreen+2);
0960 sprintf(tmpname,"hhall_pp_%d",i);
0961 hhall_pp[i] = (TH1D*)hhcorrbg_pp[i]->Clone(tmpname);
0962 hhall_pp[i]->Add(hhupspp[i]);
0963 hhall_pp[i]->SetLineColor(kMagenta);
0964 hhall_pp[i]->SetMarkerColor(kMagenta);
0965
0966 hhcorrbg_pp[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0967 hhcorrbg_pp[i]->GetFunction("expo")->SetLineColor(kBlack);
0968 hhbottom_pp[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0969 hhbottom_pp[i]->GetFunction("expo")->SetLineColor(kBlue);
0970 hhdy_pp[i]->Fit("expo","rql","",statscale_lowlim,statscale_uplim);
0971 hhdy_pp[i]->GetFunction("expo")->SetLineColor(kGreen+2);
0972
0973 }
0974
0975 TCanvas* cbginpp = new TCanvas("cbginpp","corr bg in pp",10,10,700,700);
0976 hhall_pp[nbins]->SetAxisRange(7.,12.);
0977 hhcorrbg_pp[nbins]->Draw("pehist");
0978 hhbottom_pp[nbins]->Draw("histsame");
0979 hhdy_pp[nbins]->Draw("histsame");
0980
0981
0982 TCanvas* cpp = new TCanvas("cpp","corr bg + sig in pp",100,100,700,700);
0983 hhall_pp[nbins]->SetAxisRange(7.,12.);
0984 hhall_pp[nbins]->Draw("pehist");
0985 hhcorrbg_pp[nbins]->Draw("pesame");
0986 hhbottom_pp[nbins]->Draw("same");
0987 hhdy_pp[nbins]->Draw("same");
0988
0989 TCanvas* cpp_vspt = new TCanvas("cpp_vspt","corr bg + sig vs pt in pp",50,50,1200,900);
0990 cpp_vspt->Divide(4,3);
0991 for(int i=0; i<nbins; i++) {
0992 if(i==0) {cpp_vspt->cd(1);}
0993 if(i==1) {cpp_vspt->cd(2);}
0994 if(i==2) {cpp_vspt->cd(3);}
0995 if(i==3) {cpp_vspt->cd(4);}
0996 if(i==4) {cpp_vspt->cd(5);}
0997 if(i==5) {cpp_vspt->cd(6);}
0998 if(i==6) {cpp_vspt->cd(7);}
0999 if(i==7) {cpp_vspt->cd(8);}
1000 if(i==8) {cpp_vspt->cd(9);}
1001 if(i==9) {cpp_vspt->cd(10);}
1002 if(i==10) {cpp_vspt->cd(11);}
1003 if(i==11) {cpp_vspt->cd(12);}
1004 hhall_pp[i]->SetAxisRange(7.0,12.0); hhall_pp[i]->Draw("hist"); hhcorrbg_pp[i]->Draw("histsame");
1005 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhcorrbg_pp[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
1006 }
1007
1008
1009
1010
1011 TCanvas* dummy = new TCanvas("dummy","dummy",0,0,500,500);
1012
1013 f = new TFile("fakee_eideff09.root");
1014 for(int i=0; i<nbins+1; i++) {
1015 sprintf(tmpname,"hhfakefake_%d",i);
1016 hhfakefake[i] = (TH1D*)f->Get(tmpname);
1017 hhfakefake[i]->SetDirectory(gROOT);
1018 }
1019 f->Close();
1020
1021 f = new TFile("crossterms_eideff09.root");
1022 for(int i=0; i<nbins+1; i++) {
1023 sprintf(tmpname,"hhfakehf_%d",i);
1024 hhfakehf[i] = (TH1D*)f->Get(tmpname);
1025 hhfakehf[i]->SetDirectory(gROOT);
1026 }
1027 f->Close();
1028
1029 TF1* fbg = new TF1("fbg","exp([0]+[1]*x)+exp([2]+[3]*x)",8.,11.);
1030 fbg->SetParameters(10., -1.0, 4., -0.1);
1031 fbg->SetParLimits(1.,-999.,0.);
1032 fbg->SetParLimits(3.,-999.,0.);
1033
1034 for(int i=0; i<nbins+1; i++) {
1035 sprintf(tmpname,"hhcombbg_%d",i);
1036 hhcombbg[i] = (TH1D*)hhfakefake[i]->Clone(tmpname);
1037 hhcombbg[i]->Add(hhfakehf[i]);
1038 sprintf(tmpname,"hhcombbg_scaled_%d",i);
1039 hhcombbg_scaled[i] = (TH1D*)hhcombbg[i]->Clone(tmpname);
1040 if(i==nbins) { fbg->SetParameters(10., -1.0, 4., -0.1); }
1041 hhcombbg[i]->Fit(fbg,"qrl","",statscale_lowlim,statscale_uplim);
1042
1043 for(int k=1; k<=hhcombbg[i]->GetNbinsX(); k++) {
1044 if(hhcombbg[i]->GetBinLowEdge(k)<statscale_lowlim || (hhcombbg[i]->GetBinLowEdge(k)+hhcombbg[i]->GetBinWidth(k))>statscale_uplim) {
1045 hhcombbg_scaled[i]->SetBinContent(k,0.);
1046 hhcombbg_scaled[i]->SetBinError(k,0.);
1047 }
1048 else {
1049
1050 double tmp = ncollfact * ncollfact * centwidthfact * statscale * hhcombbg[i]->GetFunction("fbg")->Eval(hhcombbg[i]->GetBinCenter(k));
1051 double tmprnd = myrandom->Poisson(tmp);
1052 if(tmprnd<0.) { tmprnd=0.; }
1053 hhcombbg_scaled[i]->SetBinContent(k,tmprnd);
1054 hhcombbg_scaled[i]->SetBinError(k,sqrt(tmprnd));
1055 }
1056 }
1057 hhcombbg_scaled[i]->Fit(fbg,"qrl","",statscale_lowlim,statscale_uplim);
1058 }
1059
1060 delete dummy;
1061
1062 TCanvas* C1 = new TCanvas("C1","Combinatorial BG (ALL p_{T})",100,100,600,600);
1063 C1->SetLogy();
1064 hhfakefake[nbins]->SetAxisRange(7.0,14.0);
1065 hhfakefake[nbins]->SetMinimum(0.1);
1066 hhfakefake[nbins]->SetMaximum(5000.);
1067 hhfakefake[nbins]->SetLineColor(kGreen+2);
1068 hhfakefake[nbins]->SetLineWidth(2);
1069 hhfakefake[nbins]->GetXaxis()->SetTitle("Transverse momentum [GeV/c]");
1070 hhfakefake[nbins]->GetXaxis()->SetTitleOffset(1.0);
1071 hhfakefake[nbins]->GetXaxis()->SetTitleColor(1);
1072 hhfakefake[nbins]->GetXaxis()->SetTitleSize(0.040);
1073 hhfakefake[nbins]->GetXaxis()->SetLabelSize(0.040);
1074 hhfakefake[nbins]->GetYaxis()->SetTitle("Combinatorial background");
1075 hhfakefake[nbins]->GetYaxis()->SetTitleOffset(1.3);
1076 hhfakefake[nbins]->GetYaxis()->SetTitleSize(0.040);
1077 hhfakefake[nbins]->GetYaxis()->SetLabelSize(0.040);
1078 hhfakefake[nbins]->Draw("e");
1079
1080 hhfakehf[nbins]->SetLineColor(kOrange+4);
1081 hhfakehf[nbins]->SetLineWidth(2);
1082 hhfakehf[nbins]->Draw("esame");
1083
1084 hhcombbg[nbins]->SetLineColor(kBlack);
1085 hhcombbg[nbins]->SetLineWidth(2);
1086 hhcombbg[nbins]->Draw("esame");
1087
1088 TCanvas* C1sc = new TCanvas("C1sc","SCALED Combinatorial BG (ALL p_{T})",100,100,600,600);
1089 C1sc->SetLogy();
1090 hhcombbg_scaled[nbins]->SetAxisRange(7.,14.);
1091 hhcombbg_scaled[nbins]->Draw("esame");
1092
1093 TCanvas* c00 = new TCanvas("c00","Combinatorial BG vs. p_{T}",150,150,1200,900);
1094 c00->Divide(4,3);
1095
1096 for(int i=0; i<nbins; i++) {
1097 if(i==0) {c00->cd(1);}
1098 if(i==1) {c00->cd(2);}
1099 if(i==2) {c00->cd(3);}
1100 if(i==3) {c00->cd(4);}
1101 if(i==4) {c00->cd(5);}
1102 if(i==5) {c00->cd(6);}
1103 if(i==6) {c00->cd(7);}
1104 if(i==7) {c00->cd(8);}
1105 if(i==8) {c00->cd(9);}
1106 if(i==9) {c00->cd(10);}
1107 if(i==10) {c00->cd(11);}
1108 if(i>=11) {c00->cd(12);}
1109 hhcombbg[i]->SetAxisRange(7.0,14.0); hhcombbg[i]->Draw();
1110 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhcombbg[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
1111 }
1112
1113 TCanvas* c00scaled = new TCanvas("c00scaled","SCALED Combinatorial BG vs. p_{T}",150,150,1200,900);
1114 c00scaled->Divide(4,3);
1115
1116 for(int i=0; i<nbins; i++) {
1117 if(i==0) {c00scaled->cd(1);}
1118 if(i==1) {c00scaled->cd(2);}
1119 if(i==2) {c00scaled->cd(3);}
1120 if(i==3) {c00scaled->cd(4);}
1121 if(i==4) {c00scaled->cd(5);}
1122 if(i==5) {c00scaled->cd(6);}
1123 if(i==6) {c00scaled->cd(7);}
1124 if(i==7) {c00scaled->cd(8);}
1125 if(i==8) {c00scaled->cd(9);}
1126 if(i==9) {c00scaled->cd(10);}
1127 if(i==10) {c00scaled->cd(11);}
1128 if(i>=11) {c00scaled->cd(12);}
1129 hhcombbg_scaled[i]->SetAxisRange(statscale_lowlim,statscale_uplim); hhcombbg_scaled[i]->Draw();
1130 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhcombbg_scaled[i]->GetMaximum()*0.95,tlchar); tl[i]->Draw();
1131 }
1132
1133
1134
1135
1136
1137 for(int i=0; i<nbins+1; i++) {
1138 sprintf(tmpname,"hhtotbg_scaled_%d",i);
1139 hhtotbg_scaled[i] = (TH1D*)hhcombbg_scaled[i]->Clone(tmpname);
1140 hhtotbg_scaled[i]->Add(hhcorrbg_scaled[i]);
1141 }
1142
1143 for(int i=0; i<nbins+1; i++) {
1144 sprintf(tmpname,"hhall_scaled_%d",i);
1145 hhall_scaled[i] = (TH1D*)hhtotbg_scaled[i]->Clone(tmpname);
1146 hhall_scaled[i]->Add(hhups[i]);
1147 }
1148
1149 TCanvas* c000 = new TCanvas("c000","Signal + Background vs. p_{T}",200,200,1200,900);
1150 c000->Divide(4,3);
1151 for(int i=0; i<nbins; i++) {
1152 if(i==0) {c000->cd(1);}
1153 if(i==1) {c000->cd(2);}
1154 if(i==2) {c000->cd(3);}
1155 if(i==3) {c000->cd(4);}
1156 if(i==4) {c000->cd(5);}
1157 if(i==5) {c000->cd(6);}
1158 if(i==6) {c000->cd(7);}
1159 if(i==7) {c000->cd(8);}
1160 if(i==8) {c000->cd(9);}
1161 if(i==9) {c000->cd(10);}
1162 if(i==10) {c000->cd(11);}
1163 if(i==11) {c000->cd(12);}
1164 hhall_scaled[i]->SetAxisRange(7.0,14.0); hhall_scaled[i]->SetMarkerStyle(1); hhall_scaled[i]->Draw("pehist");
1165 sprintf(tlchar,"%d-%d GeV",i,i+1); tl[i] = new TLatex(8.0,hhall_scaled[i]->GetMaximum()*0.9,tlchar); tl[i]->Draw();
1166 }
1167
1168
1169
1170
1171 for(int i=0; i<nbins+1; i++) {
1172 sprintf(tmpname,"hhfit_%d",i);
1173 hhfit[i] = (TH1D*)hhall_scaled[i]->Clone(tmpname);
1174 for(int j=1; j<=hhall_scaled[i]->GetNbinsX(); j++) {
1175 hhfit[i]->SetBinContent(j,hhfit[i]->GetBinContent(j) - hhcombbg_scaled[i]->GetFunction("fbg")->Eval(hhcombbg_scaled[i]->GetBinCenter(j)));
1176 hhfit[i]->SetBinError(j,sqrt(pow(hhfit[i]->GetBinError(j),2)+hhcombbg_scaled[i]->GetFunction("fbg")->Eval(hhcombbg_scaled[i]->GetBinCenter(j))));
1177 }
1178 }
1179
1180
1181
1182
1183
1184 double tmppar0 = corrbgfitpar0+TMath::Log(statscale);
1185 double tmppar1 = corrbgfitpar1;
1186 cout << "###### " << tmppar0 << " " << tmppar1 << endl;
1187
1188 double ppauauscale = fTCBauau->GetParameter(0)/fTCBpp->GetParameter(0)*0.9783;
1189 fSandBpp->SetParameter(0,fTCBpp->GetParameter(0)*ppauauscale);
1190 fSandBpp->SetParameter(1,fTCBpp->GetParameter(1));
1191 fSandBpp->SetParameter(2,fTCBpp->GetParameter(2));
1192 fSandBpp->SetParameter(3,fTCBpp->GetParameter(3));
1193 fSandBpp->SetParameter(4,fTCBpp->GetParameter(4));
1194 fSandBpp->SetParameter(5,fTCBpp->GetParameter(5)*ppauauscale);
1195 fSandBpp->SetParameter(6,fTCBpp->GetParameter(6)*ppauauscale);
1196 fSandBpp->SetParameter(7,tmppar0);
1197 fSandBpp->SetParameter(8,tmppar1);
1198 fSandBpp->SetLineColor(kBlue);
1199 fSandBpp->SetLineStyle(2);
1200
1201 cout << "######### " << fTCBauau->GetParameter(0) << " " << fTCBauau->GetParameter(5) << " " << fTCBauau->GetParameter(6) << endl;
1202 fSandBauau->SetParameter(0,fTCBauau->GetParameter(0));
1203 fSandBauau->SetParameter(1,fTCBauau->GetParameter(1));
1204 fSandBauau->SetParameter(2,fTCBauau->GetParameter(2));
1205 fSandBauau->SetParameter(3,fTCBauau->GetParameter(3));
1206 fSandBauau->SetParameter(4,fTCBauau->GetParameter(4));
1207 fSandBauau->SetParameter(5,fTCBauau->GetParameter(5));
1208 fSandBauau->SetParameter(6,fTCBauau->GetParameter(6));
1209 fSandBauau->SetParameter(7,tmppar0);
1210 fSandBauau->SetParameter(8,tmppar1);
1211 fSandBauau->SetLineColor(kRed);
1212
1213
1214 TCanvas* cfitall = new TCanvas("cfitall","FIT all pT",270,270,600,600);
1215 hhfit[nbins]->SetAxisRange(7.0,14.);
1216 hhfit[nbins]->GetXaxis()->CenterTitle();
1217 hhfit[nbins]->GetXaxis()->SetTitle("Mass(e^{+}e^{-}) [GeV/c^2]");
1218 hhfit[nbins]->GetXaxis()->SetTitleOffset(1.1);
1219 hhfit[nbins]->GetXaxis()->SetLabelSize(0.045);
1220 hhfit[nbins]->GetYaxis()->CenterTitle();
1221 hhfit[nbins]->GetYaxis()->SetLabelSize(0.045);
1222 hhfit[nbins]->GetYaxis()->SetTitle("Events / (50 MeV/c^{2})");
1223 hhfit[nbins]->GetYaxis()->SetTitleOffset(1.5);
1224 hhfit[nbins]->Draw("pehist");
1225 fSandBpp->Draw("same");
1226 fSandBauau->Draw("same");
1227
1228
1229
1230
1231
1232 TF1* fmycorrbg = new TF1("fmycorrbg","exp([0]+[1]*x)",7.,14.);
1233 fmycorrbg->SetParameters(tmppar0,tmppar1);
1234 fmycorrbg->SetLineStyle(2);
1235 fmycorrbg->SetLineColor(kRed);
1236 fmycorrbg->Draw("same");
1237
1238
1239 double myheight = fTCBauau->GetParameter(0);
1240 TLatex* ld1 = new TLatex(10.1,myheight,"sPHENIX Simulation");
1241 ld1->SetTextSize(0.035);
1242 ld1->Draw();
1243 TLatex* ld2 = new TLatex(10.1,myheight-100.,"0-10% Au+Au #sqrt{s} = 200 GeV");
1244 ld2->SetTextSize(0.035);
1245 ld2->Draw();
1246 TLatex* ld3;
1247
1248 char evstr[500];
1249 sprintf(evstr,"%i billion events",auauevts);
1250 ld3 = new TLatex(10.1,myheight-200.,evstr);
1251 ld3->SetTextSize(0.035);
1252 ld3->Draw();
1253
1254 TCanvas* cfitall2 = new TCanvas("cfitall2","FIT all pT",270,270,600,600);
1255 TH1D* hhfit_tmp = (TH1D*)hhfit[nbins]->Clone("hhfit_tmp");
1256 hhfit_tmp->SetAxisRange(8.0,11.);
1257 hhfit_tmp->Draw("pehist");
1258 fSandBauau->Draw("same");
1259 fmycorrbg->Draw("same");
1260
1261
1262
1263
1264
1265
1266 TCanvas* callpt = new TCanvas("callpt","Signal+BG (all p_{T})",300,300,600,600);
1267
1268 hhall_scaled[nbins]->GetXaxis()->SetTitle("Invariant mass GeV/c");
1269 hhall_scaled[nbins]->SetLineColor(kBlack);
1270 hhall_scaled[nbins]->SetMarkerColor(kBlack);
1271 hhall_scaled[nbins]->SetMarkerStyle(20);
1272 hhall_scaled[nbins]->SetAxisRange(8.0,10.8);
1273 hhall_scaled[nbins]->Draw("pehist");
1274 hhcombbg_scaled[nbins]->SetLineColor(kBlue);
1275 hhcombbg_scaled[nbins]->Draw("histsame");
1276 hhcorrbg_scaled[nbins]->SetLineColor(kRed);
1277 hhcorrbg_scaled[nbins]->Draw("histsame");
1278
1279
1280
1281
1282
1283 double u1start = 9.25;
1284 double u1stop = 9.65;
1285 double u2start = 9.80;
1286 double u2stop = 10.20;
1287 double u3start = 10.20;
1288 double u3stop = 10.55;
1289
1290 double raa1[nbins+1],raa2[nbins+1],raa3[nbins+1],erraa1[nbins+1],erraa2[nbins+1],erraa3[nbins+1], erraa3_up[nbins+1], erraa3_dn[nbins+1];
1291 for(int i=0; i<nbins; i++) {
1292
1293 raa1[i] = grRAA1S->Eval(0.5+i*1.0);
1294 raa2[i] = grRAA2S->Eval(0.5+i*1.0);
1295 raa3[i] = grRAA3S->Eval(0.5+i*1.0);
1296 }
1297 raa1[nbins] = raa1[0];
1298 raa2[nbins] = raa2[0];
1299 raa3[nbins] = raa3[0];
1300
1301 int fbin1 = hhall_scaled[nbins]->FindBin(u1start + 0.001);
1302 int lbin1 = hhall_scaled[nbins]->FindBin(u1stop - 0.001);
1303 int fbin2 = hhall_scaled[nbins]->FindBin(u2start + 0.001);
1304 int lbin2 = hhall_scaled[nbins]->FindBin(u2stop - 0.001);
1305 int fbin3 = hhall_scaled[nbins]->FindBin(u3start + 0.001);
1306 int lbin3 = hhall_scaled[nbins]->FindBin(u3stop - 0.001);
1307 cout << "Y(1S) bin range: " << fbin1 << " - " << lbin1 << endl;
1308 cout << "Y(1S) inv. mass range: " << u1start << " - " << u1stop << endl;
1309 cout << "Y(2S) bin range: " << fbin2 << " - " << lbin2 << endl;
1310 cout << "Y(2S) inv. mass range: " << u2start << " - " << u2stop << endl;
1311 cout << "Y(3S) bin range: " << fbin3 << " - " << lbin3 << endl;
1312 cout << "Y(3S) inv. mass range: " << u3start << " - " << u3stop << endl;
1313
1314 double sum1[99] = {0.};
1315 double truesum1[99] = {0.};
1316 double ersum1[99] = {0.};
1317 double sumpp1[99] = {0.};
1318 double ersumpp1[99] = {0.};
1319 double sum2[99] = {0.};
1320 double truesum2[99] = {0.};
1321 double ersum2[99] = {0.};
1322 double sumpp2[99] = {0.};
1323 double ersumpp2[99] = {0.};
1324 double sum3[99] = {0.};
1325 double truesum3[99] = {0.};
1326 double allsum3[99] = {0.};
1327 double ersum3[99] = {0.};
1328 double ersum3_up[99] = {0.};
1329 double ersum3_dn[99] = {0.};
1330 double sumpp3[99] = {0.};
1331 double ersumpp3[99] = {0.};
1332
1333 double sumsum1[99] = {0.};
1334 double sumsum2[99] = {0.};
1335 double sumsum3[99] = {0.};
1336 double sumsum1pp[99] = {0.};
1337 double sumsum2pp[99] = {0.};
1338 double sumsum3pp[99] = {0.};
1339
1340 for(int i=0; i<nbins+1; i++) {
1341
1342 double s1 = double(i); double s2 = double(i+1); if(i==nbins) {s1 = 0.;}
1343
1344 for(int j=fbin1; j<=lbin1; j++) {
1345 sum1[i] += (hhall_scaled[i]->GetBinContent(j) - hhcombbg_scaled[i]->GetFunction("fbg")->Eval(hhall_scaled[i]->GetBinCenter(j)) - hhcorrbg_scaled[i]->GetFunction("expo")->Eval(hhall_scaled[i]->GetBinCenter(j)));
1346 truesum1[i] += hhups1[i]->GetBinContent(j);
1347 ersum1[i] += hhall_scaled[i]->GetBinError(j)*hhall_scaled[i]->GetBinError(j);
1348 sumpp1[i] += hhups1pp[i]->GetBinContent(j);
1349 ersumpp1[i] += hhupspp[i]->GetBinError(j)*hhupspp[i]->GetBinError(j);
1350 }
1351 sumsum1[i] = truesum1[i];
1352 sumsum1pp[i] = sumpp1[i];
1353
1354
1355
1356
1357
1358
1359 if(sumsum1[i]>0. && sumsum1pp[i]>0.) {
1360 erraa1[i] = raa1[i]*sqrt(ersum1[i]/sumsum1[i]/sumsum1[i] + ersumpp1[i]/sumsum1pp[i]/sumsum1pp[i]);
1361 cout << "i " << i << " raa1 " << raa1[i] << " erraa1 " << erraa1[i] << endl;
1362 } else {raa1[i]=-1.0; erraa1[i] = 999.; }
1363
1364 for(int j=fbin2; j<=lbin2; j++) {
1365 sum2[i] += (hhall_scaled[i]->GetBinContent(j) - hhcombbg_scaled[i]->GetFunction("fbg")->Eval(hhall_scaled[i]->GetBinCenter(j)) - hhcorrbg_scaled[i]->GetFunction("expo")->Eval(hhall_scaled[i]->GetBinCenter(j)));
1366 truesum2[i] += hhups2[i]->GetBinContent(j);
1367 ersum2[i] += hhall_scaled[i]->GetBinError(j)*hhall_scaled[i]->GetBinError(j);
1368 sumpp2[i] += hhups2pp[i]->GetBinContent(j);
1369 ersumpp2[i] += hhupspp[i]->GetBinError(j)*hhupspp[i]->GetBinError(j);
1370 }
1371 sumsum2[i] = truesum2[i];
1372 sumsum2pp[i] = sumpp2[i];
1373
1374
1375
1376
1377
1378
1379 if(sumsum2[i]>0. && sumsum2pp[i]>0.) {
1380 erraa2[i] = raa2[i]*sqrt(ersum2[i]/sumsum2[i]/sumsum2[i] + ersumpp2[i]/sumsum2pp[i]/sumsum2pp[i]);
1381 cout << "i " << i << " raa2 " << raa2[i] << " erraa2 " << erraa2[i] << endl;
1382 } else {raa2[i]=-1.0; erraa2[i] = 999.; }
1383
1384 for(int j=fbin3; j<=lbin3; j++) {
1385 sum3[i] += (hhall_scaled[i]->GetBinContent(j) - hhcombbg_scaled[i]->GetFunction("fbg")->Eval(hhall_scaled[i]->GetBinCenter(j)) - hhcorrbg_scaled[i]->GetFunction("expo")->Eval(hhall_scaled[i]->GetBinCenter(j)));
1386 truesum3[i] += hhups3[i]->GetBinContent(j);
1387 ersum3[i] += hhall_scaled[i]->GetBinError(j)*hhall_scaled[i]->GetBinError(j);
1388 allsum3[i] += hhall_scaled[i]->GetBinContent(j);
1389 sumpp3[i] += hhups3pp[i]->GetBinContent(j);
1390 ersumpp3[i] += hhupspp[i]->GetBinError(j)*hhupspp[i]->GetBinError(j);
1391 }
1392 sumsum3[i] = truesum3[i];
1393 sumsum3pp[i] = sumpp3[i];
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404 if(truesum3[i]>0. && sumpp3[i]>0.) {
1405 erraa3[i] = raa3[i]*sqrt(ersum3[i]/sumsum3[i]/sumsum3[i] + ersumpp3[i]/sumsum3pp[i]/sumsum3pp[i]);
1406
1407
1408 cout << "i " << i << " raa3 " << raa3[i] << " erraa3_up " << erraa3_up[i] << " erraa3_dn " << erraa3_dn[i] << endl;
1409 } else {raa3[i]=-1.0; erraa3[i] = 999;}
1410
1411 }
1412
1413 cout << "====== Y(1S):" << endl;
1414 for(int i=0; i<nbins+1; i++) {
1415 double s1 = double(i); double s2 = double(i+1); if(i==nbins) {s1 = 0.;}
1416 cout << " " << i << " " << truesum1[i] << "(" << Nups1*fUpsilonPt->Integral(s1,s2)/upsnorm << ")" << " +- "
1417 << sqrt(ersum1[i]) << " \t\t pp: " << sumpp1[i] << " +- " << sqrt(ersumpp1[i]) << " raa " << raa1[i] << " erraa " << erraa1[i] << endl;
1418 }
1419 cout << "====== Y(2S):" << endl;
1420 for(int i=0; i<nbins+1; i++) {
1421 double s1 = double(i); double s2 = double(i+1); if(i==nbins) {s1 = 0.;}
1422 cout << " " << i << " " << truesum2[i] << "(" << Nups2*fUpsilonPt->Integral(s1,s2)/upsnorm << ")" << " +- "
1423 << sqrt(ersum2[i]) << " \t\t pp: " << sumpp2[i] << " +- " << sqrt(ersumpp2[i]) << " raa " << raa2[i] << " erraa " << erraa2[i] << endl;
1424 }
1425 cout << "====== Y(3S):" << endl;
1426 for(int i=0; i<nbins+1; i++) {
1427
1428 double s1 = double(i); double s2 = double(i+1); if(i==nbins) {s1 = 0.;}
1429 cout << " " << i << " " << truesum3[i] << "(" << Nups3*fUpsilonPt->Integral(s1,s2)/upsnorm << ")" << " (all " << allsum3[i] << ") "<< " +- "
1430
1431 << sqrt(ersum3[i]) << " \t\t pp: " << sumpp3[i] << " +- " << sqrt(ersumpp3[i]) << " raa " << raa3[i] << " erraa " << erraa3[i] << endl;
1432 }
1433
1434
1435
1436
1437
1438 int npts1 = 9;
1439 int npts2 = 7;
1440 int npts3 = 7;
1441
1442 TCanvas* craa = new TCanvas("craa","R_{AA}",120,120,600,600);
1443 TH2F* hh2 = new TH2F("hh2"," ",10,0.,float(npts1+1),10,0.,1.5);
1444 hh2->GetXaxis()->SetTitle("Transverse momentum [GeV/c]");
1445 hh2->GetXaxis()->SetTitleOffset(1.0);
1446 hh2->GetXaxis()->SetTitleColor(1);
1447 hh2->GetXaxis()->SetTitleSize(0.040);
1448 hh2->GetXaxis()->SetLabelSize(0.040);
1449 hh2->GetYaxis()->SetTitle("R_{AA}");
1450 hh2->GetYaxis()->SetTitleOffset(1.3);
1451 hh2->GetYaxis()->SetTitleSize(0.040);
1452 hh2->GetYaxis()->SetLabelSize(0.040);
1453 hh2->Draw();
1454
1455 double xx1[nbins+1]; for(int i=0; i<nbins+1; i++) {xx1[i] = 0.5 + double(i);}
1456 double xx2[nbins+1]; for(int i=0; i<nbins+1; i++) {xx2[i] = 0.43 + double(i);}
1457 double xx3[nbins+1]; for(int i=0; i<nbins+1; i++) {xx3[i] = 0.57 + double(i);}
1458
1459 TGraphErrors* gr1 = new TGraphErrors(npts1,xx1,raa1,0,erraa1);
1460 gr1->SetMarkerStyle(20);
1461 gr1->SetMarkerColor(kBlack);
1462 gr1->SetLineColor(kBlack);
1463 gr1->SetLineWidth(2);
1464 gr1->SetMarkerSize(1.5);
1465 gr1->SetName("gr1");
1466 gr1->Draw("p");
1467
1468 erraa2[7] = erraa2[7]*0.85;
1469
1470 TGraphErrors* gr2 = new TGraphErrors(npts2,xx2,raa2,0,erraa2);
1471 gr2->SetMarkerStyle(20);
1472 gr2->SetMarkerColor(kRed);
1473 gr2->SetLineColor(kRed);
1474 gr2->SetLineWidth(2);
1475 gr2->SetMarkerSize(1.5);
1476 gr2->SetName("gr2");
1477 gr2->Draw("p");
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 TLegend *leg = new TLegend(0.14,0.75,0.34,0.86);
1513 leg->SetFillColor(10);
1514 leg->SetFillStyle(1001);
1515 TLegendEntry *entry1=leg->AddEntry("gr1","Y(1S)","p");
1516 TLegendEntry *entry2=leg->AddEntry("gr2","Y(2S)","p");
1517
1518 leg->Draw();
1519
1520 TLatex* l1 = new TLatex(3.35,1.33,"sPHENIX Simulation");
1521 l1->SetTextSize(0.042);
1522 l1->Draw();
1523
1524 TLatex* lum = new TLatex(3.35,1.23,"0-10% Au+Au #sqrt{s} = 200 GeV");
1525 lum->SetTextSize(0.042);
1526 lum->Draw();
1527
1528 TLatex* run = new TLatex(3.35,1.13,run_plan[scenario].c_str());
1529 run->SetTextSize(0.042);
1530 run->Draw();
1531
1532 TLine* lll = new TLine(0.6,0.64,1.3,0.64);
1533 lll->SetLineColor(kBlue);
1534 lll->SetLineWidth(2);
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561 }
1562