1 #if !defined(__CINT__) || defined(__MAKECINT__) 8 #include <TPaveStats.h> 10 #include <TLegendEntry.h> 25 TFile *
fil=
new TFile(
"AnalysisResults.root");
26 TDirectoryFile* df=(TDirectoryFile*)fil->Get(
"HFMCCheck");
29 TH1F* hNEvents=(TH1F*)l->FindObject(
"hNEvents");
30 Int_t nAnalEv=hNEvents->GetBinContent(1);
31 printf(
"Number of events= %d\n",nAnalEv);
33 TCanvas* cv=
new TCanvas(
"cv",
"Vertex");
36 TH1F* hSPD3DvX=(TH1F*)l->FindObject(
"hSPD3DvX");
39 TH1F* hSPD3DvY=(TH1F*)l->FindObject(
"hSPD3DvY");
42 TH1F* hSPD3DvZ=(TH1F*)l->FindObject(
"hSPD3DvZ");
45 TH1F* hSPDZvX=(TH1F*)l->FindObject(
"hSPDZvX");
48 TH1F* hSPDZvY=(TH1F*)l->FindObject(
"hSPDZvY");
51 TH1F* hSPDZvZ=(TH1F*)l->FindObject(
"hSPDZvZ");
54 TH1F* hTRKvX=(TH1F*)l->FindObject(
"hTRKvX");
57 TH1F* hTRKvY=(TH1F*)l->FindObject(
"hTRKvY");
60 TH1F* hTRKvZ=(TH1F*)l->FindObject(
"hTRKvZ");
63 TCanvas* c1=
new TCanvas(
"c1",
"Multipl");
67 TH1F* hPhysPrim=(TH1F*)l->FindObject(
"hPhysPrim");
71 TH1F* hTracklets=(TH1F*)l->FindObject(
"hTracklets");
75 TH1F* hTracks=(TH1F*)l->FindObject(
"hTracks");
79 TH1F* hSelTracks=(TH1F*)l->FindObject(
"hSelTracks");
87 TH3F* hEtaPhiPtGenPi=(
TH3F*)l->FindObject(
"hEtaPhiPtGenPi");
88 Int_t minEtaBin=hEtaPhiPtGenPi->GetXaxis()->FindBin(minEta+0.00001);
89 Int_t maxEtaBin=hEtaPhiPtGenPi->GetXaxis()->FindBin(maxEta-0.00001);
90 printf(
"minetabin=%d -- maxetabin=%d\n",minEtaBin,maxEtaBin);
91 Int_t minPtBin=hEtaPhiPtGenPi->GetZaxis()->FindBin(minPt+0.00001);
92 Int_t maxPtBin=hEtaPhiPtGenPi->GetZaxis()->FindBin(maxPt-0.00001);
93 printf(
"minptbin=%d -- maxptbin=%d\n",minPtBin,maxPtBin);
94 TH1D* hEtaGenPi=hEtaPhiPtGenPi->ProjectionX(
"hEtaGenPi",0,-1,minPtBin,maxPtBin);
95 TH1D* hPhiGenPi=hEtaPhiPtGenPi->ProjectionY(
"hPhiGenPi",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
96 TH1D* hPtGenPi=hEtaPhiPtGenPi->ProjectionZ(
"hPtGenPi",minEtaBin,maxEtaBin);
100 hEtaGenPi->GetXaxis()->SetTitle(
"#eta");
101 hPhiGenPi->GetXaxis()->SetTitle(
"#varphi (rad)");
102 hPtGenPi->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
103 TH3F* hEtaPhiPtRecPi=(
TH3F*)l->FindObject(
"hEtaPhiPtRecPi");
104 TH1D* hEtaRecPi=hEtaPhiPtRecPi->ProjectionX(
"hEtaRecPi",0,-1,minPtBin,maxPtBin);
105 TH1D* hPhiRecPi=hEtaPhiPtRecPi->ProjectionY(
"hPhiRecPi",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
106 TH1D* hPtRecPi=hEtaPhiPtRecPi->ProjectionZ(
"hPtRecPi",minEtaBin,maxEtaBin);
110 hEtaRecPi->GetXaxis()->SetTitle(
"#eta");
111 hPhiRecPi->GetXaxis()->SetTitle(
"#varphi (rad)");
112 hPtRecPi->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
113 TH1D* hEtaEffPi=(
TH1D*)hEtaRecPi->Clone(
"hEtaEffPi");
114 hEtaEffPi->Divide(hEtaRecPi,hEtaGenPi,1.,1.,
"B");
115 TH1D* hPhiEffPi=(
TH1D*)hPhiRecPi->Clone(
"hPhiEffPi");
116 hPhiEffPi->Divide(hPhiRecPi,hPhiGenPi,1.,1.,
"B");
117 TH1D* hPtEffPi=(
TH1D*)hPtRecPi->Clone(
"hPtEffPi");
118 hPtEffPi->Divide(hPtRecPi,hPtGenPi,1.,1.,
"B");
120 TH3F* hEtaPhiPtGenK=(
TH3F*)l->FindObject(
"hEtaPhiPtGenK");
121 TH1D* hEtaGenK=hEtaPhiPtGenK->ProjectionX(
"hEtaGenK",0,-1,minPtBin,maxPtBin);
122 TH1D* hPhiGenK=hEtaPhiPtGenK->ProjectionY(
"hPhiGenK",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
123 TH1D* hPtGenK=hEtaPhiPtGenK->ProjectionZ(
"hPtGenK",minEtaBin,maxEtaBin);
127 hEtaGenK->GetXaxis()->SetTitle(
"#eta");
128 hPhiGenK->GetXaxis()->SetTitle(
"#varphi (rad)");
129 hPtGenK->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
130 TH3F* hEtaPhiPtRecK=(
TH3F*)l->FindObject(
"hEtaPhiPtRecK");
131 TH1D* hEtaRecK=hEtaPhiPtRecK->ProjectionX(
"hEtaRecK",0,-1,minPtBin,maxPtBin);
132 TH1D* hPhiRecK=hEtaPhiPtRecK->ProjectionY(
"hPhiRecK",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
133 TH1D* hPtRecK=hEtaPhiPtRecK->ProjectionZ(
"hPtRecK",minEtaBin,maxEtaBin);
137 hEtaRecK->GetXaxis()->SetTitle(
"#eta");
138 hPhiRecK->GetXaxis()->SetTitle(
"#varphi (rad)");
139 hPtRecK->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
140 TH1D* hEtaEffK=(
TH1D*)hEtaRecK->Clone(
"hEtaEffK");
141 hEtaEffK->Divide(hEtaRecK,hEtaGenK,1.,1.,
"B");
142 TH1D* hPhiEffK=(
TH1D*)hPhiRecK->Clone(
"hPhiEffK");
143 hPhiEffK->Divide(hPhiRecK,hPhiGenK,1.,1.,
"B");
144 TH1D* hPtEffK=(
TH1D*)hPtRecK->Clone(
"hPtEffK");
145 hPtEffK->Divide(hPtRecK,hPtGenK,1.,1.,
"B");
147 TH3F* hEtaPhiPtGenPro=(
TH3F*)l->FindObject(
"hEtaPhiPtGenPro");
148 TH1D* hEtaGenPro=hEtaPhiPtGenPro->ProjectionX(
"hEtaGenPro",0,-1,minPtBin,maxPtBin);
149 TH1D* hPhiGenPro=hEtaPhiPtGenPro->ProjectionY(
"hPhiGenPro",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
150 TH1D* hPtGenPro=hEtaPhiPtGenPro->ProjectionZ(
"hPtGenPro",minEtaBin,maxEtaBin);
154 hEtaGenPro->GetXaxis()->SetTitle(
"#eta");
155 hPhiGenPro->GetXaxis()->SetTitle(
"#varphi (rad)");
156 hPtGenPro->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
157 TH3F* hEtaPhiPtRecPro=(
TH3F*)l->FindObject(
"hEtaPhiPtRecPro");
158 TH1D* hEtaRecPro=hEtaPhiPtRecPro->ProjectionX(
"hEtaRecPro",0,-1,minPtBin,maxPtBin);
159 TH1D* hPhiRecPro=hEtaPhiPtRecPro->ProjectionY(
"hPhiRecPro",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
160 TH1D* hPtRecPro=hEtaPhiPtRecPro->ProjectionZ(
"hPtRecPro",minEtaBin,maxEtaBin);
164 hEtaRecPro->GetXaxis()->SetTitle(
"#eta");
165 hPhiRecPro->GetXaxis()->SetTitle(
"#varphi (rad)");
166 hPtRecPro->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
167 TH1D* hEtaEffPro=(
TH1D*)hEtaRecPro->Clone(
"hEtaEffPro");
168 hEtaEffPro->Divide(hEtaRecPro,hEtaGenPro,1.,1.,
"B");
169 TH1D* hPhiEffPro=(
TH1D*)hPhiRecPro->Clone(
"hPhiEffPro");
170 hPhiEffPro->Divide(hPhiRecPro,hPhiGenPro,1.,1.,
"B");
171 TH1D* hPtEffPro=(
TH1D*)hPtRecPro->Clone(
"hPtEffPro");
172 hPtEffPro->Divide(hPtRecPro,hPtGenPro,1.,1.,
"B");
174 TH3F* hEtaPhiPtGenEle=(
TH3F*)l->FindObject(
"hEtaPhiPtGenEle");
175 TH1D* hEtaGenEle=hEtaPhiPtGenEle->ProjectionX(
"hEtaGenEle",0,-1,minPtBin,maxPtBin);
176 TH1D* hPhiGenEle=hEtaPhiPtGenEle->ProjectionY(
"hPhiGenEle",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
177 TH1D* hPtGenEle=hEtaPhiPtGenEle->ProjectionZ(
"hPtGenEle",minEtaBin,maxEtaBin);
181 hEtaGenEle->GetXaxis()->SetTitle(
"#eta");
182 hPhiGenEle->GetXaxis()->SetTitle(
"#varphi (rad)");
183 hPtGenEle->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
184 TH3F* hEtaPhiPtRecEle=(
TH3F*)l->FindObject(
"hEtaPhiPtRecEle");
185 TH1D* hEtaRecEle=hEtaPhiPtRecEle->ProjectionX(
"hEtaRecEle",0,-1,minPtBin,maxPtBin);
186 TH1D* hPhiRecEle=hEtaPhiPtRecEle->ProjectionY(
"hPhiRecEle",minEtaBin,maxEtaBin,minPtBin,maxPtBin);
187 TH1D* hPtRecEle=hEtaPhiPtRecEle->ProjectionZ(
"hPtRecEle",minEtaBin,maxEtaBin);
191 hEtaRecEle->GetXaxis()->SetTitle(
"#eta");
192 hPhiRecEle->GetXaxis()->SetTitle(
"#varphi (rad)");
193 hPtRecEle->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
194 TH1D* hEtaEffEle=(
TH1D*)hEtaRecEle->Clone(
"hEtaEffEle");
195 hEtaEffEle->Divide(hEtaRecEle,hEtaGenEle,1.,1.,
"B");
196 TH1D* hPhiEffEle=(
TH1D*)hPhiRecEle->Clone(
"hPhiEffEle");
197 hPhiEffEle->Divide(hPhiRecEle,hPhiGenEle,1.,1.,
"B");
198 TH1D* hPtEffEle=(
TH1D*)hPtRecEle->Clone(
"hPtEffEle");
199 hPtEffEle->Divide(hPtRecEle,hPtGenEle,1.,1.,
"B");
201 for(
Int_t iBin=1; iBin<=hPtGenPi->GetNbinsX(); iBin++){
202 Double_t w=hPtGenPi->GetBinWidth(iBin);
203 Double_t c=hPtGenPi->GetBinContent(iBin);
204 hPtGenPi->SetBinContent(iBin,c/w);
205 c=hPtGenK->GetBinContent(iBin);
206 hPtGenK->SetBinContent(iBin,c/w);
207 c=hPtGenPro->GetBinContent(iBin);
208 hPtGenPro->SetBinContent(iBin,c/w);
209 c=hPtGenEle->GetBinContent(iBin);
210 hPtGenEle->SetBinContent(iBin,c/w);
214 hEtaEffPi->SetStats(0);
215 hPtEffPi->SetStats(0);
216 hPhiEffPi->SetStats(0);
217 hEtaEffPi->SetMinimum(0.);
218 hPtEffPi->SetMinimum(0.);
219 hPhiEffPi->SetMinimum(0.);
220 hEtaEffPi->SetMaximum(1.05);
221 hPtEffPi->SetMaximum(1.05);
222 hPhiEffPi->SetMaximum(1.05);
224 hPtGenPi->SetMarkerStyle(27);
225 hPtEffPi->SetMarkerStyle(27);
226 hEtaEffPi->SetMarkerStyle(27);
227 hPhiEffPi->SetMarkerStyle(27);
228 hPtGenK->SetMarkerStyle(22);
229 hPtEffK->SetMarkerStyle(22);
230 hEtaEffK->SetMarkerStyle(22);
231 hPhiEffK->SetMarkerStyle(22);
232 hPtGenK->SetMarkerColor(2);
233 hPtEffK->SetMarkerColor(2);
234 hEtaEffK->SetMarkerColor(2);
235 hPhiEffK->SetMarkerColor(2);
236 hPtGenPro->SetMarkerStyle(25);
237 hPtEffPro->SetMarkerStyle(25);
238 hEtaEffPro->SetMarkerStyle(25);
239 hPhiEffPro->SetMarkerStyle(25);
240 hPtGenPro->SetMarkerColor(4);
241 hPtEffPro->SetMarkerColor(4);
242 hEtaEffPro->SetMarkerColor(4);
243 hPhiEffPro->SetMarkerColor(4);
244 hPtGenEle->SetMarkerStyle(20);
245 hPtEffEle->SetMarkerStyle(20);
246 hEtaEffEle->SetMarkerStyle(20);
247 hPhiEffEle->SetMarkerStyle(20);
248 hPtGenEle->SetMarkerColor(kGreen+1);
249 hPtEffEle->SetMarkerColor(kGreen+1);
250 hEtaEffEle->SetMarkerColor(kGreen+1);
251 hPhiEffEle->SetMarkerColor(kGreen+1);
253 TCanvas* ctref=
new TCanvas(
"ctref",
"Track eff",1200,800);
259 TPaveStats* st1=(TPaveStats*)hPtGenPi->GetListOfFunctions()->FindObject(
"stats");
262 st1->SetTextColor(1);
263 hPtGenK->Draw(
"sames");
265 TPaveStats* st2=(TPaveStats*)hPtGenK->GetListOfFunctions()->FindObject(
"stats");
268 st2->SetTextColor(2);
269 hPtGenPro->Draw(
"sames");
271 TPaveStats* st3=(TPaveStats*)hPtGenPro->GetListOfFunctions()->FindObject(
"stats");
274 st3->SetTextColor(4);
275 hPtGenEle->Draw(
"sames");
277 TPaveStats* st4=(TPaveStats*)hPtGenEle->GetListOfFunctions()->FindObject(
"stats");
280 st4->SetTextColor(kGreen+1);
282 TLegend* leg=
new TLegend(0.5,0.5,0.7,0.8);
283 leg->SetFillColor(0);
284 leg->SetBorderSize(0);
285 leg->AddEntry(hPtGenPi,
"Pions",
"P")->SetTextColor(hPtGenPi->GetMarkerColor());
286 leg->AddEntry(hPtGenK,
"Kaons",
"P")->SetTextColor(hPtGenK->GetMarkerColor());
287 leg->AddEntry(hPtGenPro,
"Protons",
"P")->SetTextColor(hPtGenPro->GetMarkerColor());
288 leg->AddEntry(hPtGenEle,
"Electrons",
"P")->SetTextColor(hPtGenEle->GetMarkerColor());
294 hPtEffPi->GetYaxis()->SetTitle(
"Efficiency");
295 hPtEffK->Draw(
"same");
296 hPtEffEle->Draw(
"same");
297 hPtEffPro->Draw(
"same");
298 TLatex* t1=
new TLatex(0.62,0.18,Form(
"%.2f < #eta < %.2f",minEta,maxEta));
303 hPhiEffPi->GetYaxis()->SetTitle(
"Efficiency");
304 hPhiEffK->Draw(
"same");
305 hPhiEffEle->Draw(
"same");
306 hPhiEffPro->Draw(
"same");
307 TLatex* t2=
new TLatex(0.18,0.18,Form(
"%.1f < p_{T} < %.1f GeV/c",minPt,maxPt));
313 hEtaEffPi->GetYaxis()->SetTitle(
"Efficiency");
314 hEtaEffK->Draw(
"same");
315 hEtaEffEle->Draw(
"same");
316 hEtaEffPro->Draw(
"same");
319 TH1F* hncharmed=(TH1F*)l->FindObject(
"hncharmed");
320 TCanvas* cn=
new TCanvas(
"cn",
"ncharm");
321 hncharmed->Draw(
"box");
322 hncharmed->GetXaxis()->SetTitle(
"dNch/dy");
323 hncharmed->GetYaxis()->SetTitle(
"N Charm hadrons in golden channels");
326 TH2F* hnbvsnc=(
TH2F*)l->FindObject(
"hnbvsnc");
327 TCanvas* cnhf=
new TCanvas(
"cnhf",
"nb/c");
328 hnbvsnc->Draw(
"colz");
329 hnbvsnc->GetXaxis()->SetTitle(
"Nc");
330 hnbvsnc->GetYaxis()->SetTitle(
"Nb");
332 TH2F* hyptD0all=(
TH2F*)l->FindObject(
"hyptD0AllDecay");
333 TH2F* hyptD0promptall=(
TH2F*)l->FindObject(
"hyptD0promptAllDecay");
334 TH2F* hyptD0feeddownall=(
TH2F*)l->FindObject(
"hyptD0feeddownAllDecay");
335 TH2F* hyptD0prompt=(
TH2F*)l->FindObject(
"hyptD0prompt");
336 TH2F* hyptD0feeddown=(
TH2F*)l->FindObject(
"hyptD0feeddown");
337 TH2F* hyptD02=(
TH2F*)l->FindObject(
"hyptD02");
338 TH2F* hyptD04=(
TH2F*)l->FindObject(
"hyptD04");
339 TH1D* hptD0all=hyptD0all->ProjectionX();
340 TH1D* hptD0promptall=hyptD0promptall->ProjectionX();
341 TH1D* hptD0feeddownall=hyptD0feeddownall->ProjectionX();
342 TH2F* hyptDplusall=(
TH2F*)l->FindObject(
"hyptDplusAllDecay");
343 TH2F* hyptDpluspromptall=(
TH2F*)l->FindObject(
"hyptDpluspromptAllDecay");
344 TH2F* hyptDplusfeeddownall=(
TH2F*)l->FindObject(
"hyptDplusfeeddownAllDecay");
345 TH2F* hyptDplusprompt=(
TH2F*)l->FindObject(
"hyptDplusprompt");
346 TH2F* hyptDplusfeeddown=(
TH2F*)l->FindObject(
"hyptDplusfeeddown");
347 TH2F* hyptDplusnonreson=(
TH2F*)l->FindObject(
"hyptDplusnonreson");
348 TH2F* hyptDplusreson=(
TH2F*)l->FindObject(
"hyptDplusreson");
349 TH2F* hyptDsall=(
TH2F*)l->FindObject(
"hyptDsAllDecay");
350 TH2F* hyptDsprompt=(
TH2F*)l->FindObject(
"hyptDsprompt");
351 TH2F* hyptDsfeeddown=(
TH2F*)l->FindObject(
"hyptDsfeedown");
352 TH2F* hyptDsphi=(
TH2F*)l->FindObject(
"hyptDsphi");
353 TH2F* hyptDsK0st=(
TH2F*)l->FindObject(
"hyptDsk0st");
354 TH2F* hyptDstarall=(
TH2F*)l->FindObject(
"hyptDstarAllDecay");
355 TH2F* hyptDstarprompt=(
TH2F*)l->FindObject(
"hyptDstarprompt");
356 TH2F* hyptDstarfeedown=(
TH2F*)l->FindObject(
"hyptDstarfeedown");
357 TH2F* hyptLcprompt=(
TH2F*)l->FindObject(
"hyptLcprompt");
358 TH2F* hyptLcfeedown=(
TH2F*)l->FindObject(
"hyptLcfeedown");
359 TH2F* hyptLcall=(
TH2F*)l->FindObject(
"hyptLcAllDecay");
361 TH2F* hyptB0all=(
TH2F*)l->FindObject(
"hyptB0AllDecay");
362 TH2F* hyptBplusall=(
TH2F*)l->FindObject(
"hyptBplusAllDecay");
363 TH2F* hyptBsall=(
TH2F*)l->FindObject(
"hyptBsAllDecay");
364 TH2F* hyptBstarall=(
TH2F*)l->FindObject(
"hyptBstarAllDecay");
365 TH2F* hyptLball=(
TH2F*)l->FindObject(
"hyptLbAllDecay");
370 hD0fonll7->Scale(hptD0all->GetMaximum()/hD0fonll7->GetMaximum());
371 hD0fonll7->SetLineColor(kGreen+1);
372 hD0fonll7->SetLineWidth(2);
375 hD0fonll2->Scale(hptD0all->GetMaximum()/hD0fonll2->GetMaximum());
376 hD0fonll2->SetLineColor(kBlue+1);
377 hD0fonll2->SetLineWidth(2);
380 hptD0pythia->Scale(hptD0all->GetMaximum()/hptD0pythia->GetMaximum());
381 hptD0pythia->SetLineColor(kRed+1);
382 hptD0pythia->SetLineWidth(2);
384 hptD0all->SetLineWidth(2);
385 hptD0all->SetMarkerStyle(20);
386 hptD0all->SetTitle(
"");
387 hptD0all->GetYaxis()->SetTitle(
"D^{0} dN/dp_{T} (a.u.)");
388 hptD0all->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
389 hptD0all->SetStats(0);
390 hptD0all->GetYaxis()->SetTitleOffset(1.2);
391 hptD0all->GetXaxis()->SetTitleOffset(1.2);
393 TCanvas* cd0a=
new TCanvas(
"cd0a",
"D0 spectra",700,700);
395 cd0a->SetLeftMargin(0.13);
396 cd0a->SetRightMargin(0.07);
398 hD0fonll7->Draw(
"lsame");
399 hD0fonll2->Draw(
"lsame");
400 hptD0pythia->Draw(
"lsame");
401 TLegend* legp=
new TLegend(0.45,0.6,0.89,0.85);
402 legp->SetFillStyle(0);
403 legp->SetBorderSize(0);
404 legp->AddEntry(hptD0all,
"MC production",
"LP");
405 legp->AddEntry(hD0fonll7,
"FONLL, #sqrt{s}=7 TeV",
"L");
406 legp->AddEntry(hD0fonll2,
"FONLL, #sqrt{s}=2.76 TeV",
"L");
407 legp->AddEntry(hptD0pythia,
"PYTHIA Perugia0, #sqrt{s}=7 TeV",
"L");
411 TH1F* hOriginPrompt=(TH1F*)l->FindObject(
"hOriginPrompt");
412 TH1F* hOriginFeeddown=(TH1F*)l->FindObject(
"hOriginFeeddown");
414 hptD0promptall->SetLineColor(4);
415 hptD0promptall->SetMarkerColor(4);
416 hptD0promptall->SetMarkerStyle(26);
417 hptD0feeddownall->SetLineColor(2);
418 hptD0feeddownall->SetMarkerColor(2);
419 hptD0feeddownall->SetMarkerStyle(23)
421 TCanvas* cprf1=
new TCanvas(
"cprf1",
"Prompt/Feeddown",700,700);
423 gPad->SetLeftMargin(0.13);
424 gPad->SetRightMargin(0.07);
426 hptD0promptall->Draw(
"same");
427 hptD0feeddownall->Draw(
"same");
428 TLegend* leg2=
new TLegend(0.4,0.5,0.89,0.85);
429 leg2->SetFillStyle(0);
430 leg2->SetBorderSize(0);
431 leg2->AddEntry(hptD0all,
"All D0",
"LP");
432 leg2->AddEntry(
"",Form(
"Entries=%.0f <pt>=%.2f GeV/c",hptD0all->Integral(),hptD0all->GetMean()),
"");
433 leg2->AddEntry(hptD0promptall,
"Prompt D0",
"LP");
434 leg2->AddEntry(
"",Form(
"Entries=%.0f <pt>=%.2f GeV/c",hptD0promptall->Integral(),hptD0promptall->GetMean()),
"");
435 leg2->AddEntry(hptD0feeddownall,
"Feeddown D0",
"LP");
436 leg2->AddEntry(
"",Form(
"Entries=%.0f <pt>=%.2f GeV/c",hptD0feeddownall->Integral(),hptD0feeddownall->GetMean()),
"");
438 hOriginPrompt->GetXaxis()->SetTitle(
"Distance of prompt D meson origin to vertex (cm)");
439 hOriginFeeddown->GetXaxis()->SetTitle(
"Distance of feed-down D meson origin to vertex (cm)");
441 TCanvas* cprf2=
new TCanvas(
"cprf2",
"Origin",1000,600);
444 hOriginPrompt->Draw();
446 hOriginFeeddown->Draw();
449 Double_t nev=hNEvents->GetBinContent(1);
450 Double_t nD0=hyptD0all->GetEntries();
451 Double_t nDp=hyptDplusall->GetEntries();
452 Double_t nDs=hyptDsall->GetEntries();
453 Double_t nDst=hyptDstarall->GetEntries();
454 Double_t nLc=hyptLcall->GetEntries();
455 Double_t nB0=hyptB0all->GetEntries();
456 Double_t nBp=hyptBplusall->GetEntries();
457 Double_t nBs=hyptBsall->GetEntries();
458 Double_t nBst=hyptBstarall->GetEntries();
459 Double_t nLb=hyptLball->GetEntries();
464 for(
Int_t iBinx=1; iBinx<=hnbvsnc->GetNbinsX(); iBinx++){
465 for(
Int_t iBiny=1; iBiny<=hnbvsnc->GetNbinsY(); iBiny++){
466 Double_t bincentx=hnbvsnc->GetXaxis()->GetBinCenter(iBinx);
467 Double_t bincenty=hnbvsnc->GetYaxis()->GetBinCenter(iBiny);
468 Double_t bincont=hnbvsnc->GetBinContent(iBinx,iBiny);
469 nccbar+=(bincentx*bincont);
470 nbbbar+=(bincenty*bincont);
475 printf(
"Events =%f\n",nev);
476 printf(
"c+cbar =%f\n",nccbar);
477 printf(
"D0 =%f\n",nD0);
478 printf(
"D+ =%f\n",nDp);
479 printf(
"D*+ =%f\n",nDst);
480 printf(
"Ds =%f\n",nDs);
481 printf(
"Lc =%f\n",nLc);
482 printf(
"----------\n");
483 printf(
"b+bbar =%f\n",nbbbar);
484 printf(
"B0 =%f\n",nB0);
485 printf(
"B+ =%f\n",nBp);
486 printf(
"B*0 =%f\n",nBst);
487 printf(
"Bs =%f\n",nBs);
488 printf(
"Lb =%f\n",nLb);
490 if(nccbar==0) nccbar=nD0+nDp+nDs+nLc;
491 if(nbbbar==0) nbbbar=nB0+nBp+nBs+nLb;
494 TH1F* hCharmHad=
new TH1F(
"hCharmHad",
"",5,-0.5,4.5);
495 hCharmHad->GetXaxis()->SetBinLabel(1,
"D0");
496 hCharmHad->SetBinContent(1,nD0/nccbar);
497 hCharmHad->GetXaxis()->SetBinLabel(2,
"D+");
498 hCharmHad->SetBinContent(2,nDp/nccbar);
499 hCharmHad->GetXaxis()->SetBinLabel(3,
"Ds");
500 hCharmHad->SetBinContent(3,nDs/nccbar);
501 hCharmHad->GetXaxis()->SetBinLabel(4,
"Lc");
502 hCharmHad->SetBinContent(4,nLc/nccbar);
503 hCharmHad->GetXaxis()->SetBinLabel(5,
"D*+");
504 hCharmHad->SetBinContent(5,nDst/nccbar);
505 hCharmHad->SetMinimum(0);
506 hCharmHad->SetStats(0);
507 hCharmHad->GetYaxis()->SetTitle(
"N(species)/N(c+#bar{c})");
508 hCharmHad->GetYaxis()->SetTitleOffset(1.3);
510 TH1F* hBeautyHad=
new TH1F(
"hBeautyHad",
"",5,-0.5,4.5);
511 hBeautyHad->GetXaxis()->SetBinLabel(1,
"B0");
512 hBeautyHad->SetBinContent(1,nB0/nbbbar);
513 hBeautyHad->GetXaxis()->SetBinLabel(2,
"B+");
514 hBeautyHad->SetBinContent(2,nBp/nbbbar);
515 hBeautyHad->GetXaxis()->SetBinLabel(3,
"Bs");
516 hBeautyHad->SetBinContent(3,nBs/nbbbar);
517 hBeautyHad->GetXaxis()->SetBinLabel(4,
"Lb");
518 hBeautyHad->SetBinContent(4,nLb/nbbbar);
519 hBeautyHad->GetXaxis()->SetBinLabel(5,
"B*0");
520 hBeautyHad->SetBinContent(5,nBst/nbbbar);
521 hBeautyHad->SetMinimum(0);
522 hBeautyHad->SetStats(0);
523 hBeautyHad->GetYaxis()->SetTitle(
"N(species)/N(b+#bar{b})");
524 hBeautyHad->GetYaxis()->SetTitleOffset(1.3);
528 TCanvas* chad=
new TCanvas(
"chad",
"Hadrons",1200,600);
536 TH1F* hDSpecies=(TH1F*)l->FindObject(
"hDSpecies");
537 TH1F* hBSpecies=(TH1F*)l->FindObject(
"hBSpecies");
538 hDSpecies->SetStats(0);
539 hBSpecies->SetStats(0);
540 TCanvas* chad2=
new TCanvas(
"chad2",
"Hadrons2",800,900);
544 hDSpecies->GetYaxis()->SetTitle(
"Entries");
547 hBSpecies->GetYaxis()->SetTitle(
"Entries");
549 TCanvas* cd0=
new TCanvas(
"cd0",
"D0");
552 hyptD0prompt->Draw(
"colz");
554 hyptD0feeddown->Draw(
"colz");
556 hyptD02->Draw(
"colz");
558 hyptD04->Draw(
"colz");
561 TCanvas* cdplus=
new TCanvas(
"cdplus",
"Dplus");
564 hyptDplusprompt->Draw(
"colz");
566 hyptDplusfeeddown->Draw(
"colz");
568 hyptDplusnonreson->Draw(
"colz");
570 hyptDplusreson->Draw(
"colz");
573 TCanvas* cds=
new TCanvas(
"cds",
"Ds");
576 hyptDsprompt->Draw(
"colz");
578 hyptDsfeeddown->Draw(
"colz");
580 hyptDsphi->Draw(
"colz");
582 hyptDsK0st->Draw(
"colz");
585 TCanvas* cdstlc=
new TCanvas(
"cdstls",
"Dstar LambdaC");
588 hyptDstarprompt->Draw(
"colz");
590 hyptDstarfeedown->Draw(
"colz");
592 hyptLcprompt->Draw(
"colz");
594 hyptLcfeedown->Draw(
"colz");
602 TH1F* hFONLL7=
new TH1F(
"hFONLLD07TeV",
"",61,0.,30.5);
604 1390542.31,3512269.33,4572233.65,4116353.65,3104057.40,
605 2185147.21,1507632.40,1038687.03,721889.43,509311.55,
606 365094.01,265684.43,196609.08,147415.64,112019.94,
607 86170.85,66997.46,52651.54,41787.55,33458.64,
608 27012.62,21981.48,18020.69,14873.73,12354.91,
609 10324.90,8677.32,7331.56,6225.67,5311.74,
610 4552.30,3918.10,3385.73,2936.79,2556.52,
611 2233.25,1957.23,1720.64,1517.12,1341.44,
612 1189.32,1057.17,942.05,841.47,753.33,
613 675.89,607.68,547.45,494.14,446.87,
614 404.83,367.39,333.96,304.08,277.30,
615 253.25,231.62,212.13,194.55,178.66,
617 for(
Int_t i=0; i<61; i++) hFONLL7->SetBinContent(i+1,val[i]);
622 TH1F* hFONLL2=
new TH1F(
"hFONLLD02_76TeV",
"",61,0.,30.5);
624 1154043.73,2596175.89,2995937.57,2442988.08,1701598.07,
625 1122452.81,732896.42,482314.10,322062.75,218493.05,
626 151653.77,107053.80,76999.08,56239.64,41687.89,
627 31322.25,23818.86,18326.64,14252.10,11192.03,
628 8869.29,7089.11,5711.50,4635.50,3788.31,
629 3116.19,2578.84,2146.51,1796.18,1510.67,
630 1276.72,1083.93,924.20,791.18,679.88,
631 586.36,507.49,440.73,383.99,335.54,
632 294.07,258.43,227.68,201.11,178.07,
633 158.04,140.58,125.32,111.95,100.20,
634 89.86,80.73,72.66,65.51,59.16,
635 53.51,48.48,43.98,39.96,36.36,
637 for(
Int_t i=0; i<61; i++) hFONLL2->SetBinContent(i+1,val[i]);
642 TH1F* hPYTHIA7=
new TH1F(
"hPYTHIAD07TeV",
"",40,0.,20.);
644 826307.00,1753264.00,1877464.00,1634664.00,1278586.00,
645 959137.00,713389.00,535745.00,410250.00,316284.00,
646 249107.00,198235.00,158832.00,129936.00,106957.00,
647 89098.00,73690.00,62752.00,53247.00,45004.00,
648 38475.00,32691.00,28510.00,24516.00,21204.00,
649 18276.00,15890.00,13702.00,12326.00,10612.00,
650 9184.00,8028.00,7194.00,6384.00,5767.00,
651 5102.00,4505.00,3939.00,3578.00,3288.00
653 for(
Int_t i=0; i<40; i++) hPYTHIA7->SetBinContent(i+1,val[i]);
TH1F * HistoFONLL2_76TeV()