From 854c6280f02b903f6a0b07b22d9d88bf177376a2 Mon Sep 17 00:00:00 2001 From: Felix Schlepper Date: Thu, 26 Oct 2023 09:30:01 +0200 Subject: [PATCH] dals --- .../DCAFitter/include/DCAFitter/DCAFitterN.h | 17 ++++++++++++++++- Detectors/Vertexing/src/SVertexer.cxx | 18 +++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/Common/DCAFitter/include/DCAFitter/DCAFitterN.h b/Common/DCAFitter/include/DCAFitter/DCAFitterN.h index 89edbc508df97..e9bcd3cd9ca8c 100644 --- a/Common/DCAFitter/include/DCAFitter/DCAFitterN.h +++ b/Common/DCAFitter/include/DCAFitter/DCAFitterN.h @@ -96,7 +96,9 @@ class DCAFitterN using vf = std::vector; public: + o2::track::TrackParCov mSeedP, mSeedN; vf vChi2, vDist, vRsum, vDistXY, vDistZ; + std::vector> vChi2Trks, vDistTrks, vDistZTrks; void printStats() const { LOGP(info, "+-+_+_+_+_+_+__+_+_+_+_+_+_+_++__++__+++_+_+_+__++_+_"); @@ -220,17 +222,28 @@ class DCAFitterN float getMasStep() const { return mMaxStep; } float getMinXSeed() const { return mMinXSeed; } - void setDebug(int curId, bool shutup) + bool bDistZ, bChi2; + void setDebug(int curId, bool shutup, o2::track::TrackParCov const& seedP, o2::track::TrackParCov const& seedN) { + mSeedP = seedP; + mSeedN = seedN; mDebug = true; mShutup = shutup; LOG_IF(info, mDebug && !mShutup) << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Current failed Track = " << mCurID; mCurID = curId; + bDistZ = bChi2 = false; mCrossings.setDebug(shutup); } void unsetDebug() { LOG_IF(info, mDebug && !mShutup) << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; + if (mCrossings.bDistXY) { + vDistTrks.emplace_back(mSeedP, mSeedN); + } else if (bChi2) { + vChi2Trks.emplace_back(mSeedP, mSeedN); + } else if (bDistZ) { + vDistZTrks.emplace_back(mSeedP, mSeedN); + } mDebug = false; mCrossings.unsetDebug(); } @@ -1056,6 +1069,7 @@ bool DCAFitterN::minimizeChi2NoErr() if (!ret && mDebug) { ++nChi2; vChi2.push_back(mChi2[mCurHyp]); + bChi2 = true; } return ret; } @@ -1072,6 +1086,7 @@ bool DCAFitterN::roughDZCut() if (zdist > mMaxDZIni) { if (mDebug) { vDistZ.push_back(zdist); + bDistZ = true; } LOG_IF(info, mDebug && !mShutup) << " i=" << i << " j=" << j << " ~~~~> zCut failed: " << zdist; accept = false; diff --git a/Detectors/Vertexing/src/SVertexer.cxx b/Detectors/Vertexing/src/SVertexer.cxx index 5209e393122db..92062477a42e4 100644 --- a/Detectors/Vertexing/src/SVertexer.cxx +++ b/Detectors/Vertexing/src/SVertexer.cxx @@ -100,19 +100,27 @@ void SVertexer::process(const o2::globaltracking::RecoContainer& recoData, o2::f LOG_IF(info, mUseDebug) << "Thread = " << i; const auto& f = mFitterV0[i]; f.printStats(); - for (const auto& e : f.vChi2) { + for (int j{0}; j < f.vChi2.size(); ++j) { mDebugStream << "pChi2" - << "chi2=" << e << "\n"; + << "chi2=" << f.vChi2[j] + << "seedP=" << f.vChi2Trks[j].first + << "seedN=" << f.vChi2Trks[j].second + << "\n"; } - for (const auto& e : f.vDistZ) { + for (int j{0}; j < f.vDistZ.size(); ++j) { mDebugStream << "pDistZ" - << "z=" << e << "\n"; + << "z=" << f.vDistZ[j] + << "seedP=" << f.vDistZTrks[j].first + << "seedN=" << f.vDistZTrks[j].second + << "\n"; } for (int j{0}; j < f.vDist.size(); ++j) { mDebugStream << "pDist" << "xy=" << f.vDistXY[j] << "rsum=" << f.vRsum[j] << "dist=" << f.vDist[j] + << "seedP=" << f.vDistTrks[j].first + << "seedN=" << f.vDistTrks[j].second << "\n"; } } @@ -591,7 +599,7 @@ bool SVertexer::checkV0(const TrackCand& seedP, const TrackCand& seedN, int iP, int nCand = fitterV0.process(seedP, seedN); if (nCand == 0) { // discard this pair if (check) { - fitterV0.setDebug(nProcess++, true); + fitterV0.setDebug(nProcess++, true, seedP, seedN); // LOGP(info, "Label: 0"); // seedP.gid.print(); // lbl0.print();