|
13 | 13 |
|
14 | 14 | #include "GLOQC/MatchITSTPCQC.h" |
15 | 15 | #include "ReconstructionDataFormats/TrackTPCITS.h" |
| 16 | +#include "ReconstructionDataFormats/VtxTrackRef.h" |
16 | 17 | #include "DataFormatsTPC/TrackTPC.h" |
17 | 18 | #include "DetectorsBase/Propagator.h" |
18 | 19 | #include "SimulationDataFormat/MCUtils.h" |
@@ -133,6 +134,10 @@ void MatchITSTPCQC::deleteHistograms() |
133 | 134 | // K0 |
134 | 135 | delete mK0MassVsPtVsOccpp; |
135 | 136 | delete mK0MassVsPtVsOccPbPb; |
| 137 | + |
| 138 | + // PV |
| 139 | + delete mPVNContVsITSTracks; |
| 140 | + delete mPVNContVsITSTracksPbPb; |
136 | 141 | } |
137 | 142 |
|
138 | 143 | //__________________________________________________________ |
@@ -220,6 +225,9 @@ void MatchITSTPCQC::reset() |
220 | 225 | mK0MassVsPtVsOccpp->Reset(); |
221 | 226 | mK0MassVsPtVsOccPbPb->Reset(); |
222 | 227 | } |
| 228 | + |
| 229 | + mPVNContVsITSTracks->Reset(); |
| 230 | + mPVNContVsITSTracksPbPb->Reset(); |
223 | 231 | } |
224 | 232 |
|
225 | 233 | //__________________________________________________________ |
@@ -440,6 +448,29 @@ bool MatchITSTPCQC::init() |
440 | 448 | 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); |
441 | 449 | } |
442 | 450 |
|
| 451 | + auto makeBins = [](int out) { |
| 452 | + std::array<Double_t, 101> xbins{0}; |
| 453 | + Double_t xlogmin = TMath::Log10(1); |
| 454 | + Double_t xlogmax = TMath::Log10(out); |
| 455 | + Double_t dlogx = (xlogmax - xlogmin) / 100; |
| 456 | + for (int i = 0; i <= 100; i++) { |
| 457 | + Double_t xlog = xlogmin + (i * dlogx); |
| 458 | + xbins[i] = TMath::Exp(TMath::Log(10) * xlog); |
| 459 | + } |
| 460 | + return xbins; |
| 461 | + }; |
| 462 | + |
| 463 | + { |
| 464 | + auto xbinsPV = makeBins(250); |
| 465 | + auto xbinsITS = makeBins(2000); |
| 466 | + mPVNContVsITSTracks = new TH2F("mPVNContVsITSTracks", "PV NCont. vs ITS Tracks;PV NCont.;ITS Tracks", 100, xbinsPV.data(), 100, xbinsITS.data()); |
| 467 | + } |
| 468 | + { |
| 469 | + auto xbinsPV = makeBins(10'000); |
| 470 | + auto xbinsITS = makeBins(60'000); |
| 471 | + mPVNContVsITSTracksPbPb = new TH2F("mPVNContVsITSTracksPbPb", "PV NCont. vs ITS Tracks;PV NCont.;ITS Tracks", 100, xbinsPV.data(), 100, xbinsITS.data()); |
| 472 | + } |
| 473 | + |
443 | 474 | LOG(info) << "Printing configuration cuts"; |
444 | 475 | printParams(); |
445 | 476 |
|
@@ -516,10 +547,29 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx) |
516 | 547 | mTPCTracks = mRecoCont.getTPCTracks(); |
517 | 548 | mITSTracks = mRecoCont.getITSTracks(); |
518 | 549 | mITSTPCTracks = mRecoCont.getTPCITSTracks(); |
| 550 | + mPVs = mRecoCont.getPrimaryVertices(); |
519 | 551 |
|
520 | 552 | LOG(info) << "****** Number of found ITSTPC tracks = " << mITSTPCTracks.size(); |
521 | 553 | LOG(info) << "****** Number of found TPC tracks = " << mTPCTracks.size(); |
522 | 554 | LOG(info) << "****** Number of found ITS tracks = " << mITSTracks.size(); |
| 555 | + LOG(info) << "****** Number of PVs = " << mPVs.size(); |
| 556 | + |
| 557 | + const auto& pvm = mRecoCont.getPrimaryVertexMatchedTrackRefs(); |
| 558 | + for (int i{0}; i < mPVs.size(); ++i) { |
| 559 | + const auto& pv = mPVs[i]; |
| 560 | + const auto& m = pvm[i]; |
| 561 | + // count the number of ITS tracks that were associated to this PV |
| 562 | + // then one can plot the number of tracks contributing to a PV against the available pool |
| 563 | + // (+ ITS tracks only in OB which by constructing cannot contribute). |
| 564 | + Double_t c{0.}; |
| 565 | + for (int src = GIndex::NSources; src--;) { |
| 566 | + if (!GIndex::includesDet(DetID::ITS, src)) { |
| 567 | + continue; |
| 568 | + } |
| 569 | + c += m.getEntriesOfSource(src); |
| 570 | + } |
| 571 | + ((mIsHI) ? mPVNContVsITSTracksPbPb : mPVNContVsITSTracks)->Fill(pv.getNContributors(), c); |
| 572 | + } |
523 | 573 |
|
524 | 574 | // cache selection for TPC and ITS tracks |
525 | 575 | std::vector<bool> isTPCTrackSelectedEntry(mTPCTracks.size(), false); |
@@ -991,11 +1041,9 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx) |
991 | 1041 | } |
992 | 1042 | } |
993 | 1043 |
|
994 | | - if (mDoK0QC && mRecoCont.getPrimaryVertices().size() > 0) { |
| 1044 | + if (mDoK0QC && mPVs.size() > 0) { |
995 | 1045 | // now doing K0S |
996 | 1046 | mFitterV0.setBz(mBz); |
997 | | - const auto pvertices = mRecoCont.getPrimaryVertices(); |
998 | | - LOG(info) << "****** Number of PVs = " << pvertices.size(); |
999 | 1047 |
|
1000 | 1048 | // getting occupancy estimator |
1001 | 1049 | mNHBPerTF = o2::base::GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF(); |
@@ -1421,6 +1469,10 @@ void MatchITSTPCQC::getHistos(TObjArray& objar) |
1421 | 1469 | // V0 |
1422 | 1470 | objar.Add(mK0MassVsPtVsOccpp); |
1423 | 1471 | objar.Add(mK0MassVsPtVsOccPbPb); |
| 1472 | + |
| 1473 | + // PV Multiplicity |
| 1474 | + objar.Add(mPVNContVsITSTracks); |
| 1475 | + objar.Add(mPVNContVsITSTracksPbPb); |
1424 | 1476 | } |
1425 | 1477 |
|
1426 | 1478 | void MatchITSTPCQC::printParams() const |
|
0 commit comments