@@ -50,7 +50,6 @@ struct Omega2012Analysis {
5050 static constexpr float kSmallNumber = 1e-10f ; // Small number to avoid division by zero
5151 static constexpr float kMaxDCAV0ToPV = 1 .0f ; // Maximum DCA of V0 to PV
5252 static constexpr int kNumExpectedDaughters = 2 ; // Expected number of daughters for 2-body decay
53- static constexpr int kPlaceholderPdgCode = 3335 ;
5453 SliceCache cache;
5554 Preslice<aod::ResoCascades> perResoCollisionCasc = aod::resodaughter::resoCollisionId;
5655 Preslice<aod::ResoV0s> perResoCollisionV0 = aod::resodaughter::resoCollisionId;
@@ -73,6 +72,8 @@ struct Omega2012Analysis {
7372 Configurable<float > cMaxEtaCut{" cMaxEtaCut" , 0.8 , " Maximum |eta|" };
7473 Configurable<float > cfgRapidityCut{" cfgRapidityCut" , 0.5 , " Rapidity cut" };
7574 Configurable<bool > cRecoINELgt0{" cRecoINELgt0" , false , " Apply Reco INEL>0 event selection" };
75+ Configurable<bool > cMCINELgt0{" cMCINELgt0" , false , " Require generator INEL>0 in MC processes" };
76+ Configurable<bool > cMCVtxIn10{" cMCVtxIn10" , false , " Require generator |vertex z| < 10 cm in MC processes" };
7677 Configurable<bool > cKinCuts{" cKinCuts" , false , " Kinematic cuts for Xi-K0s opening angle" };
7778 Configurable<std::vector<float >> cKinCutsPt{" cKinCutsPt" , {0.0 , 0.4 , 0.6 , 0.8 , 1.0 , 1.4 , 1.8 , 2.2 , 2.6 , 3.0 , 4.0 , 5.0 , 6.0 , 1e10 }, " Omega(2012) pT bins for kinematic cuts" };
7879 Configurable<std::vector<float >> cKinLowerCutsAlpha{" cKinLowerCutsAlpha" , {1.5 , 1.0 , 0.5 , 0.3 , 0.2 , 0.15 , 0.1 , 0.08 , 0.07 , 0.06 , 0.04 , 0.02 , 0.02 }, " Lower cut on Xi-K0s opening angle" };
@@ -157,6 +158,10 @@ struct Omega2012Analysis {
157158 // PDG masses
158159 double massK0 = MassK0Short;
159160
161+ // Module-initializer collision tables (matches the resonance-module-initializer producer)
162+ using ResoCollisions = aod::ResoCollisions_001;
163+ using ResoMCCollisions = soa::Join<ResoCollisions, aod::ResoMCCollisions_001>;
164+
160165 using BinningTypeVertexContributor = ColumnBinningPolicy<aod::collision::PosZ, aod::resocollision::Cent>;
161166 BinningTypeVertexContributor colBinning{{cfgVtxBins, cfgMultBins}, true };
162167
@@ -888,7 +893,7 @@ struct Omega2012Analysis {
888893 }
889894 PROCESS_SWITCH (Omega2012Analysis, processDummy, " Process Dummy" , true );
890895
891- void processData (const aod::ResoCollision & collision,
896+ void processData (ResoCollisions::iterator const & collision,
892897 aod::ResoCascades const & resocasc,
893898 aod::ResoV0s const & resov0s)
894899 {
@@ -899,13 +904,13 @@ struct Omega2012Analysis {
899904 }
900905 PROCESS_SWITCH (Omega2012Analysis, processData, " Process Event for data" , false );
901906
902- void processMixedEvent (const aod:: ResoCollisions& collisions,
907+ void processMixedEvent (ResoCollisions const & collisions,
903908 aod::ResoCascades const & resocasc,
904909 aod::ResoV0s const & resov0s)
905910 {
906911
907912 auto cascV0sTuple = std::make_tuple (resocasc, resov0s);
908- Pair<aod:: ResoCollisions, aod::ResoCascades, aod::ResoV0s, BinningTypeVertexContributor> pairs{colBinning, nEvtMixing, -1 , collisions, cascV0sTuple, &cache};
913+ Pair<ResoCollisions, aod::ResoCascades, aod::ResoV0s, BinningTypeVertexContributor> pairs{colBinning, nEvtMixing, -1 , collisions, cascV0sTuple, &cache};
909914
910915 for (const auto & [collision1, casc1, collision2, v0s2] : pairs) {
911916 if (cRecoINELgt0 && (!collision1.isRecINELgt0 () || !collision2.isRecINELgt0 ()))
@@ -947,32 +952,67 @@ struct Omega2012Analysis {
947952 }
948953 PROCESS_SWITCH (Omega2012Analysis, processMixedEvent, " Process Mixed Event" , false );
949954
950- // MC processes - placeholder for future implementation
951- void processMC (const aod::ResoCollision& /* collision*/ ,
952- aod::ResoCascades const & /* resocasc*/ ,
953- aod::ResoV0s const & /* resov0s*/ ,
954- aod::McParticles const & /* mcParticles*/ )
955+ // MC reconstructed processing: match reconstructed Xi + K0s pairs to a common Omega(2012) mother
956+ void processMC (ResoMCCollisions::iterator const & collision,
957+ soa::Join<aod::ResoCascades, aod::ResoMCCascades> const & resocasc,
958+ soa::Join<aod::ResoV0s, aod::ResoMCV0s> const & resov0s)
955959 {
956- // TODO: Implement MC truth matching for Xi + K0s
957- // - Match reconstructed Xi to MC Xi
958- // - Match reconstructed K0s to MC K0s
959- // - Fill MC truth histograms
960- // - Fill reconstruction efficiency histograms
961- // - Check if the Xi and K0s come from same Omega(2012) mother
960+ if (cRecoINELgt0 && !collision.isRecINELgt0 ())
961+ return ;
962+ if (cMCINELgt0 && !collision.isINELgt0 ())
963+ return ;
964+ if (cMCVtxIn10 && !collision.isVtxIn10 ())
965+ return ;
966+
967+ int nCascAfterCuts = 0 ;
968+ int nV0sAfterCuts = 0 ;
969+ auto selectedXis = selectXiCandidates<false >(resocasc, nCascAfterCuts);
970+ auto selectedK0s = selectK0sCandidates<false >(collision, resov0s, nV0sAfterCuts);
971+
972+ for (const auto & selectedXi : selectedXis) {
973+ const auto & xi = selectedXi.candidate ;
974+ if (std::abs (xi.pdgCode ()) != kXiMinus )
975+ continue ;
976+
977+ for (const auto & selectedK0 : selectedK0s) {
978+ const auto & v0 = selectedK0.candidate ;
979+
980+ if (sharesAnyDaughterId (selectedXi.daughterIds , selectedK0.daughterIds ))
981+ continue ;
982+ if (std::abs (v0.pdgCode ()) != kK0Short )
983+ continue ;
984+ if (xi.motherId () < 0 || xi.motherId () != v0.motherId ())
985+ continue ;
986+ if (std::abs (xi.motherPDG ()) != kOmega2012Minus || xi.motherPDG () != v0.motherPDG ())
987+ continue ;
988+
989+ ROOT ::Math::PxPyPzEVector pXi, pK0s, pRes;
990+ pXi = ROOT::Math::PxPyPzEVector (ROOT::Math::PtEtaPhiMVector (xi.pt (), xi.eta (), xi.phi (), xi.mXi ()));
991+ pK0s = ROOT::Math::PxPyPzEVector (ROOT::Math::PtEtaPhiMVector (v0.pt (), v0.eta (), v0.phi (), massK0));
992+ pRes = pXi + pK0s;
993+
994+ if (std::abs (pRes.Rapidity ()) >= cfgRapidityCut)
995+ continue ;
996+
997+ histos.fill (HIST (" MC/hMCRecOmega2012Pt" ), pRes.Pt ());
998+ histos.fill (HIST (" MC/hMCRecOmega2012PtEta" ), pRes.Pt (), pRes.Eta ());
999+ histos.fill (HIST (" MC/hMCRecXiPt" ), xi.pt ());
1000+ histos.fill (HIST (" MC/hMCRecK0sPt" ), v0.pt ());
1001+ }
1002+ }
9621003 }
963- PROCESS_SWITCH (Omega2012Analysis, processMC, " Process MC with truth matching (placeholder) " , false );
1004+ PROCESS_SWITCH (Omega2012Analysis, processMC, " Process MC with truth matching" , false );
9641005
9651006 void processMCGenerated (aod::McParticles const & mcParticles)
9661007 {
9671008 // Process MC generated particles (no reconstruction requirement)
9681009 // This resonance decays to Xi + K0s
9691010
9701011 for (const auto & mcParticle : mcParticles) {
971- // Look for Omega(2012) - PDG code may vary by generator
1012+ // Look for Omega(2012)
9721013 int pdg = mcParticle.pdgCode ();
9731014
974- // TODO: Update the PDG code library to include Omega(2012) codes
975- if (std::abs (pdg) != kPlaceholderPdgCode )
1015+ if (std::abs (pdg) != kOmega2012Minus )
9761016 continue ;
9771017
9781018 // Fill generated level histograms
@@ -1015,10 +1055,16 @@ struct Omega2012Analysis {
10151055 (std::abs (daughter2PDG) == kXiMinus && daughter1PDG == kK0Short )) {
10161056 histos.fill (HIST (" MC/hMCTruthInvMassXiK0s" ), motherM);
10171057 histos.fill (HIST (" MC/hMCTruthMassPtXiK0s" ), motherM, motherPt);
1058+
1059+ const bool isDaughter1Xi = std::abs (daughter1PDG) == kXiMinus ;
1060+ const auto & pXiTruth = isDaughter1Xi ? p1 : p2;
1061+ const auto & pK0sTruth = isDaughter1Xi ? p2 : p1;
1062+ histos.fill (HIST (" MC/hMCTrueXiPt" ), pXiTruth.Pt ());
1063+ histos.fill (HIST (" MC/hMCTrueK0sPt" ), pK0sTruth.Pt ());
10181064 }
10191065 }
10201066 }
1021- PROCESS_SWITCH (Omega2012Analysis, processMCGenerated, " Process MC generated particles (placeholder) " , false );
1067+ PROCESS_SWITCH (Omega2012Analysis, processMCGenerated, " Process MC generated particles" , false );
10221068
10231069 // Fill function for 3-body decay analysis
10241070 template <bool IsResoMicrotrack, typename CollisionT, typename CascadesT, typename V0sT, typename TracksT, typename TrackIdsT>
@@ -1122,7 +1168,7 @@ struct Omega2012Analysis {
11221168 }
11231169
11241170 // 3-body decay analysis: Xi + pi + K0s with ResoTracks
1125- void processThreeBodyWithTracks (const aod::ResoCollision & collision,
1171+ void processThreeBodyWithTracks (ResoCollisions::iterator const & collision,
11261172 aod::ResoCascades const & resocasc,
11271173 aod::ResoV0s const & resov0s,
11281174 aod::ResoTracks const & resotracks,
@@ -1136,7 +1182,7 @@ struct Omega2012Analysis {
11361182 PROCESS_SWITCH (Omega2012Analysis, processThreeBodyWithTracks, " Process 3-body decay with ResoTracks" , false );
11371183
11381184 // 3-body decay analysis: Xi + pi + K0s with ResoMicroTracks
1139- void processThreeBodyWithMicroTracks (const aod::ResoCollision & collision,
1185+ void processThreeBodyWithMicroTracks (ResoCollisions::iterator const & collision,
11401186 aod::ResoCascades const & resocasc,
11411187 aod::ResoV0s const & resov0s,
11421188 aod::ResoMicroTracks const & resomicrotracks,
0 commit comments