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
54 changes: 29 additions & 25 deletions PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,49 @@
/// \author Pritam Chakraborty, WUT Warsaw, pritam.chakraborty@cern.ch
/// \author Shirajum Monira, WUT Warsaw, shirajum.monira@cern.ch

#include <experimental/type_traits>
#include <CCDB/BasicCCDBManager.h>
#include <TPDGCode.h>
#include <vector>
#include <algorithm>
#include <set>
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h"
#include "PWGCF/FemtoUniverse/Core/femtoUtils.h"
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
#include "PWGHF/Core/DecayChannels.h"
#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include "CommonConstants/PhysicsConstants.h"
#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/trackUtilities.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCollisionSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseTrackSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseV0Selection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniverseCascadeSelection.h"
#include "PWGCF/FemtoUniverse/Core/FemtoUniversePhiSelection.h"
#include "PWGCF/FemtoUniverse/Core/femtoUtils.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
#include "PWGHF/Core/HfHelper.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"
#include "Math/Vector4D.h"
#include "PWGCF/FemtoUniverse/DataModel/FemtoDerived.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "ReconstructionDataFormats/Track.h"
#include "TMath.h"
#include <CCDB/BasicCCDBManager.h>

#include "Math/Vector4D.h"
#include "TLorentzVector.h"

Check failure on line 55 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include "Framework/O2DatabasePDGPlugin.h"
#include "TMath.h"
#include <TPDGCode.h>

#include <algorithm>
#include <experimental/type_traits>
#include <set>
#include <vector>

using namespace o2;
using namespace o2::analysis::femto_universe;
Expand Down Expand Up @@ -746,7 +750,7 @@
if ((kaon1MC.isPhysicalPrimary() && kaon2MC.isPhysicalPrimary()) && (!motherskaon1MC.empty() && !motherskaon2MC.empty())) {
for (const auto& particleMotherOfNeg : motherskaon1MC) {
for (const auto& particleMotherOfPos : motherskaon2MC) {
if (particleMotherOfNeg == particleMotherOfPos && particleMotherOfNeg.pdgCode() == 333) {

Check failure on line 753 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary;
} else {
phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake;
Expand All @@ -760,8 +764,8 @@
phiOrigin = aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kFake;
}

TLorentzVector part1Vec;

Check failure on line 767 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
TLorentzVector part2Vec;

Check failure on line 768 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header
const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header
Expand All @@ -769,7 +773,7 @@
part1Vec.SetPtEtaPhiM(kaon1MC.pt(), kaon1MC.eta(), kaon1MC.phi(), mMassOne);
part2Vec.SetPtEtaPhiM(kaon2MC.pt(), kaon2MC.eta(), kaon2MC.phi(), mMassTwo);

TLorentzVector sumVec(part1Vec);

Check failure on line 776 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
sumVec += part2Vec;

float phiEta = sumVec.Eta();
Expand All @@ -786,7 +790,7 @@
template <typename ParticleType>
void fillMCParticleD0(ParticleType const& hfCand)
{
if (std::abs(hfCand.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
if (std::abs(hfCand.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
// get corresponding MC particle and its info
int pdgCode = 0;
int hfCandOrigin = 99;
Expand Down Expand Up @@ -1542,8 +1546,8 @@
continue;
}

TLorentzVector part1Vec;

Check failure on line 1549 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
TLorentzVector part2Vec;

Check failure on line 1550 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

const auto mMassOne = o2::constants::physics::MassKPlus; // FIXME: Get from the PDG service of the common header
const auto mMassTwo = o2::constants::physics::MassKMinus; // FIXME: Get from the PDG service of the common header
Expand All @@ -1551,7 +1555,7 @@
part1Vec.SetPtEtaPhiM(p1.pt(), p1.eta(), p1.phi(), mMassOne);
part2Vec.SetPtEtaPhiM(p2.pt(), p2.eta(), p2.phi(), mMassTwo);

TLorentzVector sumVec(part1Vec);

Check failure on line 1558 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
sumVec += part2Vec;

float phiEta = sumVec.Eta();
Expand Down Expand Up @@ -1658,7 +1662,7 @@
std::vector<int> tmpPDGCodes = confMCTruthPDGCodes; // necessary due to some features of the Configurable
for (auto const& pdg : tmpPDGCodes) {
if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
if (pdgCode == 333) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles

Check failure on line 1665 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
pass = true;
} else {
if (confStoreMCmothers || particle.isPhysicalPrimary() || (confActivateSecondaries && recoMcIds && recoMcIds->get().contains(particle.globalIndex())))
Expand Down Expand Up @@ -1784,7 +1788,7 @@
std::vector<int> tmpPDGCodes = confMCTruthPDGCodes; // necessary due to some features of the Configurable
for (auto const& pdg : tmpPDGCodes) {
if (static_cast<int>(pdg) == static_cast<int>(pdgCode)) {
if (pdgCode == 333) { // && (recoMcIds && recoMcIds->get().contains(particle.globalIndex()))) { // ATTENTION: all Phi mesons are NOT primary particles

Check failure on line 1791 in PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
pass = true;
} else if (pdgCode == 421) {
pass = true;
Expand All @@ -1807,7 +1811,7 @@

auto mcD0origin = aod::femtouniverseparticle::ParticleType::kMCTruthTrack;
float ptGenB = -1;
if (std::abs(particle.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
if (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
if (ConfD0Selection.yD0D0barCandGenMax >= 0. && std::abs(RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0)) > ConfD0Selection.yD0D0barCandGenMax) {
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion PWGCF/TableProducer/filter2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// \author Jasper Parkkila <jasper.parkkila@cern.ch>

#include "PWGCF/DataModel/CorrelationsDerived.h"
#include "PWGHF/Core/DecayChannels.h"
#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
Expand Down Expand Up @@ -147,7 +148,7 @@ struct Filter2Prong {
// The main filter outputs the primary MC particles. Here we just resolve the daughter indices that are needed for the efficiency matching.
for (const auto& r : cfmcparticles) {
const auto& mcParticle = r.mcParticle_as<HFMCTrack>();
if ((mcParticle.flagMcMatchGen() & (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) == 0 || mcParticle.daughtersIds().size() != 2) {
if ((std::abs(mcParticle.flagMcMatchGen()) != o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) || mcParticle.daughtersIds().size() != 2) {
output2ProngMcParts(-1, -1, aod::cf2prongtrack::Generic2Prong);
continue;
}
Expand Down
7 changes: 5 additions & 2 deletions PWGHF/Core/DecayChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ enum DecayChannelMain : int8_t {
D0ToPiPi = 3, // π+ π−
D0ToPiPiPi0 = 4, // π+ π− π0
D0ToKK = 5, // K+ K−
// J/ψ
JpsiToEE = 6, // e+ e−
JpsiToMuMu = 7, // μ+ μ−
//
NChannelsMain = D0ToKK // last channel
NChannelsMain = JpsiToMuMu // last channel
};
/// @brief 2-prong candidates: resonant channels
enum DecayChannelResonant : int8_t {
Expand Down Expand Up @@ -119,7 +122,7 @@ enum DecayChannelResonant : int8_t {
DstarToDplusToRho0Pi = 22, // ρ0 π+
DstarToDplusToF2_1270Pi = 23, // f2(1270) π+
// Λc+
LcToPKstar0 = 24, // p K*0(892)
LcToPKstar0 = 24, // p anti-K*0(892)
LcToDeltaplusplusK = 25, // Δ++ K−
LcToL1520Pi = 26, // Λ(1520) π+
// Ξc+
Expand Down
6 changes: 2 additions & 4 deletions PWGHF/D2H/Tasks/taskCharmPolarisation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
#include <TPDGCode.h>
#include <TRandom3.h>

#include <Rtypes.h>

#include <array>
#include <cmath>
#include <cstdint>
Expand Down Expand Up @@ -1626,8 +1624,8 @@ struct TaskPolarisationCharmHadrons {
int8_t charge = -99;
bool partRecoDstar{false};
if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) {
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);
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);
partRecoDstar = (std::abs(mcParticle.flagMcMatchGen()) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPiPi0) && (std::abs(mcParticle.flagMcMatchGenD0()) == hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiKPi0);
bool signalDstar = (std::abs(mcParticle.flagMcMatchGen()) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) && (std::abs(mcParticle.flagMcMatchGenD0()) == hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK);

if (!signalDstar && (!activatePartRecoDstar || !partRecoDstar)) { // this particle is not signal and not partially reconstructed signal, skip
return;
Expand Down
13 changes: 7 additions & 6 deletions PWGHF/D2H/Tasks/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/// \author Vít Kučera <vit.kucera@cern.ch>, CERN

#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGHF/Core/DecayChannels.h"
#include "PWGHF/Core/HfHelper.h"
#include "PWGHF/Core/SelectorCuts.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
Expand Down Expand Up @@ -569,7 +570,7 @@ struct HfTaskD0 {
}
auto trackPos = candidate.template prong0_as<TracksSelQuality>(); // positive daughter
auto trackNeg = candidate.template prong1_as<TracksSelQuality>(); // negative daughter
if (std::abs(candidate.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
if (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
// Get the corresponding MC particle.
auto indexMother = RecoDecay::getMother(mcParticles, trackPos.template mcParticle_as<soa::Join<aod::McParticles, aod::HfCand2ProngMcGen>>(), o2::constants::physics::Pdg::kD0, true);
auto particleMother = mcParticles.rawIteratorAt(indexMother);
Expand Down Expand Up @@ -663,7 +664,7 @@ struct HfTaskD0 {
int minTpcCrossedRowsOfProngs = std::min(trackPos.tpcNClsCrossedRows(), trackNeg.tpcNClsCrossedRows());
if (candidate.isSelD0() >= selectionFlagD0) {
registry.fill(HIST("hMassSigBkgD0"), massD0, ptCandidate, rapidityCandidate);
if (candidate.flagMcMatchRec() == (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
if (candidate.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hPtProng0Sig"), ptProng0, rapidityCandidate);
registry.fill(HIST("hPtProng1Sig"), ptProng1, rapidityCandidate);
registry.fill(HIST("hDecLengthSig"), declengthCandidate, rapidityCandidate);
Expand Down Expand Up @@ -727,7 +728,7 @@ struct HfTaskD0 {
registry.fill(HIST("hCPABkg"), cpaCandidate, rapidityCandidate);
registry.fill(HIST("hCPAxyBkg"), cpaxyCandidate, rapidityCandidate);
registry.fill(HIST("hMassBkgD0"), massD0, ptCandidate, rapidityCandidate);
if (candidate.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
if (candidate.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hMassReflBkgD0"), massD0, ptCandidate, rapidityCandidate);
if constexpr (applyMl) {
if (storeCentrality && storeOccupancy) {
Expand Down Expand Up @@ -759,7 +760,7 @@ struct HfTaskD0 {
}
if (candidate.isSelD0bar() >= selectionFlagD0bar) {
registry.fill(HIST("hMassSigBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
if (candidate.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
if (candidate.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hMassSigD0bar"), massD0bar, ptCandidate, rapidityCandidate);
if constexpr (applyMl) {
if (storeCentrality && storeOccupancy) {
Expand Down Expand Up @@ -788,7 +789,7 @@ struct HfTaskD0 {
}
} else {
registry.fill(HIST("hMassBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
if (candidate.flagMcMatchRec() == (1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
if (candidate.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hMassReflBkgD0bar"), massD0bar, ptCandidate, rapidityCandidate);
if constexpr (applyMl) {
if (storeCentrality && storeOccupancy) {
Expand Down Expand Up @@ -821,7 +822,7 @@ struct HfTaskD0 {
}
// MC gen.
for (const auto& particle : mcParticles) {
if (std::abs(particle.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
if (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
if (yCandGenMax >= 0. && std::abs(RecoDecay::y(particle.pVector(), o2::constants::physics::MassD0)) > yCandGenMax) {
continue;
}
Expand Down
8 changes: 0 additions & 8 deletions PWGHF/D2H/Tasks/taskLcToK0sP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,9 @@ struct HfTaskLcToK0sP {
TracksWPid const&)
{
for (const auto& candidate : candidates) {
/*
// no such selection for LcK0sp for now - it is the only cascade
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
continue;
}
*/

if (etaCandMax >= 0. && std::abs(candidate.eta()) > etaCandMax) {
continue;
}

if (yCandRecoMax >= 0. && std::abs(hfHelper.yLc(candidate)) > yCandRecoMax) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/D2H/Tasks/taskSigmac.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ struct HfTaskSigmac {
double decLengthLc(candidateLc.decayLength()), decLengthXYLc(candidateLc.decayLengthXY());
double cpaLc(candidateLc.cpa()), cpaXYLc(candidateLc.cpaXY());
int origin = candSc.originMcRec();
auto channel = candidateLc.flagMcDecayChanRec(); /// 0: direct; 1: Λc± → p± K*; 2: Λc± → Δ(1232)±± K∓; 3: Λc± → Λ(1520) π±
auto channel = candidateLc.flagMcDecayChanRec(); /// 0: direct; 1: Λc± → p± K*; 2: Λc± → Δ(1232)±± K∓; 3: Λc± → Λ(1520) π±; FIXME: DecayChannelResonant

/// candidate Λc+ → pK-π+ (and charge conjugate) within the range of M(pK-π+) chosen in the Σc0,++ builder
if ((TESTBIT(isCandPKPiPiKP, o2::aod::hf_cand_sigmac::Decays::PKPi)) && std::abs(candidateLc.template prong0_as<aod::TracksWMc>().mcParticle().pdgCode()) == kProton) {
Expand Down
25 changes: 13 additions & 12 deletions PWGHF/HFC/TableProducer/correlatorD0D0bar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
///
/// \author Fabio Colamaria <fabio.colamaria@ba.infn.it>, INFN Bari

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

if (std::abs(candidate1.flagMcMatchRec()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
if (std::abs(candidate1.flagMcMatchRec()) == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
// fill per-candidate distributions from D0/D0bar true candidates
registry.fill(HIST("hPtCandMCRec"), candidate1.pt());
registry.fill(HIST("hPtProng0MCRec"), candidate1.ptProng0());
Expand All @@ -317,19 +318,19 @@ struct HfCorrelatorD0D0bar {
registry.fill(HIST("hSelectionStatusMCRec"), candidate1.isSelD0bar() + (candidate1.isSelD0() * 2));
}
// fill invariant mass plots from D0/D0bar signal and background candidates
if (candidate1.isSelD0() >= selectionFlagD0) { // only reco as D0
if (candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) { // also matched as D0
if (candidate1.isSelD0() >= selectionFlagD0) { // only reco as D0
if (candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) { // also matched as D0
registry.fill(HIST("hMassD0MCRecSig"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
} else if (candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
} else if (candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hMassD0MCRecRefl"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
} else {
registry.fill(HIST("hMassD0MCRecBkg"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt(), efficiencyWeight);
}
}
if (candidate1.isSelD0bar() >= selectionFlagD0bar) { // only reco as D0bar
if (candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) { // also matched as D0bar
if (candidate1.isSelD0bar() >= selectionFlagD0bar) { // only reco as D0bar
if (candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) { // also matched as D0bar
registry.fill(HIST("hMassD0barMCRecSig"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
} else if (candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) {
} else if (candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK) {
registry.fill(HIST("hMassD0barMCRecRefl"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
} else {
registry.fill(HIST("hMassD0barMCRecBkg"), hfHelper.invMassD0barToKPi(candidate1), candidate1.pt(), efficiencyWeight);
Expand All @@ -341,17 +342,17 @@ struct HfCorrelatorD0D0bar {
if (candidate1.isSelD0() < selectionFlagD0) { // discard candidates not selected as D0 in outer loop
continue;
}
flagD0Signal = candidate1.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK; // flagD0Signal 'true' if candidate1 matched to D0 (particle)
flagD0Reflection = candidate1.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK); // flagD0Reflection 'true' if candidate1, selected as D0 (particle), is matched to D0bar (antiparticle)
flagD0Signal = candidate1.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0Signal 'true' if candidate1 matched to D0 (particle)
flagD0Reflection = candidate1.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0Reflection 'true' if candidate1, selected as D0 (particle), is matched to D0bar (antiparticle)
for (const auto& candidate2 : selectedD0CandidatesGroupedMC) {
if (!(candidate2.hfflag() & 1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) { // check decay channel flag for candidate2
continue;
}
if (candidate2.isSelD0bar() < selectionFlagD0bar) { // discard candidates not selected as D0bar in inner loop
continue;
}
flagD0barSignal = candidate2.flagMcMatchRec() == -(1 << aod::hf_cand_2prong::DecayType::D0ToPiK); // flagD0barSignal 'true' if candidate2 matched to D0bar (antiparticle)
flagD0barReflection = candidate2.flagMcMatchRec() == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK; // flagD0barReflection 'true' if candidate2, selected as D0bar (antiparticle), is matched to D0 (particle)
flagD0barSignal = candidate2.flagMcMatchRec() == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0barSignal 'true' if candidate2 matched to D0bar (antiparticle)
flagD0barReflection = candidate2.flagMcMatchRec() == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; // flagD0barReflection 'true' if candidate2, selected as D0bar (antiparticle), is matched to D0 (particle)
if (yCandMax >= 0. && std::abs(hfHelper.yD0(candidate2)) > yCandMax) {
continue;
}
Expand Down Expand Up @@ -455,7 +456,7 @@ struct HfCorrelatorD0D0bar {

// fill pairs vs etaCut plot
bool rightDecayChannels = false;
if ((std::abs(particle1.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK) && (std::abs(particle2.flagMcMatchGen()) == 1 << aod::hf_cand_2prong::DecayType::D0ToPiK)) {
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)) {
rightDecayChannels = true;
}
do {
Expand Down
Loading
Loading