230 LOGP(
debug,
"Creating Variable Binning");
231 std::array<std::string, 2> title{
"TPC",
"ITS"};
232 std::array<std::string, 2> etaSel{Form(
", |#eta| < %.1f", mEtaTPCCut), Form(
", |#eta| < %.1f", mEtaCut)};
233 std::array<int, 2> maxNCls{156, 7};
235 const Int_t nbinsPt = mPtBins;
236 const Double_t xminPt = (mPtCut > 0) ? mPtCut : 0.01;
237 const Double_t xmaxPt = mPtMaxCut;
238 Double_t* xbinsPt =
new Double_t[nbinsPt + 1];
239 Double_t xlogminPt = TMath::Log10(xminPt);
240 Double_t xlogmaxPt = TMath::Log10(xmaxPt);
241 Double_t dlogxPt = (xlogmaxPt - xlogminPt) / nbinsPt;
242 for (
int i = 0;
i <= nbinsPt;
i++) {
243 Double_t xlogPt = xlogminPt +
i * dlogxPt;
244 xbinsPt[
i] = TMath::Exp(TMath::Log(10) * xlogPt);
247 LOGP(
debug,
"Creating Histograms");
251 mPtNum[
i] =
new TH1D(Form(
"mPtNum_%s", title[
i].c_str()), Form(
"Pt distribution of ITSTPC matched tracks, wrt %s tracks %s; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
253 mPtNum[
i]->SetOption(
"logy");
254 mPtNum[
i]->GetYaxis()->SetTitleOffset(1.4);
255 mPtDen[
i] =
new TH1D(Form(
"mPtDen_%s", title[
i].c_str()), Form(
"Pt distribution of %s tracks %s; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
257 mPtDen[
i]->SetOption(
"logy");
258 mPtDen[
i]->GetYaxis()->SetTitleOffset(1.4);
259 mFractionITSTPCmatch[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatch_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks vs Pt %s; Pt [GeV/c]; Eff", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
260 mPtNum_noEta0[
i] =
new TH1D(Form(
"mPtNum_noEta0_%s", title[
i].c_str()), Form(
"Pt distribution of ITSTPC matched tracks without |eta| < %.2f, wrt %s tracks %s; Pt [GeV/c]; dNdPt", mEtaNo0Cut, title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
261 mPtNum_noEta0[
i]->Sumw2();
262 mPtNum_noEta0[
i]->SetOption(
"logy");
263 mPtNum_noEta0[
i]->GetYaxis()->SetTitleOffset(1.4);
264 mPtDen_noEta0[
i] =
new TH1D(Form(
"mPtDen_noEta0_%s", title[
i].c_str()), Form(
"Pt distribution of %s tracks without |eta| < %.2f %s; Pt [GeV/c]; dNdPt", title[
i].c_str(), mEtaNo0Cut, etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
265 mPtDen_noEta0[
i]->Sumw2();
266 mPtDen_noEta0[
i]->SetOption(
"logy");
267 mPtDen_noEta0[
i]->GetYaxis()->SetTitleOffset(1.4);
268 mFractionITSTPCmatch_noEta0[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatch_noEta0_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks vs Pt without |eta| < %.2f %s; Pt [GeV/c]; Eff", title[
i].c_str(), mEtaNo0Cut, etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut);
271 mPhiNum[
i] =
new TH1F(Form(
"mPhiNum_%s", title[
i].c_str()), Form(
"Phi distribution of ITSTPC matched tracks, wrt %s tracks %s; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
273 mPhiDen[
i] =
new TH1F(Form(
"mPhiDen_%s", title[
i].c_str()), Form(
"Phi distribution of %s tracks %s; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
275 mFractionITSTPCmatchPhi[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhi_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs Phi wrt %s tracks %s; Phi [rad]; Eff", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
276 mPhiVsPtNum[
i] =
new TH2F(Form(
"mPhiVsPtNum_%s", title[
i].c_str()), Form(
"Phi vs Pt distribution of ITSTPC matched tracks wrt %s %s; #it{p}_{T} [GeV#it{c}]; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, 0.f, 2 * TMath::Pi());
277 mPhiVsPtNum[
i]->Sumw2();
278 mPhiVsPtDen[
i] =
new TH2F(Form(
"mPhiVsPtDen_%s", title[
i].c_str()), Form(
"Phi vs Pt distribution of %s tracks %s; #it{p}_{T} [GeV#it{c}]; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, 0.f, 2 * TMath::Pi());
279 mPhiVsPtDen[
i]->Sumw2();
280 mFractionITSTPCmatchPhiVsPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhiVsPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks %s, Phi vs Pt; #it{p}_{T} [GeV#it{c}]; Phi [rad]; Eff", title[
i].c_str(), etaSel[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, 0.f, 2 * TMath::Pi());
283 mEtaNum[
i] =
new TH1F(Form(
"mEtaNum_%s", title[
i].c_str()), Form(
"Eta distribution of ITSTPC matched tracks, wrt %s tracks; Eta; dNdEta", title[
i].c_str()), 100, -2.f, 2.f);
285 mEtaNum[
i]->GetYaxis()->SetTitleOffset(1.4);
286 mEtaDen[
i] =
new TH1F(Form(
"mEtaDen_%s", title[
i].c_str()), Form(
"Eta distribution of %s tracks; Eta; dNdEta", title[
i].c_str()), 100, -2.f, 2.f);
288 mEtaDen[
i]->GetYaxis()->SetTitleOffset(1.4);
289 mFractionITSTPCmatchEta[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchEta_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks , wrt %s tracks, vs Eta; Eta; Eff", title[
i].c_str()), 100, -2.f, 2.f);
290 mEtaVsPtNum[
i] =
new TH2F(Form(
"mEtaVsPtNum_%s", title[
i].c_str()), Form(
"Eta vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; Eta", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, -2.f, 2.f);
291 mEtaVsPtNum[
i]->Sumw2();
292 mEtaVsPtDen[
i] =
new TH2F(Form(
"mEtaVsPtDen_%s", title[
i].c_str()), Form(
"Eta vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; Eta", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, -2.f, 2.f);
293 mEtaVsPtDen[
i]->Sumw2();
294 mFractionITSTPCmatchEtaVsPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchEtaVsPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks, wrt %s tracks, Eta vs Pt; #it{p}_{T} [GeV#it{c}]; Eta; Eff", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 100, -2.f, 2.f);
297 mClsVsPtNum[
i] =
new TH2F(Form(
"mClsVsPtNum_%s", title[
i].c_str()), Form(
"#Clusters vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; #Clusters", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, maxNCls[
i], 0, maxNCls[
i]);
298 mClsVsPtNum[
i]->Sumw2();
299 mClsVsPtDen[
i] =
new TH2F(Form(
"mClsVsPtDen_%s", title[
i].c_str()), Form(
"#Clusters vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; #Clusters", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, maxNCls[
i], 0, maxNCls[
i]);
300 mClsVsPtDen[
i]->Sumw2();
301 mFractionITSTPCmatchClsVsPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchClsVsPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks, wrt %s tracks, #Clusters vs Pt; #it{p}_{T} [GeV#it{c}]; #Clusters; Eff", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, maxNCls[
i], 0, maxNCls[
i]);
304 mChi2VsPtNum[
i] =
new TH2F(Form(
"mChi2VsPtNum_%s", title[
i].c_str()), Form(
"Chi2 vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; Chi2", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 200, 0, 300);
305 mChi2VsPtNum[
i]->Sumw2();
306 mChi2VsPtDen[
i] =
new TH2F(Form(
"mChi2VsPtDen_%s", title[
i].c_str()), Form(
"Chi2 vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; Chi2", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 200, 0, 300);
307 mChi2VsPtDen[
i]->Sumw2();
308 mFractionITSTPCmatchChi2VsPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchChi2VsPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks, wrt %s tracks, Chi2 vs Pt; #it{p}_{T} [GeV#it{c}]; Chi2; Eff", title[
i].c_str()), mPtBins, mPtCut, mPtMaxCut, 200, 0, 300);
311 m1OverPtNum[
i] =
new TH1D(Form(
"m1OverPtNum_%s", title[
i].c_str()), Form(
"1/Pt distribution of matched tracks, wrt %s tracks %s; 1/Pt [c/GeV]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), 100, -20.f, 20.f);
312 m1OverPtNum[
i]->Sumw2();
313 m1OverPtDen[
i] =
new TH1D(Form(
"m1OverPtDen_%s", title[
i].c_str()), Form(
"1/Pt distribution of %s tracks %s; 1/Pt [c/GeV]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), 100, -20.f, 20.f);
314 m1OverPtDen[
i]->Sumw2();
315 mFractionITSTPCmatch1OverPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatch1OverPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs 1/Pt, wrt %s tracks %s; 1/Pt [c/GeV]; Eff", title[
i].c_str(), etaSel[
i].c_str()), 100, -20.f, 20.f);
318 mEtaPhiPtNum[
i] =
new TH3F(Form(
"mEtaPhiPtNum_%s", title[
i].c_str()), Form(
"Numerator #eta vs #varphi vs #it{p}_{T}, wrt %s;#eta %s;#varphi;#it{p}_{T} [GeV#it{c}];Entries", title[
i].c_str(), etaSel[
i].c_str()), 100, -2., 2., 100, 0., 2 * TMath::Pi(), 100, 0.01, 20.);
319 mEtaPhiPtNum[
i]->Sumw2();
320 mEtaPhiPtDen[
i] =
new TH3F(Form(
"mEtaPhiPtDen_%s", title[
i].c_str()), Form(
"Denominator #eta vs #varphi vs #it{p}_{T}, wrt %s;#eta %s;#varphi;#it{p}_{T} [GeV#it{c}];Entries", title[
i].c_str(), etaSel[
i].c_str()), 100, -2., 2., 100, 0., 2 * TMath::Pi(), 100, 0.01, 20.);
321 mEtaPhiPtDen[
i]->Sumw2();
324 for (
int j = 0;
j < o2::track::PID::NIDs; ++
j) {
326 mPtNumVsTrkPID[
i][
j] =
new TH1D(Form(
"mPtNumVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Pt distribution of ITSTPC matched tracks, wrt %s tracks %s, TrkPID %i; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str(),
j), mPtBins, mPtCut, mPtMaxCut);
327 mPtNumVsTrkPID[
i][
j]->Sumw2();
328 mPtDenVsTrkPID[
i][
j] =
new TH1D(Form(
"mPtDenVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Pt distribution of %s tracks %s, TrkPID %i; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str(),
j), mPtBins, mPtCut, mPtMaxCut);
329 mPtDenVsTrkPID[
i][
j]->Sumw2();
330 mFractionITSTPCmatchPtVsTrkPID[
i][
j] =
new TEfficiency(Form(
"mFractionITSTPCmatchPtVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks vs Pt %s, TrkPID %i; Pt [GeV/c]; Eff", title[
i].c_str(), etaSel[
i].c_str(),
j), mPtBins, mPtCut, mPtMaxCut);
333 mPhiNumVsTrkPID[
i][
j] =
new TH1D(Form(
"mPhiNumVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Phi distribution of ITSTPC matched tracks, wrt %s tracks %s, TrkPID %i; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, 0.f, 2 * TMath::Pi());
334 mPhiNumVsTrkPID[
i][
j]->Sumw2();
335 mPhiDenVsTrkPID[
i][
j] =
new TH1D(Form(
"mPhiDenVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Phi distribution of %s tracks %s, TrkPID %i; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, 0.f, 2 * TMath::Pi());
336 mPhiDenVsTrkPID[
i][
j]->Sumw2();
337 mFractionITSTPCmatchPhiVsTrkPID[
i][
j] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhiVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks vs Phi %s, TrkPID %i; Phi [rad]; Eff", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, 0.f, 2 * TMath::Pi());
340 mEtaNumVsTrkPID[
i][
j] =
new TH1D(Form(
"mEtaNumVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Eta distribution of ITSTPC matched tracks, wrt %s tracks %s, TrkPID %i; Eta; dNdEta", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, -2.f, 2.f);
341 mEtaNumVsTrkPID[
i][
j]->Sumw2();
342 mEtaDenVsTrkPID[
i][
j] =
new TH1D(Form(
"mEtaDenVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Eta distribution of %s tracks %s, TrkPID %i; Eta; dNdEta", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, -2.f, 2.f);
343 mEtaDenVsTrkPID[
i][
j]->Sumw2();
344 mFractionITSTPCmatchEtaVsTrkPID[
i][
j] =
new TEfficiency(Form(
"mFractionITSTPCmatchEtaVsTrkPID_%s_PID%i", title[
i].c_str(),
j), Form(
"Fraction of ITSTPC matched tracks wrt %s tracks vs Eta %s, TrkPID %i; Eta; Eff", title[
i].c_str(), etaSel[
i].c_str(),
j), 100, -2.f, 2.f);
349 mResidualPt =
new TH2F(
"mResidualPt",
"Residuals of ITS-TPC matching in #it{p}_{T}; #it{p}_{T}^{ITS-TPC} [GeV/c]; #it{p}_{T}^{ITS-TPC} - #it{p}_{T}^{TPC} [GeV/c]", mPtBins, mPtCut, mPtMaxCut, 100, -1.f, 1.f);
350 mResidualPhi =
new TH2F(
"mResidualPhi",
"Residuals of ITS-TPC matching in #it{#phi}; #it{#phi}^{ITS-TPC} [rad]; #it{#phi}^{ITS-TPC} - #it{#phi}^{TPC} [rad]", 100, 0.f, 2 * TMath::Pi(), 100, -1.f, 1.f);
351 mResidualEta =
new TH2F(
"mResidualEta",
"Residuals of ITS-TPC matching in #it{#eta}; #it{#eta}^{ITS-TPC}; #it{#eta}^{ITS-TPC} - #it{#eta}^{TPC}", 100, -2.f, 2.f, 100, -1.f, 1.f);
352 mChi2Matching =
new TH1F(
"mChi2Matching",
"Chi2 of matching; chi2", 200, 0, 300);
353 mChi2Matching->SetOption(
"logy");
354 mChi2Matching->GetYaxis()->SetTitleOffset(1.4);
355 mChi2Refit =
new TH1F(
"mChi2Refit",
"Chi2 of refit; chi2", 200, 0, 300);
356 mChi2Refit->SetOption(
"logy");
357 mChi2Refit->GetYaxis()->SetTitleOffset(1.4);
358 mDCAr =
new TH1F(
"mDCAr",
"DCA of TPC tracks; DCAr", 100, -mDCATPCCutY, mDCATPCCutY);
359 mDCArVsPtNum =
new TH2F(
"mDCArVsPtNum",
"DCA of TPC tracks Vs Pt Num; #it{p}_{T} [GeV/c]; DCAr", 100, 0, 20., 100, -mDCATPCCutY, mDCATPCCutY);
360 mDCArVsPtNum->Sumw2();
361 mDCArVsPtDen =
new TH2F(
"mDCArVsPtDen",
"DCA of TPC tracks Vs Pt Den; #it{p}_{T} [GeV/c]; DCAr", 100, 0, 20., 100, -mDCATPCCutY, mDCATPCCutY);
362 mDCArVsPtDen->Sumw2();
363 mFractionITSTPCmatchDCArVsPt =
new TEfficiency(
"mFractionITSTPCmatchDCArVsPt",
"Fraction of ITSTPC matched tracks wrt TPC vs DCAr; #it{p}_{T} [GeV#it{c}]; DCAr; Eff", 100, 0, 20., 200, -30, 30);
365 mTimeResVsPt =
new TH2F(
"mTimeResVsPt",
"Time resolution vs Pt; Pt [GeV/c]; time res [us]", nbinsPt, xbinsPt, 100, 0.f, 2.f);
366 mTimeResVsPt->SetOption(
"colz logz logy logx");
367 mTimeResVsPt->GetYaxis()->SetTitleOffset(1.4);
373 mPtPhysPrimNum[
i] =
new TH1F(Form(
"mPtPhysPrimNum_%s", title[
i].c_str()), Form(
"Pt distribution of matched tracks (physical primary), wrt %s tracks %s; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), nbinsPt, xbinsPt);
374 mPtPhysPrimNum[
i]->Sumw2();
375 mPtPhysPrimDen[
i] =
new TH1F(Form(
"mPtPhysPrimDen_%s", title[
i].c_str()), Form(
"Pt distribution of %s tracks (physical primary) %s; Pt [GeV/c]; dNdPt", title[
i].c_str(), etaSel[
i].c_str()), nbinsPt, xbinsPt);
376 mPtPhysPrimDen[
i]->Sumw2();
377 mFractionITSTPCmatchPhiPhysPrim[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhiPhysPrim_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs Phi (physical primary), wrt %s tracks %s; Phi [rad]; Eff", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
379 mEtaPhysPrimNum[
i] =
new TH1F(Form(
"mEtaPhysPrimNum_%s", title[
i].c_str()), Form(
"Eta distribution of matched tracks (physical primary), wrt %s tracks; Eta; dNdEta", title[
i].c_str()), 100, -2.f, 2.f);
380 mEtaPhysPrimNum[
i]->Sumw2();
381 mEtaPhysPrimDen[
i] =
new TH1F(Form(
"mEtaPhysPrimDen_%s", title[
i].c_str()), Form(
"Eta distribution of %s tracks (physical primary); Eta; dNdEta", title[
i].c_str()), 100, -2.f, 2.f);
382 mEtaPhysPrimDen[
i]->Sumw2();
383 mFractionITSTPCmatchEtaPhysPrim[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchEtaPhysPrim_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs Eta (physical primary), wrt %s tracks; Eta; Eff", title[
i].c_str()), 100, -2.f, 2.f);
385 mPhiPhysPrimNum[
i] =
new TH1F(Form(
"mPhiPhysPrimNum_%s", title[
i].c_str()), Form(
"Phi distribution of matched tracks (physical primary), wrt %s tracks %s; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
386 mPhiPhysPrimNum[
i]->Sumw2();
387 mPhiPhysPrimDen[
i] =
new TH1F(Form(
"mPhiPhysPrimDen_%s", title[
i].c_str()), Form(
"Phi distribution of %s tracks (physical primary) %s; Phi [rad]; dNdPhi", title[
i].c_str(), etaSel[
i].c_str()), 100, 0.f, 2 * TMath::Pi());
388 mPhiPhysPrimDen[
i]->Sumw2();
389 mFractionITSTPCmatchPhysPrim[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhysPrim_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs Pt (physical primary), wrt %s tracks %s; Pt [GeV/c]; Eff", title[
i].c_str(), etaSel[
i].c_str()), nbinsPt, xbinsPt);
391 m1OverPtPhysPrimNum[
i] =
new TH1D(Form(
"m1OverPtPhysPrimNum_%s", title[
i].c_str()), Form(
"1/Pt distribution of matched tracks (physical primary), wrt %s tracks %s; 1/Pt [c/GeV]; dNd1/Pt", title[
i].c_str(), etaSel[
i].c_str()), 2 * mPtBins, -20., 20.);
392 m1OverPtPhysPrimNum[
i]->Sumw2();
393 m1OverPtPhysPrimDen[
i] =
new TH1D(Form(
"m1OverPtPhysPrimDen_%s", title[
i].c_str()), Form(
"1/PtPt distribution of %s tracks (physical primary) %s; 1/Pt [c/GeV]; dNd1/Pt", title[
i].c_str(), etaSel[
i].c_str()), 2 * mPtBins, -20., 20.);
394 m1OverPtPhysPrimDen[
i]->Sumw2();
395 mFractionITSTPCmatchPhysPrim1OverPt[
i] =
new TEfficiency(Form(
"mFractionITSTPCmatchPhysPrim1OverPt_%s", title[
i].c_str()), Form(
"Fraction of ITSTPC matched tracks vs 1/Pt (physical primary), wrt %s tracks %s; 1/Pt [c/GeV]; Eff", title[
i].c_str(), etaSel[
i].c_str()), 2 * mPtBins, -20., 20.);
400 const Int_t nbinsPtK0 = 10;
401 const Double_t xminPtK0 = 0.01;
402 const Double_t xmaxPtK0 = 20;
403 Double_t* xbinsPtK0 =
new Double_t[nbinsPtK0 + 1];
404 Double_t xlogminPtK0 = TMath::Log10(xminPtK0);
405 Double_t xlogmaxPtK0 = TMath::Log10(xmaxPtK0);
406 Double_t dlogxPtK0 = (xlogmaxPtK0 - xlogminPtK0) / nbinsPtK0;
407 for (
int i = 0;
i <= nbinsPtK0;
i++) {
408 Double_t xlogPtK0 = xlogminPtK0 +
i * dlogxPtK0;
409 xbinsPtK0[
i] = TMath::Exp(TMath::Log(10) * xlogPtK0);
412 const Int_t nbinsMassK0 = 100;
413 Double_t* ybinsMassK0 =
new Double_t[nbinsMassK0 + 1];
414 Double_t yminMassK0 = 0.4;
415 Double_t ymaxMassK0 = 0.6;
416 Double_t dyMassK0 = (ymaxMassK0 - yminMassK0) / nbinsMassK0;
417 for (
int i = 0;
i <= nbinsMassK0;
i++) {
418 ybinsMassK0[
i] = yminMassK0 +
i * dyMassK0;
420 const Int_t nbinsMultK0pp = mNBinsTPCOccpp;
421 Double_t* zbinsMultK0pp =
new Double_t[nbinsMultK0pp + 1];
422 Double_t zminMultK0pp = mMinTPCOccpp;
423 Double_t zmaxMultK0pp = mMaxTPCOccpp;
424 Double_t dzMultK0pp = (zmaxMultK0pp - zminMultK0pp) / nbinsMultK0pp;
425 for (
int i = 0;
i <= nbinsMultK0pp;
i++) {
426 zbinsMultK0pp[
i] = zminMultK0pp +
i * dzMultK0pp;
429 const Int_t nbinsMultK0PbPb = mNBinsTPCOccPbPb;
430 Double_t* zbinsMultK0PbPb =
new Double_t[nbinsMultK0PbPb + 1];
431 Double_t zminMultK0PbPb = mMinTPCOccPbPb;
432 Double_t zmaxMultK0PbPb = mMaxTPCOccPbPb;
433 Double_t dzMultK0PbPb = (zmaxMultK0PbPb - zminMultK0PbPb) / nbinsMultK0PbPb;
434 for (
int i = 0;
i <= nbinsMultK0PbPb;
i++) {
435 zbinsMultK0PbPb[
i] = zminMultK0PbPb +
i * dzMultK0PbPb;
440 mK0MassVsPtVsOccpp =
new TH3F(
"mK0MassVsPtVsOccpp",
"K0 invariant mass vs Pt vs TPC occupancy; Pt [GeV/c]; K0s mass [GeV/c^2]; TPC occ.", nbinsPtK0, xbinsPtK0, nbinsMassK0, ybinsMassK0, nbinsMultK0pp, zbinsMultK0pp);
442 mK0MassVsPtVsOccPbPb =
new TH3F(
"mK0MassVsPtVsOccPbPb",
"K0 invariant mass vs Pt vs TPC occupancy; Pt [GeV/c]; K0s mass [GeV/c^2]; TPC occ", nbinsPtK0, xbinsPtK0, nbinsMassK0, ybinsMassK0, nbinsMultK0PbPb, zbinsMultK0PbPb);
445 LOG(info) <<
"Printing configuration cuts";
450 delete[] ybinsMassK0;
451 delete[] zbinsMultK0pp;
452 delete[] zbinsMultK0PbPb;
487 if (mTimestamp == -1 && mDoK0QC) {
491 mFitterV0.setUseAbsDCA(svparam.
useAbsDCA);
492 mFitterV0.setMaxR(svparam.
maxRIni);
495 mFitterV0.setMaxDZIni(svparam.
maxDZIni);
496 mFitterV0.setMaxDXYIni(svparam.
maxDXYIni);
497 mFitterV0.setMaxChi2(svparam.
maxChi2);
501 mFitterV0.setMaxStep(svparam.
maxStep);
502 mFitterV0.setMaxSnp(svparam.
maxSnp);
503 mFitterV0.setMinXSeed(svparam.
minXSeed);
507 if (grplhcif->getBeamZ(0) != 1 || grplhcif->getBeamZ(1) != 1) {
508 LOG(info) <<
"We are in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
511 LOG(info) <<
"We are not in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
515 static int evCount = 0;
521 LOG(info) <<
"****** Number of found ITSTPC tracks = " << mITSTPCTracks.size();
522 LOG(info) <<
"****** Number of found TPC tracks = " << mTPCTracks.size();
523 LOG(info) <<
"****** Number of found ITS tracks = " << mITSTracks.size();
526 std::vector<bool> isTPCTrackSelectedEntry(mTPCTracks.size(),
false);
527 std::vector<bool> isITSTrackSelectedEntry(mITSTracks.size(),
false);
534 for (
auto it = mRequiredITSHits.begin(); it != mRequiredITSHits.end(); it++) {
548 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
549 auto const& trkTpc = mTPCTracks[itrk];
554 isTPCTrackSelectedEntry[itrk] =
true;
558 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
559 auto const& trkIts = mITSTracks[itrk];
564 isITSTrackSelectedEntry[itrk] =
true;
569 std::map<std::pair<int, int>, std::unordered_map<int, bool>> physPrimary;
570 auto isPhysPrimary = [&physPrimary](
const o2::MCCompLabel& lbl) {
return physPrimary.at({lbl.getSourceID(), lbl.getEventID()}).at(lbl.getTrackID()); };
573 for (
auto const& lbl :
labels) {
575 physPrimary[{lbl.getSourceID(), lbl.getEventID()}][lbl.getTrackID()] =
false;
579 for (
auto& [sourceAndEvent,
flags] : physPrimary) {
582 for (
auto& [trackID, flag] :
flags) {
592 mMapLabels[
i].clear();
594 for (
int itrk = 0; itrk < static_cast<int>(mITSTPCTracks.size()); ++itrk) {
595 auto const& trk = mITSTPCTracks[itrk];
596 auto idxTrkTpc = trk.getRefTPC().getIndex();
597 if (trk.getRefITS().getSource() !=
GID::ITS) {
600 if (isTPCTrackSelectedEntry[idxTrkTpc]) {
602 if (!lbl.isValid()) {
606 if (isPhysPrimary(lbl)) {
607 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
609 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
613 if (mITSTPCTracks[mMapLabels[
matchType::TPC].at(lbl).mIdx].getPt() < trk.getPt()) {
618 auto idxTrkIts = trk.getRefITS().getIndex();
619 if (isITSTrackSelectedEntry[idxTrkIts]) {
621 if (!lbl.isValid()) {
625 if (isPhysPrimary(lbl)) {
626 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
628 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
632 if (mITSTPCTracks[mMapLabels[
matchType::ITS].at(lbl).mIdx].getPt() < trk.getPt()) {
638 LOG(
debug) <<
"number of entries in map for nominator (without duplicates) = " << mMapLabels.size();
642 for (
auto const& el : mMapLabels[
i]) {
643 auto const& trk = mITSTPCTracks[el.second.mIdx];
645 bool isEtaITSOk =
true;
647 trkDen = mTPCTracks[trk.getRefTPC()];
649 trkDen = mITSTracks[trk.getRefITS()];
650 if (std::abs(trkDen.getEta()) > mEtaITSCut) {
656 mPtNum[
i]->Fill(trkDen.getPt());
657 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
658 mPtNum_noEta0[
i]->Fill(trkDen.getPt());
660 mPhiNum[
i]->Fill(trkDen.getPhi());
661 mPhiVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
662 m1OverPtNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
663 mEtaPhiPtNum[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
665 mPtDen[
i]->Fill(trkDen.getPt());
666 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
667 mPtDen_noEta0[
i]->Fill(trkDen.getPt());
669 mPhiDen[
i]->Fill(trkDen.getPhi());
670 mPhiVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
671 m1OverPtDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
672 mEtaPhiPtDen[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
674 mPtNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
675 mPhiNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
677 mPtDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
678 mPhiDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
681 mEtaNum[
i]->Fill(trkDen.getEta());
682 mEtaVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getEta());
684 mEtaDen[
i]->Fill(trkDen.getEta());
685 mEtaVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getEta());
687 auto tpcTrk = mTPCTracks[trk.getRefTPC()];
688 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
689 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
690 mClsVsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
691 mChi2VsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
692 math_utils::Point3D<float>
v{};
693 std::array<float, 2> dca{};
694 if (tpcTrk.propagateParamToDCA(
v, mBz, &dca)) {
695 mDCArVsPtNum->Fill(tpcTrk.getPt(), dca[0]);
696 mDCArVsPtDen->Fill(tpcTrk.getPt(), dca[0]);
699 const auto& itsTrk = mITSTracks[trk.getRefITS()];
700 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
701 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
702 mClsVsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
703 mChi2VsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
706 mEtaNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
708 mEtaDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
710 if (el.second.mIsPhysicalPrimary) {
712 mPtPhysPrimNum[
i]->Fill(trkDen.getPt());
713 mPhiPhysPrimNum[
i]->Fill(trkDen.getPhi());
714 m1OverPtPhysPrimNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
716 mPtPhysPrimDen[
i]->Fill(trkDen.getPt());
717 mPhiPhysPrimDen[
i]->Fill(trkDen.getPhi());
718 m1OverPtPhysPrimDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
720 mEtaPhysPrimNum[
i]->Fill(trkDen.getEta());
722 mEtaPhysPrimDen[
i]->Fill(trkDen.getEta());
724 ++mNITSTPCSelectedTracks[
i];
729 for (
auto const& trk : mITSTPCTracks) {
730 if (trk.getRefTPC().getIndex() >= mTPCTracks.size()) {
731 LOG(fatal) <<
"******************** ATTENTION! for TPC track associated to matched track: idx = " << trk.getRefTPC().getIndex() <<
", size of container = " << mTPCTracks.size() <<
" in TF " << evCount;
733 std::array<std::string, 2> title{
"TPC",
"ITS"};
736 unsigned int idxTrkRef{0};
737 bool fillHisto =
false;
738 bool isEtaITSOk =
true;
740 trkRef = mTPCTracks[trk.getRefTPC()];
741 idxTrkRef = trk.getRefTPC().getIndex();
742 if (isTPCTrackSelectedEntry[idxTrkRef]) {
744 ++mNITSTPCSelectedTracks[
i];
747 idxTrkRef = trk.getRefITS().getIndex();
748 if (trk.getRefITS().getSource() ==
GID::ITSAB) {
750 LOG(
debug) <<
"Track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" is from afterburner";
753 if (idxTrkRef >= mITSTracks.size()) {
754 LOG(fatal) <<
"******************** ATTENTION! for ITS track associated to matched track (NOT from AB): idx = " << trk.getRefITS().getIndex() <<
", size of container = " << mITSTracks.size() <<
" in TF " << evCount;
756 trkRef = mITSTracks[trk.getRefITS()];
757 LOG(
debug) <<
"Checking track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" and pt = " << trkRef.getPt();
758 if (isITSTrackSelectedEntry[idxTrkRef]) {
759 LOG(
debug) <<
"Track was selected (ITS), with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" , we keep it in the numerator, pt = " << trkRef.getPt();
761 ++mNITSTPCSelectedTracks[
i];
763 LOG(
debug) <<
"Track was not selected (ITS), with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" , we don't keep it in the numerator, pt = " << trkRef.getPt();
765 if (std::abs(trkRef.getEta()) > mEtaITSCut) {
768 LOG(
debug) <<
"Track (ITS), with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" will be discarded when filling pt of phi related histograms, since eta = " << trkRef.getEta() <<
" , we don't keep it in the numerator, pt = " << trkRef.getPt();
773 LOG(
debug) <<
"Filling num (" << title[
i] <<
") with track with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" with pt = " << trkRef.getPt();
775 mPtNum[
i]->Fill(trkRef.getPt());
776 if (std::abs(trkRef.getEta()) > mEtaNo0Cut) {
777 mPtNum_noEta0[
i]->Fill(trkRef.getPt());
779 mPhiNum[
i]->Fill(trkRef.getPhi());
781 mPtNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPt());
782 mPhiNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPhi());
784 mPhiVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getPhi());
785 m1OverPtNum[
i]->Fill(trkRef.getSign() * trkRef.getPtInv());
786 mEtaPhiPtNum[
i]->Fill(trkRef.getEta(), trkRef.getPhi(), trkRef.getPt());
788 mEtaNum[
i]->Fill(trkRef.getEta());
790 mEtaNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getEta());
792 mEtaVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getEta());
794 const auto& tpcTrk = mTPCTracks[trk.getRefTPC()];
795 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
796 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
798 const auto& itsTrk = mITSTracks[trk.getRefITS()];
799 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
800 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
804 mResidualPt->Fill(trk.getPt(), trk.getPt() - trkRef.getPt());
805 mResidualPhi->Fill(trk.getPhi(), trk.getPhi() - trkRef.getPhi());
806 mResidualEta->Fill(trk.getEta(), trk.getEta() - trkRef.getEta());
807 mChi2Matching->Fill(trk.getChi2Match());
808 mChi2Refit->Fill(trk.getChi2Refit());
809 mTimeResVsPt->Fill(trkRef.getPt(), trk.getTimeMUS().getTimeStampError());
810 math_utils::Point3D<float>
v{};
811 std::array<float, 2> dca{-999, -999};
812 if (trkRef.propagateParamToDCA(
v, mBz, &dca)) {
815 mDCArVsPtNum->Fill(trkRef.getPt(), dca[0]);
818 LOG(
debug) <<
"*** chi2Matching = " << trk.getChi2Match() <<
", chi2refit = " << trk.getChi2Refit() <<
", timeResolution = " << trk.getTimeMUS().getTimeStampError();
821 LOG(
debug) <<
"Not filling num (" << title[
i] <<
") for ITSTPC track " << iITSTPC <<
" for track with pt " << trkRef.getPt();
830 mMapRefLabels[
i].clear();
834 for (
int itrk = 0; itrk < static_cast<int>(mTPCTracks.size()); ++itrk) {
835 auto const& trk = mTPCTracks[itrk];
836 if (isTPCTrackSelectedEntry[itrk]) {
838 if (!lbl.isValid()) {
846 if (isPhysPrimary(lbl)) {
853 if (mTPCTracks[mMapRefLabels[
matchType::TPC].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
862 for (
int itrk = 0; itrk < static_cast<int>(mITSTracks.size()); ++itrk) {
863 auto const& trk = mITSTracks[itrk];
864 if (isITSTrackSelectedEntry[itrk]) {
866 if (!lbl.isValid()) {
874 if (isPhysPrimary(lbl)) {
881 if (mITSTracks[mMapRefLabels[
matchType::ITS].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
892 auto const& trk = mTPCTracks[el.second.mIdx];
894 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
899 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
902 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
903 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
905 math_utils::Point3D<float>
v{};
906 std::array<float, 2> dca{};
907 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
908 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
910 if (el.second.mIsPhysicalPrimary) {
914 m1OverPtPhysPrimDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
916 ++mNTPCSelectedTracks;
919 auto const& trk = mITSTracks[el.second.mIdx];
920 if (std::abs(trk.getEta()) < mEtaITSCut) {
922 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
927 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
928 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
932 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
934 if (el.second.mIsPhysicalPrimary) {
935 if (std::abs(trk.getEta()) < mEtaITSCut) {
938 m1OverPtPhysPrimDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
942 ++mNITSSelectedTracks;
946 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
947 auto const& trk = mTPCTracks[itrk];
948 if (isTPCTrackSelectedEntry[itrk]) {
949 LOG(
debug) <<
"Filling den (TPC) with track with pt = " << trk.getPt();
951 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
954 LOG(
debug) <<
"Track (ITS) " << itrk <<
" with pt = " << trk.getPt() <<
" and eta = " << trk.getEta() <<
" not used for den pt, phi, phi vs pt, 1.pt histos";
958 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
961 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
962 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
964 math_utils::Point3D<float>
v{};
965 std::array<float, 2> dca{};
966 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
967 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
969 ++mNTPCSelectedTracks;
972 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
973 auto const& trk = mITSTracks[itrk];
974 LOG(
debug) <<
"Checking den for track (ITS) " << itrk <<
" with pt " << trk.getPt() <<
" and eta = " << trk.getEta();
975 if (isITSTrackSelectedEntry[itrk]) {
976 if (std::abs(trk.getEta()) < mEtaITSCut) {
977 LOG(
debug) <<
"Filling den for track (ITS) " << itrk <<
" with pt = " << trk.getPt() <<
" and eta = " << trk.getEta();
979 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
984 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
985 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
987 LOG(
debug) <<
"Track (ITS) " << itrk <<
" with pt = " << trk.getPt() <<
" and eta = " << trk.getEta() <<
" not used for num pt, phi, phi vs pt, 1.pt histos";
991 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
993 ++mNITSSelectedTracks;
995 LOG(
debug) <<
"Not filling for this track (ITS) " << itrk <<
" with pt = " << trk.getPt();
1002 mFitterV0.setBz(mBz);
1004 LOG(info) <<
"****** Number of PVs = " << pvertices.size();
1013 LOG(
debug) <<
"occupancyMapSizeBytes = " << occupancyMapSizeBytes;
1017 std::vector<float> mTBinClOcc;
1019 int mNTPCOccBinLength = mParam->rec.tpc.occupancyMapTimeBins;
1020 LOG(
debug) <<
"mNTPCOccBinLength = " << mNTPCOccBinLength;
1021 mNTPCOccBinLengthInv = 1. / mNTPCOccBinLength;
1022 if (mNTPCOccBinLength > 1 && mTPCRefitterOccMap.size()) {
1023 int nTPCBinsInTF = mNHBPerTF * o2::constants::lhc::LHCMaxBunches / 8;
1025 int nTPCOccBinsInTF = nTPCBinsInTF * mNTPCOccBinLengthInv;
1026 int sumBins = std::max(1,
int(o2::constants::lhc::LHCMaxBunches / 8 * mNTPCOccBinLengthInv));
1027 LOG(
debug) <<
"number of TPC TB in 1 TF = nTPCBinsInTF = " << nTPCBinsInTF <<
" ; number of occupancy bins in 1 TF = nTPCOccBinsInTF = " << nTPCOccBinsInTF;
1028 LOG(
debug) <<
"bins to integrate = sumBins = " << sumBins;
1029 mTBinClOcc.resize(nTPCOccBinsInTF);
1030 std::vector<float> mltHistTB(nTPCOccBinsInTF);
1031 float sm = 0., tb = 0.5 * mNTPCOccBinLength;
1032 bool foundNotZero =
false;
1033 for (
int i = 0;
i < nTPCOccBinsInTF;
i++) {
1034 mltHistTB[
i] = mParam->GetUnscaledMult(tb);
1035 if (mParam->GetUnscaledMult(tb) != 0) {
1036 LOG(
debug) <<
"i = " <<
i <<
" tb = " << tb <<
" mltHistTB[" <<
i <<
"] = " << mltHistTB[
i];
1037 foundNotZero =
true;
1039 tb += mNTPCOccBinLength;
1041 if (!foundNotZero) {
1042 LOG(
debug) <<
"No mult bin was found different from 0!";
1044 foundNotZero =
false;
1046 for (
int i = nTPCOccBinsInTF;
i--;) {
1047 if (mltHistTB[
i] != 0) {
1048 foundNotZero =
true;
1050 LOG(
debug) <<
"i = " <<
i <<
" sm before = " << sm;
1052 LOG(
debug) <<
"i = " <<
i <<
" sm after = " << sm;
1053 if (
i + sumBins < nTPCOccBinsInTF) {
1054 LOG(
debug) <<
"i = " <<
i <<
" sumBins = " << sumBins <<
" nTPCOccBinsInTF = " << nTPCOccBinsInTF <<
" we have to decrease sm by = " << mltHistTB[
i + sumBins];
1055 sm -= mltHistTB[
i + sumBins];
1056 LOG(
debug) <<
"i = " <<
i <<
" sm after 2 = " << sm;
1059 LOG(
debug) <<
"i = " <<
i <<
" mTBinClOcc[" <<
i <<
"] = " << mTBinClOcc[
i];
1061 if (!foundNotZero) {
1062 LOG(
debug) <<
"No mult bin was found different from 0! sm = " << sm;
1065 mTBinClOcc.resize(1);
1068 auto nv0 = v0IDs.size();
1069 if (nv0 > mRecoCont.
getV0s().size()) {
1072 LOG(
debug) <<
"Found " << mRecoCont.
getV0s().size() <<
" V0s in reco container";
1073 LOG(
debug) <<
"Found " << nv0 <<
" V0s ids";
1075 std::map<int, std::vector<int>> pv2sv;
1076 static int tfID = 0;
1077 for (
int iv = 0; iv < nv0; iv++) {
1078 const auto v0id = v0IDs[iv];
1080 if (id0.getSourceDetectorsMask()[DetID::ITS] && id1.getSourceDetectorsMask()[DetID::ITS] &&
1082 pv2sv[v0id.getVertexID()].push_back(iv);
1084 LOG(
debug) <<
"Skipping this V0: the track sources do not contain ITS";
1090 for (
auto it : pv2sv) {
1091 int pvID = it.first;
1092 auto& vv = it.second;
1093 if (pvID < 0 || vv.size() == 0) {
1097 float pvTime = pv.getTimeStamp().getTimeStamp();
1098 for (
int iv0 : vv) {
1099 nV0sOk +=
processV0(iv0, mRecoCont, mTBinClOcc, pvTime) ? 1 : 0;
1104 LOG(
debug) <<
"Processed " << nV0sOk <<
" V0s";