Skip to content

Commit 9e99014

Browse files
committed
fix the QA plot in creator
1 parent 2a600ce commit 9e99014

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

PWGHF/TableProducer/candidateCreator3Prong.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ struct HfCandidateCreator3Prong {
190190
LOGP(fatal, "At least one particle specie should be enabled for the creation.");
191191
}
192192

193-
if (createLc && createXic && createCd && applyInvMassConstraint) {
193+
if (createLc && createXic && applyInvMassConstraint) {
194194
LOGP(fatal, "Unable to apply invariant mass constraint due to ambiguity of mass hypothesis: only one of Lc and Xic and Cd can be reconstructed.");
195195
}
196196

@@ -200,6 +200,8 @@ struct HfCandidateCreator3Prong {
200200
registry.add("hMass3PiKPi", "3-prong candidates;inv. mass (#pi K#pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{600, 1.6, 2.2}}});
201201
registry.add("hMass3KKPi", "3-prong candidates;inv. mass (KK #pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{600, 1.7, 2.3}}});
202202
registry.add("hMass3PiKK", "3-prong candidates;inv. mass (#pi KK) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{600, 1.7, 2.3}}});
203+
registry.add("hMass3DeKPi", "3-prong candidates;inv. mass (deK#pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{2000, 2.5, 4.5}}});
204+
registry.add("hMass3PiKDe", "3-prong candidates;inv. mass (#pi Kde) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{2000, 2.5, 4.5}}});
203205
registry.add("hMass2KPi", "2-prong pairs;inv. mass (K#pi) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{1200, 0.8, 2.0}}});
204206
registry.add("hMass2PiK", "2-prong pairs;inv. mass (#pi K) (GeV/#it{c}^{2});entries", {HistType::kTH1D, {{1200, 0.8, 2.0}}});
205207
registry.add("hCovPVXX", "3-prong candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries", {HistType::kTH1F, {{100, 0., 1.e-4}}});
@@ -419,13 +421,17 @@ struct HfCandidateCreator3Prong {
419421
const auto massPiKPi = RecoDecay::m(arrayMomenta, std::array{MassPiPlus, MassKPlus, MassPiPlus});
420422
const auto massKKPi = RecoDecay::m(arrayMomenta, std::array{MassKPlus, MassKPlus, MassPiPlus});
421423
const auto massPiKK = RecoDecay::m(arrayMomenta, std::array{MassPiPlus, MassKPlus, MassKPlus});
424+
const auto massDeKPi = RecoDecay::m(arrayMomenta, std::array{MassDeuteron, MassKPlus, MassPiPlus});
425+
const auto massPiKDe = RecoDecay::m(arrayMomenta, std::array{MassPiPlus, MassKPlus, MassDeuteron});
422426
const auto massKPi = RecoDecay::m(std::array{arrayMomenta.at(1), arrayMomenta.at(2)}, std::array{MassKPlus, MassPiPlus});
423427
const auto massPiK = RecoDecay::m(std::array{arrayMomenta.at(0), arrayMomenta.at(1)}, std::array{MassPiPlus, MassKPlus});
424428
registry.fill(HIST("hMass3PiKPi"), massPiKPi);
425429
registry.fill(HIST("hMass3PKPi"), massPKPi);
426430
registry.fill(HIST("hMass3PiKP"), massPiKP);
427431
registry.fill(HIST("hMass3KKPi"), massKKPi);
428432
registry.fill(HIST("hMass3PiKK"), massPiKK);
433+
registry.fill(HIST("hMass3DeKPi"), massDeKPi);
434+
registry.fill(HIST("hMass3PiKDe"), massPiKDe);
429435
registry.fill(HIST("hMass2KPi"), massKPi);
430436
registry.fill(HIST("hMass2PiK"), massPiK);
431437
}

PWGHF/TableProducer/trackIndexSkimCreator.cxx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,14 +1826,14 @@ struct HfTrackIndexSkimCreator {
18261826
/// \param outputScores is the array of vectors with the output scores to be filled
18271827
/// \param isSelected ia s bitmap with selection outcome
18281828
template <bool UsePidForHfFiltersBdt>
1829-
void applyMlSelectionForHfFilters3Prong(std::vector<float> featuresCand, std::vector<float> featuresCandPid, std::array<std::vector<float>, kN3ProngDecays>& outputScores, auto& isSelected)
1829+
void applyMlSelectionForHfFilters3Prong(std::vector<float> featuresCand, std::vector<float> featuresCandPid, std::array<std::vector<float>, kN3ProngDecays - 1>& outputScores, auto& isSelected)
18301830
{
18311831
if (isSelected == 0) {
18321832
return;
18331833
}
18341834

18351835
const float ptDummy = 1.f; // dummy pT value (only one pT bin)
1836-
for (int iDecay3P{0}; iDecay3P < kN3ProngDecays; ++iDecay3P) {
1836+
for (int iDecay3P{0}; iDecay3P < kN3ProngDecays - 1; ++iDecay3P) {
18371837
if (TESTBIT(isSelected, iDecay3P) && hasMlModel3Prong[iDecay3P]) {
18381838
bool isMlSel = false;
18391839
if constexpr (UsePidForHfFiltersBdt) {
@@ -1873,12 +1873,6 @@ struct HfTrackIndexSkimCreator {
18731873
registry.fill(HIST("ML/hMlScoreNonpromptXic"), outputScores[iDecay3P][2]);
18741874
break;
18751875
}
1876-
case hf_cand_3prong::DecayType::CdToDeKPi: {
1877-
registry.fill(HIST("ML/hMlScoreBkgCd"), outputScores[iDecay3P][0]);
1878-
registry.fill(HIST("ML/hMlScorePromptCd"), outputScores[iDecay3P][1]);
1879-
registry.fill(HIST("ML/hMlScoreNonpromptCd"), outputScores[iDecay3P][2]);
1880-
break;
1881-
}
18821876
}
18831877
}
18841878
if (!isMlSel) {
@@ -2568,7 +2562,7 @@ struct HfTrackIndexSkimCreator {
25682562
// 3-prong selections after secondary vertex
25692563
applySelection3Prong(pVecCandProng3Pos, secondaryVertex3, pvRefitCoord3Prong2Pos1Neg, cutStatus3Prong, isSelected3ProngCand);
25702564

2571-
std::array<std::vector<float>, kN3ProngDecays> mlScores3Prongs;
2565+
std::array<std::vector<float>, kN3ProngDecays - 1> mlScores3Prongs;
25722566
if (config.applyMlForHfFilters) {
25732567
const std::vector<float> inputFeatures{trackParVarPcaPos1.getPt(), dcaInfoPos1[0], dcaInfoPos1[1], trackParVarPcaNeg1.getPt(), dcaInfoNeg1[0], dcaInfoNeg1[1], trackParVarPcaPos2.getPt(), dcaInfoPos2[0], dcaInfoPos2[1]};
25742568
std::vector<float> inputFeaturesLcPid{};
@@ -2825,7 +2819,7 @@ struct HfTrackIndexSkimCreator {
28252819
// 3-prong selections after secondary vertex
28262820
applySelection3Prong(pVecCandProng3Neg, secondaryVertex3, pvRefitCoord3Prong1Pos2Neg, cutStatus3Prong, isSelected3ProngCand);
28272821

2828-
std::array<std::vector<float>, kN3ProngDecays> mlScores3Prongs{};
2822+
std::array<std::vector<float>, kN3ProngDecays - 1> mlScores3Prongs{};
28292823
if (config.applyMlForHfFilters) {
28302824
const std::vector<float> inputFeatures{trackParVarPcaNeg1.getPt(), dcaInfoNeg1[0], dcaInfoNeg1[1], trackParVarPcaPos1.getPt(), dcaInfoPos1[0], dcaInfoPos1[1], trackParVarPcaNeg2.getPt(), dcaInfoNeg2[0], dcaInfoNeg2[1]};
28312825
std::vector<float> inputFeaturesLcPid{};

0 commit comments

Comments
 (0)