From 314af89a77dccb06eb78bec91f9fe2731e1dfcf3 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sat, 14 Dec 2024 14:45:17 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../HFC/TableProducer/correlatorDsHadrons.cxx | 106 +++++++++--------- .../correlatorDsHadronsReduced.cxx | 18 ++- 2 files changed, 61 insertions(+), 63 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx index 7e7a81efddb..3fd1585a4a6 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx @@ -194,7 +194,7 @@ struct HfCorrelatorDsHadrons { Filter collisionFilter = aod::hf_selection_dmeson_collision::dmesonSel == true; Filter flagDsFilter = ((o2::aod::hf_track_index::hfflag & static_cast(1 << aod::hf_cand_3prong::DecayType::DsToKKPi)) != static_cast(0)) && (aod::hf_sel_candidate_ds::isSelDsToKKPi >= selectionFlagDs || aod::hf_sel_candidate_ds::isSelDsToPiKK >= selectionFlagDs); Filter trackFilter = (nabs(aod::track::eta) < etaTrackMax) && (aod::track::pt > ptTrackMin) && (aod::track::pt < ptTrackMax) && (nabs(aod::track::dcaXY) < dcaXYTrackMax) && (nabs(aod::track::dcaZ) < dcaZTrackMax); - + Preslice candsDsPerCollision = aod::hf_cand::collisionId; Preslice trackIndicesPerCollision = aod::track::collisionId; @@ -691,75 +691,75 @@ struct HfCorrelatorDsHadrons { } // end loop generated collision } PROCESS_SWITCH(HfCorrelatorDsHadrons, processMcGen, "Process MC Gen mode", false); - + int hfcReducedCollisionIndex = 0; - - void processDerivedDataDs(SelCollisionsWithDs const& collisions, + + void processDerivedDataDs(SelCollisionsWithDs const& collisions, CandDsData const& candidates, MyTracksData const& tracks) { - - for (const auto& collision : collisions){ - auto thisCollId = collision.globalIndex(); - auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); - auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); - - // Ds fill histograms and Ds candidates information stored - for (const auto& candidate : candidates) { - // candidate selected - if (candidate.isSelDsToKKPi() >= selectionFlagDs) { - candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); - } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { - candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + + for (const auto& collision : collisions) { + auto thisCollId = collision.globalIndex(); + auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); + auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); + + // Ds fill histograms and Ds candidates information stored + for (const auto& candidate : candidates) { + // candidate selected + if (candidate.isSelDsToKKPi() >= selectionFlagDs) { + candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); + } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { + candReduced(hfcReducedCollisionIndex, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + } } - } - // tracks information - for (const auto& track : tracks) { - if (!track.isGlobalTrackWoDCA()) { - continue; + // tracks information + for (const auto& track : tracks) { + if (!track.isGlobalTrackWoDCA()) { + continue; + } + assocTrackReduced(hfcReducedCollisionIndex, track.phi(), track.eta(), track.pt()); } - assocTrackReduced(hfcReducedCollisionIndex, track.phi(), track.eta(), track.pt()); + + collReduced(collision.multFT0M(), collision.posZ()); + hfcReducedCollisionIndex += 1; } - - collReduced(collision.multFT0M(), collision.posZ()); - hfcReducedCollisionIndex += 1; - } } PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDs, "Process derived data Ds", false); void processDerivedDataDsLastIndex(SelCollisionsWithDs const& collisions, - CandDsData const& candidates, - MyTracksData const& tracks) + CandDsData const& candidates, + MyTracksData const& tracks) { - - for (const auto& collision : collisions){ - auto thisCollId = collision.globalIndex(); - auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); - auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); - - int indexHfcReducedCollision = collReduced.lastIndex() + 1; - - // Ds fill histograms and Ds candidates information stored - for (const auto& candidate : candidates) { - // candidate selected - if (candidate.isSelDsToKKPi() >= selectionFlagDs) { - candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); - } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { - candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + + for (const auto& collision : collisions) { + auto thisCollId = collision.globalIndex(); + auto candsDsThisColl = candidates.sliceBy(candsDsPerCollision, thisCollId); + auto tracksThisColl = tracks.sliceBy(trackIndicesPerCollision, thisCollId); + + int indexHfcReducedCollision = collReduced.lastIndex() + 1; + + // Ds fill histograms and Ds candidates information stored + for (const auto& candidate : candidates) { + // candidate selected + if (candidate.isSelDsToKKPi() >= selectionFlagDs) { + candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToKKPi(candidate)); + } else if (candidate.isSelDsToPiKK() >= selectionFlagDs) { + candReduced(indexHfcReducedCollision, candidate.phi(), candidate.eta(), candidate.pt(), hfHelper.invMassDsToPiKK(candidate)); + } } - } - // tracks information - for (const auto& track : tracks) { - if (!track.isGlobalTrackWoDCA()) { - continue; + // tracks information + for (const auto& track : tracks) { + if (!track.isGlobalTrackWoDCA()) { + continue; + } + assocTrackReduced(indexHfcReducedCollision, track.phi(), track.eta(), track.pt()); } - assocTrackReduced(indexHfcReducedCollision, track.phi(), track.eta(), track.pt()); + + collReduced(collision.multFT0M(), collision.posZ()); } - - collReduced(collision.multFT0M(), collision.posZ()); - } } PROCESS_SWITCH(HfCorrelatorDsHadrons, processDerivedDataDsLastIndex, "Process derived data Ds w lastIndex", false); diff --git a/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx b/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx index 4f330b6bc43..20d052a2e75 100644 --- a/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx @@ -70,13 +70,12 @@ struct HfCorrelatorDsHadronsReduced { registry.add("hDsPoolBin", "Ds candidates pool bin", {HistType::kTH1F, {axisPoolBin}}); registry.add("hTracksPoolBin", "Particles associated pool bin", {HistType::kTH1F, {axisPoolBin}}); } - } - - //Preslice tracksPerCol = aod::hf_assoc_track_reduced::hfcRedCollisionId; + + // Preslice tracksPerCol = aod::hf_assoc_track_reduced::hfcRedCollisionId; Preslice tracksPerCol = aod::hf_candidate_reduced::hfcRedCollisionId; Preslice candPerCol = aod::hf_candidate_reduced::hfcRedCollisionId; - + void processDerivedDataME(aod::HfcRedCollisions const& collisions, aod::DsCandReduceds const& candidates, aod::AssocTrackReds const& tracks) @@ -85,24 +84,24 @@ struct HfCorrelatorDsHadronsReduced { BinningTypeDerived corrBinning{{zPoolBins, multPoolBins}, true}; auto tracksTuple = std::make_tuple(candidates, tracks); - + Pair pairData{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache}; - + for (const auto& [c1, tracks1, c2, tracks2] : pairData) { if (tracks1.size() == 0) { continue; } - + int poolBin = corrBinning.getBin(std::make_tuple(c2.posZ(), c2.multiplicity())); int poolBinDs = corrBinning.getBin(std::make_tuple(c1.posZ(), c1.multiplicity())); registry.fill(HIST("hMultFT0M"), c1.multiplicity()); registry.fill(HIST("hZVtx"), c1.posZ()); registry.fill(HIST("hTracksPoolBin"), poolBin); registry.fill(HIST("hDsPoolBin"), poolBinDs); - + for (const auto& [cand, pAssoc] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(tracks1, tracks2))) { LOGF(info, "Mixed event tracks pair: (%d, %d) from events (%d, %d), track event: (%d, %d)", cand.index(), pAssoc.index(), c1.index(), c2.index(), cand.hfcRedCollisionId(), pAssoc.hfcRedCollisionId()); - + entryDsHadronPair(getDeltaPhi(pAssoc.phiAssocTrack(), cand.phiCand()), pAssoc.etaAssocTrack() - cand.etaCand(), cand.ptCand(), @@ -110,7 +109,6 @@ struct HfCorrelatorDsHadronsReduced { poolBin); entryDsHadronRecoInfo(cand.invMassDs(), false, false); entryDsHadronGenInfo(false, false, 0); - } } }