@@ -1543,9 +1543,12 @@ struct LambdaSpinPolarization {
15431543 Configurable<int > cNPhiBins{" cNPhiBins" , 36 , " N Phi Bins" };
15441544 Configurable<int > cNBinsCosTS{" cNBinsCosTS" , 10 , " N CosTS Bins" };
15451545 Configurable<bool > cInvBoostFlag{" cInvBoostFlag" , true , " Inverse Boost Flag" };
1546+ Configurable<int > mixingParameter{" mixingParameter" , 5 , " How many events are mixed" };
15461547
15471548 // Centrality Axis
15481549 ConfigurableAxis cMultBins{" cMultBins" , {VARIABLE_WIDTH, 0 .0f , 10 .0f , 30 .0f , 50 .f , 80 .0f , 100 .f }, " Variable Mult-Bins" };
1550+ ConfigurableAxis axisCentME{" axisCentME" , {VARIABLE_WIDTH, 0 , 10 , 30 , 50 , 100 }, " Mixing bins - centrality (%)" };
1551+ ConfigurableAxis axisVtxZME{" axisVtxZME" , {VARIABLE_WIDTH, -7 , -3 , 0 , 3 , 7 }, " Mixing bins - z-vertex" };
15491552
15501553 // Histogram Registry.
15511554 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -1570,8 +1573,14 @@ struct LambdaSpinPolarization {
15701573 const AxisSpec axisCosTS (cNBinsCosTS, -1 , 1 , " cos(#theta*)" );
15711574 const AxisSpec axisDR (10 , 0 , 2 , " #DeltaR" );
15721575
1573- // Single and Two Particle Densities
1574- // 1D Histograms
1576+ // Pool occupancy
1577+ histos.add (" QA/ME/hPoolCentVz" , " ME pool occupancy;centrality (%);V_{z} (cm)" , kTH2F , {axisCentME, axisVtxZME});
1578+
1579+ // Lambda multiplicity vs centrality
1580+ histos.add (" QA/ME/hLambdaMultVsCent" , " ME #Lambda multiplicity;centrality (%);N_{#Lambda}" , kTH2F , {axisCentME, {50 , 0 , 50 }});
1581+ histos.add (" QA/ME/hAntiLambdaMultVsCent" , " ME #bar{#Lambda} multiplicity;centrality (%);N_{#bar{#Lambda}}" , kTH2F , {axisCentME, {50 , 0 , 50 }});
1582+
1583+ // inv mass vs pt for Lambda and AntiLambda
15751584 histos.add (" Reco/h2f_n2_mass_LaPLaM" , " m_{inv}^{#Lambda} vs m_{inv}^{#bar{#Lambda}}" , kTHnSparseF , {axisMass, axisMass, axisPt, axisPt});
15761585 histos.add (" Reco/h2f_n2_mass_LaPLaP" , " m_{inv}^{#Lambda} vs m_{inv}^{#Lambda}" , kTHnSparseF , {axisMass, axisMass, axisPt, axisPt});
15771586 histos.add (" Reco/h2f_n2_mass_LaMLaM" , " m_{inv}^{#bar{#Lambda}} vs m_{inv}^{#bar{#Lambda}}" , kTHnSparseF , {axisMass, axisMass, axisPt, axisPt});
@@ -1583,9 +1592,6 @@ struct LambdaSpinPolarization {
15831592 histos.add (" RecoCorr/h2f_n2_ctheta_LaPLaM" , " #rho_{2}^{#Lambda#bar{#Lambda}}" , kTHnSparseF , {axisCent, axisDRap, axisDPhi, axisCosTS});
15841593 histos.add (" RecoCorr/h2f_n2_ctheta_LaPLaP" , " #rho_{2}^{#Lambda#Lambda}" , kTHnSparseF , {axisCent, axisDRap, axisDPhi, axisCosTS});
15851594 histos.add (" RecoCorr/h2f_n2_ctheta_LaMLaM" , " #rho_{2}^{#bar{#Lambda}#bar{#Lambda}}" , kTHnSparseF , {axisCent, axisDRap, axisDPhi, axisCosTS});
1586- // histos.add("RecoCorr/h2f_n2_dphi_LaPLaM", "#rho_{2}^{#Lambda#bar{#Lambda}}", kTHnSparseF, {axisCent, axisDRap, axisDPhi, axisDPhi});
1587- // histos.add("RecoCorr/h2f_n2_dphi_LaPLaP", "#rho_{2}^{#Lambda#Lambda}", kTHnSparseF, {axisCent, axisDRap, axisDPhi, axisDPhi});
1588- // histos.add("RecoCorr/h2f_n2_dphi_LaMLaM", "#rho_{2}^{#bar{#Lambda}#bar{#Lambda}}", kTHnSparseF, {axisCent, axisDRap, axisDPhi, axisDPhi});
15891595 }
15901596
15911597 void getBoostVector (std::array<float , 4 > const & p, std::array<float , 3 >& v, bool inverseBoostFlag = true )
@@ -1619,7 +1625,7 @@ struct LambdaSpinPolarization {
16191625 static constexpr std::string_view SubDirHist[] = {" LaPLaM" , " LaPLaP" , " LaMLaM" };
16201626
16211627 // Fill lambda pair mass
1622- histos.fill (HIST (" Reco/h2f_n2_mass_" ) + HIST (SubDirHist[part_pair]), p1.mass (), p2.mass (), p1.pt (), p2.pt ());
1628+ // histos.fill(HIST("Reco/h2f_n2_mass_") + HIST(SubDirHist[part_pair]), p1.mass(), p2.mass(), p1.pt(), p2.pt());
16231629 float drap = p1.rap () - p2.rap ();
16241630 float dphi = RecoDecay::constrainAngle (p1.phi () - p2.phi (), -PI);
16251631 float dR = std::sqrt (drap * drap + dphi * dphi);
@@ -1638,11 +1644,7 @@ struct LambdaSpinPolarization {
16381644 std::array<float , 3 > pr1tv = {pr1[0 ], pr1[1 ], pr1[2 ]};
16391645 std::array<float , 3 > pr2tv = {pr2[0 ], pr2[1 ], pr2[2 ]};
16401646 float ctheta = RecoDecay::dotProd (pr1tv, pr2tv) / (RecoDecay::sqrtSumOfSquares (pr1tv[0 ], pr1tv[1 ], pr1tv[2 ]) * RecoDecay::sqrtSumOfSquares (pr2tv[0 ], pr2tv[1 ], pr2tv[2 ]));
1641- // float prdphi = RecoDecay::constrainAngle(RecoDecay::phi(pr1) - RecoDecay::phi(pr2), -PI);
1642- // float prdrap = RecoDecay::eta(pr1tv) - RecoDecay::eta(pr2tv);
16431647
1644- // Fill pair density
1645- // histos.fill(HIST("RecoCorr/h2f_n2_dphi_") + HIST(SubDirHist[part_pair]), cent, drap, dphi, prdphi);
16461648 histos.fill (HIST (" RecoCorr/h2f_n2_ctheta_" ) + HIST (SubDirHist[part_pair]), cent, drap, dphi, ctheta);
16471649 histos.fill (HIST (" RecoCorr/h2f_n2_dltaR_" ) + HIST (SubDirHist[part_pair]), cent, dR, ctheta);
16481650 }
@@ -1661,10 +1663,33 @@ struct LambdaSpinPolarization {
16611663 }
16621664 }
16631665
1666+ template <ParticlePairType part_pair, bool samelambda, typename T>
1667+ void analyzePairsWithKinematicMatching (T const & trks_1, T const & trks_2)
1668+ {
1669+ for (auto const & trk_1 : trks_1) {
1670+ for (auto const & trk_2 : trks_2) {
1671+ if (samelambda && ((trk_1.index () == trk_2.index ()))) {
1672+ continue ;
1673+ }
1674+
1675+ // CRITICAL: Kinematic matching
1676+ float deltaPt = std::abs (trk_1.pt () - trk_2.pt ());
1677+ float deltaPhi = std::abs (RecoDecay::constrainAngle (trk_1.phi () - trk_2.phi (), -PI));
1678+ float deltaRap = std::abs (trk_1.rap () - trk_2.rap ());
1679+
1680+ if (deltaPt < 0.1 && deltaPhi < 0.1 && deltaRap < 0.1 ) {
1681+ fillPairHistos<part_pair>(trk_1, trk_2);
1682+ }
1683+ }
1684+ }
1685+ }
1686+
16641687 // Initialize tables
16651688 using LambdaCollisions = aod::LambdaCollisions;
16661689 using LambdaTracks = soa::Join<aod::LambdaTracks, aod::LambdaTracksExt>;
16671690
1691+ Preslice<LambdaTracks> perCollisionLambda = aod::lambdatrack::lambdaCollisionId;
1692+
16681693 SliceCache cache;
16691694 Partition<LambdaTracks> partLambdaTracks = (aod::lambdatrack::v0Type == (int8_t )kLambda ) && (aod::lambdatrackext::trueLambdaFlag == true ) && (aod::lambdatrack::v0PrmScd == (int8_t )kPrimary );
16701695 Partition<LambdaTracks> partAntiLambdaTracks = (aod::lambdatrack::v0Type == (int8_t )kAntiLambda ) && (aod::lambdatrackext::trueLambdaFlag == true ) && (aod::lambdatrack::v0PrmScd == (int8_t )kPrimary );
@@ -1689,7 +1714,55 @@ struct LambdaSpinPolarization {
16891714 analyzePairs<kAntiLambdaAntiLambda , true >(antiLambdaTracks, antiLambdaTracks);
16901715 }
16911716
1692- PROCESS_SWITCH (LambdaSpinPolarization, processDataReco, " Process for Data and MCReco" , true );
1717+ PROCESS_SWITCH (LambdaSpinPolarization, processDataReco, " Process for Data and MCReco" , false );
1718+
1719+ struct GetMultiplicity {
1720+ float operator ()(auto const & col) const
1721+ {
1722+ return col.cent ();
1723+ }
1724+ };
1725+
1726+ using MixedBinning = FlexibleBinningPolicy<std::tuple<GetMultiplicity>, o2::aod::collision::PosZ, GetMultiplicity>;
1727+ MixedBinning binningOnVtxAndMult{
1728+ {GetMultiplicity{}},
1729+ {axisVtxZME, axisCentME},
1730+ true };
1731+
1732+ void processDataRecoMixed (LambdaCollisions const & col, LambdaTracks const &)
1733+ {
1734+ for (auto const & [col1, col2] : soa::selfCombinations (binningOnVtxAndMult, mixingParameter, -1 , col, col)) {
1735+
1736+ if (col1.globalIndex () == col2.globalIndex ()) {
1737+ continue ;
1738+ }
1739+
1740+ cent = col1.cent ();
1741+
1742+ // QA: pool occupancy
1743+ histos.fill (HIST (" QA/ME/hPoolCentVz" ), col1.cent (), col1.posZ ());
1744+
1745+ // Lambda slices
1746+ auto lambdaTracks_col1 = partLambdaTracks->sliceByCached (aod::lambdatrack::lambdaCollisionId, col1.globalIndex (), cache);
1747+ auto lambdaTracks_col2 = partLambdaTracks->sliceByCached (aod::lambdatrack::lambdaCollisionId, col2.globalIndex (), cache);
1748+
1749+ // Anti-lambda slices
1750+ auto antiLambdaTracks_col1 = partAntiLambdaTracks->sliceByCached (aod::lambdatrack::lambdaCollisionId, col1.globalIndex (), cache);
1751+ auto antiLambdaTracks_col2 = partAntiLambdaTracks->sliceByCached (aod::lambdatrack::lambdaCollisionId, col2.globalIndex (), cache);
1752+
1753+ // QA: multiplicities
1754+ histos.fill (HIST (" QA/ME/hLambdaMultVsCent" ), col1.cent (), lambdaTracks_col1.size ());
1755+ histos.fill (HIST (" QA/ME/hAntiLambdaMultVsCent" ), col1.cent (), antiLambdaTracks_col1.size ());
1756+
1757+ // Mixed-event pairs
1758+ analyzePairsWithKinematicMatching<kLambdaAntiLambda , false >(lambdaTracks_col1, antiLambdaTracks_col2);
1759+ analyzePairsWithKinematicMatching<kLambdaAntiLambda , false >(antiLambdaTracks_col1, lambdaTracks_col2);
1760+ analyzePairsWithKinematicMatching<kLambdaLambda , true >(lambdaTracks_col1, lambdaTracks_col2);
1761+ analyzePairsWithKinematicMatching<kAntiLambdaAntiLambda , true >(antiLambdaTracks_col1, antiLambdaTracks_col2);
1762+ }
1763+ }
1764+
1765+ PROCESS_SWITCH (LambdaSpinPolarization, processDataRecoMixed, " Process for Data and MCReco for Mixed events" , true );
16931766
16941767 void processDataRecoMixEvent (LambdaCollisions::iterator const & collision, LambdaTracks const & tracks)
16951768 {
@@ -1707,7 +1780,7 @@ struct LambdaSpinPolarization {
17071780 }
17081781 }
17091782
1710- PROCESS_SWITCH (LambdaSpinPolarization, processDataRecoMixEvent, " Process for Data and MCReco Mix Event" , true );
1783+ PROCESS_SWITCH (LambdaSpinPolarization, processDataRecoMixEvent, " Process for Data and MCReco Mix Event" , false );
17111784};
17121785
17131786WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments