@@ -35,7 +35,9 @@ enum TripletOrder : uint8_t {
3535 kOrder123 , // no swap
3636 kOrder213 , // swap 1&2: for the case that particle 1 & 2 are the same species, particle 3 is something else
3737 kOrder132 , // swap 2&3
38- kOrder321 , // reverse: swap 1&3
38+ kOrder231 , // swap 1&2 & 1&3
39+ kOrder312 , // swap 2&3 & 1&3
40+ kOrder321 , // swap 1&3
3941};
4042
4143// process same event for identical 3 particles
@@ -76,6 +78,12 @@ bool processSameEvent(T1 const& SliceParticle,
7678 case kOrder132 :
7779 TripletHistManager.setTriplet (p1, p3, p2, Collision);
7880 break ;
81+ case kOrder231 :
82+ TripletHistManager.setTriplet (p2, p3, p1, Collision);
83+ break ;
84+ case kOrder312 :
85+ TripletHistManager.setTriplet (p3, p1, p2, Collision);
86+ break ;
7987 case kOrder321 :
8088 TripletHistManager.setTriplet (p3, p2, p1, Collision);
8189 break ;
@@ -291,6 +299,12 @@ bool processSameEvent(T1 const& SliceParticle,
291299 case kOrder132 :
292300 TripletHistManager.setTripletMc (p1, p3, p2, mcParticles, Collision, mcCollisions);
293301 break ;
302+ case kOrder231 :
303+ TripletHistManager.setTripletMc (p2, p3, p1, mcParticles, Collision, mcCollisions);
304+ break ;
305+ case kOrder312 :
306+ TripletHistManager.setTripletMc (p3, p1, p2, mcParticles, Collision, mcCollisions);
307+ break ;
294308 case kOrder321 :
295309 TripletHistManager.setTripletMc (p3, p2, p1, mcParticles, Collision, mcCollisions);
296310 break ;
@@ -403,7 +417,6 @@ bool processSameEvent(T1 const& SliceParticle1,
403417}
404418
405419// process same event for 3 different particles with mc information
406- // NOTE: added `Cleaner1`, `Cleaner2`, `Cleaner3` (one per species)
407420template <modes::Mode mode,
408421 typename T1 ,
409422 typename T2 ,
@@ -498,13 +511,6 @@ bool processSameEvent(T1 const& SliceParticle1,
498511}
499512
500513// --- mc truth only (kMc without kReco): triplets of generated particles ---------------------------
501- // These are named processSameEventMcTruth (not processSameEvent) on purpose: several of the reco
502- // overloads have the same number of arguments and every parameter is a template type, so the call
503- // would be ambiguous.
504- // The particles ARE the truth, so there is no track table, no reco counterpart and no charge rescaling.
505- // The close triplet rejection and the triplet cleaner take the table of mc particles where the reco
506- // helpers take the track table; both ignore it in the track-track-track case.
507-
508514// process same event for identical 3 mc particles
509515template <modes::Mode mode,
510516 typename T1 ,
@@ -548,16 +554,24 @@ bool processSameEventMcTruth(T1 const& SliceParticle,
548554
549555 // Randomize triplet order if enabled, then compute the kinematic (Q3) for this triplet
550556 switch (tripletOrder) {
557+ case kOrder123 :
558+ TripletHistManager.setTripletMcTruth (p1, p2, p3, Collision);
559+ break ;
551560 case kOrder213 :
552561 TripletHistManager.setTripletMcTruth (p2, p1, p3, Collision);
553562 break ;
554563 case kOrder132 :
555564 TripletHistManager.setTripletMcTruth (p1, p3, p2, Collision);
556565 break ;
566+ case kOrder231 :
567+ TripletHistManager.setTripletMcTruth (p2, p3, p1, Collision);
568+ break ;
569+ case kOrder312 :
570+ TripletHistManager.setTripletMcTruth (p3, p1, p2, Collision);
571+ break ;
557572 case kOrder321 :
558573 TripletHistManager.setTripletMcTruth (p3, p2, p1, Collision);
559574 break ;
560- case kOrder123 :
561575 default :
562576 TripletHistManager.setTripletMcTruth (p1, p2, p3, Collision);
563577 break ;
@@ -729,7 +743,6 @@ bool processSameEventMcTruth(T1 const& SliceParticle1,
729743}
730744
731745// process mixed event
732- // (no cleaner here — ParticleCleaner only operates on MC info, see the mc overload below)
733746template <modes::Mode mode,
734747 typename T1 ,
735748 typename T2 ,
@@ -843,8 +856,6 @@ void processMixedEvent(T1 const& Collisions,
843856}
844857
845858// process mixed event in mc
846- // NOTE: added `mcMothers`, `mcPartonicMothers` (missing in the original — mixed-event mc triplets
847- // were never mc-cleaned via TcManager) plus `Cleaner1`, `Cleaner2`, `Cleaner3`
848859template <modes::Mode mode,
849860 typename T1 ,
850861 typename T2 ,
@@ -1005,8 +1016,8 @@ void processMixedEventMcTruth(T1 const& McCollisions,
10051016 int windowSizeRaw = 0 ;
10061017 int windowSizeEffective = 0 ;
10071018
1008- std::optional<decltype (Partition1->sliceByCached (o2::aod::femtomcparticle::fMcColId , 0 , cache))> sliceParticle1;
1009- std::optional<decltype (Partition2->sliceByCached (o2::aod::femtomcparticle::fMcColId , 0 , cache))> sliceParticle2;
1019+ std::optional<decltype (Partition1->sliceByCachedUnsorted (o2::aod::femtomcparticle::fMcColId , 0 , cache))> sliceParticle1;
1020+ std::optional<decltype (Partition2->sliceByCachedUnsorted (o2::aod::femtomcparticle::fMcColId , 0 , cache))> sliceParticle2;
10101021
10111022 for (auto const & [collision1, collision2, collision3] : o2::soa::selfCombinations (policy, depth, -1 , McCollisions, McCollisions, McCollisions)) {
10121023
@@ -1019,18 +1030,18 @@ void processMixedEventMcTruth(T1 const& McCollisions,
10191030 windowSizeEffective = 0 ;
10201031 lastCollisionIndex1 = collision1.globalIndex ();
10211032 lastCollisionIndex2 = -1 ; // force sliceParticle2 to refresh below
1022- sliceParticle1.emplace (Partition1->sliceByCached (o2::aod::femtomcparticle::fMcColId , collision1.globalIndex (), cache));
1033+ sliceParticle1.emplace (Partition1->sliceByCachedUnsorted (o2::aod::femtomcparticle::fMcColId , collision1.globalIndex (), cache));
10231034 }
10241035
10251036 // inner sub-window
10261037 if (collision2.globalIndex () != lastCollisionIndex2) {
10271038 lastCollisionIndex2 = collision2.globalIndex ();
1028- sliceParticle2.emplace (Partition2->sliceByCached (o2::aod::femtomcparticle::fMcColId , collision2.globalIndex (), cache));
1039+ sliceParticle2.emplace (Partition2->sliceByCachedUnsorted (o2::aod::femtomcparticle::fMcColId , collision2.globalIndex (), cache));
10291040 }
10301041
10311042 ++windowSizeRaw;
10321043
1033- auto sliceParticle3 = Partition3->sliceByCached (o2::aod::femtomcparticle::fMcColId , collision3.globalIndex (), cache);
1044+ auto sliceParticle3 = Partition3->sliceByCachedUnsorted (o2::aod::femtomcparticle::fMcColId , collision3.globalIndex (), cache);
10341045
10351046 TripletHistManager.resetTrackedParticlesPerEvent ();
10361047
0 commit comments