@@ -65,13 +65,13 @@ struct StrangeCascTrack {
6565
6666 PresliceUnsorted<soa::Join<aod::StraCollisions, aod::StraCollLabels, aod::StraCents>> perMcCollision = aod::v0data::straMCCollisionId;
6767 PresliceUnsorted<DerMCGenCascades> cascsPerMcCollision = aod::cascdata::straMCCollisionId;
68+ Preslice<DerMCRecCascDatas> cascsPerCollision = aod::cascdata::straCollisionId;
6869
6970 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
7071
7172 // subprocess switches:
7273
7374 Configurable<bool > doProcessIons{" doProcessIons" , false , " true for PbPb and OO, false for pp and pO" };
74- Configurable<bool > doCustomGroup{" doCustomGroup" , true , " custom group tracked cascades in case of table order bug" };
7575
7676 Configurable<bool > doApplyEventCuts{" doApplyEventCuts" , true , " apply general event cuts" }; // event filter - PVz, sel8, INEL>0
7777 // Xi selections
@@ -415,10 +415,6 @@ struct StrangeCascTrack {
415415 return ; // safety check: dismisses tracked cascades without proper reference
416416 }
417417
418- if (cascade.straCollisionId () != collision.globalIndex ()) {
419- return ; // safety check: the cascade must come from that event
420- }
421-
422418 // for tracked cascades, make a reference to standard table
423419 auto stdCasc = [&]() {
424420 if constexpr (requires { cascade.topologyChi2 (); }) {
@@ -703,19 +699,61 @@ struct StrangeCascTrack {
703699 if (fillTruthXi || fillTruthOmega)
704700 histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/GenRecPt" ), genPt, pt);
705701 }
706- if (fillTruthXi)
702+ if (fillTruthXi) {
707703 histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/GenRecRapidityXi" ), genYXi, cascade.yXi ());
704+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyPrimaryXi" ), cascade.dcaXYCascToPV (), pt, mult);
705+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzPrimaryXi" ), cascade.dcaZCascToPV (), pt, mult);
706+ if (std::abs (cascmccore.pdgCodeMother ()) > 4000 ) {
707+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyDecayXi" ), cascade.dcaXYCascToPV (), pt, mult);
708+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzDecayXi" ), cascade.dcaZCascToPV (), pt, mult);
709+ } else {
710+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyDirectXi" ), cascade.dcaXYCascToPV (), pt, mult);
711+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzDirectXi" ), cascade.dcaZCascToPV (), pt, mult);
712+ }
713+ }
708714 if (passedAllSelsXi) {
709715 histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec/GenRecRapidityXi" ), genYXi, cascade.yXi ());
710- if (fillTruthXi)
716+ if (fillTruthXi) {
711717 histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/GenRecRapidityXi" ), genYXi, cascade.yXi ());
718+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyPrimaryXi" ), cascade.dcaXYCascToPV (), pt, mult);
719+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzPrimaryXi" ), cascade.dcaZCascToPV (), pt, mult);
720+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/Radius/PrimaryXi" ), cascade.cascradius (), pt);
721+ if (std::abs (cascmccore.pdgCodeMother ()) > 4000 ) {
722+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyDecayXi" ), cascade.dcaXYCascToPV (), pt, mult);
723+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzDecayXi" ), cascade.dcaZCascToPV (), pt, mult);
724+ } else {
725+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyDirectXi" ), cascade.dcaXYCascToPV (), pt, mult);
726+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzDirectXi" ), cascade.dcaZCascToPV (), pt, mult);
727+ }
728+ }
712729 }
713- if (fillTruthOmega)
730+ if (fillTruthOmega) {
714731 histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/GenRecRapidityOmega" ), genYOmega, cascade.yOmega ());
732+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyPrimaryOmega" ), cascade.dcaXYCascToPV (), pt, mult);
733+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzPrimaryOmega" ), cascade.dcaZCascToPV (), pt, mult);
734+ if (std::abs (cascmccore.pdgCodeMother ()) > 4000 ) {
735+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyDecayOmega" ), cascade.dcaXYCascToPV (), pt, mult);
736+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzDecayOmega" ), cascade.dcaZCascToPV (), pt, mult);
737+ } else {
738+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAxyDirectOmega" ), cascade.dcaXYCascToPV (), pt, mult);
739+ histos.fill (HIST (TypeNames[Type]) + HIST (" /NoSel-Truth/DCA/DCAzDirectOmega" ), cascade.dcaZCascToPV (), pt, mult);
740+ }
741+ }
715742 if (passedAllSelsOmega) {
716743 histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec/GenRecRapidityOmega" ), genYOmega, cascade.yOmega ());
717- if (fillTruthOmega)
744+ if (fillTruthOmega) {
718745 histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/GenRecRapidityOmega" ), genYOmega, cascade.yOmega ());
746+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyPrimaryOmega" ), cascade.dcaXYCascToPV (), pt, mult);
747+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzPrimaryOmega" ), cascade.dcaZCascToPV (), pt, mult);
748+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/Radius/PrimaryOmega" ), cascade.cascradius (), pt);
749+ if (std::abs (cascmccore.pdgCodeMother ()) > 4000 ) {
750+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyDecayOmega" ), cascade.dcaXYCascToPV (), pt, mult);
751+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzDecayOmega" ), cascade.dcaZCascToPV (), pt, mult);
752+ } else {
753+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAxyDirectOmega" ), cascade.dcaXYCascToPV (), pt, mult);
754+ histos.fill (HIST (TypeNames[Type]) + HIST (" /Rec-Truth/DCA/DCAzDirectOmega" ), cascade.dcaZCascToPV (), pt, mult);
755+ }
756+ }
719757 }
720758 }
721759 }
@@ -787,6 +825,19 @@ struct StrangeCascTrack {
787825 histos.add (Form (" %s/NoSel-Truth/GenRecRapidityOmega" , TypeNames[Type].data ()), " Generated vs reconstructed y (Omega)" , kTH2D , {{200 , -1.0 , 1.0 }, {200 , -1.0 , 1.0 }});
788826 histos.add (Form (" %s/NoSel-Truth/MassXi" , TypeNames[Type].data ()), " Invariant mass hypothesis" , kTH1D , {axesConfig.axisXiMass });
789827 histos.add (Form (" %s/NoSel-Truth/MassOmega" , TypeNames[Type].data ()), " Invariant mass hypothesis" , kTH1D , {axesConfig.axisOmegaMass });
828+ // /
829+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyPrimaryXi" , TypeNames[Type].data ()), " DCA xy for primary Xi" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
830+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzPrimaryXi" , TypeNames[Type].data ()), " DCA z for primary Xi" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
831+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyDirectXi" , TypeNames[Type].data ()), " DCA xy for direct Xi (has no mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
832+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzDirectXi" , TypeNames[Type].data ()), " DCA z for direct Xi (has no mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
833+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyDecayXi" , TypeNames[Type].data ()), " DCA xy for decay Xi (has mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
834+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzDecayXi" , TypeNames[Type].data ()), " DCA z for decay Xi (has mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
835+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyPrimaryOmega" , TypeNames[Type].data ()), " DCA xy for primary Omega" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
836+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzPrimaryOmega" , TypeNames[Type].data ()), " DCA z for primary Omega" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
837+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyDirectOmega" , TypeNames[Type].data ()), " DCA xy for direct Omega (has no mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
838+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzDirectOmega" , TypeNames[Type].data ()), " DCA z for direct Omega (has no mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
839+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAxyDecayOmega" , TypeNames[Type].data ()), " DCA xy for decay Omega (has mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
840+ histos.add (Form (" %s/NoSel-Truth/DCA/DCAzDecayOmega" , TypeNames[Type].data ()), " DCA z for decay Omega (has mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
790841 // xi and omega selection statistics
791842 histos.add (Form (" %s/Rec/Filters/PropDCAxy" , TypeNames[Type].data ()), " DCA to xy (propagated)" , kTH1D , {axesConfig.axisDCAxy });
792843 histos.add (Form (" %s/Rec/Filters/PropDCAz" , TypeNames[Type].data ()), " DCA to z (propagated)" , kTH1D , {axesConfig.axisDCAz });
@@ -843,6 +894,22 @@ struct StrangeCascTrack {
843894 // /
844895 histos.add (Form (" %s/Rec-Truth/RapCheck_TH3_Truth_Xi" , TypeNames[Type].data ()), " Rapidity check (pt, mult, y)" , kTHnD , {axesConfig.axisPt , axesConfig.axisMult , {200 , -1.0 , 1.0 }});
845896 histos.add (Form (" %s/Rec-Truth/RapCheck_TH3_Truth_Omega" , TypeNames[Type].data ()), " Rapidity check (pt, mult, y)" , kTHnD , {axesConfig.axisPt , axesConfig.axisMult , {200 , -1.0 , 1.0 }});
897+ // /
898+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyPrimaryXi" , TypeNames[Type].data ()), " DCA xy for primary Xi" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
899+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzPrimaryXi" , TypeNames[Type].data ()), " DCA z for primary Xi" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
900+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyDirectXi" , TypeNames[Type].data ()), " DCA xy for direct Xi (has no mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
901+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzDirectXi" , TypeNames[Type].data ()), " DCA z for direct Xi (has no mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
902+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyDecayXi" , TypeNames[Type].data ()), " DCA xy for decay Xi (has mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
903+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzDecayXi" , TypeNames[Type].data ()), " DCA z for decay Xi (has mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
904+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyPrimaryOmega" , TypeNames[Type].data ()), " DCA xy for primary Omega" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
905+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzPrimaryOmega" , TypeNames[Type].data ()), " DCA z for primary Omega" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
906+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyDirectOmega" , TypeNames[Type].data ()), " DCA xy for direct Omega (has no mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
907+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzDirectOmega" , TypeNames[Type].data ()), " DCA z for direct Omega (has no mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
908+ histos.add (Form (" %s/Rec-Truth/DCA/DCAxyDecayOmega" , TypeNames[Type].data ()), " DCA xy for decay Omega (has mothers)" , kTHnD , {axesConfig.axisDCAxy , axesConfig.axisPt , axesConfig.axisMult });
909+ histos.add (Form (" %s/Rec-Truth/DCA/DCAzDecayOmega" , TypeNames[Type].data ()), " DCA z for decay Omega (has mothers)" , kTHnD , {axesConfig.axisDCAz , axesConfig.axisPt , axesConfig.axisMult });
910+ // /
911+ histos.add (Form (" %s/Rec-Truth/Radius/PrimaryXi" , TypeNames[Type].data ()), " Cascade radius (primary Xi)" , kTH2D , {{500 , 0.0 , 50.0 }, axesConfig.axisPt });
912+ histos.add (Form (" %s/Rec-Truth/Radius/PrimaryOmega" , TypeNames[Type].data ()), " Cascade radius (primary Omega)" , kTH2D , {{500 , 0.0 , 50.0 }, axesConfig.axisPt });
846913 });
847914 // for MC-specific processing
848915 // all generated events:
@@ -1122,32 +1189,28 @@ struct StrangeCascTrack {
11221189 }
11231190 }
11241191
1125- std::vector<std::vector<int64_t >> traCascsGrouped;
1192+ std::vector<std::vector<int >> traCascsGrouped;
11261193 void processDerivedMCRec (DerMCRecCollisions const & collisions, DerMCRecCascDatas const & allCascs, DerMCRecTraCascDatas const & traCascs, DauTracks const &, DerMCGenCascades const &)
11271194 {
1128- if (doCustomGroup) {
1195+ // custom group tracked cascades - a temporary fix for wrong ordering in OO MC
11291196 traCascsGrouped.clear ();
11301197 traCascsGrouped.resize (collisions.size ());
11311198 for (const auto & casc : traCascs) {
11321199 traCascsGrouped[casc.straCollisionId ()].push_back (casc.globalIndex ());
11331200 }
1134- }
11351201 for (const auto & collision : collisions) {
11361202 fillEvents (collision); // save info about all processed events
1203+ auto slicedAllCascs = allCascs.sliceBy (cascsPerCollision, collision.globalIndex ());
11371204 if (isValidEvent (collision, true )) {
11381205 histos.fill (HIST (" Rec-Events/EvCounter" ), 0.5 );
11391206 histos.fill (HIST (" Rec-Events/PVxy" ), collision.posX (), collision.posY ());
11401207 histos.fill (HIST (" Rec-Events/PVz" ), collision.posZ ());
11411208 double mult = (doProcessIons) ? collision.centFT0C () : collision.centFT0M ();
11421209 histos.fill (HIST (" Rec-Events/Mult" ), mult);
1143- analyseCascs (collision, allCascs); // process all cascades
1144- if (doCustomGroup) {
1145- for (const int idx : traCascsGrouped[collision.globalIndex ()]) {
1210+ analyseCascs (collision, slicedAllCascs); // process all cascades
1211+ for (int const & idx : traCascsGrouped[collision.globalIndex ()]) {
11461212 auto casc = traCascs.rawIteratorAt (idx);
11471213 analyseCascade (collision, casc);
1148- }
1149- } else {
1150- analyseCascs (collision, traCascs);
11511214 }
11521215 }
11531216 }
0 commit comments