@@ -61,8 +61,8 @@ struct LfTaskLambdaSpinCorr {
6161 Configurable<bool > cfgEvtRCTFlagCheckerLimitAcceptAsBad{" cfgEvtRCTFlagCheckerLimitAcceptAsBad" , true , " Evt sel: RCT flag checker treat Limited Acceptance As Bad" };
6262 } rctCut;
6363 // mixing
64- Configurable<int > cosCalculation{" cosCalculation" , 1 , " cos calculation" };
65- Configurable<int > mixingCombination{" mixingCombination" , 1 , " mixing Combination" };
64+ Configurable<int > cosCalculation{" cosCalculation" , 0 , " cos calculation" };
65+ Configurable<int > mixingCombination{" mixingCombination" , 0 , " mixing Combination" };
6666 Configurable<bool > mixingEvSel{" mixingEvSel" , false , " mixingEvSel" };
6767 Configurable<int > cfgCutOccupancy{" cfgCutOccupancy" , 2000 , " Occupancy cut" };
6868 ConfigurableAxis axisVertex{" axisVertex" , {5 , -10 , 10 }, " vertex axis for bin" };
@@ -128,7 +128,8 @@ struct LfTaskLambdaSpinCorr {
128128 AxisSpec thnAxisInvMasspair{iMNbinspair, lbinIMpair, hbinIMpair, " #it{M} (GeV/#it{c}^{2})" };
129129 histos.add (" hEvtSelInfo" , " hEvtSelInfo" , kTH1F , {{10 , 0 , 10.0 }});
130130 histos.add (" hPtDiff" , " hPtDiff" , kTH1F , {{1000 , 0 , 100.0 }});
131- histos.add (" hRDiff" , " hRDiff" , kTH1F , {{640 , 0 , 16.0 }});
131+ histos.add (" hPhiDiff" , " hPhiDiff" , kTH1F , {{800 , -8.0 , 8.0 }});
132+ histos.add (" hRDiff" , " hRDiff" , kTH1F , {{640 , -16.0 , 16.0 }});
132133 histos.add (" hv0Mult" , " hv0Mult" , kTH1F , {{10001 , -0.5 , 10000.5 }});
133134 histos.add (" hCentrality" , " Centrality distribution" , kTH1F , {{configcentAxis}});
134135 histos.add (" hSparseLambdaLambda" , " hSparseLambdaLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
@@ -244,8 +245,8 @@ struct LfTaskLambdaSpinCorr {
244245 const ROOT::Math::PxPyPzMVector& Lambdadummy,
245246 const ROOT::Math::PxPyPzMVector& AntiLambdadummy)
246247 {
247- const double minMass = 1.0 ;
248- const double maxMass = 2.0 ;
248+ const double minMass = 1.09 ;
249+ const double maxMass = 1.14 ;
249250 return (lambdaTag && aLambdaTag &&
250251 (Lambdadummy.M () > minMass && Lambdadummy.M () < maxMass) &&
251252 (AntiLambdadummy.M () > minMass && AntiLambdadummy.M () < maxMass));
@@ -294,8 +295,8 @@ struct LfTaskLambdaSpinCorr {
294295 double cosTheta2 = proton2LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
295296 cosThetaDiff = cosTheta1 * cosTheta2;
296297 }
297-
298- double deltaR = TMath::Sqrt (TMath::Power (particle1.Eta () - particle2.Eta (), 2.0 ) + TMath::Power (particle1. Phi () - particle2. Phi () , 2.0 ));
298+ double deltaPhi = RecoDecay::constrainAngle (particle1. Phi () - particle2. Phi (), 0.0 );
299+ double deltaR = TMath::Sqrt (TMath::Power (particle1.Eta () - particle2.Eta (), 2.0 ) + TMath::Power (deltaPhi , 2.0 ));
299300 if (datatype == 0 ) {
300301 if (tag1 && tag3) {
301302 histos.fill (HIST (" hSparseLambdaLambda" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, deltaR);
@@ -412,7 +413,7 @@ struct LfTaskLambdaSpinCorr {
412413
413414 return {lambdaTag, aLambdaTag, true }; // Valid candidate
414415 }
415-
416+ ROOT::Math::PxPyPzMVector lambda0, antiLambda0, proton0, pion0, antiProton0, antiPion0;
416417 ROOT::Math::PxPyPzMVector lambda, antiLambda, proton, pion, antiProton, antiPion;
417418 ROOT::Math::PxPyPzMVector lambda2, antiLambda2, proton2, pion2, antiProton2, antiPion2;
418419 ROOT::Math::PxPyPzMVector lambdamc, antiLambdamc, protonmc, pionmc, antiProtonmc, antiPionmc;
@@ -479,7 +480,12 @@ struct LfTaskLambdaSpinCorr {
479480 pion = ROOT::Math::PxPyPzMVector (v0.pxpos (), v0.pypos (), v0.pzpos (), o2::constants::physics::MassPionCharged);
480481 antiLambda = antiProton + pion;
481482 }
482-
483+ if (lambdaTag && (lambda.M () < lbinIM || lambda.M () > hbinIM)) {
484+ continue ;
485+ }
486+ if (aLambdaTag && (antiLambda.M () < lbinIM || antiLambda.M () > hbinIM)) {
487+ continue ;
488+ }
483489 auto postrack1 = v0.template posTrack_as <AllTrackCandidates>();
484490 auto negtrack1 = v0.template negTrack_as <AllTrackCandidates>();
485491
@@ -505,6 +511,12 @@ struct LfTaskLambdaSpinCorr {
505511 pion2 = ROOT::Math::PxPyPzMVector (v02.pxpos (), v02.pypos (), v02.pzpos (), o2::constants::physics::MassPionCharged);
506512 antiLambda2 = antiProton2 + pion2;
507513 }
514+ if (lambdaTag2 && (lambda2.M () < lbinIM || lambda2.M () > hbinIM)) {
515+ continue ;
516+ }
517+ if (aLambdaTag2 && (antiLambda2.M () < lbinIM || antiLambda2.M () > hbinIM)) {
518+ continue ;
519+ }
508520 auto postrack2 = v02.template posTrack_as <AllTrackCandidates>();
509521 auto negtrack2 = v02.template negTrack_as <AllTrackCandidates>();
510522 if (postrack1.globalIndex () == postrack2.globalIndex () || negtrack1.globalIndex () == negtrack2.globalIndex ()) {
@@ -631,8 +643,42 @@ struct LfTaskLambdaSpinCorr {
631643 if (postrack1.globalIndex () == postrack2.globalIndex () || negtrack1.globalIndex () == negtrack2.globalIndex ()) {
632644 continue ;
633645 }
634- auto samePairSumPt = t1.pt () + t2.pt ();
635- auto samePairR = TMath::Sqrt (TMath::Power (t1.phi () - t2.phi (), 2.0 ) + TMath::Power (t1.eta () - t2.eta (), 2.0 ));
646+ // auto samePairSumPt = t1.pt() + t2.pt();
647+ double deltaPhiSame = RecoDecay::constrainAngle (t1.phi () - t2.phi (), 0.0 );
648+ auto samePairR = TMath::Sqrt (TMath::Power (deltaPhiSame, 2.0 ) + TMath::Power (t1.eta () - t2.eta (), 2.0 ));
649+
650+ if (lambdaTag1) {
651+ proton0 = ROOT::Math::PxPyPzMVector (t1.pxpos (), t1.pypos (), t1.pzpos (), o2::constants::physics::MassProton);
652+ antiPion0 = ROOT::Math::PxPyPzMVector (t1.pxneg (), t1.pyneg (), t1.pzneg (), o2::constants::physics::MassPionCharged);
653+ lambda0 = proton0 + antiPion0;
654+ }
655+ if (aLambdaTag1) {
656+ antiProton0 = ROOT::Math::PxPyPzMVector (t1.pxneg (), t1.pyneg (), t1.pzneg (), o2::constants::physics::MassProton);
657+ pion0 = ROOT::Math::PxPyPzMVector (t1.pxpos (), t1.pypos (), t1.pzpos (), o2::constants::physics::MassPionCharged);
658+ antiLambda0 = antiProton0 + pion0;
659+ }
660+ if (lambdaTag1 && (lambda0.M () < lbinIM || lambda0.M () > hbinIM)) {
661+ continue ;
662+ }
663+ if (aLambdaTag1 && (antiLambda0.M () < lbinIM || antiLambda0.M () > hbinIM)) {
664+ continue ;
665+ }
666+ if (lambdaTag2) {
667+ proton = ROOT::Math::PxPyPzMVector (t2.pxpos (), t2.pypos (), t2.pzpos (), o2::constants::physics::MassProton);
668+ antiPion = ROOT::Math::PxPyPzMVector (t2.pxneg (), t2.pyneg (), t2.pzneg (), o2::constants::physics::MassPionCharged);
669+ lambda = proton + antiPion;
670+ }
671+ if (aLambdaTag2) {
672+ antiProton = ROOT::Math::PxPyPzMVector (t2.pxneg (), t2.pyneg (), t2.pzneg (), o2::constants::physics::MassProton);
673+ pion = ROOT::Math::PxPyPzMVector (t2.pxpos (), t2.pypos (), t2.pzpos (), o2::constants::physics::MassPionCharged);
674+ antiLambda = antiProton + pion;
675+ }
676+ if (lambdaTag2 && (lambda.M () < lbinIM || lambda.M () > hbinIM)) {
677+ continue ;
678+ }
679+ if (aLambdaTag2 && (antiLambda.M () < lbinIM || antiLambda.M () > hbinIM)) {
680+ continue ;
681+ }
636682 for (const auto & t3 : groupV03) {
637683 // if (pairStatus[t3.index()][t2.index()]) {
638684 // LOGF(info, "repeat match found v0 id: (%d, %d)", t3.index(), t2.index());
@@ -654,55 +700,49 @@ struct LfTaskLambdaSpinCorr {
654700 if (lambdaTag1 != lambdaTag3 || aLambdaTag1 != aLambdaTag3) {
655701 continue ;
656702 }
657- // if (std::abs(t1.pt() - t3.pt()) > ptMix) {
658- // continue;
659- // }
660- // if (std::abs(t1.eta() - t3.eta()) > etaMix) {
661- // continue;
662- // }
663- // if (std::abs(t1.phi() - t3.phi()) > phiMix) {
664- // continue;
665- // }
666- auto mixPairSumPt = t3.pt () + t2.pt ();
667- auto mixPairR = TMath::Sqrt (TMath::Power (t3.phi () - t2.phi (), 2.0 ) + TMath::Power (t3.eta () - t2.eta (), 2.0 ));
668- histos.fill (HIST (" hPtDiff" ), TMath::Abs (mixPairSumPt - samePairSumPt));
669- histos.fill (HIST (" hRDiff" ), TMath::Abs (mixPairR - samePairR));
670- if (mixingCombination == 0 && std::abs (t1.pt () - t3.pt ()) > ptMix) {
671- continue ;
703+
704+ if (lambdaTag3) {
705+ proton2 = ROOT::Math::PxPyPzMVector (t3.pxpos (), t3.pypos (), t3.pzpos (), o2::constants::physics::MassProton);
706+ antiPion2 = ROOT::Math::PxPyPzMVector (t3.pxneg (), t3.pyneg (), t3.pzneg (), o2::constants::physics::MassPionCharged);
707+ lambda2 = proton2 + antiPion2;
708+ }
709+ if (aLambdaTag3) {
710+ antiProton2 = ROOT::Math::PxPyPzMVector (t3.pxneg (), t3.pyneg (), t3.pzneg (), o2::constants::physics::MassProton);
711+ pion2 = ROOT::Math::PxPyPzMVector (t3.pxpos (), t3.pypos (), t3.pzpos (), o2::constants::physics::MassPionCharged);
712+ antiLambda2 = antiProton2 + pion2;
672713 }
673- if (mixingCombination == 0 && std::abs (t1. eta () - t3. eta ()) > etaMix ) {
714+ if (lambdaTag3 && (lambda2. M () < lbinIM || lambda2. M () > hbinIM) ) {
674715 continue ;
675716 }
676- if (mixingCombination == 0 && std::abs (t1. phi () - t3. phi ()) > phiMix ) {
717+ if (aLambdaTag3 && (antiLambda2. M () < lbinIM || antiLambda2. M () > hbinIM) ) {
677718 continue ;
678719 }
720+ double deltaPhiMix = RecoDecay::constrainAngle (t3.phi () - t2.phi (), 0.0 );
721+ auto mixPairR = TMath::Sqrt (TMath::Power (deltaPhiMix, 2.0 ) + TMath::Power (t3.eta () - t2.eta (), 2.0 ));
722+ auto etaDiff = t1.eta () - t3.eta ();
723+ auto phiDiff = RecoDecay::constrainAngle (t1.phi () - t3.phi (), 0.0 );
679724
680- if (mixingCombination == 1 && std::abs (mixPairSumPt - samePairSumPt) > ptMix) {
725+ histos.fill (HIST (" hPtDiff" ), t1.pt () - t3.pt ());
726+ histos.fill (HIST (" hPhiDiff" ), phiDiff);
727+ histos.fill (HIST (" hRDiff" ), etaDiff);
728+
729+ if (mixingCombination == 0 && std::abs (t1.pt () - t3.pt ()) > ptMix) {
681730 continue ;
682731 }
683- if (mixingCombination == 1 && std::abs (mixPairR - samePairR ) > etaMix) {
732+ if (mixingCombination == 0 && t1. eta () * t3. eta () > 0 && std::abs (etaDiff ) > etaMix) {
684733 continue ;
685734 }
686- if (lambdaTag2) {
687- proton = ROOT::Math::PxPyPzMVector (t2.pxpos (), t2.pypos (), t2.pzpos (), o2::constants::physics::MassProton);
688- antiPion = ROOT::Math::PxPyPzMVector (t2.pxneg (), t2.pyneg (), t2.pzneg (), o2::constants::physics::MassPionCharged);
689- lambda = proton + antiPion;
690- }
691- if (aLambdaTag2) {
692- antiProton = ROOT::Math::PxPyPzMVector (t2.pxneg (), t2.pyneg (), t2.pzneg (), o2::constants::physics::MassProton);
693- pion = ROOT::Math::PxPyPzMVector (t2.pxpos (), t2.pypos (), t2.pzpos (), o2::constants::physics::MassPionCharged);
694- antiLambda = antiProton + pion;
735+ if (mixingCombination == 0 && phiDiff > phiMix) {
736+ continue ;
695737 }
696- if (lambdaTag3) {
697- proton2 = ROOT::Math::PxPyPzMVector (t3.pxpos (), t3.pypos (), t3.pzpos (), o2::constants::physics::MassProton);
698- antiPion2 = ROOT::Math::PxPyPzMVector (t3.pxneg (), t3.pyneg (), t3.pzneg (), o2::constants::physics::MassPionCharged);
699- lambda2 = proton2 + antiPion2;
738+
739+ if (mixingCombination == 1 && std::abs (t1.pt () - t3.pt ()) > ptMix) {
740+ continue ;
700741 }
701- if (aLambdaTag3) {
702- antiProton2 = ROOT::Math::PxPyPzMVector (t3.pxneg (), t3.pyneg (), t3.pzneg (), o2::constants::physics::MassProton);
703- pion2 = ROOT::Math::PxPyPzMVector (t3.pxpos (), t3.pypos (), t3.pzpos (), o2::constants::physics::MassPionCharged);
704- antiLambda2 = antiProton2 + pion2;
742+ if (mixingCombination == 1 && std::abs (mixPairR - samePairR) > etaMix) {
743+ continue ;
705744 }
745+
706746 if (lambdaTag2 && lambdaTag3) {
707747 fillHistograms (1 , 0 , 1 , 0 , lambda, lambda2, proton, proton2, centrality, 2 );
708748 } else if (aLambdaTag2 && aLambdaTag3) {
@@ -715,7 +755,6 @@ struct LfTaskLambdaSpinCorr {
715755 continue ;
716756 }
717757 pairfound = true ;
718- // pairStatus[t3.index()][t2.index()] = true;
719758 pairStatus[t3.index ()][t2.index ()] = true ;
720759 // LOGF(info, "v0 id: (%d, %d)", t3.index(), t2.index());
721760 if (pairfound) {
0 commit comments