30 std::map<size_t, std::vector<size_t>> reordered;
31 for (
auto& corr : correlations) {
32 reordered[corr[0]].emplace_back(corr[1]);
35 for (
auto& corr : reordered) {
36 for (
auto& pcIdx : corr.second) {
37 int cathode =
static_cast<int>(
preClusters[pcIdx].cathode);
38 auto labels = inMCContainer.
getLabels(pcIdx);
39 addLabels(corr.first, cathode, labels);
47 if (idx >= mMCContainer.getIndexedSize()) {
51 for (
auto& cLabel : mMCContainer.getLabels(idx)) {
52 if (pcLabel.
compare(cLabel) == 1) {
60void ClusterLabeler::addLabels(
size_t idx,
int cathode, gsl::span<const MCCompLabel>& labels)
63 for (
auto& pcLabel : labels) {
64 MCClusterLabel* foundLabel = findLabel(idx, pcLabel);
67 foundLabel->setIsFiredBP(
true);
69 foundLabel->setIsFiredNBP(
true);
72 bool isFiredBP = (cathode == 0);
73 bool isFiredNBP = (cathode == 1);
75 mMCContainer.addElement(idx, cLabel);
int compare(const MCCompLabel &other) const
void process(gsl::span< const PreCluster > preClusters, const o2::dataformats::MCTruthContainer< MCCompLabel > &inMCContainer, gsl::span< const Cluster > clusters, gsl::span< const std::array< size_t, 2 > > correlations)
std::vector< Cluster > clusters
gsl::span< const PreCluster > preClusters(preClusterizer.getPreClusters().data(), preClusterizer.getPreClusters().size())
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...