228 LOGP(
debug,
"Creating Variable Binning");
229 std::array<std::string, 2> title{
"TPC",
"ITS"};
230 std::array<std::string, 2> etaSel{Form(
", |#eta| < %.1f", mEtaTPCCut), Form(
", |#eta| < %.1f", mEtaCut)};
231 std::array<int, 2> maxNCls{156, 7};
233 const Int_t nbinsPt = mPtBins;
234 const Double_t xminPt = (mPtCut > 0) ? mPtCut : 0.01;
235 const Double_t xmaxPt = mPtMaxCut;
236 Double_t* xbinsPt =
new Double_t[nbinsPt + 1];
237 Double_t xlogminPt = TMath::Log10(xminPt);
238 Double_t xlogmaxPt = TMath::Log10(xmaxPt);
239 Double_t dlogxPt = (xlogmaxPt - xlogminPt) / nbinsPt;
240 for (
int i = 0;
i <= nbinsPt;
i++) {
241 Double_t xlogPt = xlogminPt +
i * dlogxPt;
242 xbinsPt[
i] = TMath::Exp(TMath::Log(10) * xlogPt);
245 LOGP(
debug,
"Creating Histograms");
249 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);
251 mPtNum[
i]->SetOption(
"logy");
252 mPtNum[
i]->GetYaxis()->SetTitleOffset(1.4);
253 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);
255 mPtDen[
i]->SetOption(
"logy");
256 mPtDen[
i]->GetYaxis()->SetTitleOffset(1.4);
257 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);
258 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);
259 mPtNum_noEta0[
i]->Sumw2();
260 mPtNum_noEta0[
i]->SetOption(
"logy");
261 mPtNum_noEta0[
i]->GetYaxis()->SetTitleOffset(1.4);
262 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);
263 mPtDen_noEta0[
i]->Sumw2();
264 mPtDen_noEta0[
i]->SetOption(
"logy");
265 mPtDen_noEta0[
i]->GetYaxis()->SetTitleOffset(1.4);
266 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);
269 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());
271 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());
273 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());
274 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());
275 mPhiVsPtNum[
i]->Sumw2();
276 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());
277 mPhiVsPtDen[
i]->Sumw2();
278 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());
281 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);
283 mEtaNum[
i]->GetYaxis()->SetTitleOffset(1.4);
284 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);
286 mEtaDen[
i]->GetYaxis()->SetTitleOffset(1.4);
287 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);
288 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);
289 mEtaVsPtNum[
i]->Sumw2();
290 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);
291 mEtaVsPtDen[
i]->Sumw2();
292 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);
295 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]);
296 mClsVsPtNum[
i]->Sumw2();
297 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]);
298 mClsVsPtDen[
i]->Sumw2();
299 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]);
302 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);
303 mChi2VsPtNum[
i]->Sumw2();
304 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);
305 mChi2VsPtDen[
i]->Sumw2();
306 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);
309 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);
310 m1OverPtNum[
i]->Sumw2();
311 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);
312 m1OverPtDen[
i]->Sumw2();
313 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);
316 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.);
317 mEtaPhiPtNum[
i]->Sumw2();
318 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.);
319 mEtaPhiPtDen[
i]->Sumw2();
324 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);
325 mPtNumVsTrkPID[
i][
j]->Sumw2();
326 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);
327 mPtDenVsTrkPID[
i][
j]->Sumw2();
328 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);
331 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());
332 mPhiNumVsTrkPID[
i][
j]->Sumw2();
333 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());
334 mPhiDenVsTrkPID[
i][
j]->Sumw2();
335 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());
338 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);
339 mEtaNumVsTrkPID[
i][
j]->Sumw2();
340 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);
341 mEtaDenVsTrkPID[
i][
j]->Sumw2();
342 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);
347 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);
348 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);
349 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);
350 mChi2Matching =
new TH1F(
"mChi2Matching",
"Chi2 of matching; chi2", 200, 0, 300);
351 mChi2Matching->SetOption(
"logy");
352 mChi2Matching->GetYaxis()->SetTitleOffset(1.4);
353 mChi2Refit =
new TH1F(
"mChi2Refit",
"Chi2 of refit; chi2", 200, 0, 300);
354 mChi2Refit->SetOption(
"logy");
355 mChi2Refit->GetYaxis()->SetTitleOffset(1.4);
356 mDCAr =
new TH1F(
"mDCAr",
"DCA of TPC tracks; DCAr", 100, -mDCATPCCutY, mDCATPCCutY);
357 mDCArVsPtNum =
new TH2F(
"mDCArVsPtNum",
"DCA of TPC tracks Vs Pt Num; #it{p}_{T} [GeV/c]; DCAr", 100, 0, 20., 100, -mDCATPCCutY, mDCATPCCutY);
358 mDCArVsPtNum->Sumw2();
359 mDCArVsPtDen =
new TH2F(
"mDCArVsPtDen",
"DCA of TPC tracks Vs Pt Den; #it{p}_{T} [GeV/c]; DCAr", 100, 0, 20., 100, -mDCATPCCutY, mDCATPCCutY);
360 mDCArVsPtDen->Sumw2();
361 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);
363 mTimeResVsPt =
new TH2F(
"mTimeResVsPt",
"Time resolution vs Pt; Pt [GeV/c]; time res [us]", nbinsPt, xbinsPt, 100, 0.f, 2.f);
364 mTimeResVsPt->SetOption(
"colz logz logy logx");
365 mTimeResVsPt->GetYaxis()->SetTitleOffset(1.4);
371 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);
372 mPtPhysPrimNum[
i]->Sumw2();
373 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);
374 mPtPhysPrimDen[
i]->Sumw2();
375 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());
377 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);
378 mEtaPhysPrimNum[
i]->Sumw2();
379 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);
380 mEtaPhysPrimDen[
i]->Sumw2();
381 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);
383 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());
384 mPhiPhysPrimNum[
i]->Sumw2();
385 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());
386 mPhiPhysPrimDen[
i]->Sumw2();
387 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);
389 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.);
390 m1OverPtPhysPrimNum[
i]->Sumw2();
391 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.);
392 m1OverPtPhysPrimDen[
i]->Sumw2();
393 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.);
398 const Int_t nbinsPtK0 = 10;
399 const Double_t xminPtK0 = 0.01;
400 const Double_t xmaxPtK0 = 20;
401 Double_t* xbinsPtK0 =
new Double_t[nbinsPtK0 + 1];
402 Double_t xlogminPtK0 = TMath::Log10(xminPtK0);
403 Double_t xlogmaxPtK0 = TMath::Log10(xmaxPtK0);
404 Double_t dlogxPtK0 = (xlogmaxPtK0 - xlogminPtK0) / nbinsPtK0;
405 for (
int i = 0;
i <= nbinsPtK0;
i++) {
406 Double_t xlogPtK0 = xlogminPtK0 +
i * dlogxPtK0;
407 xbinsPtK0[
i] = TMath::Exp(TMath::Log(10) * xlogPtK0);
410 const Int_t nbinsMassK0 = 100;
411 Double_t* ybinsMassK0 =
new Double_t[nbinsMassK0 + 1];
412 Double_t yminMassK0 = 0.4;
413 Double_t ymaxMassK0 = 0.6;
414 Double_t dyMassK0 = (ymaxMassK0 - yminMassK0) / nbinsMassK0;
415 for (
int i = 0;
i <= nbinsMassK0;
i++) {
416 ybinsMassK0[
i] = yminMassK0 +
i * dyMassK0;
418 const Int_t nbinsMultK0pp = mNBinsTPCOccpp;
419 Double_t* zbinsMultK0pp =
new Double_t[nbinsMultK0pp + 1];
420 Double_t zminMultK0pp = mMinTPCOccpp;
421 Double_t zmaxMultK0pp = mMaxTPCOccpp;
422 Double_t dzMultK0pp = (zmaxMultK0pp - zminMultK0pp) / nbinsMultK0pp;
423 for (
int i = 0;
i <= nbinsMultK0pp;
i++) {
424 zbinsMultK0pp[
i] = zminMultK0pp +
i * dzMultK0pp;
427 const Int_t nbinsMultK0PbPb = mNBinsTPCOccPbPb;
428 Double_t* zbinsMultK0PbPb =
new Double_t[nbinsMultK0PbPb + 1];
429 Double_t zminMultK0PbPb = mMinTPCOccPbPb;
430 Double_t zmaxMultK0PbPb = mMaxTPCOccPbPb;
431 Double_t dzMultK0PbPb = (zmaxMultK0PbPb - zminMultK0PbPb) / nbinsMultK0PbPb;
432 for (
int i = 0;
i <= nbinsMultK0PbPb;
i++) {
433 zbinsMultK0PbPb[
i] = zminMultK0PbPb +
i * dzMultK0PbPb;
438 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);
440 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);
443 LOG(info) <<
"Printing configuration cuts";
448 delete[] ybinsMassK0;
449 delete[] zbinsMultK0pp;
450 delete[] zbinsMultK0PbPb;
486 if (mTimestamp == -1 && mDoK0QC) {
490 mFitterV0.setUseAbsDCA(svparam.
useAbsDCA);
491 mFitterV0.setMaxR(svparam.
maxRIni);
494 mFitterV0.setMaxDZIni(svparam.
maxDZIni);
495 mFitterV0.setMaxDXYIni(svparam.
maxDXYIni);
496 mFitterV0.setMaxChi2(svparam.
maxChi2);
500 mFitterV0.setMaxStep(svparam.
maxStep);
501 mFitterV0.setMaxSnp(svparam.
maxSnp);
502 mFitterV0.setMinXSeed(svparam.
minXSeed);
506 if (grplhcif->getBeamZ(0) != 1 || grplhcif->getBeamZ(1) != 1) {
507 LOG(info) <<
"We are in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
510 LOG(info) <<
"We are not in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
514 static int evCount = 0;
520 LOG(info) <<
"****** Number of found ITSTPC tracks = " << mITSTPCTracks.size();
521 LOG(info) <<
"****** Number of found TPC tracks = " << mTPCTracks.size();
522 LOG(info) <<
"****** Number of found ITS tracks = " << mITSTracks.size();
525 std::vector<bool> isTPCTrackSelectedEntry(mTPCTracks.size(),
false);
526 std::vector<bool> isITSTrackSelectedEntry(mITSTracks.size(),
false);
533 for (
auto it = mRequiredITSHits.begin(); it != mRequiredITSHits.end(); it++) {
547 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
548 auto const& trkTpc = mTPCTracks[itrk];
553 isTPCTrackSelectedEntry[itrk] =
true;
557 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
558 auto const& trkIts = mITSTracks[itrk];
563 isITSTrackSelectedEntry[itrk] =
true;
570 mMapLabels[
i].clear();
572 for (
int itrk = 0; itrk < static_cast<int>(mITSTPCTracks.size()); ++itrk) {
573 auto const& trk = mITSTPCTracks[itrk];
574 auto idxTrkTpc = trk.getRefTPC().getIndex();
575 if (trk.getRefITS().getSource() !=
GID::ITS) {
578 if (isTPCTrackSelectedEntry[idxTrkTpc]) {
580 if (!lbl.isValid()) {
585 int event = lbl.getEventID();
587 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
589 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
591 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
595 if (mITSTPCTracks[mMapLabels[
matchType::TPC].at(lbl).mIdx].getPt() < trk.getPt()) {
600 auto idxTrkIts = trk.getRefITS().getIndex();
601 if (isITSTrackSelectedEntry[idxTrkIts]) {
603 if (!lbl.isValid()) {
608 int event = lbl.getEventID();
610 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
612 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
614 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
618 if (mITSTPCTracks[mMapLabels[
matchType::ITS].at(lbl).mIdx].getPt() < trk.getPt()) {
624 LOG(
debug) <<
"number of entries in map for nominator (without duplicates) = " << mMapLabels.size();
628 for (
auto const& el : mMapLabels[
i]) {
629 auto const& trk = mITSTPCTracks[el.second.mIdx];
631 bool isEtaITSOk =
true;
633 trkDen = mTPCTracks[trk.getRefTPC()];
635 trkDen = mITSTracks[trk.getRefITS()];
636 if (std::abs(trkDen.getEta()) > mEtaITSCut) {
642 mPtNum[
i]->Fill(trkDen.getPt());
643 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
644 mPtNum_noEta0[
i]->Fill(trkDen.getPt());
646 mPhiNum[
i]->Fill(trkDen.getPhi());
647 mPhiVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
648 m1OverPtNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
649 mEtaPhiPtNum[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
651 mPtDen[
i]->Fill(trkDen.getPt());
652 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
653 mPtDen_noEta0[
i]->Fill(trkDen.getPt());
655 mPhiDen[
i]->Fill(trkDen.getPhi());
656 mPhiVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
657 m1OverPtDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
658 mEtaPhiPtDen[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
660 mPtNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
661 mPhiNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
663 mPtDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
664 mPhiDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
667 mEtaNum[
i]->Fill(trkDen.getEta());
668 mEtaVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getEta());
670 mEtaDen[
i]->Fill(trkDen.getEta());
671 mEtaVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getEta());
673 auto tpcTrk = mTPCTracks[trk.getRefTPC()];
674 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
675 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
676 mClsVsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
677 mChi2VsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
679 std::array<float, 2> dca{};
680 if (tpcTrk.propagateParamToDCA(
v, mBz, &dca)) {
681 mDCArVsPtNum->Fill(tpcTrk.getPt(), dca[0]);
682 mDCArVsPtDen->Fill(tpcTrk.getPt(), dca[0]);
685 const auto& itsTrk = mITSTracks[trk.getRefITS()];
686 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
687 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
688 mClsVsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
689 mChi2VsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
692 mEtaNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
694 mEtaDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
696 if (el.second.mIsPhysicalPrimary) {
698 mPtPhysPrimNum[
i]->Fill(trkDen.getPt());
699 mPhiPhysPrimNum[
i]->Fill(trkDen.getPhi());
700 m1OverPtPhysPrimNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
702 mPtPhysPrimDen[
i]->Fill(trkDen.getPt());
703 mPhiPhysPrimDen[
i]->Fill(trkDen.getPhi());
704 m1OverPtPhysPrimDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
706 mEtaPhysPrimNum[
i]->Fill(trkDen.getEta());
708 mEtaPhysPrimDen[
i]->Fill(trkDen.getEta());
710 ++mNITSTPCSelectedTracks[
i];
715 for (
auto const& trk : mITSTPCTracks) {
716 if (trk.getRefTPC().getIndex() >= mTPCTracks.size()) {
717 LOG(fatal) <<
"******************** ATTENTION! for TPC track associated to matched track: idx = " << trk.getRefTPC().getIndex() <<
", size of container = " << mTPCTracks.size() <<
" in TF " << evCount;
719 std::array<std::string, 2> title{
"TPC",
"ITS"};
722 unsigned int idxTrkRef{0};
723 bool fillHisto =
false;
724 bool isEtaITSOk =
true;
726 trkRef = mTPCTracks[trk.getRefTPC()];
727 idxTrkRef = trk.getRefTPC().getIndex();
728 if (isTPCTrackSelectedEntry[idxTrkRef]) {
730 ++mNITSTPCSelectedTracks[
i];
733 idxTrkRef = trk.getRefITS().getIndex();
734 if (trk.getRefITS().getSource() ==
GID::ITSAB) {
736 LOG(
debug) <<
"Track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" is from afterburner";
739 if (idxTrkRef >= mITSTracks.size()) {
740 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;
742 trkRef = mITSTracks[trk.getRefITS()];
743 LOG(
debug) <<
"Checking track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" and pt = " << trkRef.getPt();
744 if (isITSTrackSelectedEntry[idxTrkRef]) {
745 LOG(
debug) <<
"Track was selected (ITS), with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" , we keep it in the numerator, pt = " << trkRef.getPt();
747 ++mNITSTPCSelectedTracks[
i];
749 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();
751 if (std::abs(trkRef.getEta()) > mEtaITSCut) {
754 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();
759 LOG(
debug) <<
"Filling num (" << title[
i] <<
") with track with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" with pt = " << trkRef.getPt();
761 mPtNum[
i]->Fill(trkRef.getPt());
762 if (std::abs(trkRef.getEta()) > mEtaNo0Cut) {
763 mPtNum_noEta0[
i]->Fill(trkRef.getPt());
765 mPhiNum[
i]->Fill(trkRef.getPhi());
767 mPtNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPt());
768 mPhiNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPhi());
770 mPhiVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getPhi());
771 m1OverPtNum[
i]->Fill(trkRef.getSign() * trkRef.getPtInv());
772 mEtaPhiPtNum[
i]->Fill(trkRef.getEta(), trkRef.getPhi(), trkRef.getPt());
774 mEtaNum[
i]->Fill(trkRef.getEta());
776 mEtaNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getEta());
778 mEtaVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getEta());
780 const auto& tpcTrk = mTPCTracks[trk.getRefTPC()];
781 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
782 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
784 const auto& itsTrk = mITSTracks[trk.getRefITS()];
785 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
786 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
790 mResidualPt->Fill(trk.getPt(), trk.getPt() - trkRef.getPt());
791 mResidualPhi->Fill(trk.getPhi(), trk.getPhi() - trkRef.getPhi());
792 mResidualEta->Fill(trk.getEta(), trk.getEta() - trkRef.getEta());
793 mChi2Matching->Fill(trk.getChi2Match());
794 mChi2Refit->Fill(trk.getChi2Refit());
795 mTimeResVsPt->Fill(trkRef.getPt(), trk.getTimeMUS().getTimeStampError());
797 std::array<float, 2> dca{-999, -999};
798 if (trkRef.propagateParamToDCA(
v, mBz, &dca)) {
801 mDCArVsPtNum->Fill(trkRef.getPt(), dca[0]);
804 LOG(
debug) <<
"*** chi2Matching = " << trk.getChi2Match() <<
", chi2refit = " << trk.getChi2Refit() <<
", timeResolution = " << trk.getTimeMUS().getTimeStampError();
807 LOG(
debug) <<
"Not filling num (" << title[
i] <<
") for ITSTPC track " << iITSTPC <<
" for track with pt " << trkRef.getPt();
816 mMapRefLabels[
i].clear();
820 for (
int itrk = 0; itrk < static_cast<int>(mTPCTracks.size()); ++itrk) {
821 auto const& trk = mTPCTracks[itrk];
822 if (isTPCTrackSelectedEntry[itrk]) {
824 if (!lbl.isValid()) {
833 int event = lbl.getEventID();
835 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
843 if (mTPCTracks[mMapRefLabels[
matchType::TPC].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
852 for (
int itrk = 0; itrk < static_cast<int>(mITSTracks.size()); ++itrk) {
853 auto const& trk = mITSTracks[itrk];
854 if (isITSTrackSelectedEntry[itrk]) {
856 if (!lbl.isValid()) {
865 int event = lbl.getEventID();
867 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
875 if (mITSTracks[mMapRefLabels[
matchType::ITS].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
886 auto const& trk = mTPCTracks[el.second.mIdx];
888 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
893 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
896 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
897 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
900 std::array<float, 2> dca{};
901 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
902 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
904 if (el.second.mIsPhysicalPrimary) {
908 m1OverPtPhysPrimDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
910 ++mNTPCSelectedTracks;
913 auto const& trk = mITSTracks[el.second.mIdx];
914 if (std::abs(trk.getEta()) < mEtaITSCut) {
916 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
921 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
922 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
926 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
928 if (el.second.mIsPhysicalPrimary) {
929 if (std::abs(trk.getEta()) < mEtaITSCut) {
932 m1OverPtPhysPrimDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
936 ++mNITSSelectedTracks;
940 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
941 auto const& trk = mTPCTracks[itrk];
942 if (isTPCTrackSelectedEntry[itrk]) {
943 LOG(
debug) <<
"Filling den (TPC) with track with pt = " << trk.getPt();
945 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
948 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";
952 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
955 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
956 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
959 std::array<float, 2> dca{};
960 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
961 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
963 ++mNTPCSelectedTracks;
966 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
967 auto const& trk = mITSTracks[itrk];
968 LOG(
debug) <<
"Checking den for track (ITS) " << itrk <<
" with pt " << trk.getPt() <<
" and eta = " << trk.getEta();
969 if (isITSTrackSelectedEntry[itrk]) {
970 if (std::abs(trk.getEta()) < mEtaITSCut) {
971 LOG(
debug) <<
"Filling den for track (ITS) " << itrk <<
" with pt = " << trk.getPt() <<
" and eta = " << trk.getEta();
973 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
978 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
979 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
981 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";
985 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
987 ++mNITSSelectedTracks;
989 LOG(
debug) <<
"Not filling for this track (ITS) " << itrk <<
" with pt = " << trk.getPt();
996 mFitterV0.setBz(mBz);
998 LOG(info) <<
"****** Number of PVs = " << pvertices.size();
1007 LOG(
debug) <<
"occupancyMapSizeBytes = " << occupancyMapSizeBytes;
1011 std::vector<float> mTBinClOcc;
1013 int mNTPCOccBinLength = mParam->rec.tpc.occupancyMapTimeBins;
1014 LOG(
debug) <<
"mNTPCOccBinLength = " << mNTPCOccBinLength;
1015 mNTPCOccBinLengthInv = 1. / mNTPCOccBinLength;
1016 if (mNTPCOccBinLength > 1 && mTPCRefitterOccMap.size()) {
1019 int nTPCOccBinsInTF = nTPCBinsInTF * mNTPCOccBinLengthInv;
1021 LOG(
debug) <<
"number of TPC TB in 1 TF = nTPCBinsInTF = " << nTPCBinsInTF <<
" ; number of occupancy bins in 1 TF = nTPCOccBinsInTF = " << nTPCOccBinsInTF;
1022 LOG(
debug) <<
"bins to integrate = sumBins = " << sumBins;
1023 mTBinClOcc.resize(nTPCOccBinsInTF);
1024 std::vector<float> mltHistTB(nTPCOccBinsInTF);
1025 float sm = 0., tb = 0.5 * mNTPCOccBinLength;
1026 bool foundNotZero =
false;
1027 for (
int i = 0;
i < nTPCOccBinsInTF;
i++) {
1028 mltHistTB[
i] = mParam->GetUnscaledMult(tb);
1029 if (mParam->GetUnscaledMult(tb) != 0) {
1030 LOG(
debug) <<
"i = " <<
i <<
" tb = " << tb <<
" mltHistTB[" <<
i <<
"] = " << mltHistTB[
i];
1031 foundNotZero =
true;
1033 tb += mNTPCOccBinLength;
1035 if (!foundNotZero) {
1036 LOG(
debug) <<
"No mult bin was found different from 0!";
1038 foundNotZero =
false;
1040 for (
int i = nTPCOccBinsInTF;
i--;) {
1041 if (mltHistTB[
i] != 0) {
1042 foundNotZero =
true;
1044 LOG(
debug) <<
"i = " <<
i <<
" sm before = " << sm;
1046 LOG(
debug) <<
"i = " <<
i <<
" sm after = " << sm;
1047 if (
i + sumBins < nTPCOccBinsInTF) {
1048 LOG(
debug) <<
"i = " <<
i <<
" sumBins = " << sumBins <<
" nTPCOccBinsInTF = " << nTPCOccBinsInTF <<
" we have to decrease sm by = " << mltHistTB[
i + sumBins];
1049 sm -= mltHistTB[
i + sumBins];
1050 LOG(
debug) <<
"i = " <<
i <<
" sm after 2 = " << sm;
1053 LOG(
debug) <<
"i = " <<
i <<
" mTBinClOcc[" <<
i <<
"] = " << mTBinClOcc[
i];
1055 if (!foundNotZero) {
1056 LOG(
debug) <<
"No mult bin was found different from 0! sm = " << sm;
1059 mTBinClOcc.resize(1);
1063 auto nv0 = v0IDs.size();
1064 if (nv0 > mRecoCont.
getV0s().size()) {
1067 LOG(
debug) <<
"Found " << mRecoCont.
getV0s().size() <<
" V0s in reco container";
1068 LOG(
debug) <<
"Found " << nv0 <<
" V0s ids";
1070 std::map<int, std::vector<int>> pv2sv;
1071 static int tfID = 0;
1072 for (
int iv = 0; iv < nv0; iv++) {
1073 const auto v0id = v0IDs[iv];
1077 pv2sv[v0id.getVertexID()].push_back(iv);
1079 LOG(
debug) <<
"Skipping this V0: the track sources do not contain ITS";
1085 for (
auto it : pv2sv) {
1086 int pvID = it.first;
1087 auto& vv = it.second;
1088 if (pvID < 0 || vv.size() == 0) {
1092 float pvTime = pv.getTimeStamp().getTimeStamp();
1093 for (
int iv0 : vv) {
1094 nV0sOk +=
processV0(iv0, mRecoCont, mTBinClOcc, pvTime) ? 1 : 0;
1099 LOG(
debug) <<
"Processed " << nV0sOk <<
" V0s";