|
15 | 15 | #include <chrono> |
16 | 16 | #include <format> |
17 | 17 | #include <fstream> |
18 | | -#include <numeric> |
19 | 18 |
|
20 | | -#include "CommonDataFormat/IRFrame.h" |
21 | 19 | #include "DataFormatsTRK/Cluster.h" |
22 | 20 | #include "DataFormatsTRK/ROFRecord.h" |
23 | 21 | #include "DetectorsBase/GeometryManager.h" |
@@ -387,63 +385,13 @@ void TrackerDPL::run(ProcessingContext& pc) |
387 | 385 | LOGP(info, "Good tracks: {} ({:.1f}%)", goodTracks, totalTracks > 0 ? 100.0 * goodTracks / totalTracks : 0); |
388 | 386 | LOGP(info, "Fake tracks: {} ({:.1f}%)", fakeTracks, totalTracks > 0 ? 100.0 * fakeTracks / totalTracks : 0); |
389 | 387 |
|
390 | | - const auto& rofView = timeFrame.getROFOverlapTableView(); |
391 | | - const auto& clockLayer = rofView.getClockLayer(); |
392 | | - const int clockLayerId = rofView.getClock(); |
393 | | - const int64_t anchorBC = timeFrame.getTFAnchorIR().toLong(); |
394 | | - |
395 | | - int highestROF = static_cast<int>(clockLayer.mNROFsTF); |
396 | | - for (const auto& trc : allTracks) { |
397 | | - highestROF = std::max(highestROF, static_cast<int>(clockLayer.getROF(trc.getTimeStamp()))); |
398 | | - } |
399 | | - for (const auto& vtx : timeFrame.getPrimaryVertices()) { |
400 | | - highestROF = std::max(highestROF, static_cast<int>(clockLayer.getROF(vtx.getTimeStamp().lower()))); |
401 | | - } |
402 | | - |
403 | | - std::vector<o2::trk::ROFRecord> allTrackROFs(highestROF); |
404 | | - for (size_t iROF = 0; iROF < allTrackROFs.size(); ++iROF) { |
405 | | - auto& rof = allTrackROFs[iROF]; |
406 | | - o2::InteractionRecord ir; |
407 | | - ir.setFromLong(anchorBC + static_cast<int64_t>(clockLayer.getROFStartInBC(iROF))); |
408 | | - rof.setBCData(ir); |
409 | | - rof.setROFrame(iROF); |
410 | | - rof.setFirstEntry(0); |
411 | | - rof.setNEntries(0); |
412 | | - } |
413 | | - |
414 | | - std::vector<int> rofEntries(highestROF + 1, 0); |
415 | | - for (const auto& trc : allTracks) { |
416 | | - const int rof = static_cast<int>(clockLayer.getROF(trc.getTimeStamp())); |
417 | | - if (rof >= 0 && rof < highestROF) { |
418 | | - ++rofEntries[rof]; |
419 | | - } |
420 | | - } |
421 | | - std::exclusive_scan(rofEntries.begin(), rofEntries.end(), rofEntries.begin(), 0); |
422 | | - |
423 | | - std::vector<o2::dataformats::IRFrame> irFrames; |
424 | | - irFrames.reserve(allTrackROFs.size()); |
425 | | - const auto& maskView = timeFrame.getROFMaskView(); |
426 | | - const auto rofLenMinus1 = clockLayer.mROFLength > 0 ? clockLayer.mROFLength - 1 : 0; |
427 | | - for (size_t iROF = 0; iROF < allTrackROFs.size(); ++iROF) { |
428 | | - allTrackROFs[iROF].setFirstEntry(rofEntries[iROF]); |
429 | | - allTrackROFs[iROF].setNEntries(rofEntries[iROF + 1] - rofEntries[iROF]); |
430 | | - if (maskView.isROFEnabled(clockLayerId, static_cast<int>(iROF))) { |
431 | | - const auto& bcStart = allTrackROFs[iROF].getBCData(); |
432 | | - auto& irFrame = irFrames.emplace_back(bcStart, bcStart + rofLenMinus1); |
433 | | - irFrame.info = allTrackROFs[iROF].getNEntries(); |
434 | | - } |
435 | | - } |
436 | | - |
437 | 388 | pc.outputs().snapshot(o2::framework::Output{"TRK", "TRACKS", 0}, allTracks); |
438 | | - pc.outputs().snapshot(o2::framework::Output{"TRK", "TRACKSROF", 0}, allTrackROFs); |
439 | | - pc.outputs().snapshot(o2::framework::Output{"TRK", "IRFRAMES", 0}, irFrames); |
440 | 389 | if (mIsMC) { |
441 | 390 | pc.outputs().snapshot(o2::framework::Output{"TRK", "TRACKSMCTR", 0}, allLabels); |
442 | 391 | } |
443 | 392 |
|
444 | | - LOGP(info, "TRK pushed {} tracks in {} ROFs and {} IR frames{}", |
445 | | - allTracks.size(), allTrackROFs.size(), irFrames.size(), |
446 | | - mIsMC ? " (with MC labels)" : ""); |
| 393 | + LOGP(info, "TRK pushed {} tracks{}", |
| 394 | + allTracks.size(), mIsMC ? " (with MC labels)" : ""); |
447 | 395 |
|
448 | 396 | timeFrame.wipe(); |
449 | 397 | }; |
@@ -482,8 +430,6 @@ DataProcessorSpec getTrackerSpec(bool useMC, const std::string& hitRecoConfig, c |
482 | 430 | std::vector<InputSpec> inputs; |
483 | 431 | std::vector<OutputSpec> outputs; |
484 | 432 | outputs.emplace_back("TRK", "TRACKS", 0, Lifetime::Timeframe); |
485 | | - outputs.emplace_back("TRK", "TRACKSROF", 0, Lifetime::Timeframe); |
486 | | - outputs.emplace_back("TRK", "IRFRAMES", 0, Lifetime::Timeframe); |
487 | 433 | auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime |
488 | 434 | false, // GRPECS=true |
489 | 435 | false, // GRPLHCIF |
|
0 commit comments