Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Dec 14, 2024
1 parent 7c7aa6f commit 314af89
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 63 deletions.
106 changes: 53 additions & 53 deletions PWGHF/HFC/TableProducer/correlatorDsHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t>(1 << aod::hf_cand_3prong::DecayType::DsToKKPi)) != static_cast<uint8_t>(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<CandDsData> candsDsPerCollision = aod::hf_cand::collisionId;
Preslice<MyTracksData> trackIndicesPerCollision = aod::track::collisionId;

Expand Down Expand Up @@ -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);

Expand Down
18 changes: 8 additions & 10 deletions PWGHF/HFC/TableProducer/correlatorDsHadronsReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<aod::AssocTrackReds> tracksPerCol = aod::hf_assoc_track_reduced::hfcRedCollisionId;

// Preslice<aod::AssocTrackReds> tracksPerCol = aod::hf_assoc_track_reduced::hfcRedCollisionId;
Preslice<aod::AssocTrackReds> tracksPerCol = aod::hf_candidate_reduced::hfcRedCollisionId;
Preslice<aod::DsCandReduceds> candPerCol = aod::hf_candidate_reduced::hfcRedCollisionId;

void processDerivedDataME(aod::HfcRedCollisions const& collisions,
aod::DsCandReduceds const& candidates,
aod::AssocTrackReds const& tracks)
Expand All @@ -85,32 +84,31 @@ struct HfCorrelatorDsHadronsReduced {
BinningTypeDerived corrBinning{{zPoolBins, multPoolBins}, true};

auto tracksTuple = std::make_tuple(candidates, tracks);

Pair<aod::HfcRedCollisions, aod::DsCandReduceds, aod::AssocTrackReds, BinningTypeDerived> 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(),
pAssoc.ptAssocTrack(),
poolBin);
entryDsHadronRecoInfo(cand.invMassDs(), false, false);
entryDsHadronGenInfo(false, false, 0);

}
}
}
Expand Down

0 comments on commit 314af89

Please sign in to comment.