1 #if !defined(__CINT__) || defined(__MAKECINT__) 8 #include "TFileMerger.h" 14 #include "TPaveStats.h" 18 #include "TGridResult.h" 19 #include "TObjString.h" 25 const Int_t totTrending=5;
26 Float_t vecForTrend[totTrending];
27 TString varForTrending[totTrending]={
"nDzeroCandperEv",
"nDplusCandperEv",
"nDsCandperEv",
"nLcCandperEv",
"nDstarCandperEv"};
31 TTree* trtree=
new TTree(
"trendingHF",
"tree of trending variables");
32 trtree->Branch(
"nrun",&runNumber,
"nrun/I");
33 for(
Int_t j=0; j<totTrending; j++){
34 trtree->Branch(varForTrending[j].
Data(),&vecForTrend[j],Form(
"%s/F",varForTrending[j].
Data()));
38 TFile *ff =
new TFile(
filename.Data());
40 Int_t color[5] = {kBlack, kRed, kGreen, kBlue, kOrange};
42 TDirectoryFile *dirD2H = (TDirectoryFile *)ff->Get(
"PWG3_D2H_QA");
44 printf(
"Directory PWG3_D2H_QA not found in file %s\n",
filename.Data());
47 TList *listD2H = (
TList *)dirD2H->Get(
"nEntriesQA");
48 if(!listD2H) listD2H = (
TList *)dirD2H->Get(
"nEntriesQAD0");
50 printf(
"TList nEntriesQA and nEntriesQAD0 not found in file %s\n",
filename.Data());
53 TH1F *hNentries = (TH1F *)listD2H->FindObject(
"hNentries");
54 TH2F *hHasSelBit = (
TH2F *)listD2H->FindObject(
"HasSelBit");
56 TCanvas *cqa =
new TCanvas(
"cqa",
"cqa", 800, 500);
61 hHasSelBit->Draw(
"colz");
62 cqa->SaveAs(
"plot_D2HQA.png");
64 Double_t nEv=hNentries->GetBinContent(10);
65 vecForTrend[0]=hHasSelBit->GetBinContent(1)/nEv;
66 vecForTrend[1]=hHasSelBit->GetBinContent(2)/nEv;
67 vecForTrend[2]=hHasSelBit->GetBinContent(3)/nEv;
68 vecForTrend[3]=hHasSelBit->GetBinContent(4)/nEv;
69 vecForTrend[4]=hHasSelBit->GetBinContent(5)/nEv;
72 TDirectoryFile *
dir = (TDirectoryFile *)ff->Get(
"PWGHF_D2H_MCPerform");
76 list = (
TList *)dir->Get(
"coutputDperfQA");
79 TH1F *hn = (TH1F *)list->FindObject(
"fHistNEvents");
80 TH1F *hnGenD = (TH1F *)list->FindObject(
"fHistNGenD");
81 Int_t entries = hn->GetBinContent(3);
83 TH2F *fHistNCand = (
TH2F *)list->FindObject(
"fHistNCand");
84 TH1F *fHistNCandDzero = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDzero", 1, 1);
85 TH1F *fHistNCandDplus = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDplus", 2, 2);
86 TH1F *fHistNCandDstar = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDstar", 3, 3);
87 TH1F *fHistNCandDs = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDs", 4, 4);
88 TH1F *fHistNCandLc = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandLc", 5, 5);
90 TString names[5] = {
"Dzero",
"Dplus",
"Dstar",
"Ds",
"Lc2pkpi"};
91 TString type[2] = {
"Prompt",
"Feeddown"};
92 const Int_t nDecays = 5;
93 TH2F *fHistXvtxResVsPt[2 * nDecays];
94 TH2F *fHistYvtxResVsPt[2 * nDecays];
95 TH2F *fHistZvtxResVsPt[2 * nDecays];
96 TH2F *fHistInvMassVsPt[2 * nDecays];
97 TH2F *fHistDecLenVsPt[2 * nDecays];
98 TH2F *fHistNormDLxyVsPt[2 * nDecays];
99 TH2F *fHistCosPointVsPt[2 * nDecays];
101 TH3F *fHistPtYMultGenDauInAcc[2 * nDecays];
102 TH3F *fHistPtYMultRecoFilt[2 * nDecays];
104 TProfile *fHistXvtxRes[2 * nDecays];
105 TProfile *fHistYvtxRes[2 * nDecays];
106 TProfile *fHistZvtxRes[2 * nDecays];
107 TProfile *fHistXvtxMean[2 * nDecays];
108 TProfile *fHistYvtxMean[2 * nDecays];
109 TProfile *fHistZvtxMean[2 * nDecays];
111 TH1F *fHistXvtxRes2[2 * nDecays];
112 TH1F *fHistYvtxRes2[2 * nDecays];
113 TH1F *fHistZvtxRes2[2 * nDecays];
115 TProfile *fHistInvMass[2 * nDecays];
116 TProfile *fHistDecLen[2 * nDecays];
117 TProfile *fHistCosp[2 * nDecays];
119 TH1F *fHistInvMassRes[2 * nDecays];
121 TH1F *hEffPt[2 * nDecays];
124 for (
Int_t j = 0; j < 5; j++)
126 for (
Int_t i = 0; i < 2; i++)
128 Int_t index = j * 2 + i;
129 fHistXvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hXvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
130 fHistYvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hYvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
131 fHistZvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hZvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
132 fHistInvMassVsPt[index] = (
TH2F *)list->FindObject(Form(
"hInvMassVsPt%s%s", type[i].
Data(), names[j].
Data()));
133 fHistDecLenVsPt[index] = (
TH2F *)list->FindObject(Form(
"hDecLenVsPt%s%s", type[i].
Data(), names[j].
Data()));
134 fHistCosPointVsPt[index] = (
TH2F *)list->FindObject(Form(
"hCosPointVsPt%s%s", type[i].
Data(), names[j].
Data()));
135 fHistPtYMultGenDauInAcc[index] = (
TH3F *)list->FindObject(Form(
"hPtYMult%sGenDauInAcc%s", type[i].
Data(), names[j].
Data()));
136 fHistPtYMultRecoFilt[index] = (
TH3F *)list->FindObject(Form(
"hPtYMult%sRecoFilt%s", type[i].
Data(), names[j].
Data()));
138 fHistXvtxMean[index] = (TProfile *)fHistXvtxResVsPt[index]->ProfileX(Form(
"hXvtxMean%s%s", type[i].
Data(), names[j].
Data()));
139 fHistXvtxMean[index]->SetLineColor(color[j]);
140 fHistXvtxMean[index]->SetLineWidth(2);
141 fHistXvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
142 fHistXvtxMean[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) mean (#mum)");
143 fHistXvtxMean[index]->SetTitle(
"Xvtx residual vs pT");
145 fHistYvtxMean[index] = (TProfile *)fHistYvtxResVsPt[index]->ProfileX(Form(
"hYvtxMean%s%s", type[i].
Data(), names[j].
Data()));
146 fHistYvtxMean[index]->SetLineColor(color[j]);
147 fHistYvtxMean[index]->SetLineWidth(2);
148 fHistYvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
149 fHistYvtxMean[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) mean (#mum)");
150 fHistYvtxMean[index]->SetTitle(
"Yvtx residual vs pT");
152 fHistZvtxMean[index] = (TProfile *)fHistZvtxResVsPt[index]->ProfileX(Form(
"hZvtxMean%s%s", type[i].
Data(), names[j].
Data()));
153 fHistZvtxMean[index]->SetLineColor(color[j]);
154 fHistZvtxMean[index]->SetLineWidth(2);
155 fHistZvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
156 fHistZvtxMean[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) mean (#mum)");
157 fHistZvtxMean[index]->SetTitle(
"Zvtx residual vs pT");
159 fHistXvtxRes[index] = (TProfile *)fHistXvtxResVsPt[index]->ProfileX(Form(
"hXvtxRes%s%s", type[i].
Data(), names[j].
Data()), 1, -1,
"s");
160 fHistYvtxRes[index] = (TProfile *)fHistYvtxResVsPt[index]->ProfileX(Form(
"hYvtxRes%s%s", type[i].
Data(), names[j].Data()), 1, -1,
"s");
161 fHistZvtxRes[index] = (TProfile *)fHistZvtxResVsPt[index]->ProfileX(Form(
"hZvtxRes%s%s", type[i].
Data(), names[j].Data()), 1, -1,
"s");
162 fHistXvtxRes2[index] = (TH1F *)fHistXvtxResVsPt[index]->ProjectionX(Form(
"hXvtxRes2%s%s", type[i].
Data(), names[j].Data()));
163 fHistYvtxRes2[index] = (TH1F *)fHistYvtxResVsPt[index]->ProjectionX(Form(
"hYvtxRes2%s%s", type[i].
Data(), names[j].Data()));
164 fHistZvtxRes2[index] = (TH1F *)fHistZvtxResVsPt[index]->ProjectionX(Form(
"hZvtxRes2%s%s", type[i].
Data(), names[j].Data()));
165 fHistXvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
166 fHistXvtxRes[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) RMS (#mum)");
167 fHistXvtxRes[index]->SetTitle(
"Xvtx resolution vs pT");
168 fHistYvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
169 fHistYvtxRes[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) RMS (#mum)");
170 fHistYvtxRes[index]->SetTitle(
"Yvtx resolution vs pT");
171 fHistZvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
172 fHistZvtxRes[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) RMS (#mum)");
173 fHistZvtxRes[index]->SetTitle(
"Zvtx resolution vs pT");
175 fHistXvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
176 fHistXvtxRes2[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) RMS (#mum)");
177 fHistXvtxRes2[index]->SetTitle(
"Xvtx resolution vs pT");
178 fHistYvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
179 fHistYvtxRes2[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) RMS (#mum)");
180 fHistYvtxRes2[index]->SetTitle(
"Yvtx resolution vs pT");
181 fHistZvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
182 fHistZvtxRes2[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) RMS (#mum)");
183 fHistZvtxRes2[index]->SetTitle(
"Zvtx resolution vs pT");
185 fHistXvtxRes2[index]->SetLineColor(color[j]);
186 fHistYvtxRes2[index]->SetLineColor(color[j]);
187 fHistZvtxRes2[index]->SetLineColor(color[j]);
188 fHistXvtxRes2[index]->SetMarkerColor(color[j]);
189 fHistXvtxRes2[index]->SetMarkerStyle(20);
190 fHistYvtxRes2[index]->SetMarkerColor(color[j]);
191 fHistYvtxRes2[index]->SetMarkerStyle(20);
192 fHistZvtxRes2[index]->SetMarkerColor(color[j]);
193 fHistZvtxRes2[index]->SetMarkerStyle(20);
194 fHistXvtxRes2[index]->SetLineWidth(2);
195 fHistYvtxRes2[index]->SetLineWidth(2);
196 fHistZvtxRes2[index]->SetLineWidth(2);
197 fHistXvtxRes2[index]->Sumw2();
198 fHistYvtxRes2[index]->Sumw2();
199 fHistZvtxRes2[index]->Sumw2();
201 fHistInvMass[index] = (TProfile *)fHistInvMassVsPt[index]->ProfileX(Form(
"hInvMassVsPt%s%s", type[i].
Data(), names[j].
Data()));
202 fHistInvMass[index]->SetLineColor(color[j]);
203 fHistInvMass[index]->SetLineWidth(2);
204 fHistInvMass[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
205 fHistInvMass[index]->GetYaxis()->SetTitle(
"Inv Mass (GeV/c2)");
206 fHistInvMass[index]->SetTitle(
"Inv Mass vs pT");
208 fHistDecLen[index] = (TProfile *)fHistDecLenVsPt[index]->ProfileX(Form(
"hDecLenVsPt%s%s", type[i].
Data(), names[j].
Data()));
209 fHistDecLen[index]->SetLineColor(color[j]);
210 fHistDecLen[index]->SetLineWidth(2);
211 fHistDecLen[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
212 fHistDecLen[index]->GetYaxis()->SetTitle(
"Dec Len (#mum)");
213 fHistDecLen[index]->SetTitle(
"Prompt Dec Len vs pT");
215 fHistCosp[index] = (TProfile *)fHistCosPointVsPt[index]->ProfileX(Form(
"hCosPVsPt%s%s", type[i].
Data(), names[j].
Data()));
216 fHistCosp[index]->SetLineColor(color[j]);
217 fHistCosp[index]->SetLineWidth(2);
218 fHistCosp[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
219 fHistCosp[index]->GetYaxis()->SetTitle(
"Cos Point");
220 fHistCosp[index]->SetTitle(
"Prompt CosPoint vs pT");
223 fHistDecLen[index]->SetTitle(
"FeedDown Dec Len vs pT");
225 htemp = (TH1F *)fHistPtYMultGenDauInAcc[index]->ProjectionX(Form(
"hPtDen%s%s", type[i].
Data(), names[j].
Data()));
226 hEffPt[index] = (TH1F *)fHistPtYMultRecoFilt[index]->ProjectionX(Form(
"hPtNum%s%s", type[i].
Data(), names[j].Data()));
227 fHistPtYMultGenDauInAcc[index]->Sumw2();
228 fHistPtYMultRecoFilt[index]->Sumw2();
229 hEffPt[index]->Sumw2();
230 hEffPt[index]->Divide(htemp);
231 hEffPt[index]->SetLineColor(color[j]);
232 hEffPt[index]->SetLineWidth(2);
233 hEffPt[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
234 hEffPt[index]->GetYaxis()->SetTitle(
"Prompt Efficiency");
235 hEffPt[index]->SetTitle(
"Prompt Efficiency");
236 hEffPt[index]->SetStats(0);
237 fHistCosp[index]->SetStats(0);
238 fHistDecLen[index]->SetStats(0);
242 hEffPt[index]->GetYaxis()->SetTitle(
"Feeddown Efficiency");
243 hEffPt[index]->SetTitle(
"Feeddown Efficiency");
246 fHistInvMassRes[index] =
new TH1F(*hEffPt[index]);
247 for (
Int_t jj = 1; jj < hEffPt[index]->GetNbinsX() + 1; jj++)
249 TH1F *hTemp = (TH1F *)fHistInvMassVsPt[index]->ProjectionY(
"htemp", jj, jj);
250 fHistInvMassRes[index]->SetBinContent(jj, hTemp->GetRMS());
251 fHistInvMassRes[index]->SetBinError(jj, hTemp->GetRMSError());
252 fHistInvMassRes[index]->SetLineColor(color[j]);
253 fHistInvMassRes[index]->SetLineWidth(2);
254 fHistInvMassRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
255 fHistInvMassRes[index]->GetYaxis()->SetTitle(
"Inv Mass RMS (GeV/c2)");
256 fHistInvMassRes[index]->SetTitle(
"Inv Mass RMS vs pT");
258 printf(
"D0: pt=%f, res=%f \n", fHistInvMassRes[index]->GetBinCenter(jj), fHistInvMassRes[index]->GetBinContent(jj));
259 TH1F *hTempX = (TH1F *)fHistXvtxResVsPt[index]->ProjectionY(
"htempX", jj, jj);
260 TH1F *hTempY = (TH1F *)fHistYvtxResVsPt[index]->ProjectionY(
"htempY", jj, jj);
261 TH1F *hTempZ = (TH1F *)fHistZvtxResVsPt[index]->ProjectionY(
"htempZ", jj, jj);
263 fHistXvtxRes2[index]->SetBinContent(jj, hTempX->GetRMS());
264 fHistXvtxRes2[index]->SetBinError(jj, hTempX->GetRMSError());
266 fHistYvtxRes2[index]->SetBinContent(jj, hTempY->GetRMS());
267 fHistYvtxRes2[index]->SetBinError(jj, hTempY->GetRMSError());
269 fHistZvtxRes2[index]->SetBinContent(jj, hTempZ->GetRMS());
270 fHistZvtxRes2[index]->SetBinError(jj, hTempZ->GetRMSError());
275 fHistNCandDplus->SetLineColor(2);
276 fHistNCandDstar->SetLineColor(3);
277 fHistNCandDs->SetLineColor(4);
278 fHistNCandLc->SetLineColor(kOrange);
279 fHistNCandDplus->SetLineWidth(2);
280 fHistNCandDstar->SetLineWidth(2);
281 fHistNCandDs->SetLineWidth(2);
282 fHistNCandLc->SetLineWidth(2);
284 fHistNCandDzero->GetXaxis()->SetTitle(
"pT (GeV/c)");
285 fHistNCandDzero->GetYaxis()->SetTitle(
"counts");
286 TLegend *leg =
new TLegend(0.6, 0.7, 0.8, 0.9);
287 leg->AddEntry(fHistNCandDzero,
"Dzero",
"l");
288 leg->AddEntry(fHistNCandDplus,
"Dplus",
"l");
289 leg->AddEntry(fHistNCandDstar,
"Dstar",
"l");
290 leg->AddEntry(fHistNCandDs,
"Ds",
"l");
291 leg->AddEntry(fHistNCandLc,
"Lc",
"l");
293 TLegend *leg1 =
new TLegend(0.5, 0.7, 0.7, 0.9);
294 leg1->AddEntry(fHistYvtxRes2[0],
"Dzero",
"pl");
295 leg1->AddEntry(fHistYvtxRes2[2],
"Dplus",
"pl");
296 if (drawOnlyDzerDplus == 0)
297 leg1->AddEntry(fHistYvtxRes2[6],
"Ds",
"pl");
298 if (drawOnlyDzerDplus == 0)
299 leg1->AddEntry(fHistYvtxRes2[8],
"Lc",
"pl");
301 TLegend *leg2 =
new TLegend(0.5, 0.7, 0.7, 0.9);
302 leg2->AddEntry(fHistYvtxMean[0],
"Dzero",
"l");
303 leg2->AddEntry(fHistYvtxMean[2],
"Dplus",
"l");
304 if (drawOnlyDzerDplus == 0)
305 leg2->AddEntry(fHistYvtxMean[6],
"Ds",
"l");
306 if (drawOnlyDzerDplus == 0)
307 leg2->AddEntry(fHistYvtxMean[8],
"Lc",
"l");
309 TLegend *leg3 =
new TLegend(0.2, 0.7, 0.4, 0.9);
310 leg3->AddEntry(fHistNCandDzero,
"Dzero",
"l");
311 leg3->AddEntry(fHistNCandDplus,
"Dplus",
"l");
312 if (drawOnlyDzerDplus == 0)
313 leg3->AddEntry(fHistNCandDstar,
"Dstar",
"l");
314 if (drawOnlyDzerDplus == 0)
315 leg3->AddEntry(fHistNCandDs,
"Ds",
"l");
316 if (drawOnlyDzerDplus == 0)
317 leg3->AddEntry(fHistNCandLc,
"Lc",
"l");
319 TLegend *leg4 =
new TLegend(0.7, 0.7, 0.9, 0.9);
320 leg4->AddEntry(fHistNCandDzero,
"Dzero",
"l");
321 leg4->AddEntry(fHistNCandDplus,
"Dplus",
"l");
322 if (drawOnlyDzerDplus == 0)
323 leg4->AddEntry(fHistNCandDstar,
"Dstar",
"l");
324 if (drawOnlyDzerDplus == 0)
325 leg4->AddEntry(fHistNCandDs,
"Ds",
"l");
326 if (drawOnlyDzerDplus == 0)
327 leg4->AddEntry(fHistNCandLc,
"Lc",
"l");
329 TCanvas *c0_1 =
new TCanvas(
"c0_1",
"c0_1", 500, 500);
330 hnGenD->SetTitle(
"number of generated D mesons");
332 c0_1->SaveAs(
"plotDgen.png");
334 TCanvas *c0_2 =
new TCanvas(
"c0_2",
"c0_2", 500, 500);
337 fHistNCandDs->SetTitle(
"Candidates passing filtering cuts");
338 fHistNCandDs->Draw(
"");
340 TPaveStats *stats = (TPaveStats *)c0_2->GetPrimitive(
"stats");
341 stats->SetName(
"h1stats");
342 stats->SetY1NDC(0.5);
343 stats->SetY2NDC(0.35);
346 fHistNCandDplus->Draw(
"sames");
348 TPaveStats *stats2 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
349 stats2->SetName(
"h2stats");
350 stats2->SetY1NDC(0.8);
351 stats2->SetY2NDC(.65);
354 fHistNCandDstar->Draw(
"sames");
356 TPaveStats *stats3 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
357 stats3->SetName(
"h3stats");
358 stats3->SetY1NDC(0.65);
359 stats3->SetY2NDC(.5);
362 fHistNCandDzero->Draw(
"sames");
364 TPaveStats *stats4 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
365 stats4->SetName(
"h4stats");
366 stats4->SetY1NDC(0.95);
367 stats4->SetY2NDC(.8);
370 fHistNCandLc->Draw(
"sames");
372 TPaveStats *stats5 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
373 stats5->SetName(
"h1stats");
374 stats5->SetY1NDC(0.35);
375 stats5->SetY2NDC(.2);
378 c0_2->SaveAs(
"plotDcandpt.png");
380 TCanvas *c0_3 =
new TCanvas(
"c0_3",
"c0_3", 500, 500);
381 fHistInvMass[0]->SetMinimum(1.6);
382 fHistInvMass[0]->SetMaximum(2.4);
383 fHistInvMass[0]->Draw();
384 fHistInvMass[2]->Draw(
"sames");
385 fHistInvMass[4]->Draw(
"sames");
386 fHistInvMass[6]->Draw(
"sames");
387 fHistInvMass[8]->Draw(
"sames");
389 c0_3->SaveAs(
"plotDcandInvMass.png");
391 TCanvas *c0_4 =
new TCanvas(
"c0_4",
"c0_4", 500, 500);
395 fHistInvMassRes[0]->GetYaxis()->SetTitleOffset(1.4);
396 fHistInvMassRes[0]->SetTitle(
"D0 Inv Mass RMS vs pT");
397 fHistInvMassRes[0]->Draw(
"");
399 if (drawOnlyDzerDplus == 0)
400 fHistInvMassRes[4]->Draw(
"sames");
401 if (drawOnlyDzerDplus == 0)
402 fHistInvMassRes[6]->Draw(
"sames");
403 if (drawOnlyDzerDplus == 0)
404 fHistInvMassRes[8]->Draw(
"sames");
406 c0_4->SaveAs(
"plotD0candInvMassWidth.png");
408 fHistXvtxMean[0]->SetStats(0);
409 fHistYvtxMean[0]->SetStats(0);
410 fHistZvtxMean[0]->SetStats(0);
411 fHistXvtxMean[2]->SetStats(0);
412 fHistYvtxMean[2]->SetStats(0);
413 fHistZvtxMean[2]->SetStats(0);
414 fHistXvtxRes2[0]->SetStats(0);
415 fHistYvtxRes2[0]->SetStats(0);
416 fHistZvtxRes2[0]->SetStats(0);
417 fHistXvtxRes2[2]->SetStats(0);
418 fHistYvtxRes2[2]->SetStats(0);
419 fHistZvtxRes2[2]->SetStats(0);
421 TCanvas *
cc =
new TCanvas(
"cc",
"cc", 1200, 500);
424 fHistXvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
425 fHistXvtxMean[0]->SetMinimum(-300.);
426 fHistXvtxMean[0]->SetMaximum(300.);
427 fHistXvtxMean[0]->Draw();
429 fHistXvtxMean[2]->Draw(
"sames");
434 fHistYvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
435 fHistYvtxMean[0]->SetMinimum(-300.);
436 fHistYvtxMean[0]->SetMaximum(300.);
437 fHistYvtxMean[0]->Draw();
438 fHistYvtxMean[2]->Draw(
"sames");
442 fHistZvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
443 fHistZvtxMean[0]->SetMinimum(-300.);
444 fHistZvtxMean[0]->SetMaximum(300.);
445 fHistZvtxMean[0]->Draw();
446 fHistZvtxMean[2]->Draw(
"sames");
448 cc->SaveAs(
"plotXYZVtxMean.png");
451 TCanvas *ccr =
new TCanvas(
"ccr",
"ccr", 1200, 500);
454 fHistXvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
455 fHistXvtxRes2[0]->SetMinimum(0.);
456 fHistXvtxRes2[0]->SetMaximum(500.);
457 fHistXvtxRes2[0]->Draw();
458 fHistXvtxRes2[2]->Draw(
"sames");
462 fHistYvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
463 fHistYvtxRes2[0]->SetMinimum(0.);
464 fHistYvtxRes2[0]->SetMaximum(500.);
465 fHistYvtxRes2[0]->Draw();
466 fHistYvtxRes2[2]->Draw(
"sames");
470 fHistZvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
471 fHistZvtxRes2[0]->SetMinimum(0.);
472 fHistZvtxRes2[0]->SetMaximum(500.);
473 fHistZvtxRes2[0]->Draw();
474 fHistZvtxRes2[2]->Draw(
"sames");
476 ccr->SaveAs(
"plotXYZVtxRMS.png");
478 TCanvas *ccc =
new TCanvas(
"ccc",
"ccc", 1200, 800);
481 fHistDecLen[0]->GetYaxis()->SetTitleOffset(1.45);
482 fHistDecLen[0]->Draw();
483 fHistDecLen[2]->Draw(
"sames");
484 if (drawOnlyDzerDplus == 0)
485 fHistDecLen[4]->Draw(
"sames");
486 if (drawOnlyDzerDplus == 0)
487 fHistDecLen[6]->Draw(
"sames");
488 if (drawOnlyDzerDplus == 0)
489 fHistDecLen[8]->Draw(
"sames");
493 fHistCosp[0]->GetYaxis()->SetTitleOffset(1.45);
494 fHistCosp[0]->Draw();
495 fHistCosp[2]->Draw(
"sames");
496 if (drawOnlyDzerDplus == 0)
497 fHistCosp[4]->Draw(
"sames");
498 if (drawOnlyDzerDplus == 0)
499 fHistCosp[6]->Draw(
"sames");
500 if (drawOnlyDzerDplus == 0)
501 fHistCosp[8]->Draw(
"sames");
505 hEffPt[0]->GetYaxis()->SetTitleOffset(1.45);
507 hEffPt[2]->Draw(
"sames");
508 if (drawOnlyDzerDplus == 0)
509 hEffPt[4]->Draw(
"sames");
510 if (drawOnlyDzerDplus == 0)
511 hEffPt[6]->Draw(
"sames");
512 if (drawOnlyDzerDplus == 0)
513 hEffPt[8]->Draw(
"sames");
517 fHistDecLen[1]->GetYaxis()->SetTitleOffset(1.45);
518 fHistDecLen[1]->Draw();
519 fHistDecLen[3]->Draw(
"sames");
520 if (drawOnlyDzerDplus == 0)
521 fHistDecLen[5]->Draw(
"sames");
522 if (drawOnlyDzerDplus == 0)
523 fHistDecLen[7]->Draw(
"sames");
524 if (drawOnlyDzerDplus == 0)
525 fHistDecLen[9]->Draw(
"sames");
529 fHistCosp[1]->GetYaxis()->SetTitleOffset(1.45);
530 fHistCosp[1]->Draw();
531 fHistCosp[3]->Draw(
"sames");
532 if (drawOnlyDzerDplus == 0)
533 fHistCosp[5]->Draw(
"sames");
534 if (drawOnlyDzerDplus == 0)
535 fHistCosp[7]->Draw(
"sames");
536 if (drawOnlyDzerDplus == 0)
537 fHistCosp[9]->Draw(
"sames");
541 hEffPt[1]->GetYaxis()->SetTitleOffset(1.45);
543 hEffPt[3]->Draw(
"sames");
544 if (drawOnlyDzerDplus == 0)
545 hEffPt[5]->Draw(
"sames");
546 if (drawOnlyDzerDplus == 0)
547 hEffPt[7]->Draw(
"sames");
548 if (drawOnlyDzerDplus == 0)
549 hEffPt[9]->Draw(
"sames");
552 ccc->SaveAs(
"plot_DL_cosp_Eff_prompt_fd.png");
559 TFile* foutfile=
new TFile(
"trendingHF.root",
"recreate");
561 TDirectory* outdir=foutfile->mkdir(dirD2H->GetName());
563 listD2H->Write(listD2H->GetName(),1);
566 TDirectory* outdir2=foutfile->mkdir(dir->GetName());
568 list->Write(list->GetName(),1);
Int_t color[]
print message on plot with ok/not ok
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)