From 59bdba857883f55e0d5d263715a18e2c5c24e106 Mon Sep 17 00:00:00 2001 From: sgorbuno <se.gorbunov@gsi.de> Date: Thu, 22 Jul 2021 10:03:52 +0000 Subject: [PATCH] L1: fix internal reco time calculation wihen using sub-slices --- reco/L1/CbmL1.cxx | 6 ++++-- reco/L1/CbmL1.h | 1 + reco/L1/CbmL1Performance.cxx | 11 ++++++----- reco/L1/L1Algo/L1Algo.h | 2 +- reco/L1/L1Algo/L1CATrackFinder.cxx | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index ac33323ee7..00a477e7c7 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -1108,6 +1108,8 @@ void CbmL1::Reconstruct(CbmEvent* event) vRTracksCur.reserve(10 + (2 * nHits) / nSta); } + fTrackingTime = 0; + while (newTS) { fData->Clear(); @@ -1241,7 +1243,7 @@ void CbmL1::Reconstruct(CbmEvent* event) if (fVerbose > 1) { cout << "L1 Track finder..." << endl; } algo->CATrackFinder(); // IdealTrackFinder(); - + fTrackingTime += algo->fCATime; if (fVerbose > 1) { cout << "L1 Track finder ok" << endl; } // algo->L1KFTrackFitter( fExtrapolateToTheEndOfSTS ); @@ -1373,7 +1375,7 @@ void CbmL1::Reconstruct(CbmEvent* event) if (fTimesliceMode) TsStart = TsStart_new; ///Set new TS strat to earliest discarted track - if (fTimesliceMode) cout << "CA Track Finder: " << algo->CATime << " s/sub-ts" << endl << endl; + if (fTimesliceMode) cout << "CA Track Finder: " << algo->fCATime << " s/sub-ts" << endl << endl; } diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 4b67502e2a..a2eec04e3c 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -255,6 +255,7 @@ private: int NTOFStation {0}; // number of tof stations Int_t fPerformance {0}; // 0 - w\o perf. 1 - L1-Efficiency definition. 2 - QA-Eff.definition + double fTrackingTime {0.}; // time of track finding int fSTAPDataMode {0}; // way to work with file for standalone package. // 0 (off) , 1 (write), 2 (read data and work only with it), 3 (debug - write and read) diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index 37da82fff2..06212c90cb 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -420,7 +420,7 @@ void CbmL1::EfficienciesPerformance() } // for mcTracks - L1_CATIME += algo->CATime; + L1_CATIME += fTrackingTime; L1_NEVENTS++; ntra.IncNEvents(); L1_NTRA += ntra; @@ -444,7 +444,8 @@ void CbmL1::EfficienciesPerformance() cout << "MC tracks/event found : " << int(double(L1_NTRA.reco.counters[L1_NTRA.indices["total"]]) / double(L1_NEVENTS)) << endl; cout << endl; - cout << "CA Track Finder: " << L1_CATIME / L1_NEVENTS << " s/ev" << endl << endl; + cout << "CA Track Finder: " << L1_CATIME / L1_NEVENTS << (fTimesliceMode ? " s/time slice" : " s/ev") << endl + << endl; } } // void CbmL1::Performance() @@ -991,9 +992,9 @@ void CbmL1::HistoPerformance() // TODO: check if works correctly. Change vHitRe if (iMC < 0) NFakes++; } - h_reco_time->Fill(algo->CATime); - h_reco_timeNtr->Fill(mc_total, algo->CATime); - h_reco_timeNhit->Fill(algo->vStsHits->size(), algo->CATime); + h_reco_time->Fill(fTrackingTime); + h_reco_timeNtr->Fill(mc_total, fTrackingTime); + h_reco_timeNhit->Fill(algo->vStsHits->size(), fTrackingTime); h_reco_fakeNtr->Fill(mc_total, NFakes); h_reco_fakeNhit->Fill(algo->vStsHits->size() - NFakes, NFakes); diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index 7f5aa238c4..0e69fbd160 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -176,7 +176,7 @@ public: L1Vector<unsigned char>* fStripFlag {nullptr}; // information of hits station & using hits in tracks; - double CATime {0.}; // time of trackfinding + double fCATime {0.}; // time of track finding L1Vector<L1Track> fTracks {"L1Algo::fTracks"}; // reconstructed tracks L1Vector<THitI> fRecoHits {"L1Algo::fRecoHits"}; // packed hits of reconstructed tracks diff --git a/reco/L1/L1Algo/L1CATrackFinder.cxx b/reco/L1/L1Algo/L1CATrackFinder.cxx index 35ba30ddce..20104356d9 100644 --- a/reco/L1/L1Algo/L1CATrackFinder.cxx +++ b/reco/L1/L1Algo/L1CATrackFinder.cxx @@ -2469,7 +2469,7 @@ void L1Algo::CATrackFinder() // cout << "End TrackFinder" << endl; // CATime = (double(c_time.CpuTime())); - CATime = (double(c_time.RealTime())); + fCATime = (double(c_time.RealTime())); #ifdef XXX -- GitLab