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
24 changes: 13 additions & 11 deletions PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ struct HfCandidateCreatorXicToXiPiPi {
HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

static constexpr float cmToMicrometer{10000.};

void init(InitContext const&)
{
if ((doprocessNoCentXicplusWithDcaFitter + doprocessCentFT0CXicplusWithDcaFitter + doprocessCentFT0MXicplusWithDcaFitter + doprocessNoCentXicplusWithKFParticle + doprocessCentFT0CXicplusWithKFParticle + doprocessCentFT0MXicplusWithKFParticle) != 1) {
Expand Down Expand Up @@ -541,12 +543,12 @@ struct HfCandidateCreatorXicToXiPiPi {
registry.fill(HIST("hCovSVXZ"), covMatrixSV[3]);
registry.fill(HIST("hCovSVZZ"), covMatrixSV[5]);
// DCAs of prongs
registry.fill(HIST("hDcaXYProngs"), trackCasc.getPt(), impactParameterCasc.getY());
registry.fill(HIST("hDcaXYProngs"), trackCharmBachelor0.pt(), impactParameter0.getY());
registry.fill(HIST("hDcaXYProngs"), trackCharmBachelor1.pt(), impactParameter1.getY());
registry.fill(HIST("hDcaZProngs"), trackCasc.getPt(), impactParameterCasc.getZ());
registry.fill(HIST("hDcaZProngs"), trackCharmBachelor0.pt(), impactParameter0.getZ());
registry.fill(HIST("hDcaZProngs"), trackCharmBachelor1.pt(), impactParameter1.getZ());
registry.fill(HIST("hDcaXYProngs"), trackCasc.getPt(), impactParameterCasc.getY() * cmToMicrometer);
registry.fill(HIST("hDcaXYProngs"), trackCharmBachelor0.pt(), impactParameter0.getY() * cmToMicrometer);
registry.fill(HIST("hDcaXYProngs"), trackCharmBachelor1.pt(), impactParameter1.getY() * cmToMicrometer);
registry.fill(HIST("hDcaZProngs"), trackCasc.getPt(), impactParameterCasc.getZ() * cmToMicrometer);
registry.fill(HIST("hDcaZProngs"), trackCharmBachelor0.pt(), impactParameter0.getZ() * cmToMicrometer);
registry.fill(HIST("hDcaZProngs"), trackCharmBachelor1.pt(), impactParameter1.getZ() * cmToMicrometer);
}

//---------------------------------fill candidate table rows-------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -873,9 +875,9 @@ struct HfCandidateCreatorXicToXiPiPi {
registry.fill(HIST("hCovSVXZ"), covMatrixXicPlus[3]);
registry.fill(HIST("hCovSVZZ"), covMatrixXicPlus[5]);
// DCAs of prongs
registry.fill(HIST("hDcaXYProngs"), kfXi.GetPt(), impactParameterXiXY);
registry.fill(HIST("hDcaXYProngs"), kfCharmBachelor0.GetPt(), impactParameterPi0XY);
registry.fill(HIST("hDcaXYProngs"), kfCharmBachelor1.GetPt(), impactParameterPi1XY);
registry.fill(HIST("hDcaXYProngs"), kfXi.GetPt(), impactParameterXiXY * cmToMicrometer);
registry.fill(HIST("hDcaXYProngs"), kfCharmBachelor0.GetPt(), impactParameterPi0XY * cmToMicrometer);
registry.fill(HIST("hDcaXYProngs"), kfCharmBachelor1.GetPt(), impactParameterPi1XY * cmToMicrometer);
}

//------------------------------fill candidate table rows--------------------------------------
Expand Down Expand Up @@ -1093,7 +1095,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
registry.add("hDecayedPions", "hDecayedPions", {HistType::kTH1F, {{5, -0.5, 4.5}}});
registry.add("hInteractionsWithMaterial", "hInteractionsWithMaterial", {HistType::kTH1F, {{6, -0.5, 5.5}}});
registry.add("hDebugRec", "hDebugRec", {HistType::kTH1F, {{4, -0.5, 3.5}}});
registry.add("hy_pt_gen", "Generated MC", {HistType::kTH2F, {{20, -1.0, 1.0}, {200, 0, 20}}});
registry.add("hYPtGen", "Generated MC", {HistType::kTH2F, {{20, -1.0, 1.0}, {200, 0, 20}}});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hero-seo here you add() the histogram under condition if (fillMcHistograms) but attempt to fill it in the line 1353 unconditionally, therefore the task crashes when fillMcHistograms == false. Please fix the bug.

registry.get<TH1>(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + TotalRec, "total");
registry.get<TH1>(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XicToFinalState, "#Xi^{+}_{c} #rightarrow #pi^{#plus} #pi^{#plus} #pi^{#minus} p #pi^{#minus}");
registry.get<TH1>(HIST("hDebugRec"))->GetXaxis()->SetBinLabel(1 + XiToPiPPi, "#Xi^{#minus} #rightarrow #pi^{#minus} p #pi^{#minus}");
Expand Down Expand Up @@ -1348,7 +1350,7 @@ struct HfCandidateCreatorXicToXiPiPiExpressions {
// Check whether the charm baryon is non-prompt (from a b quark).
if (flag != 0) {
// fill inclusive generated Xic+
registry.fill(HIST("hy_pt_gen"), particle.y(), particle.pt());
registry.fill(HIST("hYPtGen"), particle.y(), particle.pt());

origin = RecoDecay::getCharmHadronOrigin(mcParticles, particle, false, &idxBhadMothers);
// Calculate the decay length of the generated particle
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/candidateSelectorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ struct HfCandidateSelectorXicToXiPiPi {
registry.add("hNCrossedRowsTpcV0PosDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 pos. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}});
registry.add("hNCrossedRowsTpcV0NegDauRecBkg", "Reconstructed background;#it{N}_{rows}^{TPC} (V0 neg. dau.);entries", {HistType::kTH1F, {{103, 49.5, 152.5}}});
/// reconstructed MC
registry.add("hmass_pt_reco_truth", "Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]", {HistType::kTH2F, {{40, 2.3, 2.7}, {200, 0, 20}}});
registry.add("hMassPtRecSig", "Reconstructed truth matching MC;inv.mass(#Xi#pi#pi) [GeV/c^{2}];p_{T} [GeV/c]", {HistType::kTH2F, {{40, 2.3, 2.7}, {200, 0, 20}}});
}
}

Expand Down Expand Up @@ -643,7 +643,7 @@ struct HfCandidateSelectorXicToXiPiPi {
if constexpr (IsMc) {
if (isMatchedSignal) {
registry.fill(HIST("hSelCandidatesRecSig"), PidSelected);
registry.fill(HIST("hmass_pt_reco_truth"), hfCandXic.invMassXicPlus(), hfCandXic.pt());
registry.fill(HIST("hMassPtRecSig"), hfCandXic.invMassXicPlus(), hfCandXic.pt());
} else {
registry.fill(HIST("hSelCandidatesRecBkg"), PidSelected);
}
Expand Down
Loading