Skip to content

Commit d58d48f

Browse files
committed
ALICE3: remove ROFs for output tracks
1 parent c738d7c commit d58d48f

1 file changed

Lines changed: 2 additions & 56 deletions

File tree

Detectors/Upgrades/ALICE3/GlobalReconstruction/workflow/src/TrackerSpec.cxx

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#include <chrono>
1616
#include <format>
1717
#include <fstream>
18-
#include <numeric>
1918

20-
#include "CommonDataFormat/IRFrame.h"
2119
#include "DataFormatsTRK/Cluster.h"
2220
#include "DataFormatsTRK/ROFRecord.h"
2321
#include "DetectorsBase/GeometryManager.h"
@@ -387,63 +385,13 @@ void TrackerDPL::run(ProcessingContext& pc)
387385
LOGP(info, "Good tracks: {} ({:.1f}%)", goodTracks, totalTracks > 0 ? 100.0 * goodTracks / totalTracks : 0);
388386
LOGP(info, "Fake tracks: {} ({:.1f}%)", fakeTracks, totalTracks > 0 ? 100.0 * fakeTracks / totalTracks : 0);
389387

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-
437388
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);
440389
if (mIsMC) {
441390
pc.outputs().snapshot(o2::framework::Output{"TRK", "TRACKSMCTR", 0}, allLabels);
442391
}
443392

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)" : "");
447395

448396
timeFrame.wipe();
449397
};
@@ -482,8 +430,6 @@ DataProcessorSpec getTrackerSpec(bool useMC, const std::string& hitRecoConfig, c
482430
std::vector<InputSpec> inputs;
483431
std::vector<OutputSpec> outputs;
484432
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);
487433
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, // orbitResetTime
488434
false, // GRPECS=true
489435
false, // GRPLHCIF

0 commit comments

Comments
 (0)