Skip to content

Commit df773a0

Browse files
committed
Remove matching for generated particles
1 parent 2a8dcd2 commit df773a0

6 files changed

Lines changed: 11 additions & 5 deletions

‎PWGHF/TableProducer/candidateCreator3Prong.cxx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ struct HfCandidateCreator3ProngExpressions {
10531053
McCollisions const& mcCollisions,
10541054
BCsInfo const&)
10551055
{
1056+
LOG(info) << "Running MC matching for 3-prong candidates";
10561057
rowCandidateProng3->bindExternalIndices(&tracks);
10571058

10581059
int indexRec = -1;
@@ -1102,6 +1103,7 @@ struct HfCandidateCreator3ProngExpressions {
11021103
}
11031104

11041105
if (matchCorrelatedBackground) {
1106+
LOG(info) << "Matching correlated background candidates";
11051107
indexRec = -1; // Index of the matched reconstructed candidate
11061108
constexpr int DepthMainMax = 2; // Depth for final state matching
11071109
constexpr int DepthResoMax = 1; // Depth for resonant decay matching
@@ -1357,11 +1359,13 @@ struct HfCandidateCreator3ProngExpressions {
13571359
}
13581360
if (origin == RecoDecay::OriginType::NonPrompt) {
13591361
auto bHadMother = mcParticles.rawIteratorAt(idxBhadMothers[0]);
1362+
LOG(info) << "flagChannelMain: " << static_cast<int>(flagChannelMain) << ", origin: " << static_cast<int>(origin) << ", swapping: " << static_cast<int>(swapping) << ", resonant channel: " << static_cast<int>(flagChannelResonant);
13601363
rowMcMatchRec(flagChannelMain, origin, swapping, flagChannelResonant, bHadMother.pt(), bHadMother.pdgCode(), nKinkedTracks, nInteractionsWithMaterial);
13611364
} else {
13621365
if (std::abs(flagChannelMain) == DecayChannelMain::CDeuteronToDeKPi) {
13631366
origin = RecoDecay::OriginType::Prompt;
13641367
}
1368+
LOG(info) << "flagChannelMain: " << static_cast<int>(flagChannelMain) << ", origin: " << static_cast<int>(origin) << ", swapping: " << static_cast<int>(swapping) << ", resonant channel: " << static_cast<int>(flagChannelResonant);
13651369
rowMcMatchRec(flagChannelMain, origin, swapping, flagChannelResonant, -1.f, 0, nKinkedTracks, nInteractionsWithMaterial);
13661370
}
13671371
}

‎PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct HfDerivedDataCreatorD0ToKPi {
107107
using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
108108

109109
Filter filterSelectCandidates = aod::hf_sel_candidate_d0::isSelD0 >= 1 || aod::hf_sel_candidate_d0::isSelD0bar >= 1;
110-
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK)) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);
110+
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK);
111111

112112
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
113113
Preslice<SelectedCandidatesKf> candidatesKfPerCollision = aod::hf_cand::collisionId;

‎PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct HfDerivedDataCreatorDplusToPiKPi {
104104
using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
105105

106106
Filter filterSelectCandidates = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi & static_cast<int>(BIT(aod::SelectionStep::RecoMl - 1))) != 0; // select candidates which passed all cuts at least up to RecoMl - 1
107-
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi)) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);
107+
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi);
108108

109109
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
110110
Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;
@@ -243,6 +243,8 @@ struct HfDerivedDataCreatorDplusToPiKPi {
243243
TracksWPid const&,
244244
aod::BCs const&)
245245
{
246+
LOG(info) << "IsMc:" << IsMc;
247+
LOG(info) << "Processing candidates for collisions with size: " << collisions.size() << " and candidates with size: " << candidates.size();
246248
// Fill collision properties
247249
if constexpr (IsMc) {
248250
if (confDerData.fillMcRCollId) {

‎PWGHF/TableProducer/derivedDataCreatorDsToKKPi.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct HfDerivedDataCreatorDsToKKPi {
102102
using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
103103

104104
Filter filterSelectCandidates = (aod::hf_sel_candidate_ds::isSelDsToKKPi & static_cast<int>(BIT(aod::SelectionStep::RecoMl - 1))) != 0; // select candidates which passed all cuts at least up to RecoMl - 1
105-
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DsToPiKK)) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);
105+
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DsToPiKK);
106106

107107
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
108108
Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;

‎PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
100100
using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
101101

102102
Filter filterSelectCandidates = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == true;
103-
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi)) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);
103+
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi);
104104

105105
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
106106
Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;

‎PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct HfDerivedDataCreatorLcToPKPi {
102102
using TypeMcCollisions = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
103103

104104
Filter filterSelectCandidates = aod::hf_sel_candidate_lc::isSelLcToPKPi >= 1 || aod::hf_sel_candidate_lc::isSelLcToPiKP >= 1;
105-
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen)) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);
105+
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi);
106106

107107
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
108108
Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;

0 commit comments

Comments
 (0)