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");
49 printf(
"TList nEntriesQA not found in file %s\n",
filename.Data());
52 TH1F *hNentries = (TH1F *)listD2H->FindObject(
"hNentries");
53 TH2F *hHasSelBit = (
TH2F *)listD2H->FindObject(
"HasSelBit");
55 TCanvas *cqa =
new TCanvas(
"cqa",
"cqa", 800, 500);
60 hHasSelBit->Draw(
"colz");
61 cqa->SaveAs(
"plot_D2HQA.png");
63 Double_t nEv=hNentries->GetBinContent(10);
64 vecForTrend[0]=hHasSelBit->GetBinContent(1)/nEv;
65 vecForTrend[1]=hHasSelBit->GetBinContent(2)/nEv;
66 vecForTrend[2]=hHasSelBit->GetBinContent(3)/nEv;
67 vecForTrend[3]=hHasSelBit->GetBinContent(4)/nEv;
68 vecForTrend[4]=hHasSelBit->GetBinContent(5)/nEv;
71 TDirectoryFile *
dir = (TDirectoryFile *)ff->Get(
"PWGHF_D2H_MCPerform");
75 list = (
TList *)dir->Get(
"coutputDperfQA");
78 TH1F *hn = (TH1F *)list->FindObject(
"fHistNEvents");
79 TH1F *hnGenD = (TH1F *)list->FindObject(
"fHistNGenD");
80 Int_t entries = hn->GetBinContent(3);
82 TH2F *fHistNCand = (
TH2F *)list->FindObject(
"fHistNCand");
83 TH1F *fHistNCandDzero = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDzero", 1, 1);
84 TH1F *fHistNCandDplus = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDplus", 2, 2);
85 TH1F *fHistNCandDstar = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDstar", 3, 3);
86 TH1F *fHistNCandDs = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandDs", 4, 4);
87 TH1F *fHistNCandLc = (TH1F *)fHistNCand->ProjectionY(
"fHistNCandLc", 5, 5);
89 TString names[5] = {
"Dzero",
"Dplus",
"Dstar",
"Ds",
"Lc2pkpi"};
90 TString type[2] = {
"Prompt",
"Feeddown"};
91 const Int_t nDecays = 5;
92 TH2F *fHistXvtxResVsPt[2 * nDecays];
93 TH2F *fHistYvtxResVsPt[2 * nDecays];
94 TH2F *fHistZvtxResVsPt[2 * nDecays];
95 TH2F *fHistInvMassVsPt[2 * nDecays];
96 TH2F *fHistDecLenVsPt[2 * nDecays];
97 TH2F *fHistNormDLxyVsPt[2 * nDecays];
98 TH2F *fHistCosPointVsPt[2 * nDecays];
100 TH3F *fHistPtYMultGenDauInAcc[2 * nDecays];
101 TH3F *fHistPtYMultRecoFilt[2 * nDecays];
103 TProfile *fHistXvtxRes[2 * nDecays];
104 TProfile *fHistYvtxRes[2 * nDecays];
105 TProfile *fHistZvtxRes[2 * nDecays];
106 TProfile *fHistXvtxMean[2 * nDecays];
107 TProfile *fHistYvtxMean[2 * nDecays];
108 TProfile *fHistZvtxMean[2 * nDecays];
110 TH1F *fHistXvtxRes2[2 * nDecays];
111 TH1F *fHistYvtxRes2[2 * nDecays];
112 TH1F *fHistZvtxRes2[2 * nDecays];
114 TProfile *fHistInvMass[2 * nDecays];
115 TProfile *fHistDecLen[2 * nDecays];
116 TProfile *fHistCosp[2 * nDecays];
118 TH1F *fHistInvMassRes[2 * nDecays];
120 TH1F *hEffPt[2 * nDecays];
123 for (
Int_t j = 0; j < 5; j++)
125 for (
Int_t i = 0; i < 2; i++)
127 Int_t index = j * 2 + i;
128 fHistXvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hXvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
129 fHistYvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hYvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
130 fHistZvtxResVsPt[index] = (
TH2F *)list->FindObject(Form(
"hZvtxResVsPt%s%s", type[i].
Data(), names[j].
Data()));
131 fHistInvMassVsPt[index] = (
TH2F *)list->FindObject(Form(
"hInvMassVsPt%s%s", type[i].
Data(), names[j].
Data()));
132 fHistDecLenVsPt[index] = (
TH2F *)list->FindObject(Form(
"hDecLenVsPt%s%s", type[i].
Data(), names[j].
Data()));
133 fHistCosPointVsPt[index] = (
TH2F *)list->FindObject(Form(
"hCosPointVsPt%s%s", type[i].
Data(), names[j].
Data()));
134 fHistPtYMultGenDauInAcc[index] = (
TH3F *)list->FindObject(Form(
"hPtYMult%sGenDauInAcc%s", type[i].
Data(), names[j].
Data()));
135 fHistPtYMultRecoFilt[index] = (
TH3F *)list->FindObject(Form(
"hPtYMult%sRecoFilt%s", type[i].
Data(), names[j].
Data()));
137 fHistXvtxMean[index] = (TProfile *)fHistXvtxResVsPt[index]->ProfileX(Form(
"hXvtxMean%s%s", type[i].
Data(), names[j].
Data()));
138 fHistXvtxMean[index]->SetLineColor(color[j]);
139 fHistXvtxMean[index]->SetLineWidth(2);
140 fHistXvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
141 fHistXvtxMean[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) mean (#mum)");
142 fHistXvtxMean[index]->SetTitle(
"Xvtx residual vs pT");
144 fHistYvtxMean[index] = (TProfile *)fHistYvtxResVsPt[index]->ProfileX(Form(
"hYvtxMean%s%s", type[i].
Data(), names[j].
Data()));
145 fHistYvtxMean[index]->SetLineColor(color[j]);
146 fHistYvtxMean[index]->SetLineWidth(2);
147 fHistYvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
148 fHistYvtxMean[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) mean (#mum)");
149 fHistYvtxMean[index]->SetTitle(
"Yvtx residual vs pT");
151 fHistZvtxMean[index] = (TProfile *)fHistZvtxResVsPt[index]->ProfileX(Form(
"hZvtxMean%s%s", type[i].
Data(), names[j].
Data()));
152 fHistZvtxMean[index]->SetLineColor(color[j]);
153 fHistZvtxMean[index]->SetLineWidth(2);
154 fHistZvtxMean[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
155 fHistZvtxMean[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) mean (#mum)");
156 fHistZvtxMean[index]->SetTitle(
"Zvtx residual vs pT");
158 fHistXvtxRes[index] = (TProfile *)fHistXvtxResVsPt[index]->ProfileX(Form(
"hXvtxRes%s%s", type[i].
Data(), names[j].
Data()), 1, -1,
"s");
159 fHistYvtxRes[index] = (TProfile *)fHistYvtxResVsPt[index]->ProfileX(Form(
"hYvtxRes%s%s", type[i].
Data(), names[j].Data()), 1, -1,
"s");
160 fHistZvtxRes[index] = (TProfile *)fHistZvtxResVsPt[index]->ProfileX(Form(
"hZvtxRes%s%s", type[i].
Data(), names[j].Data()), 1, -1,
"s");
161 fHistXvtxRes2[index] = (TH1F *)fHistXvtxResVsPt[index]->ProjectionX(Form(
"hXvtxRes2%s%s", type[i].
Data(), names[j].Data()));
162 fHistYvtxRes2[index] = (TH1F *)fHistYvtxResVsPt[index]->ProjectionX(Form(
"hYvtxRes2%s%s", type[i].
Data(), names[j].Data()));
163 fHistZvtxRes2[index] = (TH1F *)fHistZvtxResVsPt[index]->ProjectionX(Form(
"hZvtxRes2%s%s", type[i].
Data(), names[j].Data()));
164 fHistXvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
165 fHistXvtxRes[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) RMS (#mum)");
166 fHistXvtxRes[index]->SetTitle(
"Xvtx resolution vs pT");
167 fHistYvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
168 fHistYvtxRes[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) RMS (#mum)");
169 fHistYvtxRes[index]->SetTitle(
"Yvtx resolution vs pT");
170 fHistZvtxRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
171 fHistZvtxRes[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) RMS (#mum)");
172 fHistZvtxRes[index]->SetTitle(
"Zvtx resolution vs pT");
174 fHistXvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
175 fHistXvtxRes2[index]->GetYaxis()->SetTitle(
"Xvtx (reco-true) RMS (#mum)");
176 fHistXvtxRes2[index]->SetTitle(
"Xvtx resolution vs pT");
177 fHistYvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
178 fHistYvtxRes2[index]->GetYaxis()->SetTitle(
"Yvtx (reco-true) RMS (#mum)");
179 fHistYvtxRes2[index]->SetTitle(
"Yvtx resolution vs pT");
180 fHistZvtxRes2[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
181 fHistZvtxRes2[index]->GetYaxis()->SetTitle(
"Zvtx (reco-true) RMS (#mum)");
182 fHistZvtxRes2[index]->SetTitle(
"Zvtx resolution vs pT");
184 fHistXvtxRes2[index]->SetLineColor(color[j]);
185 fHistYvtxRes2[index]->SetLineColor(color[j]);
186 fHistZvtxRes2[index]->SetLineColor(color[j]);
187 fHistXvtxRes2[index]->SetMarkerColor(color[j]);
188 fHistXvtxRes2[index]->SetMarkerStyle(20);
189 fHistYvtxRes2[index]->SetMarkerColor(color[j]);
190 fHistYvtxRes2[index]->SetMarkerStyle(20);
191 fHistZvtxRes2[index]->SetMarkerColor(color[j]);
192 fHistZvtxRes2[index]->SetMarkerStyle(20);
193 fHistXvtxRes2[index]->SetLineWidth(2);
194 fHistYvtxRes2[index]->SetLineWidth(2);
195 fHistZvtxRes2[index]->SetLineWidth(2);
196 fHistXvtxRes2[index]->Sumw2();
197 fHistYvtxRes2[index]->Sumw2();
198 fHistZvtxRes2[index]->Sumw2();
200 fHistInvMass[index] = (TProfile *)fHistInvMassVsPt[index]->ProfileX(Form(
"hInvMassVsPt%s%s", type[i].
Data(), names[j].
Data()));
201 fHistInvMass[index]->SetLineColor(color[j]);
202 fHistInvMass[index]->SetLineWidth(2);
203 fHistInvMass[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
204 fHistInvMass[index]->GetYaxis()->SetTitle(
"Inv Mass (GeV/c2)");
205 fHistInvMass[index]->SetTitle(
"Inv Mass vs pT");
207 fHistDecLen[index] = (TProfile *)fHistDecLenVsPt[index]->ProfileX(Form(
"hDecLenVsPt%s%s", type[i].
Data(), names[j].
Data()));
208 fHistDecLen[index]->SetLineColor(color[j]);
209 fHistDecLen[index]->SetLineWidth(2);
210 fHistDecLen[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
211 fHistDecLen[index]->GetYaxis()->SetTitle(
"Dec Len (#mum)");
212 fHistDecLen[index]->SetTitle(
"Prompt Dec Len vs pT");
214 fHistCosp[index] = (TProfile *)fHistCosPointVsPt[index]->ProfileX(Form(
"hCosPVsPt%s%s", type[i].
Data(), names[j].
Data()));
215 fHistCosp[index]->SetLineColor(color[j]);
216 fHistCosp[index]->SetLineWidth(2);
217 fHistCosp[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
218 fHistCosp[index]->GetYaxis()->SetTitle(
"Cos Point");
219 fHistCosp[index]->SetTitle(
"Prompt CosPoint vs pT");
222 fHistDecLen[index]->SetTitle(
"FeedDown Dec Len vs pT");
224 htemp = (TH1F *)fHistPtYMultGenDauInAcc[index]->ProjectionX(Form(
"hPtDen%s%s", type[i].
Data(), names[j].
Data()));
225 hEffPt[index] = (TH1F *)fHistPtYMultRecoFilt[index]->ProjectionX(Form(
"hPtNum%s%s", type[i].
Data(), names[j].Data()));
226 fHistPtYMultGenDauInAcc[index]->Sumw2();
227 fHistPtYMultRecoFilt[index]->Sumw2();
228 hEffPt[index]->Sumw2();
229 hEffPt[index]->Divide(htemp);
230 hEffPt[index]->SetLineColor(color[j]);
231 hEffPt[index]->SetLineWidth(2);
232 hEffPt[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
233 hEffPt[index]->GetYaxis()->SetTitle(
"Prompt Efficiency");
234 hEffPt[index]->SetTitle(
"Prompt Efficiency");
235 hEffPt[index]->SetStats(0);
236 fHistCosp[index]->SetStats(0);
237 fHistDecLen[index]->SetStats(0);
241 hEffPt[index]->GetYaxis()->SetTitle(
"Feeddown Efficiency");
242 hEffPt[index]->SetTitle(
"Feeddown Efficiency");
245 fHistInvMassRes[index] =
new TH1F(*hEffPt[index]);
246 for (
Int_t jj = 1; jj < hEffPt[index]->GetNbinsX() + 1; jj++)
248 TH1F *hTemp = (TH1F *)fHistInvMassVsPt[index]->ProjectionY(
"htemp", jj, jj);
249 fHistInvMassRes[index]->SetBinContent(jj, hTemp->GetRMS());
250 fHistInvMassRes[index]->SetBinError(jj, hTemp->GetRMSError());
251 fHistInvMassRes[index]->SetLineColor(color[j]);
252 fHistInvMassRes[index]->SetLineWidth(2);
253 fHistInvMassRes[index]->GetXaxis()->SetTitle(
"pT (GeV/c)");
254 fHistInvMassRes[index]->GetYaxis()->SetTitle(
"Inv Mass RMS (GeV/c2)");
255 fHistInvMassRes[index]->SetTitle(
"Inv Mass RMS vs pT");
257 printf(
"D0: pt=%f, res=%f \n", fHistInvMassRes[index]->GetBinCenter(jj), fHistInvMassRes[index]->GetBinContent(jj));
258 TH1F *hTempX = (TH1F *)fHistXvtxResVsPt[index]->ProjectionY(
"htempX", jj, jj);
259 TH1F *hTempY = (TH1F *)fHistYvtxResVsPt[index]->ProjectionY(
"htempY", jj, jj);
260 TH1F *hTempZ = (TH1F *)fHistZvtxResVsPt[index]->ProjectionY(
"htempZ", jj, jj);
262 fHistXvtxRes2[index]->SetBinContent(jj, hTempX->GetRMS());
263 fHistXvtxRes2[index]->SetBinError(jj, hTempX->GetRMSError());
265 fHistYvtxRes2[index]->SetBinContent(jj, hTempY->GetRMS());
266 fHistYvtxRes2[index]->SetBinError(jj, hTempY->GetRMSError());
268 fHistZvtxRes2[index]->SetBinContent(jj, hTempZ->GetRMS());
269 fHistZvtxRes2[index]->SetBinError(jj, hTempZ->GetRMSError());
274 fHistNCandDplus->SetLineColor(2);
275 fHistNCandDstar->SetLineColor(3);
276 fHistNCandDs->SetLineColor(4);
277 fHistNCandLc->SetLineColor(kOrange);
278 fHistNCandDplus->SetLineWidth(2);
279 fHistNCandDstar->SetLineWidth(2);
280 fHistNCandDs->SetLineWidth(2);
281 fHistNCandLc->SetLineWidth(2);
283 fHistNCandDzero->GetXaxis()->SetTitle(
"pT (GeV/c)");
284 fHistNCandDzero->GetYaxis()->SetTitle(
"counts");
285 TLegend *leg =
new TLegend(0.6, 0.7, 0.8, 0.9);
286 leg->AddEntry(fHistNCandDzero,
"Dzero",
"l");
287 leg->AddEntry(fHistNCandDplus,
"Dplus",
"l");
288 leg->AddEntry(fHistNCandDstar,
"Dstar",
"l");
289 leg->AddEntry(fHistNCandDs,
"Ds",
"l");
290 leg->AddEntry(fHistNCandLc,
"Lc",
"l");
292 TLegend *leg1 =
new TLegend(0.5, 0.7, 0.7, 0.9);
293 leg1->AddEntry(fHistYvtxRes2[0],
"Dzero",
"pl");
294 leg1->AddEntry(fHistYvtxRes2[2],
"Dplus",
"pl");
295 if (drawOnlyDzerDplus == 0)
296 leg1->AddEntry(fHistYvtxRes2[6],
"Ds",
"pl");
297 if (drawOnlyDzerDplus == 0)
298 leg1->AddEntry(fHistYvtxRes2[8],
"Lc",
"pl");
300 TLegend *leg2 =
new TLegend(0.5, 0.7, 0.7, 0.9);
301 leg2->AddEntry(fHistYvtxMean[0],
"Dzero",
"l");
302 leg2->AddEntry(fHistYvtxMean[2],
"Dplus",
"l");
303 if (drawOnlyDzerDplus == 0)
304 leg2->AddEntry(fHistYvtxMean[6],
"Ds",
"l");
305 if (drawOnlyDzerDplus == 0)
306 leg2->AddEntry(fHistYvtxMean[8],
"Lc",
"l");
308 TLegend *leg3 =
new TLegend(0.2, 0.7, 0.4, 0.9);
309 leg3->AddEntry(fHistNCandDzero,
"Dzero",
"l");
310 leg3->AddEntry(fHistNCandDplus,
"Dplus",
"l");
311 if (drawOnlyDzerDplus == 0)
312 leg3->AddEntry(fHistNCandDstar,
"Dstar",
"l");
313 if (drawOnlyDzerDplus == 0)
314 leg3->AddEntry(fHistNCandDs,
"Ds",
"l");
315 if (drawOnlyDzerDplus == 0)
316 leg3->AddEntry(fHistNCandLc,
"Lc",
"l");
318 TLegend *leg4 =
new TLegend(0.7, 0.7, 0.9, 0.9);
319 leg4->AddEntry(fHistNCandDzero,
"Dzero",
"l");
320 leg4->AddEntry(fHistNCandDplus,
"Dplus",
"l");
321 if (drawOnlyDzerDplus == 0)
322 leg4->AddEntry(fHistNCandDstar,
"Dstar",
"l");
323 if (drawOnlyDzerDplus == 0)
324 leg4->AddEntry(fHistNCandDs,
"Ds",
"l");
325 if (drawOnlyDzerDplus == 0)
326 leg4->AddEntry(fHistNCandLc,
"Lc",
"l");
328 TCanvas *c0_1 =
new TCanvas(
"c0_1",
"c0_1", 500, 500);
329 hnGenD->SetTitle(
"number of generated D mesons");
331 c0_1->SaveAs(
"plotDgen.png");
333 TCanvas *c0_2 =
new TCanvas(
"c0_2",
"c0_2", 500, 500);
336 fHistNCandDs->SetTitle(
"Candidates passing filtering cuts");
337 fHistNCandDs->Draw(
"");
339 TPaveStats *stats = (TPaveStats *)c0_2->GetPrimitive(
"stats");
340 stats->SetName(
"h1stats");
341 stats->SetY1NDC(0.5);
342 stats->SetY2NDC(0.35);
345 fHistNCandDplus->Draw(
"sames");
347 TPaveStats *stats2 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
348 stats2->SetName(
"h2stats");
349 stats2->SetY1NDC(0.8);
350 stats2->SetY2NDC(.65);
353 fHistNCandDstar->Draw(
"sames");
355 TPaveStats *stats3 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
356 stats3->SetName(
"h3stats");
357 stats3->SetY1NDC(0.65);
358 stats3->SetY2NDC(.5);
361 fHistNCandDzero->Draw(
"sames");
363 TPaveStats *stats4 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
364 stats4->SetName(
"h4stats");
365 stats4->SetY1NDC(0.95);
366 stats4->SetY2NDC(.8);
369 fHistNCandLc->Draw(
"sames");
371 TPaveStats *stats5 = (TPaveStats *)c0_2->GetPrimitive(
"stats");
372 stats5->SetName(
"h1stats");
373 stats5->SetY1NDC(0.35);
374 stats5->SetY2NDC(.2);
377 c0_2->SaveAs(
"plotDcandpt.png");
379 TCanvas *c0_3 =
new TCanvas(
"c0_3",
"c0_3", 500, 500);
380 fHistInvMass[0]->SetMinimum(1.6);
381 fHistInvMass[0]->SetMaximum(2.4);
382 fHistInvMass[0]->Draw();
383 fHistInvMass[2]->Draw(
"sames");
384 fHistInvMass[4]->Draw(
"sames");
385 fHistInvMass[6]->Draw(
"sames");
386 fHistInvMass[8]->Draw(
"sames");
388 c0_3->SaveAs(
"plotDcandInvMass.png");
390 TCanvas *c0_4 =
new TCanvas(
"c0_4",
"c0_4", 500, 500);
394 fHistInvMassRes[0]->GetYaxis()->SetTitleOffset(1.4);
395 fHistInvMassRes[0]->SetTitle(
"D0 Inv Mass RMS vs pT");
396 fHistInvMassRes[0]->Draw(
"");
398 if (drawOnlyDzerDplus == 0)
399 fHistInvMassRes[4]->Draw(
"sames");
400 if (drawOnlyDzerDplus == 0)
401 fHistInvMassRes[6]->Draw(
"sames");
402 if (drawOnlyDzerDplus == 0)
403 fHistInvMassRes[8]->Draw(
"sames");
405 c0_4->SaveAs(
"plotD0candInvMassWidth.png");
407 fHistXvtxMean[0]->SetStats(0);
408 fHistYvtxMean[0]->SetStats(0);
409 fHistZvtxMean[0]->SetStats(0);
410 fHistXvtxMean[2]->SetStats(0);
411 fHistYvtxMean[2]->SetStats(0);
412 fHistZvtxMean[2]->SetStats(0);
413 fHistXvtxRes2[0]->SetStats(0);
414 fHistYvtxRes2[0]->SetStats(0);
415 fHistZvtxRes2[0]->SetStats(0);
416 fHistXvtxRes2[2]->SetStats(0);
417 fHistYvtxRes2[2]->SetStats(0);
418 fHistZvtxRes2[2]->SetStats(0);
420 TCanvas *
cc =
new TCanvas(
"cc",
"cc", 1200, 500);
423 fHistXvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
424 fHistXvtxMean[0]->SetMinimum(-300.);
425 fHistXvtxMean[0]->SetMaximum(300.);
426 fHistXvtxMean[0]->Draw();
428 fHistXvtxMean[2]->Draw(
"sames");
433 fHistYvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
434 fHistYvtxMean[0]->SetMinimum(-300.);
435 fHistYvtxMean[0]->SetMaximum(300.);
436 fHistYvtxMean[0]->Draw();
437 fHistYvtxMean[2]->Draw(
"sames");
441 fHistZvtxMean[0]->GetYaxis()->SetTitleOffset(1.4);
442 fHistZvtxMean[0]->SetMinimum(-300.);
443 fHistZvtxMean[0]->SetMaximum(300.);
444 fHistZvtxMean[0]->Draw();
445 fHistZvtxMean[2]->Draw(
"sames");
447 cc->SaveAs(
"plotXYZVtxMean.png");
450 TCanvas *ccr =
new TCanvas(
"ccr",
"ccr", 1200, 500);
453 fHistXvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
454 fHistXvtxRes2[0]->SetMinimum(0.);
455 fHistXvtxRes2[0]->SetMaximum(500.);
456 fHistXvtxRes2[0]->Draw();
457 fHistXvtxRes2[2]->Draw(
"sames");
461 fHistYvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
462 fHistYvtxRes2[0]->SetMinimum(0.);
463 fHistYvtxRes2[0]->SetMaximum(500.);
464 fHistYvtxRes2[0]->Draw();
465 fHistYvtxRes2[2]->Draw(
"sames");
469 fHistZvtxRes2[0]->GetYaxis()->SetTitleOffset(1.4);
470 fHistZvtxRes2[0]->SetMinimum(0.);
471 fHistZvtxRes2[0]->SetMaximum(500.);
472 fHistZvtxRes2[0]->Draw();
473 fHistZvtxRes2[2]->Draw(
"sames");
475 ccr->SaveAs(
"plotXYZVtxRMS.png");
477 TCanvas *ccc =
new TCanvas(
"ccc",
"ccc", 1200, 800);
480 fHistDecLen[0]->GetYaxis()->SetTitleOffset(1.45);
481 fHistDecLen[0]->Draw();
482 fHistDecLen[2]->Draw(
"sames");
483 if (drawOnlyDzerDplus == 0)
484 fHistDecLen[4]->Draw(
"sames");
485 if (drawOnlyDzerDplus == 0)
486 fHistDecLen[6]->Draw(
"sames");
487 if (drawOnlyDzerDplus == 0)
488 fHistDecLen[8]->Draw(
"sames");
492 fHistCosp[0]->GetYaxis()->SetTitleOffset(1.45);
493 fHistCosp[0]->Draw();
494 fHistCosp[2]->Draw(
"sames");
495 if (drawOnlyDzerDplus == 0)
496 fHistCosp[4]->Draw(
"sames");
497 if (drawOnlyDzerDplus == 0)
498 fHistCosp[6]->Draw(
"sames");
499 if (drawOnlyDzerDplus == 0)
500 fHistCosp[8]->Draw(
"sames");
504 hEffPt[0]->GetYaxis()->SetTitleOffset(1.45);
506 hEffPt[2]->Draw(
"sames");
507 if (drawOnlyDzerDplus == 0)
508 hEffPt[4]->Draw(
"sames");
509 if (drawOnlyDzerDplus == 0)
510 hEffPt[6]->Draw(
"sames");
511 if (drawOnlyDzerDplus == 0)
512 hEffPt[8]->Draw(
"sames");
516 fHistDecLen[1]->GetYaxis()->SetTitleOffset(1.45);
517 fHistDecLen[1]->Draw();
518 fHistDecLen[3]->Draw(
"sames");
519 if (drawOnlyDzerDplus == 0)
520 fHistDecLen[5]->Draw(
"sames");
521 if (drawOnlyDzerDplus == 0)
522 fHistDecLen[7]->Draw(
"sames");
523 if (drawOnlyDzerDplus == 0)
524 fHistDecLen[9]->Draw(
"sames");
528 fHistCosp[1]->GetYaxis()->SetTitleOffset(1.45);
529 fHistCosp[1]->Draw();
530 fHistCosp[3]->Draw(
"sames");
531 if (drawOnlyDzerDplus == 0)
532 fHistCosp[5]->Draw(
"sames");
533 if (drawOnlyDzerDplus == 0)
534 fHistCosp[7]->Draw(
"sames");
535 if (drawOnlyDzerDplus == 0)
536 fHistCosp[9]->Draw(
"sames");
540 hEffPt[1]->GetYaxis()->SetTitleOffset(1.45);
542 hEffPt[3]->Draw(
"sames");
543 if (drawOnlyDzerDplus == 0)
544 hEffPt[5]->Draw(
"sames");
545 if (drawOnlyDzerDplus == 0)
546 hEffPt[7]->Draw(
"sames");
547 if (drawOnlyDzerDplus == 0)
548 hEffPt[9]->Draw(
"sames");
551 ccc->SaveAs(
"plot_DL_cosp_Eff_prompt_fd.png");
558 TFile* foutfile=
new TFile(
"trendingHF.root",
"recreate");
560 TDirectory* outdir=foutfile->mkdir(dirD2H->GetName());
562 listD2H->Write(listD2H->GetName(),1);
565 TDirectory* outdir2=foutfile->mkdir(dir->GetName());
567 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)