Skip to content

Commit 87be5da

Browse files
authored
[PWGCF,PWGHF,PWGJE] Propagate new MC flags to 2-prongs (#11782)
1 parent 02aa365 commit 87be5da

27 files changed

+523
-493
lines changed

PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,49 @@
1717
/// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@cern.ch
1818
/// \author Shirajum Monira, WUT Warsaw, shirajum.monira@cern.ch
1919

20-
#include <experimental/type_traits>
21-
#include <CCDB/BasicCCDBManager.h>
22-
#include <TPDGCode.h>
23-
#include <vector>
24-
#include <algorithm>
25-
#include <set>
20+
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h"
21+
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h"
22+
#include "PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h"
23+
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h"
24+
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h"
25+
#include "PWGCF/FemtoUniverse/Core/femtoUtils.h"
26+
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
27+
#include "PWGHF/Core/DecayChannels.h"
28+
#include "PWGHF/Core/HfHelper.h"
29+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
30+
#include "PWGHF/DataModel/CandidateSelectionTables.h"
31+
#include "PWGLF/DataModel/LFStrangenessTables.h"
2632

27-
#include "CommonConstants/PhysicsConstants.h"
2833
#include "Common/CCDB/ctpRateFetcher.h"
29-
#include "Common/Core/trackUtilities.h"
3034
#include "Common/Core/RecoDecay.h"
35+
#include "Common/Core/trackUtilities.h"
36+
#include "Common/DataModel/Centrality.h"
3137
#include "Common/DataModel/EventSelection.h"
3238
#include "Common/DataModel/Multiplicity.h"
33-
#include "Common/DataModel/Centrality.h"
3439
#include "Common/DataModel/PIDResponse.h"
3540
#include "Common/DataModel/TrackSelectionTables.h"
41+
42+
#include "CommonConstants/PhysicsConstants.h"
3643
#include "DataFormatsParameters/GRPMagField.h"
3744
#include "DataFormatsParameters/GRPObject.h"
38-
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h"
39-
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h"
40-
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h"
41-
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h"
42-
#include "PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h"
43-
#include "PWGCF/FemtoUniverse/Core/femtoUtils.h"
44-
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
45-
#include "PWGHF/DataModel/CandidateSelectionTables.h"
46-
#include "PWGHF/Core/HfHelper.h"
4745
#include "Framework/ASoAHelpers.h"
4846
#include "Framework/AnalysisDataModel.h"
4947
#include "Framework/AnalysisTask.h"
5048
#include "Framework/HistogramRegistry.h"
49+
#include "Framework/O2DatabasePDGPlugin.h"
5150
#include "Framework/runDataProcessing.h"
52-
#include "Math/Vector4D.h"
53-
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
54-
#include "PWGLF/DataModel/LFStrangenessTables.h"
5551
#include "ReconstructionDataFormats/Track.h"
56-
#include "TMath.h"
52+
#include <CCDB/BasicCCDBManager.h>
53+
54+
#include "Math/Vector4D.h"
5755
#include "TLorentzVector.h"
58-
#include "Framework/O2DatabasePDGPlugin.h"
56+
#include "TMath.h"
57+
#include <TPDGCode.h>
58+
59+
#include <algorithm>
60+
#include <experimental/type_traits>
61+
#include <set>
62+
#include <vector>
5963

6064
using namespace o2;
6165
using namespace o2::analysis::femto_universe;
@@ -786,7 +790,7 @@ struct FemtoUniverseProducerTask {
786790
template <typename ParticleType>
787791
void fillMCParticleD0(ParticleType const& hfCand)
788792
{
789-
if (std::abs(hfCand.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
793+
if (std::abs(hfCand.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
790794
// get corresponding MC particle and its info
791795
int pdgCode = 0;
792796
int hfCandOrigin = 99;
@@ -1807,7 +1811,7 @@ struct FemtoUniverseProducerTask {
18071811

18081812
auto mcD0origin = aod::femtouniverseparticle::ParticleType::kMCTruthTrack;
18091813
float ptGenB = -1;
1810-
if (std::abs(particle.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
1814+
if (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
18111815
if (ConfD0Selection.yD0D0barCandGenMax >= 0. && std::abs(RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0)) > ConfD0Selection.yD0D0barCandGenMax) {
18121816
continue;
18131817
}

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/// \author Jasper Parkkila <jasper.parkkila@cern.ch>
1313

1414
#include "PWGCF/DataModel/CorrelationsDerived.h"
15+
#include "PWGHF/Core/DecayChannels.h"
1516
#include "PWGHF/Core/HfHelper.h"
1617
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
1718
#include "PWGHF/DataModel/CandidateSelectionTables.h"
@@ -147,7 +148,7 @@ struct Filter2Prong {
147148
// The main filter outputs the primary MC particles. Here we just resolve the daughter indices that are needed for the efficiency matching.
148149
for (const auto& r : cfmcparticles) {
149150
const auto& mcParticle = r.mcParticle_as<HFMCTrack>();
150-
if ((mcParticle.flagMcMatchGen() & (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) == 0 || mcParticle.daughtersIds().size() != 2) {
151+
if ((std::abs(mcParticle.flagMcMatchGen()) != o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || mcParticle.daughtersIds().size() != 2) {
151152
output2ProngMcParts(-1, -1, aod::cf2prongtrack::Generic2Prong);
152153
continue;
153154
}

PWGHF/Core/DecayChannels.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ enum DecayChannelMain : int8_t {
4040
D0ToPiPi = 3, // π+ π−
4141
D0ToPiPiPi0 = 4, // π+ π− π0
4242
D0ToKK = 5, // K+ K−
43+
// J/ψ
44+
JpsiToEE = 6, // e+ e−
45+
JpsiToMuMu = 7, // μ+ μ−
4346
//
44-
NChannelsMain = D0ToKK // last channel
47+
NChannelsMain = JpsiToMuMu // last channel
4548
};
4649
/// @brief 2-prong candidates: resonant channels
4750
enum DecayChannelResonant : int8_t {
@@ -119,7 +122,7 @@ enum DecayChannelResonant : int8_t {
119122
DstarToDplusToRho0Pi = 22, // ρ0 π+
120123
DstarToDplusToF2_1270Pi = 23, // f2(1270) π+
121124
// Λc+
122-
LcToPKstar0 = 24, // p K*0(892)
125+
LcToPKstar0 = 24, // p anti-K*0(892)
123126
LcToDeltaplusplusK = 25, // Δ++ K−
124127
LcToL1520Pi = 26, // Λ(1520) π+
125128
// Ξc+

PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
#include <TPDGCode.h>
4949
#include <TRandom3.h>
5050

51-
#include <Rtypes.h>
52-
5351
#include <array>
5452
#include <cmath>
5553
#include <cstdint>
@@ -2082,8 +2080,8 @@ struct HfTaskCharmPolarisation {
20822080
int8_t charge = -99;
20832081
bool partRecoDstar{false};
20842082
if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) {
2085-
partRecoDstar = TESTBIT(std::abs(mcParticle.flagMcMatchGen()), hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPiPi0) && TESTBIT(std::abs(mcParticle.flagMcMatchGenD0()), hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiKPi0);
2086-
bool signalDstar = TESTBIT(std::abs(mcParticle.flagMcMatchGen()), hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) && TESTBIT(std::abs(mcParticle.flagMcMatchGenD0()), hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK);
2083+
partRecoDstar = (std::abs(mcParticle.flagMcMatchGen()) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPiPi0) && (std::abs(mcParticle.flagMcMatchGenD0()) == hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiKPi0);
2084+
bool signalDstar = (std::abs(mcParticle.flagMcMatchGen()) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) && (std::abs(mcParticle.flagMcMatchGenD0()) == hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK);
20872085

20882086
if (!signalDstar && (!activatePartRecoDstar || !partRecoDstar)) { // this particle is not signal and not partially reconstructed signal, skip
20892087
return;

PWGHF/D2H/Tasks/taskD0.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/// \author Vít Kučera <vit.kucera@cern.ch>, CERN
1717

1818
#include "PWGHF/Core/CentralityEstimation.h"
19+
#include "PWGHF/Core/DecayChannels.h"
1920
#include "PWGHF/Core/HfHelper.h"
2021
#include "PWGHF/Core/SelectorCuts.h"
2122
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -569,7 +570,7 @@ struct HfTaskD0 {
569570
}
570571
auto trackPos = candidate.template prong0_as<TracksSelQuality>(); // positive daughter
571572
auto trackNeg = candidate.template prong1_as<TracksSelQuality>(); // negative daughter
572-
if (std::abs(candidate.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
573+
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
573574
// Get the corresponding MC particle.
574575
auto indexMother = RecoDecay::getMother(mcParticles, trackPos.template mcParticle_as<soa::Join<aod::McParticles, aod::HfCand2ProngMcGen>>(), o2::constants::physics::Pdg::kD0, true);
575576
auto particleMother = mcParticles.rawIteratorAt(indexMother);
@@ -663,7 +664,7 @@ struct HfTaskD0 {
663664
int minTpcCrossedRowsOfProngs = std::min(trackPos.tpcNClsCrossedRows(), trackNeg.tpcNClsCrossedRows());
664665
if (candidate.isSelD0() >= selectionFlagD0) {
665666
registry.fill(HIST("hMassSigBkgD0"), massD0, ptCandidate, rapidityCandidate);
666-
if (candidate.flagMcMatchRec() == (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
667+
if (candidate.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
667668
registry.fill(HIST("hPtProng0Sig"), ptProng0, rapidityCandidate);
668669
registry.fill(HIST("hPtProng1Sig"), ptProng1, rapidityCandidate);
669670
registry.fill(HIST("hDecLengthSig"), declengthCandidate, rapidityCandidate);
@@ -727,7 +728,7 @@ struct HfTaskD0 {
727728
registry.fill(HIST("hCPABkg"), cpaCandidate, rapidityCandidate);
728729
registry.fill(HIST("hCPAxyBkg"), cpaxyCandidate, rapidityCandidate);
729730
registry.fill(HIST("hMassBkgD0"), massD0, ptCandidate, rapidityCandidate);
730-
if (candidate.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
731+
if (candidate.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
731732
registry.fill(HIST("hMassReflBkgD0"), massD0, ptCandidate, rapidityCandidate);
732733
if constexpr (applyMl) {
733734
if (storeCentrality && storeOccupancy) {
@@ -759,7 +760,7 @@ struct HfTaskD0 {
759760
}
760761
if (candidate.isSelD0bar() >= selectionFlagD0bar) {
761762
registry.fill(HIST("hMassSigBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
762-
if (candidate.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
763+
if (candidate.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
763764
registry.fill(HIST("hMassSigD0bar"), massD0bar, ptCandidate, rapidityCandidate);
764765
if constexpr (applyMl) {
765766
if (storeCentrality && storeOccupancy) {
@@ -788,7 +789,7 @@ struct HfTaskD0 {
788789
}
789790
} else {
790791
registry.fill(HIST("hMassBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
791-
if (candidate.flagMcMatchRec() == (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
792+
if (candidate.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
792793
registry.fill(HIST("hMassReflBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
793794
if constexpr (applyMl) {
794795
if (storeCentrality && storeOccupancy) {
@@ -821,7 +822,7 @@ struct HfTaskD0 {
821822
}
822823
// MC gen.
823824
for (const auto& particle : mcParticles) {
824-
if (std::abs(particle.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
825+
if (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
825826
if (yCandGenMax >= 0. && std::abs(RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0)) > yCandGenMax) {
826827
continue;
827828
}

PWGHF/D2H/Tasks/taskLcToK0sP.cxx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,9 @@ struct HfTaskLcToK0sP {
266266
TracksWPid const&)
267267
{
268268
for (const auto& candidate : candidates) {
269-
/*
270-
// no such selection for LcK0sp for now - it is the only cascade
271-
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
272-
continue;
273-
}
274-
*/
275-
276269
if (etaCandMax >= 0. && std::abs(candidate.eta()) > etaCandMax) {
277270
continue;
278271
}
279-
280272
if (yCandRecoMax >= 0. && std::abs(hfHelper.yLc(candidate)) > yCandRecoMax) {
281273
continue;
282274
}

PWGHF/D2H/Tasks/taskSigmac.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ struct HfTaskSigmac {
10701070
double decLengthLc(candidateLc.decayLength()), decLengthXYLc(candidateLc.decayLengthXY());
10711071
double cpaLc(candidateLc.cpa()), cpaXYLc(candidateLc.cpaXY());
10721072
int origin = candSc.originMcRec();
1073-
auto channel = candidateLc.flagMcDecayChanRec(); /// 0: direct; 1: Λc± → p± K*; 2: Λc± → Δ(1232)±± K∓; 3: Λc± → Λ(1520) π±
1073+
auto channel = candidateLc.flagMcDecayChanRec(); /// 0: direct; 1: Λc± → p± K*; 2: Λc± → Δ(1232)±± K∓; 3: Λc± → Λ(1520) π±; FIXME: DecayChannelResonant
10741074

10751075
/// candidate Λc+ → pK-π+ (and charge conjugate) within the range of M(pK-π+) chosen in the Σc0,++ builder
10761076
if ((TESTBIT(isCandPKPiPiKP, o2::aod::hf_cand_sigmac::Decays::PKPi)) && std::abs(candidateLc.template prong0_as<aod::TracksWMc>().mcParticle().pdgCode()) == kProton) {

PWGHF/HFC/TableProducer/correlatorD0D0bar.cxx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
///
1515
/// \author Fabio Colamaria <fabio.colamaria@ba.infn.it>, INFN Bari
1616

17+
#include "PWGHF/Core/DecayChannels.h"
1718
#include "PWGHF/Core/HfHelper.h"
1819
#include "PWGHF/Core/SelectorCuts.h"
1920
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -306,7 +307,7 @@ struct HfCorrelatorD0D0bar {
306307
efficiencyWeight = 1. / efficiencyD->at(o2::analysis::findBin(binsPt, candidate1.pt()));
307308
}
308309

309-
if (std::abs(candidate1.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
310+
if (std::abs(candidate1.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
310311
// fill per-candidate distributions from D0/D0bar true candidates
311312
registry.fill(HIST("hPtCandMCRec"), candidate1.pt());
312313
registry.fill(HIST("hPtProng0MCRec"), candidate1.ptProng0());
@@ -317,19 +318,19 @@ struct HfCorrelatorD0D0bar {
317318
registry.fill(HIST("hSelectionStatusMCRec"), candidate1.isSelD0bar() + (candidate1.isSelD0() * 2));
318319
}
319320
// fill invariant mass plots from D0/D0bar signal and background candidates
320-
if (candidate1.isSelD0() >= selectionFlagD0) { // only reco as D0
321-
if (candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) { // also matched as D0
321+
if (candidate1.isSelD0() >= selectionFlagD0) { // only reco as D0
322+
if (candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) { // also matched as D0
322323
registry.fill(HIST("hMassD0MCRecSig"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
323-
} else if (candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
324+
} else if (candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
324325
registry.fill(HIST("hMassD0MCRecRefl"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
325326
} else {
326327
registry.fill(HIST("hMassD0MCRecBkg"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
327328
}
328329
}
329-
if (candidate1.isSelD0bar() >= selectionFlagD0bar) { // only reco as D0bar
330-
if (candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) { // also matched as D0bar
330+
if (candidate1.isSelD0bar() >= selectionFlagD0bar) { // only reco as D0bar
331+
if (candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) { // also matched as D0bar
331332
registry.fill(HIST("hMassD0barMCRecSig"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
332-
} else if (candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
333+
} else if (candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
333334
registry.fill(HIST("hMassD0barMCRecRefl"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
334335
} else {
335336
registry.fill(HIST("hMassD0barMCRecBkg"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
@@ -341,17 +342,17 @@ struct HfCorrelatorD0D0bar {
341342
if (candidate1.isSelD0() < selectionFlagD0) { // discard candidates not selected as D0 in outer loop
342343
continue;
343344
}
344-
flagD0Signal = candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK; // flagD0Signal 'true' if candidate1 matched to D0 (particle)
345-
flagD0Reflection = candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK); // flagD0Reflection 'true' if candidate1, selected as D0 (particle), is matched to D0bar (antiparticle)
345+
flagD0Signal = candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0Signal 'true' if candidate1 matched to D0 (particle)
346+
flagD0Reflection = candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0Reflection 'true' if candidate1, selected as D0 (particle), is matched to D0bar (antiparticle)
346347
for (const auto& candidate2 : selectedD0CandidatesGroupedMC) {
347348
if (!(candidate2.hfflag() & 1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) { // check decay channel flag for candidate2
348349
continue;
349350
}
350351
if (candidate2.isSelD0bar() < selectionFlagD0bar) { // discard candidates not selected as D0bar in inner loop
351352
continue;
352353
}
353-
flagD0barSignal = candidate2.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK); // flagD0barSignal 'true' if candidate2 matched to D0bar (antiparticle)
354-
flagD0barReflection = candidate2.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK; // flagD0barReflection 'true' if candidate2, selected as D0bar (antiparticle), is matched to D0 (particle)
354+
flagD0barSignal = candidate2.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0barSignal 'true' if candidate2 matched to D0bar (antiparticle)
355+
flagD0barReflection = candidate2.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0barReflection 'true' if candidate2, selected as D0bar (antiparticle), is matched to D0 (particle)
355356
if (yCandMax >= 0. && std::abs(hfHelper.yD0(candidate2)) > yCandMax) {
356357
continue;
357358
}
@@ -455,7 +456,7 @@ struct HfCorrelatorD0D0bar {
455456

456457
// fill pairs vs etaCut plot
457458
bool rightDecayChannels = false;
458-
if ((std::abs(particle1.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) && (std::abs(particle2.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
459+
if ((std::abs(particle1.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) && (std::abs(particle2.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK)) {
459460
rightDecayChannels = true;
460461
}
461462
do {

0 commit comments

Comments
 (0)