From a5410ed6375b2ec787712b20fa8ab9c9523bedd6 Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Fri, 31 Oct 2025 22:38:04 +0100 Subject: [PATCH] PWGEM/Dilepton: remove unnecessary lines --- PWGEM/Dilepton/Core/Dilepton.h | 9 --------- PWGEM/Dilepton/Core/DileptonHadronMPC.h | 1 - PWGEM/Dilepton/Utils/MCUtilities.h | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index 241ddd7a932..222a690470a 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -1042,13 +1042,7 @@ struct Dilepton { if constexpr (ev_id == 0) { std::pair key_df_collision = std::make_pair(ndf, collision.globalIndex()); - std::vector possibleIds1; - std::vector possibleIds2; - if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { - std::copy(t1.ambiguousElectronsIds().begin(), t1.ambiguousElectronsIds().end(), std::back_inserter(possibleIds1)); - std::copy(t2.ambiguousElectronsIds().begin(), t2.ambiguousElectronsIds().end(), std::back_inserter(possibleIds2)); - if (std::find(used_trackIds_per_col.begin(), used_trackIds_per_col.end(), t1.globalIndex()) == used_trackIds_per_col.end()) { used_trackIds_per_col.emplace_back(t1.globalIndex()); if (cfgDoMix) { @@ -1070,9 +1064,6 @@ struct Dilepton { } } } else if (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) { - std::copy(t1.ambiguousMuonsIds().begin(), t1.ambiguousMuonsIds().end(), std::back_inserter(possibleIds1)); - std::copy(t2.ambiguousMuonsIds().begin(), t2.ambiguousMuonsIds().end(), std::back_inserter(possibleIds2)); - if (std::find(used_trackIds_per_col.begin(), used_trackIds_per_col.end(), t1.globalIndex()) == used_trackIds_per_col.end()) { used_trackIds_per_col.emplace_back(t1.globalIndex()); if (cfgDoMix) { diff --git a/PWGEM/Dilepton/Core/DileptonHadronMPC.h b/PWGEM/Dilepton/Core/DileptonHadronMPC.h index bbbac707c32..f9759f45910 100644 --- a/PWGEM/Dilepton/Core/DileptonHadronMPC.h +++ b/PWGEM/Dilepton/Core/DileptonHadronMPC.h @@ -1059,7 +1059,6 @@ struct DileptonHadronMPC { auto posTracks_per_coll = posTracks.sliceByCached(perCollision, collision.globalIndex(), cache); auto negTracks_per_coll = negTracks.sliceByCached(perCollision, collision.globalIndex(), cache); - used_trackIds_per_col.reserve(posTracks_per_coll.size() + negTracks_per_coll.size()); int nuls = 0, nlspp = 0, nlsmm = 0; diff --git a/PWGEM/Dilepton/Utils/MCUtilities.h b/PWGEM/Dilepton/Utils/MCUtilities.h index ca4c095a628..7e30ebd061f 100644 --- a/PWGEM/Dilepton/Utils/MCUtilities.h +++ b/PWGEM/Dilepton/Utils/MCUtilities.h @@ -510,7 +510,7 @@ int searchMothers(T& p, U& mcParticles, int pdg, bool equal) int quark_id = -1; for (int i : allmothersids) { auto mother = mcParticles.iteratorAt(i); - int mpdg = abs(mother.pdgCode()); + int mpdg = std::abs(mother.pdgCode()); if (mpdg == pdg && mother.pdgCode() == p.pdgCode()) { // found the quark if (quark_id > -1) { // we already found a possible candidate in the list of mothers, so now we have (at least) two // LOG(warning) << "Flavour tracking is ambiguous. Stopping here.";