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;
485 if (mTimestamp == -1 && mDoK0QC) {
489 mFitterV0.setUseAbsDCA(svparam.
useAbsDCA);
490 mFitterV0.setMaxR(svparam.
maxRIni);
493 mFitterV0.setMaxDZIni(svparam.
maxDZIni);
494 mFitterV0.setMaxDXYIni(svparam.
maxDXYIni);
495 mFitterV0.setMaxChi2(svparam.
maxChi2);
499 mFitterV0.setMaxStep(svparam.
maxStep);
500 mFitterV0.setMaxSnp(svparam.
maxSnp);
501 mFitterV0.setMinXSeed(svparam.
minXSeed);
505 if (grplhcif->getBeamZ(0) != 1 || grplhcif->getBeamZ(1) != 1) {
506 LOG(info) <<
"We are in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
509 LOG(info) <<
"We are not in Heavy Ion: Z for beam 0 = " << grplhcif->getBeamZ(0) <<
" ; Z for beam 1 = " << grplhcif->getBeamZ(1);
513 static int evCount = 0;
519 LOG(info) <<
"****** Number of found ITSTPC tracks = " << mITSTPCTracks.size();
520 LOG(info) <<
"****** Number of found TPC tracks = " << mTPCTracks.size();
521 LOG(info) <<
"****** Number of found ITS tracks = " << mITSTracks.size();
524 std::vector<bool> isTPCTrackSelectedEntry(mTPCTracks.size(),
false);
525 std::vector<bool> isITSTrackSelectedEntry(mITSTracks.size(),
false);
532 for (
auto it = mRequiredITSHits.begin(); it != mRequiredITSHits.end(); it++) {
546 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
547 auto const& trkTpc = mTPCTracks[itrk];
552 isTPCTrackSelectedEntry[itrk] =
true;
556 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
557 auto const& trkIts = mITSTracks[itrk];
562 isITSTrackSelectedEntry[itrk] =
true;
569 mMapLabels[
i].clear();
571 for (
int itrk = 0; itrk < static_cast<int>(mITSTPCTracks.size()); ++itrk) {
572 auto const& trk = mITSTPCTracks[itrk];
573 auto idxTrkTpc = trk.getRefTPC().getIndex();
574 if (trk.getRefITS().getSource() !=
GID::ITS) {
577 if (isTPCTrackSelectedEntry[idxTrkTpc]) {
579 if (!lbl.isValid()) {
584 int event = lbl.getEventID();
586 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
588 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
590 mMapLabels[
matchType::TPC].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
594 if (mITSTPCTracks[mMapLabels[
matchType::TPC].at(lbl).mIdx].getPt() < trk.getPt()) {
599 auto idxTrkIts = trk.getRefITS().getIndex();
600 if (isITSTrackSelectedEntry[idxTrkIts]) {
602 if (!lbl.isValid()) {
607 int event = lbl.getEventID();
609 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
611 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
true}});
613 mMapLabels[
matchType::ITS].insert({lbl, {.mIdx = itrk, .mIsPhysicalPrimary =
false}});
617 if (mITSTPCTracks[mMapLabels[
matchType::ITS].at(lbl).mIdx].getPt() < trk.getPt()) {
623 LOG(
debug) <<
"number of entries in map for nominator (without duplicates) = " << mMapLabels.size();
627 for (
auto const& el : mMapLabels[
i]) {
628 auto const& trk = mITSTPCTracks[el.second.mIdx];
630 bool isEtaITSOk =
true;
632 trkDen = mTPCTracks[trk.getRefTPC()];
634 trkDen = mITSTracks[trk.getRefITS()];
635 if (std::abs(trkDen.getEta()) > mEtaITSCut) {
641 mPtNum[
i]->Fill(trkDen.getPt());
642 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
643 mPtNum_noEta0[
i]->Fill(trkDen.getPt());
645 mPhiNum[
i]->Fill(trkDen.getPhi());
646 mPhiVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
647 m1OverPtNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
648 mEtaPhiPtNum[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
650 mPtDen[
i]->Fill(trkDen.getPt());
651 if (std::abs(trkDen.getEta()) > mEtaNo0Cut) {
652 mPtDen_noEta0[
i]->Fill(trkDen.getPt());
654 mPhiDen[
i]->Fill(trkDen.getPhi());
655 mPhiVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getPhi());
656 m1OverPtDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
657 mEtaPhiPtDen[
i]->Fill(trkDen.getEta(), trkDen.getPhi(), trkDen.getPt());
659 mPtNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
660 mPhiNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
662 mPtDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPt());
663 mPhiDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getPhi());
666 mEtaNum[
i]->Fill(trkDen.getEta());
667 mEtaVsPtNum[
i]->Fill(trkDen.getPt(), trkDen.getEta());
669 mEtaDen[
i]->Fill(trkDen.getEta());
670 mEtaVsPtDen[
i]->Fill(trkDen.getPt(), trkDen.getEta());
672 auto tpcTrk = mTPCTracks[trk.getRefTPC()];
673 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
674 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
675 mClsVsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
676 mChi2VsPtDen[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
678 std::array<float, 2> dca{};
679 if (tpcTrk.propagateParamToDCA(
v, mBz, &dca)) {
680 mDCArVsPtNum->Fill(tpcTrk.getPt(), dca[0]);
681 mDCArVsPtDen->Fill(tpcTrk.getPt(), dca[0]);
684 const auto& itsTrk = mITSTracks[trk.getRefITS()];
685 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
686 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
687 mClsVsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
688 mChi2VsPtDen[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
691 mEtaNumVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
693 mEtaDenVsTrkPID[
i][trkDen.getPID()]->Fill(trkDen.getEta());
695 if (el.second.mIsPhysicalPrimary) {
697 mPtPhysPrimNum[
i]->Fill(trkDen.getPt());
698 mPhiPhysPrimNum[
i]->Fill(trkDen.getPhi());
699 m1OverPtPhysPrimNum[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
701 mPtPhysPrimDen[
i]->Fill(trkDen.getPt());
702 mPhiPhysPrimDen[
i]->Fill(trkDen.getPhi());
703 m1OverPtPhysPrimDen[
i]->Fill(trkDen.getSign() * trkDen.getPtInv());
705 mEtaPhysPrimNum[
i]->Fill(trkDen.getEta());
707 mEtaPhysPrimDen[
i]->Fill(trkDen.getEta());
709 ++mNITSTPCSelectedTracks[
i];
714 for (
auto const& trk : mITSTPCTracks) {
715 if (trk.getRefTPC().getIndex() >= mTPCTracks.size()) {
716 LOG(fatal) <<
"******************** ATTENTION! for TPC track associated to matched track: idx = " << trk.getRefTPC().getIndex() <<
", size of container = " << mTPCTracks.size() <<
" in TF " << evCount;
718 std::array<std::string, 2> title{
"TPC",
"ITS"};
721 unsigned int idxTrkRef{0};
722 bool fillHisto =
false;
723 bool isEtaITSOk =
true;
725 trkRef = mTPCTracks[trk.getRefTPC()];
726 idxTrkRef = trk.getRefTPC().getIndex();
727 if (isTPCTrackSelectedEntry[idxTrkRef]) {
729 ++mNITSTPCSelectedTracks[
i];
732 idxTrkRef = trk.getRefITS().getIndex();
733 if (trk.getRefITS().getSource() ==
GID::ITSAB) {
735 LOG(
debug) <<
"Track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" is from afterburner";
738 if (idxTrkRef >= mITSTracks.size()) {
739 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;
741 trkRef = mITSTracks[trk.getRefITS()];
742 LOG(
debug) <<
"Checking track (ITS) with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" and pt = " << trkRef.getPt();
743 if (isITSTrackSelectedEntry[idxTrkRef]) {
744 LOG(
debug) <<
"Track was selected (ITS), with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" , we keep it in the numerator, pt = " << trkRef.getPt();
746 ++mNITSTPCSelectedTracks[
i];
748 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();
750 if (std::abs(trkRef.getEta()) > mEtaITSCut) {
753 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();
758 LOG(
debug) <<
"Filling num (" << title[
i] <<
") with track with id " << idxTrkRef <<
" for ITSTPC track " << iITSTPC <<
" with pt = " << trkRef.getPt();
760 mPtNum[
i]->Fill(trkRef.getPt());
761 if (std::abs(trkRef.getEta()) > mEtaNo0Cut) {
762 mPtNum_noEta0[
i]->Fill(trkRef.getPt());
764 mPhiNum[
i]->Fill(trkRef.getPhi());
766 mPtNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPt());
767 mPhiNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getPhi());
769 mPhiVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getPhi());
770 m1OverPtNum[
i]->Fill(trkRef.getSign() * trkRef.getPtInv());
771 mEtaPhiPtNum[
i]->Fill(trkRef.getEta(), trkRef.getPhi(), trkRef.getPt());
773 mEtaNum[
i]->Fill(trkRef.getEta());
775 mEtaNumVsTrkPID[
i][trkRef.getPID()]->Fill(trkRef.getEta());
777 mEtaVsPtNum[
i]->Fill(trkRef.getPt(), trkRef.getEta());
779 const auto& tpcTrk = mTPCTracks[trk.getRefTPC()];
780 mClsVsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
781 mChi2VsPtNum[
i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
783 const auto& itsTrk = mITSTracks[trk.getRefITS()];
784 mClsVsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
785 mChi2VsPtNum[
i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
789 mResidualPt->Fill(trk.getPt(), trk.getPt() - trkRef.getPt());
790 mResidualPhi->Fill(trk.getPhi(), trk.getPhi() - trkRef.getPhi());
791 mResidualEta->Fill(trk.getEta(), trk.getEta() - trkRef.getEta());
792 mChi2Matching->Fill(trk.getChi2Match());
793 mChi2Refit->Fill(trk.getChi2Refit());
794 mTimeResVsPt->Fill(trkRef.getPt(), trk.getTimeMUS().getTimeStampError());
796 std::array<float, 2> dca{-999, -999};
797 if (trkRef.propagateParamToDCA(
v, mBz, &dca)) {
800 mDCArVsPtNum->Fill(trkRef.getPt(), dca[0]);
803 LOG(
debug) <<
"*** chi2Matching = " << trk.getChi2Match() <<
", chi2refit = " << trk.getChi2Refit() <<
", timeResolution = " << trk.getTimeMUS().getTimeStampError();
806 LOG(
debug) <<
"Not filling num (" << title[
i] <<
") for ITSTPC track " << iITSTPC <<
" for track with pt " << trkRef.getPt();
815 mMapRefLabels[
i].clear();
819 for (
int itrk = 0; itrk < static_cast<int>(mTPCTracks.size()); ++itrk) {
820 auto const& trk = mTPCTracks[itrk];
821 if (isTPCTrackSelectedEntry[itrk]) {
823 if (!lbl.isValid()) {
832 int event = lbl.getEventID();
834 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
842 if (mTPCTracks[mMapRefLabels[
matchType::TPC].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
851 for (
int itrk = 0; itrk < static_cast<int>(mITSTracks.size()); ++itrk) {
852 auto const& trk = mITSTracks[itrk];
853 if (isITSTrackSelectedEntry[itrk]) {
855 if (!lbl.isValid()) {
864 int event = lbl.getEventID();
866 const o2::MCTrack& p = pcontainer[lbl.getTrackID()];
874 if (mITSTracks[mMapRefLabels[
matchType::ITS].at(lbl).mIdx].getNClusters() < trk.getNClusters()) {
885 auto const& trk = mTPCTracks[el.second.mIdx];
887 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
892 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
895 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
896 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
899 std::array<float, 2> dca{};
900 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
901 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
903 if (el.second.mIsPhysicalPrimary) {
907 m1OverPtPhysPrimDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
909 ++mNTPCSelectedTracks;
912 auto const& trk = mITSTracks[el.second.mIdx];
913 if (std::abs(trk.getEta()) < mEtaITSCut) {
915 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
920 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
921 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
925 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
927 if (el.second.mIsPhysicalPrimary) {
928 if (std::abs(trk.getEta()) < mEtaITSCut) {
931 m1OverPtPhysPrimDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
935 ++mNITSSelectedTracks;
939 for (
size_t itrk = 0; itrk < mTPCTracks.size(); ++itrk) {
940 auto const& trk = mTPCTracks[itrk];
941 if (isTPCTrackSelectedEntry[itrk]) {
942 LOG(
debug) <<
"Filling den (TPC) with track with pt = " << trk.getPt();
944 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
947 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";
951 mEtaPhiPtDen[
matchType::TPC]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
954 m1OverPtDen[
matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
955 mClsVsPtDen[
matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
958 std::array<float, 2> dca{};
959 if (
auto trc = trk; trc.propagateParamToDCA(
v, mBz, &dca)) {
960 mDCArVsPtDen->Fill(trc.getPt(), dca[0]);
962 ++mNTPCSelectedTracks;
965 for (
size_t itrk = 0; itrk < mITSTracks.size(); ++itrk) {
966 auto const& trk = mITSTracks[itrk];
967 LOG(
debug) <<
"Checking den for track (ITS) " << itrk <<
" with pt " << trk.getPt() <<
" and eta = " << trk.getEta();
968 if (isITSTrackSelectedEntry[itrk]) {
969 if (std::abs(trk.getEta()) < mEtaITSCut) {
970 LOG(
debug) <<
"Filling den for track (ITS) " << itrk <<
" with pt = " << trk.getPt() <<
" and eta = " << trk.getEta();
972 if (std::abs(trk.getEta()) > mEtaNo0Cut) {
977 mEtaPhiPtDen[
matchType::ITS]->Fill(trk.getEta(), trk.getPhi(), trk.getPt());
978 m1OverPtDen[
matchType::ITS]->Fill(trk.getSign() * trk.getPtInv());
980 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";
984 mClsVsPtDen[
matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
986 ++mNITSSelectedTracks;
988 LOG(
debug) <<
"Not filling for this track (ITS) " << itrk <<
" with pt = " << trk.getPt();
995 mFitterV0.setBz(mBz);
997 LOG(info) <<
"****** Number of PVs = " << pvertices.size();
1006 LOG(
debug) <<
"occupancyMapSizeBytes = " << occupancyMapSizeBytes;
1010 std::vector<float> mTBinClOcc;
1012 int mNTPCOccBinLength = mParam->rec.tpc.occupancyMapTimeBins;
1013 LOG(
debug) <<
"mNTPCOccBinLength = " << mNTPCOccBinLength;
1014 mNTPCOccBinLengthInv = 1. / mNTPCOccBinLength;
1015 if (mNTPCOccBinLength > 1 && mTPCRefitterOccMap.size()) {
1018 int nTPCOccBinsInTF = nTPCBinsInTF * mNTPCOccBinLengthInv;
1020 LOG(
debug) <<
"number of TPC TB in 1 TF = nTPCBinsInTF = " << nTPCBinsInTF <<
" ; number of occupancy bins in 1 TF = nTPCOccBinsInTF = " << nTPCOccBinsInTF;
1021 LOG(
debug) <<
"bins to integrate = sumBins = " << sumBins;
1022 mTBinClOcc.resize(nTPCOccBinsInTF);
1023 std::vector<float> mltHistTB(nTPCOccBinsInTF);
1024 float sm = 0., tb = 0.5 * mNTPCOccBinLength;
1025 bool foundNotZero =
false;
1026 for (
int i = 0;
i < nTPCOccBinsInTF;
i++) {
1027 mltHistTB[
i] = mParam->GetUnscaledMult(tb);
1028 if (mParam->GetUnscaledMult(tb) != 0) {
1029 LOG(
debug) <<
"i = " <<
i <<
" tb = " << tb <<
" mltHistTB[" <<
i <<
"] = " << mltHistTB[
i];
1030 foundNotZero =
true;
1032 tb += mNTPCOccBinLength;
1034 if (!foundNotZero) {
1035 LOG(
debug) <<
"No mult bin was found different from 0!";
1037 foundNotZero =
false;
1039 for (
int i = nTPCOccBinsInTF;
i--;) {
1040 if (mltHistTB[
i] != 0) {
1041 foundNotZero =
true;
1043 LOG(
debug) <<
"i = " <<
i <<
" sm before = " << sm;
1045 LOG(
debug) <<
"i = " <<
i <<
" sm after = " << sm;
1046 if (
i + sumBins < nTPCOccBinsInTF) {
1047 LOG(
debug) <<
"i = " <<
i <<
" sumBins = " << sumBins <<
" nTPCOccBinsInTF = " << nTPCOccBinsInTF <<
" we have to decrease sm by = " << mltHistTB[
i + sumBins];
1048 sm -= mltHistTB[
i + sumBins];
1049 LOG(
debug) <<
"i = " <<
i <<
" sm after 2 = " << sm;
1052 LOG(
debug) <<
"i = " <<
i <<
" mTBinClOcc[" <<
i <<
"] = " << mTBinClOcc[
i];
1054 if (!foundNotZero) {
1055 LOG(
debug) <<
"No mult bin was found different from 0! sm = " << sm;
1058 mTBinClOcc.resize(1);
1061 auto nv0 = v0IDs.size();
1062 if (nv0 > mRecoCont.
getV0s().size()) {
1065 LOG(
debug) <<
"Found " << mRecoCont.
getV0s().size() <<
" V0s in reco container";
1066 LOG(
debug) <<
"Found " << nv0 <<
" V0s ids";
1068 std::map<int, std::vector<int>> pv2sv;
1069 static int tfID = 0;
1070 for (
int iv = 0; iv < nv0; iv++) {
1071 const auto v0id = v0IDs[iv];
1075 pv2sv[v0id.getVertexID()].push_back(iv);
1077 LOG(
debug) <<
"Skipping this V0: the track sources do not contain ITS";
1083 for (
auto it : pv2sv) {
1084 int pvID = it.first;
1085 auto& vv = it.second;
1086 if (pvID < 0 || vv.size() == 0) {
1090 float pvTime = pv.getTimeStamp().getTimeStamp();
1091 for (
int iv0 : vv) {
1092 nV0sOk +=
processV0(iv0, mRecoCont, mTBinClOcc, pvTime) ? 1 : 0;
1097 LOG(
debug) <<
"Processed " << nV0sOk <<
" V0s";