|
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(500); |
| 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(20'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,19 @@ 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 | + ((mIsHI) ? mPVNContVsITSTracksPbPb : mPVNContVsITSTracks)->Fill(pv.getNContributors(), mITSTracks.size()); |
| 562 | + } |
523 | 563 |
|
524 | 564 | // cache selection for TPC and ITS tracks
|
525 | 565 | std::vector<bool> isTPCTrackSelectedEntry(mTPCTracks.size(), false);
|
@@ -991,11 +1031,9 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
|
991 | 1031 | }
|
992 | 1032 | }
|
993 | 1033 |
|
994 |
| - if (mDoK0QC && mRecoCont.getPrimaryVertices().size() > 0) { |
| 1034 | + if (mDoK0QC && mPVs.size() > 0) { |
995 | 1035 | // now doing K0S
|
996 | 1036 | mFitterV0.setBz(mBz);
|
997 |
| - const auto pvertices = mRecoCont.getPrimaryVertices(); |
998 |
| - LOG(info) << "****** Number of PVs = " << pvertices.size(); |
999 | 1037 |
|
1000 | 1038 | // getting occupancy estimator
|
1001 | 1039 | mNHBPerTF = o2::base::GRPGeomHelper::instance().getGRPECS()->getNHBFPerTF();
|
@@ -1421,6 +1459,10 @@ void MatchITSTPCQC::getHistos(TObjArray& objar)
|
1421 | 1459 | // V0
|
1422 | 1460 | objar.Add(mK0MassVsPtVsOccpp);
|
1423 | 1461 | objar.Add(mK0MassVsPtVsOccPbPb);
|
| 1462 | + |
| 1463 | + // PV Multiplicity |
| 1464 | + objar.Add(mPVNContVsITSTracks); |
| 1465 | + objar.Add(mPVNContVsITSTracksPbPb); |
1424 | 1466 | }
|
1425 | 1467 |
|
1426 | 1468 | void MatchITSTPCQC::printParams() const
|
|
0 commit comments