13 #include <TGraphAsymmErrors.h>
14 #include <TGraphErrors.h>
21 #include "SaveCanvas.C"
22 #include "sPhenixStyle.C"
30 "/sphenix/user/jinhuang/HF-jet/event_gen/200pp_pythia8_CTEQ6L_7GeV/200pp_pythia8_CTEQ6L_7GeV_ALL.cfg_eneg_DSTReader.root",
31 double int_lumi = 891093 / 3.332
e-02 / 1e9,
const double dy = 0.6 * 2)
43 gStyle->SetOptStat(0);
44 gStyle->SetOptFit(1111);
45 TVirtualFitter::SetDefaultFitter(
"Minuit2");
47 gSystem->Load(
"libg4eval.so");
51 TString chian_str =
infile;
52 chian_str.ReplaceAll(
"ALL",
"*");
54 TChain *
t =
new TChain(
"T");
55 const int n = t->Add(chian_str);
59 cout <<
"int_lumi = " << int_lumi <<
" pb^-1 from " << n <<
" root files with " << chian_str << endl;
72 const double acceptance1 = 2.* (1.1 - .4);
84 TH1 *
hall =
new TH1F(
"hall",
";p_{T} [GeV/c]", 100, 0, 100);
85 TH1 *
h_b =
new TH1F(
"h_b",
";p_{T} [GeV/c]", 100, 0, 100);
86 TH1 *h_bq =
new TH1F(
"h_bq",
";p_{T} [GeV/c]", 100, 0, 100);
87 TH1 *h_bh =
new TH1F(
"h_bh",
";p_{T} [GeV/c]", 100, 0, 100);
88 TH1 *h_bh5 =
new TH1F(
"h_bh5",
";p_{T} [GeV/c]", 100, 0, 100);
89 TH1 *h_ch5 =
new TH1F(
"h_ch5",
";p_{T} [GeV/c]", 100, 0, 100);
90 TH1 *h_c =
new TH1F(
"h_c",
";p_{T} [GeV/c]", 100, 0, 100);
92 T->Draw(
"AntiKt_Truth_r04.get_pt()>>hall",
93 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6",
96 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_b",
97 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==5",
100 "AntiKt_Truth_r04.get_pt()* AntiKt_Truth_r04.get_property(1001) >>h_bq",
101 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==5",
108 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_bh5",
109 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1010))==5 && AntiKt_Truth_r04.get_property(1011) * AntiKt_Truth_r04.get_pt() > 5",
112 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_c",
113 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==4",
115 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_ch5",
116 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1010))==4 && AntiKt_Truth_r04.get_property(1011) * AntiKt_Truth_r04.get_pt() > 5",
126 h_b->SetLineColor(kBlue);
127 h_b->SetMarkerColor(kBlue);
129 h_bq->SetLineColor(kBlue + 3);
130 h_bq->SetMarkerColor(kBlue + 3);
132 h_bh5->SetLineColor(kBlue + 3);
133 h_bh5->SetMarkerColor(kBlue + 3);
134 h_bh5->SetMarkerStyle(kStar);
136 h_c->SetLineColor(kRed);
137 h_c->SetMarkerColor(kRed);
139 h_ch5->SetLineColor(kRed + 3);
140 h_ch5->SetMarkerColor(kRed + 3);
141 h_ch5->SetMarkerStyle(kStar);
144 gr_fonll_b->SetFillColor(kBlue - 7);
145 gr_fonll_b->SetFillStyle(3002);
147 gr_fonll_c->SetFillColor(kRed - 7);
148 gr_fonll_c->SetFillStyle(3003);
150 gr_phenix->SetLineColor(kGray + 2);
151 gr_phenix->SetMarkerColor(kBlack);
152 gr_phenix->SetMarkerStyle(kOpenCross);
154 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_DrawCrossSection",
"Draw_HFJetTruth_DrawCrossSection", 1000, 860);
159 p = (TPad *) c1->cd(idx++);
167 gr_fonll_b->Draw(
"3");
168 gr_fonll_c->Draw(
"3");
169 gr_phenix->Draw(
"pe");
177 hall->GetXaxis()->SetRangeUser(12, 60);
178 hall->GetYaxis()->SetTitle(
179 "d^{2}#sigma/(dp_{T}dy), d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
181 TLegend *
leg =
new TLegend(0.45, 0.6, 0.99, 0.95);
182 leg->SetFillColor(kWhite);
183 leg->SetFillStyle(1001);
184 leg->SetHeader(
"p+p collisions @ sPHENIX, #sqrt{s} = 200 GeV, |#eta|<0.6");
185 leg->AddEntry(hall,
"Inclusive jet, Pythia8, Truth, anti-k_{t}, R=0.4",
187 leg->AddEntry(h_c,
"c-quark jet, Pythia8, Truth, anti-k_{t}, R=0.4",
"lpe");
188 leg->AddEntry(h_b,
"b-quark jet, Pythia8, Truth, anti-k_{t}, R=0.4",
"lpe");
189 leg->AddEntry(h_bq,
"Leading b-quark in jet, Pythia8, anti-k_{t}, R=0.4",
"lpe");
191 "b-hadron jet, Pythia8, Truth, anti-k_{t}, R=0.4, p_{T, b-hadron}>5 GeV/c",
193 leg->AddEntry(gr_phenix,
"PHENIX inclusive jet, PRL 116, 122301 (2016)",
"ple");
194 leg->AddEntry(gr_fonll_c,
"c-quark, FONLL v1.3.2, CTEQ6.6, |y|<0.6",
"f");
195 leg->AddEntry(gr_fonll_b,
"b-quark, FONLL v1.3.2, CTEQ6.6, |y|<0.6",
"f");
203 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
206 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
208 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
211 hall->SetMarkerColor(kBlack);
212 hall->SetLineColor(kBlack);
213 hall->SetMarkerStyle(kFullCircle);
215 h_b->SetMarkerColor(kBlue + 2);
216 h_b->SetLineColor(kBlue + 2);
217 h_b->SetMarkerStyle(kFullCircle);
220 gr_fonll_b->SetFillColor(kBlue - 7);
221 gr_fonll_b->SetFillStyle(1001);
223 gr_fonll_c->SetFillColor(kRed - 7);
224 gr_fonll_c->SetFillStyle(3003);
226 gr_phenix->SetLineColor(kGray + 2);
227 gr_phenix->SetLineWidth(3);
228 gr_phenix->SetMarkerColor(kGray + 2);
229 gr_phenix->SetMarkerSize(2);
230 gr_phenix->SetMarkerStyle(kFullSquare);
232 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_DrawCrossSection_PR",
"Draw_HFJetTruth_DrawCrossSection_PR", 1000, 860);
237 p = (TPad *) c1->cd(idx++);
241 TH1 *hframe = p->DrawFrame(12, 0.1, 70, 1e8);
242 hframe->SetTitle(
";p_{T} [GeV/c];d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
244 gr_fonll_b->Draw(
"3");
245 gr_phenix->Draw(
"pe");
250 TLegend *
leg =
new TLegend(0.2, 0.7, 0.95, 0.92);
251 leg->SetFillColor(kWhite);
252 leg->SetFillStyle(1001);
254 leg->SetHeader(
"#it{#bf{sPHENIX }} Simulation, #it{p}+#it{p} #sqrt{s} = 200 GeV, |#eta|<0.6");
255 leg->AddEntry(hall,
"Inclusive jet, PYTHIA8 + CTEQ6L, anti-k_{T} R=0.4",
257 leg->AddEntry(h_b,
"#it{b}-quark jet, PYTHIA8 + CTEQ6L, anti-k_{T} R=0.4",
"lpe");
258 leg->AddEntry(gr_phenix,
"PHENIX inclusive jet, PRL 116, 122301 (2016)",
"ple");
259 leg->AddEntry(gr_fonll_b,
"#it{b}-quark, FONLL v1.3.2, CTEQ6.6",
"f");
267 const double b_jet_RAA = 0.6;
285 const double pp_lumi_proposal = 175;
287 const double dy_proposal = 2.;
288 const double eff_proposal = 0.5;
289 const double dy_proposal = 2;
291 cout <<
"CrossSection2RAA_Proposal integrated luminosity assumptions in pb^-1: " << endl;
293 <<
"pp_lumi_proposal = " << pp_lumi_proposal << endl;
295 <<
"AuAu_eq_lumi_C0_20_proposal = " << AuAu_eq_lumi_C0_20_proposal << endl;
297 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
300 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
304 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Proposal",
"Draw_HFJetTruth_CrossSection2RAA_Proposal", 1000, 860);
309 p = (TPad *) c1->cd(idx++);
315 h_b->GetYaxis()->SetTitle(
316 "d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
319 p = (TPad *) c1->cd(idx++);
325 TH1 *h_b_int = (TH1 *) h_b->Clone(TString(h_b->GetName()) +
"_IntrgratedCount");
327 for (
int i = h_b_int->GetNbinsX();
i >= 1; --
i)
329 const double cs = h_b_int->GetBinContent(
i);
331 integral += cs * h_b_int->GetXaxis()->GetBinWidth(
i) * dy_proposal * 0.2 * AuAu_Ncoll_C0_20 /
pp_inelastic_crosssec;
333 const double cs = h_b_int->SetBinContent(
i, integral);
334 const double cs = h_b_int->SetBinError(
i, 0);
337 h_b_int->GetYaxis()->SetTitle(
338 "(Count > p_{T} cut)/Event 0-20% AuAu");
341 p = (TPad *) c1->cd(idx++);
348 TH1 *g_AA =
CrossSection2RelUncert(h_b, b_jet_RAA, dy_proposal, AuAu_eq_lumi_C0_20_proposal * eff_proposal);
353 p = (TPad *) c1->cd(idx++);
359 p->DrawFrame(0, 0, 100, 1.2)
360 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];#it{R}_{AA}");
362 t.DrawLatex(10, 1, Form(
"#splitline{pp lumi %.0f pb^{-1}}{#splitline{AuAu 0-20 in 100B MB}{eff %.1f }}", pp_lumi_proposal, eff_proposal));
364 TGraphErrors *ge_RAA =
GetRAA(g_pp, g_AA);
367 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
372 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
375 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
377 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
380 const TString s_suffix(use_AA_jet_trigger ?
"_AAJetTriggered" :
"");
381 s_suffix += Form(
"_deta%.2f",
dy/2);
383 const double b_jet_RAA = 0.6;
385 const double pp_eff = 0.6;
386 const double pp_purity = 0.4;
387 const double AuAu_eff = 0.4;
388 const double AuAu_purity = 0.4;
394 const double pp_lumi = 200;
397 const double AuAu_MB_Evt = use_AA_jet_trigger ? 550e9 : 240e9;
398 const double pAu_MB_Evt = 600e9;
411 cout <<
"CrossSection2RAA integrated luminosity assumptions in pb^-1: " << endl;
413 <<
"pp_lumi = " << pp_lumi << endl;
415 <<
"AuAu_eq_lumi_C0_10 = " << AuAu_eq_lumi_C0_10 << endl;
417 <<
"AuAu_eq_lumi_C0_20 = " << AuAu_eq_lumi_C0_20 << endl;
419 <<
"AuAu_eq_lumi_C0_100 = " << AuAu_eq_lumi_C0_100 << endl;
421 <<
"pAu_eq_lumi_C0_100 = " << pAu_eq_lumi_C0_100 << endl;
423 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Ratio" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA_Ratio" + s_suffix, 700, 600);
428 p = (TPad *) c1->cd(idx++);
437 g_pp->SetLineColor(kRed);
438 g_AA->SetLineColor(kBlue);
442 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
444 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA" + s_suffix, 700, 600);
449 p = (TPad *) c1->cd(idx++);
452 p->DrawFrame(11, 0, 50, 1.2)
453 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];#it{R}_{AA}");
455 TGraphErrors *ge_RAA =
GetRAA(g_pp, g_AA);
457 ge_RAA->SetLineWidth(3);
458 ge_RAA->SetMarkerStyle(kFullCircle);
459 ge_RAA->SetMarkerSize(2);
464 TLegend *
leg =
new TLegend(.0, .76, .85, .93);
465 leg->SetFillStyle(0);
466 leg->AddEntry(
"",
"#it{#bf{sPHENIX }} Simulation",
"");
467 leg->AddEntry(
"", Form(
"PYTHIA-8 #it{b}-jet, Anti-k_{T} R=0.4, |#eta|<%.2f, CTEQ6L",
dy / 2),
"");
468 leg->AddEntry(
"", Form(
"#it{p}+#it{p}: %.0f pb^{-1}, %.0f%% Eff., %.0f%% Pur.", pp_lumi, pp_eff * 100, pp_purity * 100),
"");
469 leg->AddEntry(
"", Form(
"Au+Au: %.0fB col., %.0f%% Eff., %.0f%% Pur.",
'%', AuAu_MB_Evt / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"");
472 TLegend *leg2 =
new TLegend(.17, .70, .88, .77);
473 leg2->AddEntry(ge_RAA,
"#it{b}-jet #it{R}_{AA}, Au+Au 0-10%C, #sqrt{s_{NN}}=200 GeV",
"pl");
476 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
478 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Theory" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA_Theory" + s_suffix, 700, 600);
483 p = (TPad *) c1->cd(idx++);
486 p->DrawFrame(11, 0, 50, 1.2)
487 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];#it{R}_{AA}");
492 g20->SetLineColor(kGreen + 3);
493 g22->SetLineColor(kRed + 3);
494 g20->SetLineWidth(3);
495 g22->SetLineWidth(3);
500 ge_RAA->DrawClone(
"pe");
504 TLegend *leg1 =
new TLegend(.2, .20, .85, .37);
505 leg1->SetHeader(
"#splitline{pQCD, Phys.Lett. B726 (2013) 251-256}{#sqrt{s_{NN}}=200 GeV, #it{b}-jet R=0.4}");
506 leg1->AddEntry(
"",
"",
"");
507 leg1->AddEntry(g20,
"g^{med} = 2.0",
"l");
508 leg1->AddEntry(g22,
"g^{med} = 2.2",
"l");
511 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
514 void CrossSection2v2(
const TString
infile,
const bool use_AA_jet_trigger =
true,
const double ep_resolution = 0.7,
const double dy = .7 * 2)
516 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
519 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
521 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
524 const double b_jet_RAA = 0.6;
526 const double pp_eff = 0.6;
527 const double pp_purity = 0.4;
528 const double AuAu_eff = 0.4;
529 const double AuAu_purity = 0.4;
535 const double pp_lumi = 200;
538 const double AuAu_MB_Evt = use_AA_jet_trigger ? 550e9 : 240e9;
539 const double pAu_MB_Evt = 600e9;
543 const double AuAu_Ncoll_C10_20 = 603;
544 const double AuAu_Ncoll_C20_40 = 296;
545 const double AuAu_Ncoll_C10_40 = (AuAu_Ncoll_C10_20*10 + AuAu_Ncoll_C20_40*20)/30;
546 const double AuAu_Ncoll_C40_60 = 94;
547 const double AuAu_Ncoll_C60_92 = 15;
559 const double AuAu_eq_lumi_C60_92 = AuAu_MB_Evt * (.92 - .6) * AuAu_Ncoll_C60_92 /
pp_inelastic_crosssec;
566 const TString s_suffix(use_AA_jet_trigger ?
"_AAJetTriggered" :
"");
567 s_suffix += Form(
"_EPR%.1f",ep_resolution);
568 s_suffix += Form(
"_deta%.2f",
dy/2);
570 cout <<
"CrossSection2v2 integrated luminosity assumptions in pb^-1: " << endl;
572 <<
"pp_lumi = " << pp_lumi << endl;
574 <<
"AuAu_eq_lumi_C0_10 = " << AuAu_eq_lumi_C0_10 << endl;
576 <<
"AuAu_eq_lumi_C0_20 = " << AuAu_eq_lumi_C0_20 << endl;
578 <<
"AuAu_eq_lumi_C0_100 = " << AuAu_eq_lumi_C0_100 << endl;
580 <<
"AuAu_eq_lumi_C10_20 = " << AuAu_eq_lumi_C10_20 << endl;
582 <<
"AuAu_eq_lumi_C20_40 = " << AuAu_eq_lumi_C20_40 << endl;
584 <<
"AuAu_eq_lumi_C10_40 = " << AuAu_eq_lumi_C10_40 << endl;
586 <<
"AuAu_eq_lumi_C40_60 = " << AuAu_eq_lumi_C40_60 << endl;
588 <<
"AuAu_eq_lumi_C60_92 = " << AuAu_eq_lumi_C60_92 << endl;
590 <<
"pAu_eq_lumi_C0_100 = " << pAu_eq_lumi_C0_100 << endl;
592 TGraph *g_AA_C0_10 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C0_10 * AuAu_eff * AuAu_purity, ep_resolution, -1*.7);
593 TGraph *g_AA_C0_20 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C0_20 * AuAu_eff * AuAu_purity, ep_resolution, 0);
594 TGraph *g_AA_C10_20 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C10_20 * AuAu_eff * AuAu_purity, ep_resolution, 0);
595 TGraph *g_AA_C20_40 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C20_40 * AuAu_eff * AuAu_purity, ep_resolution, 1*.7);
596 TGraph *g_AA_C10_40 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C10_40 * AuAu_eff * AuAu_purity, ep_resolution, 1*.7);
597 TGraph *g_AA_C40_60 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C40_60 * AuAu_eff * AuAu_purity, ep_resolution, 2*.7);
598 TGraph *g_AA_C60_92 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C60_92 * AuAu_eff * AuAu_purity, ep_resolution, 3*.7);
600 g_AA_C0_10->SetLineColor(kBlue+3);
601 g_AA_C10_20->SetLineColor(kAzure+3);
602 g_AA_C20_40->SetLineColor(kTeal+3);
603 g_AA_C10_40->SetLineColor(kTeal+3);
604 g_AA_C40_60->SetLineColor(kSpring+3);
606 g_AA_C0_10->SetMarkerColor(kBlue+3);
607 g_AA_C10_20->SetMarkerColor(kAzure+3);
608 g_AA_C20_40->SetMarkerColor(kTeal+3);
609 g_AA_C10_40->SetMarkerColor(kTeal+3);
610 g_AA_C40_60->SetMarkerColor(kSpring+3);
612 g_AA_C0_10->SetMarkerStyle(kFullCircle);
613 g_AA_C10_20->SetMarkerStyle(kFullSquare);
614 g_AA_C20_40->SetMarkerStyle(kFullDiamond);
615 g_AA_C10_40->SetMarkerStyle(kFullDiamond);
616 g_AA_C40_60->SetMarkerStyle(kFullCross);
620 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2v2" + s_suffix,
"Draw_HFJetTruth_CrossSection2v2" + s_suffix, 700, 600);
625 p = (TPad *) c1->cd(idx++);
628 p->DrawFrame(15, -.1, 40, .3)
629 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];v_{2}");
631 g_AA_C0_10->Draw(
"pe");
634 g_AA_C10_40->Draw(
"pe");
646 TLegend *
leg =
new TLegend(.0, .78, .85, .93);
647 leg->SetFillStyle(0);
648 leg->AddEntry(
"",
"#it{#bf{sPHENIX }} Simulation",
"");
649 leg->AddEntry(
"", Form(
"PYTHIA-8 #it{b}-jet, Anti-k_{T} R=0.4, |#eta|<%.2f, CTEQ6L",
dy / 2),
"");
650 leg->AddEntry(
"", Form(
"Au+Au: %.0fB col., %.0f%% Eff., %.0f%% Pur.",
'%', AuAu_MB_Evt / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"");
653 TLegend *leg2 =
new TLegend(.19, .55, 1, .78);
654 leg2->SetHeader( Form(
"#it{b}-jet v_{2} Projection, #it{R}_{AA, #it{b}-jet}=%.1f, Res(#Psi_{2})=%.1f", b_jet_RAA, ep_resolution));
655 leg2->AddEntry(g_AA_C0_10,
"Au+Au 0-10%C",
"pl");
658 leg2->AddEntry(g_AA_C10_40,
"Au+Au 10-40%C",
"pl");
660 leg2->SetFillStyle(0);
663 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
666 TGraphErrors *
GetRAA(TH1 *h_pp, TH1 *h_AA)
670 double xs[1000] = {0};
671 double ys[1000] = {0};
672 double eys[1000] = {0};
676 assert(h_pp->GetNbinsX() == h_AA->GetNbinsX());
678 for (
int i = 1;
i <= h_pp->GetNbinsX(); ++
i)
680 if (h_pp->GetBinError(
i) > 0 && h_pp->GetBinError(
i) < 1 && h_AA->GetBinError(
i) > 0 && h_AA->GetBinError(
i) < 1)
682 xs[n_bin] = h_pp->GetXaxis()->GetBinCenter(
i);
684 ys[n_bin] = h_AA->GetBinContent(
i) / h_pp->GetBinContent(
i);
686 eys[n_bin] = ys[n_bin] * sqrt(pow(h_AA->GetBinError(
i) / h_AA->GetBinContent(
i), 2) + pow(h_pp->GetBinError(
i) / h_pp->GetBinContent(
i), 2));
692 TGraphErrors *ge =
new TGraphErrors(n_bin, xs, ys, NULL, eys);
693 ge->SetName(TString(
"RAA_") + h_AA->GetName());
699 const double suppression,
701 const double pp_quiv_int_lum)
706 h_cross->Clone(TString(h_cross->GetName()) + Form(
"_copy%d", rand()));
709 h_ratio->Scale(deta * h_ratio->GetXaxis()->GetBinWidth(0) * pp_quiv_int_lum * suppression);
712 for (
int i = 1;
i <= h_ratio->GetNbinsX(); ++
i)
714 const double yield = h_ratio->GetBinContent(
i);
718 h_ratio->SetBinContent(
i, suppression);
720 h_ratio->SetBinError(
i, suppression / sqrt(yield));
724 h_ratio->SetBinContent(
i, 0);
726 h_ratio->SetBinError(
i, 0);
730 h_ratio->GetYaxis()->SetTitle(
"Relative Cross Section and Uncertainty");
736 const double suppression,
738 const double pp_quiv_int_lum,
739 const double ep_resolution = 1,
740 const double pt_shift = 0
746 h_cross->Clone(TString(h_cross->GetName()) + Form(
"_copyv2%d", rand()));
749 h_ratio->Scale(deta * h_ratio->GetXaxis()->GetBinWidth(0) * pp_quiv_int_lum * suppression);
756 for (
int i = 1;
i <= h_ratio->GetNbinsX(); ++
i)
758 const double yield = h_ratio->GetBinContent(
i);
762 h_ratio->SetBinContent(
i, 0);
764 h_ratio->SetBinError(
i, 1. / sqrt(2 * yield) / ep_resolution);
766 pts.push_back(h_ratio->GetBinCenter(
i) + pt_shift);
767 v2s.push_back(h_ratio->GetBinContent(
i));
768 v2es.push_back(h_ratio->GetBinError(
i));
772 h_ratio->SetBinContent(
i, 0);
774 h_ratio->SetBinError(
i, 0);
778 h_ratio->GetYaxis()->SetTitle(
"v2 and uncertainty");
780 TGraph *
gr =
new TGraphErrors(pts.size(), &pts[0], &v2s[0], 0, &v2es[0]);
781 gr->SetName(TString(
"ge_") + h_ratio->GetName());
784 gr->SetMarkerStyle(kFullCircle);
785 gr->SetMarkerSize(2);
794 for (
int i = 1;
i <= h->GetXaxis()->GetNbins(); ++
i)
796 const double pT1 = h->GetXaxis()->GetBinLowEdge(
i);
797 const double pT2 = h->GetXaxis()->GetBinUpEdge(
i);
800 const double dpT = pT2 - pT1;
803 const double count2sigma = 1. / dpT / dy / int_lumi;
805 h->SetBinContent(
i, h->GetBinContent(
i) * count2sigma);
806 h->SetBinError(
i, h->GetBinError(
i) * count2sigma);
811 h->SetMarkerStyle(kFullCircle);
852 const double deta = 0.6 * 2;
857 10.0000, 11.0526, 12.1053, 13.1579, 14.2105, 15.2632, 16.3158, 17.3684,
858 18.4211, 19.4737, 20.5263, 21.5789, 22.6316, 23.6842, 24.7368, 25.7895,
859 26.8421, 27.8947, 28.9474, 30.0000
863 const double centrals[] =
864 {4.1645e+03, 2.4830e+03, 1.5046e+03, 9.2707e+02, 5.8027e+02, 3.6865e+02,
865 2.3744e+02, 1.5484e+02, 1.0215e+02, 6.8101e+01, 4.5818e+01, 3.1111e+01,
866 2.1287e+01, 1.4663e+01, 1.0175e+01, 7.1026e+00, 4.9796e+00, 3.5103e+00,
867 2.4892e+00, 1.7693e+00};
869 {4.1645e+03 - 2.9134e+03, 2.4830e+03 - 1.7438e+03, 1.5046e+03 - 1.0602e+03,
870 9.2707e+02 - 6.5506e+02, 5.8027e+02 - 4.1098e+02, 3.6865e+02 - 2.6159e+02, 2.3744e+02 - 1.6874e+02, 1.5484e+02 - 1.1016e+02,
871 1.0215e+02 - 7.2725e+01, 6.8101e+01 - 4.8502e+01, 4.5818e+01 - 3.2631e+01, 3.1111e+01 - 2.2148e+01, 2.1287e+01 - 1.5142e+01,
872 1.4663e+01 - 1.0419e+01, 1.0175e+01 - 7.2188e+00, 7.1026e+00 - 5.0296e+00, 4.9796e+00 - 3.5183e+00, 3.5103e+00 - 2.4738e+00,
873 2.4892e+00 - 1.7492e+00, 1.7693e+00 - 1.2394e+00};
876 {6.0916e+03 - 4.1645e+03, 3.6234e+03 - 2.4830e+03, 2.1900e+03 - 1.5046e+03,
877 1.3454e+03 - 9.2707e+02, 8.3990e+02 - 5.8027e+02, 5.3224e+02 - 3.6865e+02, 3.4198e+02 - 2.3744e+02, 2.2257e+02 - 1.5484e+02,
878 1.4657e+02 - 1.0215e+02, 9.7587e+01 - 6.8101e+01, 6.5588e+01 - 4.5818e+01, 4.4506e+01 - 3.1111e+01, 3.0444e+01 - 2.1287e+01,
879 2.0974e+01 - 1.4663e+01, 1.4562e+01 - 1.0175e+01, 1.0176e+01 - 7.1026e+00, 7.1439e+00 - 4.9796e+00, 5.0451e+00 - 3.5103e+00,
880 3.5856e+00 - 2.4892e+00, 2.5556e+00 - 1.7693e+00};
882 TGraphAsymmErrors *
gr =
new TGraphAsymmErrors(20, pts, centrals, 0, 0, min,
885 for (
int i = 0;
i < gr->GetN(); ++
i)
887 (gr->GetY())[
i] /= deta;
888 (gr->GetEYhigh())[
i] /= deta;
889 (gr->GetEYlow())[
i] /= deta;
933 const double deta = 0.6 * 2;
938 10.0000, 11.0526, 12.1053, 13.1579, 14.2105, 15.2632, 16.3158, 17.3684,
939 18.4211, 19.4737, 20.5263, 21.5789, 22.6316, 23.6842, 24.7368, 25.7895,
940 26.8421, 27.8947, 28.9474, 30.0000
944 const double centrals[] =
948 9.7368e+03, 4.9069e+03, 2.5743e+03, 1.3990e+03, 7.8344e+02, 4.5087e+02,
949 2.6550e+02, 1.5978e+02, 9.7903e+01, 6.0993e+01, 3.8605e+01, 2.4727e+01,
950 1.6036e+01, 1.0532e+01, 6.9729e+00, 4.6560e+00, 3.1409e+00, 2.1346e+00,
951 1.4557e+00, 9.9826e-01
958 9.7368e+03 - 6.5051e+03, 4.9069e+03 - 3.2787e+03, 2.5743e+03 - 1.7187e+03, 1.3990e+03 - 9.3274e+02, 7.8344e+02 - 5.2138e+02,
959 4.5087e+02 - 2.9938e+02, 2.6550e+02 - 1.7584e+02, 1.5978e+02 - 1.0551e+02, 9.7903e+01 - 6.4459e+01, 6.0993e+01 - 4.0030e+01,
960 3.8605e+01 - 2.5248e+01, 2.4727e+01 - 1.6108e+01, 1.6036e+01 - 1.0402e+01, 1.0532e+01 - 6.8006e+00, 6.9729e+00 - 4.4803e+00,
961 4.6560e+00 - 2.9760e+00, 3.1409e+00 - 1.9970e+00, 2.1346e+00 - 1.3500e+00, 1.4557e+00 - 9.1535e-01, 9.9826e-01 - 6.2400e-01
969 1.5528e+04 - 9.7368e+03, 7.7308e+03 - 4.9069e+03, 4.0147e+03 - 2.5743e+03, 2.1641e+03 - 1.3990e+03, 1.2037e+03 - 7.8344e+02,
970 6.8902e+02 - 4.5087e+02, 4.0398e+02 - 2.6550e+02, 2.4232e+02 - 1.5978e+02, 1.4811e+02 - 9.7903e+01, 9.2103e+01 - 6.0993e+01,
971 5.8239e+01 - 3.8605e+01, 3.7286e+01 - 2.4727e+01, 2.4185e+01 - 1.6036e+01, 1.5898e+01 - 1.0532e+01, 1.0540e+01 - 6.9729e+00,
972 7.0510e+00 - 4.6560e+00, 4.7681e+00 - 3.1409e+00, 3.2500e+00 - 2.1346e+00, 2.2239e+00 - 1.4557e+00, 1.5310e+00 - 9.9826e-01
976 TGraphAsymmErrors *
gr =
new TGraphAsymmErrors(20, pts, centrals, 0, 0, min,
979 for (
int i = 0;
i < gr->GetN(); ++
i)
981 (gr->GetY())[
i] /= deta;
982 (gr->GetEYhigh())[
i] /= deta;
983 (gr->GetEYlow())[
i] /= deta;
1028 const double RAA[] =
1044 return new TGraph(13, pT, RAA);
1079 const double RAA[] =
1095 return new TGraph(13, pT, RAA);
1120 const double pt_l[] =
1125 12.2, 14.5, 17.3, 20.7, 24.7, 29.4, 35.1, 41.9
1129 const double pt_h[] =
1134 14.5, 17.3, 20.7, 24.7, 29.4, 35.1, 41.9, 50.0
1137 const double yval[] =
1142 0.0001145, 3.774e-05, 1.263e-05, 4.230e-06, 1.224e-06, 2.962e-07,
1143 5.837e-08, 8.882e-09
1146 const double ystat[] =
1151 1.0, 1.3, 1.7, 2.3, 3.6, 6.1, 8.9, 11
1155 const double ysyst[] =
1160 15.6, 16.3, 15.6, 17.3, 19.3, 21.0, 24.3, 32.3
1171 for (
int i = 0;
i < 8; ++
i)
1173 pT_c[
i] = 0.5 * (pt_l[
i] + pt_h[
i]);
1174 pT_e[
i] = 0.5 * (pt_h[
i] - pt_l[
i]);
1176 y_e[
i] = yval[
i] * sqrt(ystat[
i] * ystat[
i] + ysyst[
i] * ysyst[
i]) / 100;
1179 TGraphErrors *
gr =
new TGraphErrors(8, pT_c, yval, pT_e, y_e);