diff --git a/Detectors/TPC/qc/include/TPCQC/Tracks.h b/Detectors/TPC/qc/include/TPCQC/Tracks.h index f6cff7c2b8090..766633e4984a1 100644 --- a/Detectors/TPC/qc/include/TPCQC/Tracks.h +++ b/Detectors/TPC/qc/include/TPCQC/Tracks.h @@ -81,6 +81,14 @@ class Tracks mUseCutMaxAbsDCArOnHistos = useCutMaxAbsDCArOnHistos; } + // Set PV position + void setPVposition(const o2::math_utils::Point3D meanVtxPoint3D) + { + mXpositionOfPV = meanVtxPoint3D.X(); + mYpositionOfPV = meanVtxPoint3D.Y(); + mZpositionOfPV = meanVtxPoint3D.Z(); + } + /// get ratios of 1D histograms std::unordered_map>& getMapHist() { return mMapHist; } const std::unordered_map>& getMapHist() const { return mMapHist; } @@ -94,6 +102,9 @@ class Tracks bool mTurnOffHistosForAsync = false; // Decide whether to turn off some histograms for async to reduce memory float mCutMaxAbsDCAr = 1.f; // maximum DCAr bool mUseCutMaxAbsDCArOnHistos = false; // Decide whether to use the cut on maximum DCAr for the histograms + float mXpositionOfPV = 0.f; // x-position of the PV + float mYpositionOfPV = 0.f; // y-position of the PV + float mZpositionOfPV = 0.f; // z-position of the PV std::unordered_map> mMapHist; std::vector mHist1D{}; ///< Initialize vector of 1D histograms diff --git a/Detectors/TPC/qc/src/Tracks.cxx b/Detectors/TPC/qc/src/Tracks.cxx index 9f1d9aabf9523..692f66b5988a9 100644 --- a/Detectors/TPC/qc/src/Tracks.cxx +++ b/Detectors/TPC/qc/src/Tracks.cxx @@ -180,7 +180,8 @@ bool Tracks::processTrack(const o2::tpc::TrackTPC& track) if (propagator->getMatLUT() && propagator->hasMagFieldSet()) { // ---| fill DCA histos |--- o2::gpu::gpustd::array dca; - const o2::math_utils::Point3D refPoint{0, 0, 0}; + const o2::math_utils::Point3D refPoint{mXpositionOfPV, mYpositionOfPV, mZpositionOfPV}; // inlcude option to fetch this information form the CCDB instead of assuming collision at nominal interaction point + // LOGP(error, "DeBugOutput: mXpositionOfPV({%.2f}), mYpositionOfPV({%.2f}), mZpositionOfPV({%i})", mXpositionOfPV, mYpositionOfPV, mZpositionOfPV); o2::track::TrackPar propTrack(track); if (propagator->propagateToDCABxByBz(refPoint, propTrack, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT, &dca)) { const auto phi = o2::math_utils::to02PiGen(track.getPhi());