Skip to content

Commit 790959e

Browse files
Fix: included HF hadron in the jet constituents counting.
1 parent b5e0471 commit 790959e

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

PWGJE/Tasks/hfFragmentationFunction.cxx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ struct HfFragmentationFunction {
288288

289289
// filling table
290290
distJetTable(axisDistance,
291-
jet.pt(), jet.eta(), jet.phi(), jet.template tracks_as<aod::JetTracks>().size(),
291+
jet.pt(), jet.eta(), jet.phi(), jet.template tracks_as<aod::JetTracks>().size() + jet.template candidates_as<TCandidates>().size(),
292292
candidate.pt(), candidate.eta(), candidate.phi(), candidate.m(), candidate.y(), candidate.mlScores()[0], candidate.mlScores()[1], candidate.mlScores()[2]);
293293

294294
break; // get out of candidates' loop after first HF particle is found in jet
@@ -376,7 +376,7 @@ struct HfFragmentationFunction {
376376

377377
// store data in MC detector level table
378378
mcddistJetTable(jetutilities::deltaR(mcdjet, mcdd0cand),
379-
mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.tracks_as<aod::JetTracks>().size(), // detector level jet
379+
mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.tracks_as<aod::JetTracks>().size() + mcdjet.candidates_as<aod::CandidatesD0MCD>().size(), // detector level jet
380380
mcdd0cand.pt(), mcdd0cand.eta(), mcdd0cand.phi(), mcdd0cand.m(), mcdd0cand.y(), (mcdd0cand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level D0 candidate
381381
mcdjet.has_matchedJetCand(), mcdd0cand.mlScores()[0], mcdd0cand.mlScores()[1], mcdd0cand.mlScores()[2], // // Machine Learning PID scores: background, prompt, non-prompt
382382
matchedFrom, selectedAs); // D0 = +1, D0bar = -1, neither = 0
@@ -398,7 +398,7 @@ struct HfFragmentationFunction {
398398

399399
// store data in MC detector level table (calculate angular distance in eta-phi plane on the fly)
400400
mcpdistJetTable(jetutilities::deltaR(mcpjet, mcpd0cand),
401-
mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.tracks_as<aod::JetParticles>().size(), // particle level jet
401+
mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.tracks_as<aod::JetParticles>().size() + mcpjet.candidates_as<aod::CandidatesD0MCP>().size(), // particle level jet
402402
mcpd0cand.pt(), mcpd0cand.eta(), mcpd0cand.phi(), mcpd0cand.y(), (mcpd0cand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level D0
403403
mcpjet.has_matchedJetCand());
404404
}
@@ -497,21 +497,21 @@ struct HfFragmentationFunction {
497497
}
498498

499499
// store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly)
500-
matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as<aod::JetParticles>().size(), // particle level jet
501-
mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF
502-
jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as<aod::JetTracks>().size(), // detector level jet
503-
mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF
504-
mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt
505-
matchedFrom, selectedAs); // HF = +1, HFbar = -1, neither = 0
500+
matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as<aod::JetParticles>().size() + mcpjet.template candidates_as<TCandidatesMCP>().size(), // particle level jet
501+
mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF
502+
jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as<aod::JetTracks>().size() + + mcdjet.template candidates_as<TCandidatesMCD>().size(), // detector level jet
503+
mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF
504+
mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt
505+
matchedFrom, selectedAs); // HF = +1, HFbar = -1, neither = 0
506506
}
507507
} else {
508508
// store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly)
509-
matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as<aod::JetParticles>().size(), // particle level jet
510-
mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF
511-
-2, -2, -2, -2, -2, // detector level jet
512-
-2, -2, -2, -2, -2, -2, // detector level HF
513-
-2, -2, -2, // Machine Learning PID scores: background, prompt, non-prompt
514-
-2, -2); // HF = +1, HFbar = -1, neither = 0
509+
matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as<aod::JetParticles>().size() + + mcpjet.template candidates_as<TCandidatesMCP>().size(), // particle level jet
510+
mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF
511+
-2, -2, -2, -2, -2, // detector level jet
512+
-2, -2, -2, -2, -2, -2, // detector level HF
513+
-2, -2, -2, // Machine Learning PID scores: background, prompt, non-prompt
514+
-2, -2); // HF = +1, HFbar = -1, neither = 0
515515
}
516516
} // end of mcpjets loop
517517
} // end of mccollisions loop

0 commit comments

Comments
 (0)