You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PWGJE/Core/JetCandidateUtilities.h
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -255,6 +255,24 @@ auto slicedPerCandidateCollision(T const& table, U const& candidates, V const& c
255
255
}
256
256
}
257
257
258
+
/**
259
+
* returns a slice of the table depending on the index of the candidate
260
+
* @param CandidateTable candidtae table type
261
+
* @param jet jet that the slice is based on
262
+
* @param table the table to be sliced
263
+
*/
264
+
template <typename CandidateTable, typename T, typename U, typename V, typename M, typename N, typename O, typename P>
265
+
autoslicedPerJet(T const& table, U const& jet, V const& perD0Jet, M const& perDplusJet, N const& perLcJet, O const& perBplusJet, P const& perDielectronJet)
floatgetPtSum(T const& tracksBase, U const& clustersBase, V const& tracksTag, O const& clustersTag)
410
+
template <bool isEMCAL, boolisCandidate, booljetsBaseIsMc, bool jetsTagIsMc, typename T, typename U, typename V, typename O, typename P, typename Q, typename R, typename S>
411
+
floatgetPtSum(T const& tracksBase, U const& candidatesBase, V const& clustersBase, O const& tracksTag, P const& candidatesTag, Q const& clustersTag, R const& fullTracksBase, S const& fullTracksTag)
411
412
{
412
413
std::vector<int> particleTracker;
413
414
float ptSum = 0.;
@@ -464,6 +465,47 @@ float getPtSum(T const& tracksBase, U const& clustersBase, V const& tracksTag, O
464
465
}
465
466
}
466
467
}
468
+
ifconstexpr (isCandidate) {
469
+
ifconstexpr (jetsTagIsMc) {
470
+
for (autoconst& candidateBase : candidatesBase) {
471
+
if (jetcandidateutilities::isMatchedCandidate(candidateBase)) {
} elseifconstexpr (jetfindingutilities::isDummyTable<U>()) { // this is for the case where EMCal clusters are tested but no clusters exist, like in the case of charged jet analyses
} elseifconstexpr (jetfindingutilities::isDummyTable<U>() || std::is_same_v<U, o2::aod::JCollisions> || std::is_same_v<U, o2::aod::JMcCollisions>) { // this is for the case where EMCal clusters or candidates are tested but no clusters or candidates exist and dummy tables are used, like in the case of charged jet analyses
476
520
returnnullptr;
477
521
} else {
478
522
return jet.templatetracks_as<U>();
479
523
}
480
524
}
481
525
482
-
template <bool jetsBaseIsMc, bool jetsTagIsMc, typename T, typename U, typename V, typename M, typename N, typename O>
483
-
voidMatchPt(T const& jetsBasePerCollision, U const& jetsTagPerCollision, std::vector<std::vector<int>>& baseToTagMatchingPt, std::vector<std::vector<int>>& tagToBaseMatchingPt, V const& tracksBase, M const& clustersBase, N const& tracksTag, O const& clustersTag, float minPtFraction)
526
+
template <bool jetsBaseIsMc, bool jetsTagIsMc, typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q>
527
+
voidMatchPt(T const& jetsBasePerCollision, U const& jetsTagPerCollision, std::vector<std::vector<int>>& baseToTagMatchingPt, std::vector<std::vector<int>>& tagToBaseMatchingPt, V const& tracksBase, M const& candidatesBase, N const& clustersBase, Oconst& tracksTag, P const& candidatesTag, Qconst& clustersTag, float minPtFraction)
484
528
{
485
529
float ptSumBase;
486
530
float ptSumTag;
487
531
for (constauto& jetBase : jetsBasePerCollision) {
488
532
auto jetBaseTracks = getConstituents(jetBase, tracksBase);
489
533
auto jetBaseClusters = getConstituents(jetBase, clustersBase);
534
+
auto jetBaseCandidates = getConstituents(jetBase, candidatesBase);
490
535
for (constauto& jetTag : jetsTagPerCollision) {
491
536
if (std::round(jetBase.r()) != std::round(jetTag.r())) {
492
537
continue;
493
538
}
494
539
auto jetTagTracks = getConstituents(jetTag, tracksTag);
495
540
auto jetTagClusters = getConstituents(jetTag, clustersTag);
541
+
auto jetTagCandidates = getConstituents(jetTag, candidatesTag);
template <bool jetsBaseIsMc, bool jetsTagIsMc, typename T, typename U, typename V, typename M, typename N, typename O>
577
+
voiddoPairMatching(T const& pairsBase, U const& pairsTag, std::vector<std::vector<int>>& baseToTagMatching, std::vector<std::vector<int>>& tagToBaseMatching, V const& /*candidatesBase*/, M const& tracksBase, N const& /*candidatesTag*/, O const& tracksTag)
0 commit comments