Skip to content

Commit 94abc6d

Browse files
committed
Enhance DCAFitterN::print, allow resetting log throttlers
1 parent ff8ba81 commit 94abc6d

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

Common/DCAFitter/include/DCAFitter/DCAFitterN.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,13 @@ class DCAFitterN
324324
pnt[2] = tr.getZ();
325325
}
326326

327+
GPUdi() void clearLogThrottlers()
328+
{
329+
mLoggerBadCov.clear();
330+
mLoggerBadInv.clear();
331+
mLoggerBadProp.clear();
332+
}
333+
327334
void setBadCovPolicy(BadCovPolicy v) { mBadCovPolicy = v; }
328335
BadCovPolicy getBadCovPolicy() const { return mBadCovPolicy; }
329336

@@ -1084,10 +1091,16 @@ template <int N, typename... Args>
10841091
GPUd() void DCAFitterN<N, Args...>::print() const
10851092
{
10861093
#ifndef GPUCA_GPUCODE_DEVICE
1087-
LOG(info) << N << "-prong vertex fitter in " << (mUseAbsDCA ? "abs." : "weighted") << " distance minimization mode";
1088-
LOG(info) << "Bz: " << mBz << " MaxIter: " << mMaxIter << " MaxChi2: " << mMaxChi2;
1094+
LOG(info) << N << "-prong vertex fitter in " << (mUseAbsDCA ? "abs." : "weighted") << " distance minimization mode, collinear tracks mode: " << (mIsCollinear ? "ON" : "OFF");
1095+
LOG(info) << "Bz: " << mBz << " MaxIter: " << mMaxIter << " MaxChi2: " << mMaxChi2 << " MatCorrType: " << int(mMatCorr);
10891096
LOG(info) << "Stopping condition: Max.param change < " << mMinParamChange << " Rel.Chi2 change > " << mMinRelChi2Change;
10901097
LOG(info) << "Discard candidates for : Rvtx > " << getMaxR() << " DZ between tracks > " << mMaxDZIni;
1098+
LOG(info) << "PropagateToPCA:" << mPropagateToPCA << " WeightedFinalPCA:" << mWeightedFinalPCA << " UsePropagator:" << mUsePropagator << " RefitWithMatCorr:" << mRefitWithMatCorr;
1099+
std::string rep{};
1100+
for (int i = 0; i < mCrossings.nDCA; i++) {
1101+
rep += fmt::format("seed{}:{}/{} ", i, mTrPropDone[i], mPropFailed[i]);
1102+
}
1103+
LOG(info) << "Last call: NCand:" << mCurHyp << " from " << mCrossings.nDCA << " seeds, prop.done/failed: " << rep;
10911104
#else
10921105
if (mUseAbsDCA) {
10931106
printf("%d-prong vertex fitter in abs. distance minimization mode\n", N);

Common/DCAFitter/test/testDCAFitterN.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
238238
BOOST_CHECK(meanDA < 0.1);
239239
BOOST_CHECK(meanDAW < 0.1);
240240
BOOST_CHECK(meanDW < 0.1);
241+
ft.print();
241242
}
242243

243244
// 2 prongs vertices with collinear tracks (gamma conversion)
@@ -316,6 +317,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
316317
BOOST_CHECK(meanDA < 2.1);
317318
BOOST_CHECK(meanDAW < 2.1);
318319
BOOST_CHECK(meanDW < 2.1);
320+
ft.print();
319321
}
320322

321323
// 2 prongs vertices with one of charges set to 0: Helix : Line
@@ -394,6 +396,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
394396
BOOST_CHECK(meanDA < 0.1);
395397
BOOST_CHECK(meanDAW < 0.1);
396398
BOOST_CHECK(meanDW < 0.1);
399+
ft.print();
397400
}
398401

399402
// 2 prongs vertices with both of charges set to 0: Line : Line
@@ -471,6 +474,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
471474
BOOST_CHECK(meanDA < 0.1);
472475
BOOST_CHECK(meanDAW < 0.1);
473476
BOOST_CHECK(meanDW < 0.1);
477+
ft.print();
474478
}
475479

476480
// 3 prongs vertices
@@ -547,8 +551,8 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
547551
BOOST_CHECK(meanDA < 0.1);
548552
BOOST_CHECK(meanDAW < 0.1);
549553
BOOST_CHECK(meanDW < 0.1);
554+
ft.print();
550555
}
551-
552556
outStream.Close();
553557
}
554558

0 commit comments

Comments
 (0)