Skip to content

Commit ab5edce

Browse files
authored
[PWGJE] Jet Fragmentation & V0 QA (#13218)
1 parent 7500c53 commit ab5edce

File tree

2 files changed

+36
-13
lines changed

2 files changed

+36
-13
lines changed

PWGJE/Tasks/jetFragmentation.cxx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ struct JetFragmentation {
6464
Configurable<std::string> trackSel{"trackSel", "globalTracks", "choose track selection"};
6565
Configurable<int> nV0Classes{"nV0Classes", 2, "Must be 2 or 4! Number of V0 signal/bkg classes"};
6666
Configurable<bool> doCorrectionWithTracks{"doCorrectionWithTracks", false, "add tracks during background subtraction"};
67+
Configurable<bool> fillHistsInclusiveV0s{"fillHistsInclusiveV0s", true, "Fill hists for inclusive V0s"};
68+
Configurable<bool> fillHistsJets{"fillHistsJets", true, "Fill hists for jets"};
6769

6870
Configurable<std::vector<float>> ptBinsK0S{"ptBinsK0S", {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0}, "K0S pt Vals"};
6971
Configurable<std::vector<float>> ptBinsLambda{"ptBinsLambda", {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 25.0}, "Lambda pt Vals"};
@@ -2734,8 +2736,14 @@ struct JetFragmentation {
27342736

27352737
registry.fill(HIST("data/hEvents"), 1.5);
27362738
registry.fill(HIST("data/V0/nV0sEvent"), V0s.size());
2737-
fillDataV0sInclusive(coll, V0s);
2738-
fillDataV0sInclusiveWeighted(coll, V0s);
2739+
2740+
if (fillHistsInclusiveV0s) {
2741+
fillDataV0sInclusive(coll, V0s);
2742+
fillDataV0sInclusiveWeighted(coll, V0s);
2743+
}
2744+
2745+
if (!fillHistsJets)
2746+
return;
27392747

27402748
for (const auto& jet : jets) {
27412749
if (!jetfindingutilities::isInEtaAcceptance(jet, -99., -99., v0EtaMin, v0EtaMax))
@@ -2822,9 +2830,14 @@ struct JetFragmentation {
28222830
registry.fill(HIST("matching/V0/nV0sEvent"), V0s.size());
28232831
registry.fill(HIST("matching/V0/nV0sEventWeighted"), V0s.size(), weight);
28242832

2825-
fillMcdV0sInclusive(coll, V0s, weight);
2826-
fillMcpV0sInclusive(pV0s, weight);
2827-
fillMatchingV0sInclusive<aod::JetTracksMCD, aod::JetParticles>(coll, V0s, pV0s, weight);
2833+
if (fillHistsInclusiveV0s) {
2834+
fillMcdV0sInclusive(coll, V0s, weight);
2835+
fillMcpV0sInclusive(pV0s, weight);
2836+
fillMatchingV0sInclusive<aod::JetTracksMCD, aod::JetParticles>(coll, V0s, pV0s, weight);
2837+
}
2838+
2839+
if (!fillHistsJets)
2840+
return;
28282841

28292842
for (const auto& detJet : v0jetsMCD) {
28302843
if (!jetfindingutilities::isInEtaAcceptance(detJet, -99., -99., v0EtaMin, v0EtaMax))

PWGJE/Tasks/v0QA.cxx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,12 @@ struct V0QA {
325325
registry.add("sharing/AntiLambdaAntiLambda", "AntiLambda-AntiLambda w shared daughter", HistType::kTHnSparseD, {axisV0Pt, axisEta, axisV0Pt});
326326

327327
registry.add("sharing/JetPtEtaPhi", "JetPtEtaPhi", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
328+
registry.add("sharing/JetPtEtaPhiNone", "JetPtEtaPhiNone", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
328329
registry.add("sharing/JetPtEtaPhiSingle", "JetPtEtaPhiSingle", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
329330
registry.add("sharing/JetPtEtaPhiMultiple", "JetPtEtaPhiMultiple", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
331+
registry.add("sharing/JetPtEtaPhiShared", "JetPtEtaPhiShared", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
332+
registry.add("sharing/JetPtEtaPhiNoShared", "JetPtEtaPhiNoShared", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
333+
330334
registry.add("sharing/JetPtEtaV0Pt", "JetPtEtaV0Pt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
331335
registry.add("sharing/JetPtEtaK0SPt", "JetPtEtaK0SPt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
332336
registry.add("sharing/JetPtEtaLambdaPt", "JetPtEtaLambdaPt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
@@ -900,14 +904,20 @@ struct V0QA {
900904
}
901905

902906
template <typename T>
903-
void fillV0DaughterSharingJet(T const& jet, bool jetHasSingleV0)
907+
void fillV0DaughterSharingJet(T const& jet, bool jetContainsSharedDaughters)
904908
{
905909
registry.fill(HIST("sharing/JetPtEtaPhi"), jet.pt(), jet.eta(), jet.phi());
906-
907-
if (jetHasSingleV0)
910+
if (jet.candidatesIds().size() == 0)
911+
registry.fill(HIST("sharing/JetPtEtaPhiNone"), jet.pt(), jet.eta(), jet.phi());
912+
else if (jet.candidatesIds().size() == 1)
908913
registry.fill(HIST("sharing/JetPtEtaPhiSingle"), jet.pt(), jet.eta(), jet.phi());
909914
else
910915
registry.fill(HIST("sharing/JetPtEtaPhiMultiple"), jet.pt(), jet.eta(), jet.phi());
916+
917+
if (jetContainsSharedDaughters)
918+
registry.fill(HIST("sharing/JetPtEtaPhiShared"), jet.pt(), jet.eta(), jet.phi());
919+
else
920+
registry.fill(HIST("sharing/JetPtEtaPhiNoShared"), jet.pt(), jet.eta(), jet.phi());
911921
}
912922

913923
template <typename T, typename U>
@@ -1767,7 +1777,7 @@ struct V0QA {
17671777

17681778
// Check if V0s within the same jet share daughters
17691779
for (const auto& jet : jets) {
1770-
bool jetHasSingleV0 = true;
1780+
bool jetContainsSharedDaughters = false;
17711781

17721782
for (const auto& trigger : jet.template candidates_as<aod::CandidatesV0Data>()) {
17731783
if (trigger.isRejectedCandidate())
@@ -1782,14 +1792,14 @@ struct V0QA {
17821792
if (trigger == associate)
17831793
continue;
17841794

1785-
jetHasSingleV0 = false;
1786-
17871795
// Double-counting accounted for by filling histograms with weight 0.5
1788-
if (v0sShareDaughter<DaughterJTracks>(trigger, associate))
1796+
if (v0sShareDaughter<DaughterJTracks>(trigger, associate)) {
1797+
jetContainsSharedDaughters = true;
17891798
fillV0DaughterSharingJet<DaughterJTracks, DaughterTracks>(jet, trigger, associate);
1799+
}
17901800
}
17911801
}
1792-
fillV0DaughterSharingJet(jet, jetHasSingleV0);
1802+
fillV0DaughterSharingJet(jet, jetContainsSharedDaughters);
17931803
}
17941804
}
17951805
PROCESS_SWITCH(V0QA, processTestV0DaughterSharing, "Test V0s with shared daughters", false);

0 commit comments

Comments
 (0)