Skip to content

Commit 3663be7

Browse files
committed
Correct error in mass assignment
1 parent ab6839e commit 3663be7

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

PWGHF/DataModel/DerivedTables.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,11 @@ DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTML", //! Table with candidate selecti
899899

900900
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTMC", //! Table with MC candidate info
901901
hf_cand_mc::FlagMcMatchRec,
902+
hf_cand_mc_charm::FlagMcMatchRecCharm,
902903
hf_cand_mc::OriginMcRec,
904+
hf_cand::PtBhadMotherPart,
905+
hf_cand::PdgBhadMotherPart,
906+
hf_cand::NTracksDecayed,
903907
o2::soa::Marker<MarkerDstar>);
904908
} // namespace o2::aod
905909

PWGHF/HFJ/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
#
88
# In applying this license CERN does not waive the privileges and immunities
99
# granted to it by virtue of its status as an Intergovernmental Organization
10-
# or submit itself to any jurisdiction.
11-
12-
add_subdirectory(Tasks)
10+
# or submit itself to any jurisdiction.

PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
127127

128128
template <typename T, typename U>
129129
void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass,
130-
double y, int8_t flagMc, int8_t origin, const std::vector<float>& mlScores)
130+
double y, int8_t flagMc, int8_t flagMcD0, int8_t origin, int8_t nTracksDecayed, double ptBhad, int pdgBhad, const std::vector<float>& mlScores)
131131
{
132132
rowsCommon.fillTablesCandidate(candidate, invMass, y);
133133
if (fillCandidatePar) {
@@ -196,7 +196,11 @@ struct HfDerivedDataCreatorDstarToD0Pi {
196196
if (fillCandidateMc) {
197197
rowCandidateMc(
198198
flagMc,
199-
origin);
199+
flagMcD0,
200+
origin,
201+
ptBhad,
202+
pdgBhad,
203+
nTracksDecayed);
200204
}
201205
}
202206

@@ -242,7 +246,9 @@ struct HfDerivedDataCreatorDstarToD0Pi {
242246
if constexpr (isMc) {
243247
reserveTable(rowCandidateMc, fillCandidateMc, sizeTableCand);
244248
}
245-
int8_t flagMcRec = 0, origin = 0;
249+
int8_t flagMcRec = 0, flagMcRecD0 = 0, origin = 0, nTracksDecayed = 0;
250+
double ptBhadMotherPart = 0;
251+
int pdgBhadMotherPart = 0;
246252
for (const auto& candidate : candidatesThisColl) {
247253
if constexpr (isMl) {
248254
if (!TESTBIT(candidate.isSelDstarToD0Pi(), aod::SelectionStep::RecoMl)) {
@@ -251,7 +257,11 @@ struct HfDerivedDataCreatorDstarToD0Pi {
251257
}
252258
if constexpr (isMc) {
253259
flagMcRec = candidate.flagMcMatchRec();
260+
flagMcRecD0 = candidate.flagMcMatchRecD0();
254261
origin = candidate.originMcRec();
262+
nTracksDecayed = candidate.nTracksDecayed();
263+
ptBhadMotherPart = candidate.ptBhadMotherPart();
264+
pdgBhadMotherPart = candidate.pdgBhadMotherPart();
255265
if constexpr (onlyBkg) {
256266
if (std::abs(flagMcRec) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) {
257267
continue;
@@ -279,7 +289,12 @@ struct HfDerivedDataCreatorDstarToD0Pi {
279289
if constexpr (isMl) {
280290
std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi));
281291
}
282-
fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, isD0 ? 0 : 1, y, massDstar, flagMcRec, origin, mlScoresDstarToD0Pi);
292+
if (candidate.signSoftPi() > 0){
293+
fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi);
294+
} else {
295+
fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi);
296+
}
297+
283298
}
284299
}
285300
}

0 commit comments

Comments
 (0)