Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions PWGJE/Tasks/jetFragmentation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
Configurable<std::string> trackSel{"trackSel", "globalTracks", "choose track selection"};
Configurable<int> nV0Classes{"nV0Classes", 2, "Must be 2 or 4! Number of V0 signal/bkg classes"};
Configurable<bool> doCorrectionWithTracks{"doCorrectionWithTracks", false, "add tracks during background subtraction"};
Configurable<bool> fillHistsInclusiveV0s{"fillHistsInclusiveV0s", true, "Fill hists for inclusive V0s"};
Configurable<bool> fillHistsJets{"fillHistsJets", true, "Fill hists for jets"};

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"};
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"};
Expand Down Expand Up @@ -2734,8 +2736,14 @@

registry.fill(HIST("data/hEvents"), 1.5);
registry.fill(HIST("data/V0/nV0sEvent"), V0s.size());
fillDataV0sInclusive(coll, V0s);
fillDataV0sInclusiveWeighted(coll, V0s);

if (fillHistsInclusiveV0s) {
fillDataV0sInclusive(coll, V0s);
fillDataV0sInclusiveWeighted(coll, V0s);
}

if (!fillHistsJets)
return;

for (const auto& jet : jets) {
if (!jetfindingutilities::isInEtaAcceptance(jet, -99., -99., v0EtaMin, v0EtaMax))
Expand Down Expand Up @@ -2773,9 +2781,9 @@
double z = getMomFrac(jet, v0);
std::vector<double> w;

if (nV0Classes == 2)

Check failure on line 2784 in PWGJE/Tasks/jetFragmentation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
w = getV0SignalProbVector2Classes(v0);
else if (nV0Classes == 4)

Check failure on line 2786 in PWGJE/Tasks/jetFragmentation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
w = getV0SignalProbVector4Classes(v0);
else
return;
Expand Down Expand Up @@ -2822,9 +2830,14 @@
registry.fill(HIST("matching/V0/nV0sEvent"), V0s.size());
registry.fill(HIST("matching/V0/nV0sEventWeighted"), V0s.size(), weight);

fillMcdV0sInclusive(coll, V0s, weight);
fillMcpV0sInclusive(pV0s, weight);
fillMatchingV0sInclusive<aod::JetTracksMCD, aod::JetParticles>(coll, V0s, pV0s, weight);
if (fillHistsInclusiveV0s) {
fillMcdV0sInclusive(coll, V0s, weight);
fillMcpV0sInclusive(pV0s, weight);
fillMatchingV0sInclusive<aod::JetTracksMCD, aod::JetParticles>(coll, V0s, pV0s, weight);
}

if (!fillHistsJets)
return;

for (const auto& detJet : v0jetsMCD) {
if (!jetfindingutilities::isInEtaAcceptance(detJet, -99., -99., v0EtaMin, v0EtaMax))
Expand Down
26 changes: 18 additions & 8 deletions PWGJE/Tasks/v0QA.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGJE/Tasks/v0QA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -325,8 +325,12 @@
registry.add("sharing/AntiLambdaAntiLambda", "AntiLambda-AntiLambda w shared daughter", HistType::kTHnSparseD, {axisV0Pt, axisEta, axisV0Pt});

registry.add("sharing/JetPtEtaPhi", "JetPtEtaPhi", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaPhiNone", "JetPtEtaPhiNone", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaPhiSingle", "JetPtEtaPhiSingle", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaPhiMultiple", "JetPtEtaPhiMultiple", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaPhiShared", "JetPtEtaPhiShared", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaPhiNoShared", "JetPtEtaPhiNoShared", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});

registry.add("sharing/JetPtEtaV0Pt", "JetPtEtaV0Pt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaK0SPt", "JetPtEtaK0SPt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
registry.add("sharing/JetPtEtaLambdaPt", "JetPtEtaLambdaPt", HistType::kTH3D, {axisJetPt, axisEta, axisPhi});
Expand Down Expand Up @@ -900,14 +904,20 @@
}

template <typename T>
void fillV0DaughterSharingJet(T const& jet, bool jetHasSingleV0)
void fillV0DaughterSharingJet(T const& jet, bool jetContainsSharedDaughters)
{
registry.fill(HIST("sharing/JetPtEtaPhi"), jet.pt(), jet.eta(), jet.phi());

if (jetHasSingleV0)
if (jet.candidatesIds().size() == 0)
registry.fill(HIST("sharing/JetPtEtaPhiNone"), jet.pt(), jet.eta(), jet.phi());
else if (jet.candidatesIds().size() == 1)
registry.fill(HIST("sharing/JetPtEtaPhiSingle"), jet.pt(), jet.eta(), jet.phi());
else
registry.fill(HIST("sharing/JetPtEtaPhiMultiple"), jet.pt(), jet.eta(), jet.phi());

if (jetContainsSharedDaughters)
registry.fill(HIST("sharing/JetPtEtaPhiShared"), jet.pt(), jet.eta(), jet.phi());
else
registry.fill(HIST("sharing/JetPtEtaPhiNoShared"), jet.pt(), jet.eta(), jet.phi());
}

template <typename T, typename U>
Expand Down Expand Up @@ -1767,7 +1777,7 @@

// Check if V0s within the same jet share daughters
for (const auto& jet : jets) {
bool jetHasSingleV0 = true;
bool jetContainsSharedDaughters = false;

for (const auto& trigger : jet.template candidates_as<aod::CandidatesV0Data>()) {
if (trigger.isRejectedCandidate())
Expand All @@ -1782,14 +1792,14 @@
if (trigger == associate)
continue;

jetHasSingleV0 = false;

// Double-counting accounted for by filling histograms with weight 0.5
if (v0sShareDaughter<DaughterJTracks>(trigger, associate))
if (v0sShareDaughter<DaughterJTracks>(trigger, associate)) {
jetContainsSharedDaughters = true;
fillV0DaughterSharingJet<DaughterJTracks, DaughterTracks>(jet, trigger, associate);
}
}
}
fillV0DaughterSharingJet(jet, jetHasSingleV0);
fillV0DaughterSharingJet(jet, jetContainsSharedDaughters);
}
}
PROCESS_SWITCH(V0QA, processTestV0DaughterSharing, "Test V0s with shared daughters", false);
Expand All @@ -1815,5 +1825,5 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<V0QA>(cfgc, TaskName{"jet-v0qa"})};

Check failure on line 1828 in PWGJE/Tasks/v0QA.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name jet-v0qa produces device name jet-v0qa which does not match the device name v0-q-a from the struct name V0QA. (Matching struct name JetV0qa)
}
Loading