Skip to content

Commit 2a56fe9

Browse files
committed
Finish corrections in the same event QA plots filling
1 parent 0caeedd commit 2a56fe9

File tree

1 file changed

+11
-41
lines changed

1 file changed

+11
-41
lines changed

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,14 @@ struct HfTaskFlow {
11191119
auto triggerWeight = 1;
11201120
auto associatedWeight = 1;
11211121

1122+
//To avoid filling associated tracks QA many times
1123+
// I fill it only for the first trigger track of the collision
1124+
auto loopCounter = 0;
1125+
11221126
for (const auto& track1 : tracks1) {
11231127

1128+
loopCounter++;
1129+
11241130
float eta1 = track1.eta();
11251131
float pt1 = track1.pt();
11261132
float phi1 = track1.phi();
@@ -1186,6 +1192,7 @@ struct HfTaskFlow {
11861192
fillTpcMftChChSameEventQa(multiplicity, track1, true);
11871193
} // end of if condition for TPC-TPC or TPC-MFT case
11881194
}
1195+
// Maybe I won't need it for MC (first files are way lighter in MC, but also I need to loop over all tracks in MC GEN)
11891196
//} else { // If MC (add cases later)
11901197
//fillTpcTpcChChSameEventQaMc(multiplicityTracks2, vz, tracks1);
11911198
//}
@@ -1255,7 +1262,7 @@ struct HfTaskFlow {
12551262
}
12561263

12571264
// FILL QA PLOTS for associated particle
1258-
if (sameEvent) {
1265+
if (sameEvent && (loopCounter == 1)) {
12591266
//if constexpr (std::is_same_v<FilteredCollisionsWSelMult, TCollisions>) { // If DATA
12601267
if constexpr (!std::is_same_v<aod::MFTTracks, TTracksAssoc>) { // IF TPC-TPC case
12611268
if constexpr (std::is_same_v<HfCandidatesSelD0, TTracksTrig>) { // IF D0 CASE -> TPC-TPC D0-h
@@ -1427,7 +1434,6 @@ struct HfTaskFlow {
14271434

14281435
sameTPCTPCChCh->fillEvent(multiplicity, CorrelationContainer::kCFStepReconstructed);
14291436

1430-
//fillTpcTpcChChSameEventQa(multiplicity, tracks);
14311437
// TO-DO : add if condition for when we will implant corrected correlations (kCFStepReconstructed -> kCFStepCorrected)
14321438
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCTPCChCh, tracks, tracks, multiplicity, collision.posZ(), true);
14331439
}
@@ -1458,7 +1464,6 @@ struct HfTaskFlow {
14581464

14591465
sameTPCTPCHfCh->fillEvent(multiplicity, CorrelationContainer::kCFStepReconstructed);
14601466

1461-
//fillTpcTpcD0CandidateQa(candidates);
14621467
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCTPCHfCh, candidates, tracks, multiplicity, collision.posZ(), true);
14631468
}
14641469
PROCESS_SWITCH(HfTaskFlow, processSameTpcTpcD0Ch, "DATA : Process same-event correlations for TPC-TPC D0-h case", false);
@@ -1488,7 +1493,6 @@ struct HfTaskFlow {
14881493

14891494
sameTPCTPCHfCh->fillEvent(multiplicity, CorrelationContainer::kCFStepReconstructed);
14901495

1491-
//fillTpcTpcLcCandidateQa(candidates);
14921496
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCTPCHfCh, candidates, tracks, multiplicity, collision.posZ(), true);
14931497
}
14941498
PROCESS_SWITCH(HfTaskFlow, processSameTpcTpcLcCh, "DATA : Process same-event correlations for TPC-TPC Lc-h case", false);
@@ -1506,14 +1510,12 @@ struct HfTaskFlow {
15061510
}
15071511

15081512
const auto multiplicityTPC = tracks.size();
1509-
//const auto multiplicityMFT = mftTracks.size();
15101513
BinningPolicyBase<2> baseBinning{{axisVertex, axisMultiplicity}, true};
15111514
int bin = baseBinning.getBin(std::make_tuple(collision.posZ(), multiplicityTPC));
15121515
registry.fill(HIST("Data/TpcMft/HadronHadron/SameEvent/hEventCountSame"), bin);
15131516

15141517
sameTPCMFTChCh->fillEvent(multiplicityTPC, CorrelationContainer::kCFStepReconstructed);
1515-
//fillTpcMftChChSameEventQa(multiplicityTPC, tracks);
1516-
//fillTpcMftChChSameEventQa(multiplicityMFT, mftTracks);
1518+
15171519
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCMFTChCh, tracks, mftTracks, multiplicityTPC, collision.posZ(), true);
15181520
}
15191521
PROCESS_SWITCH(HfTaskFlow, processSameTpcMftChCh, "DATA : Process same-event correlations for TPC-MFT h-h case", false);
@@ -1537,14 +1539,12 @@ struct HfTaskFlow {
15371539
}
15381540

15391541
const auto multiplicityCandidates = candidates.size();
1540-
//const auto multiplicityMFT = mftTracks.size();
15411542
BinningPolicyBase<2> baseBinning{{axisVertex, axisMultiplicity}, true};
15421543
int bin = baseBinning.getBin(std::make_tuple(collision.posZ(), multiplicityCandidates));
15431544
registry.fill(HIST("Data/TpcMft/HfHadron/SameEvent/2Prong/hEventCountSame"), bin);
15441545

15451546
sameTPCMFTHfCh->fillEvent(multiplicityCandidates, CorrelationContainer::kCFStepReconstructed);
1546-
//fillTpcMftD0CandidateQa(candidates, multiplicityCandidates);
1547-
//fillTpcMftHfChSameEventQa(multiplicityMFT, mftTracks);
1547+
15481548
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCMFTHfCh, candidates, mftTracks, multiplicityCandidates, collision.posZ(), true);
15491549
}
15501550
PROCESS_SWITCH(HfTaskFlow, processSameTpcMftD0Ch, "DATA : Process same-event correlations for TPC-MFT D0-h case", false);
@@ -1568,14 +1568,12 @@ struct HfTaskFlow {
15681568
}
15691569

15701570
const auto multiplicityCandidates = candidates.size();
1571-
//const auto multiplicityMFT = mftTracks.size();
15721571
BinningPolicyBase<2> baseBinning{{axisVertex, axisMultiplicity}, true};
15731572
int bin = baseBinning.getBin(std::make_tuple(collision.posZ(), multiplicityCandidates));
15741573
registry.fill(HIST("Data/TpcMft/HfHadron/SameEvent/3Prong/hEventCountSame"), bin);
15751574

15761575
sameTPCMFTHfCh->fillEvent(multiplicityCandidates, CorrelationContainer::kCFStepReconstructed);
1577-
//fillTpcMftLcCandidateQa(candidates, multiplicityCandidates);
1578-
//fillTpcMftHfChSameEventQa(multiplicityMFT, mftTracks);
1576+
15791577
fillCorrelations<CorrelationContainer::kCFStepReconstructed>(sameTPCMFTHfCh, candidates, mftTracks, multiplicityCandidates, collision.posZ(), true);
15801578
}
15811579
PROCESS_SWITCH(HfTaskFlow, processSameTpcMftLcCh, "DATA : Process same-event correlations for TPC-MFT Lc-h case", false);
@@ -1686,13 +1684,6 @@ struct HfTaskFlow {
16861684
return size;
16871685
};
16881686

1689-
// auto getTracksSize = [&candidates, this](FilteredCollisionsWSelMult::iterator const& col) {
1690-
// // Still o2::aod::track::collisionId with HF ??? -> I don't think so
1691-
// auto associatedTracks = candidates.sliceByCached(o2::aod::hf_cand::collisionId, col.globalIndex(), this->cache);
1692-
// auto size = associatedTracks.size();
1693-
// return size;
1694-
// };
1695-
16961687
mixCollisions(collisions, candidates, tracks, getTracksSize, mixedTPCTPCHfCh);
16971688
}
16981689
PROCESS_SWITCH(HfTaskFlow, processMixedTpcTpcD0Ch, "DATA : Process mixed-event correlations for TPC-TPC D0-h case", false);
@@ -1713,13 +1704,6 @@ struct HfTaskFlow {
17131704
return size;
17141705
};
17151706

1716-
// auto getTracksSize = [&candidates, this](FilteredCollisionsWSelMult::iterator const& col) {
1717-
// // Still o2::aod::track::collisionId with HF ??? -> I don't think so
1718-
// auto associatedTracks = candidates.sliceByCached(o2::aod::hf_cand::collisionId, col.globalIndex(), this->cache);
1719-
// auto size = associatedTracks.size();
1720-
// return size;
1721-
// };
1722-
17231707
mixCollisions(collisions, candidates, tracks, getTracksSize, mixedTPCTPCHfCh);
17241708
}
17251709
PROCESS_SWITCH(HfTaskFlow, processMixedTpcTpcLcCh, "DATA : Process mixed-event correlations for TPC-TPC Lc-h case", false);
@@ -1759,13 +1743,6 @@ struct HfTaskFlow {
17591743
return size;
17601744
};
17611745

1762-
// auto getTracksSize = [&candidates, this](FilteredCollisionsWSelMult::iterator const& col) {
1763-
// // Still o2::aod::track::collisionId with HF ??? -> I don't think so
1764-
// auto associatedTracks = candidates.sliceByCached(o2::aod::hf_cand::collisionId, col.globalIndex(), this->cache);
1765-
// auto size = associatedTracks.size();
1766-
// return size;
1767-
// };
1768-
17691746
mixCollisions(collisions, candidates, mftTracks, getTracksSize, mixedTPCMFTHfCh);
17701747
}
17711748
PROCESS_SWITCH(HfTaskFlow, processMixedTpcMftD0Ch, "DATA : Process mixed-event correlations for TPC-MFT D0-h case", false);
@@ -1787,13 +1764,6 @@ struct HfTaskFlow {
17871764
return size;
17881765
};
17891766

1790-
// auto getTracksSize = [&candidates, this](FilteredCollisionsWSelMult::iterator const& col) {
1791-
// // Still o2::aod::track::collisionId with HF ??? -> I don't think so
1792-
// auto associatedTracks = candidates.sliceByCached(o2::aod::hf_cand::collisionId, col.globalIndex(), this->cache);
1793-
// auto size = associatedTracks.size();
1794-
// return size;
1795-
// };
1796-
17971767
mixCollisions(collisions, candidates, mftTracks, getTracksSize, mixedTPCMFTHfCh);
17981768
}
17991769
PROCESS_SWITCH(HfTaskFlow, processMixedTpcMftLcCh, "DATA : Process mixed-event correlations for TPC-MFT Lc-h case", false);

0 commit comments

Comments
 (0)