@@ -106,10 +106,19 @@ struct LfTaskLambdaSpinCorr {
106106 histos.add (" hSparseLambdaLambda" , " hSparseLambdaLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
107107 histos.add (" hSparseLambdaAntiLambda" , " hSparseLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
108108 histos.add (" hSparseAntiLambdaAntiLambda" , " hSparseAntiLambdaAntiLambda" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
109+
110+ // /////// along quantization axes///////////
111+ histos.add (" hSparseLambdaLambdaQA" , " hSparseLambdaLambdaQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
112+ histos.add (" hSparseLambdaAntiLambdaQA" , " hSparseLambdaAntiLambdaQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
113+ histos.add (" hSparseAntiLambdaAntiLambdaQA" , " hSparseAntiLambdaAntiLambdaQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
109114 if (fillGEN) {
110115 histos.add (" hSparseLambdaLambdaMC" , " hSparseLambdaLambdaMC" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
111116 histos.add (" hSparseLambdaAntiLambdaMC" , " hSparseLambdaAntiLambdaMC" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
112117 histos.add (" hSparseAntiLambdaAntiLambdaMC" , " hSparseAntiLambdaAntiLambdaMC" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
118+
119+ histos.add (" hSparseLambdaLambdaMCQA" , " hSparseLambdaLambdaMCQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
120+ histos.add (" hSparseLambdaAntiLambdaMCQA" , " hSparseLambdaAntiLambdaMCQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
121+ histos.add (" hSparseAntiLambdaAntiLambdaMCQA" , " hSparseAntiLambdaAntiLambdaMCQA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisInvMass, configthnAxisPol, configcentAxis, thnAxisInvMasspair}, true );
113122 }
114123 }
115124
@@ -262,6 +271,58 @@ struct LfTaskLambdaSpinCorr {
262271 }
263272 }
264273
274+ void fillHistograms2 (bool tag1, bool tag2, bool tag3, bool tag4, const ROOT::Math::PxPyPzMVector& particlepair,
275+ const ROOT::Math::PxPyPzMVector& particle1, const ROOT::Math::PxPyPzMVector& particle2,
276+ const ROOT::Math::PxPyPzMVector& daughpart1, const ROOT::Math::PxPyPzMVector& daughpart2,
277+ double centrality, bool datatype)
278+ {
279+
280+ ROOT::Math::Boost boostPairToCM{particlepair.BoostToCM ()}; // boosting vector for pair CM
281+ // Boosting both Lambdas to Lambda-Lambda pair rest frame
282+ auto lambda1CM = boostPairToCM (particle1);
283+ auto lambda2CM = boostPairToCM (particle2);
284+
285+ // Step 2: Boost Each Lambda to its Own Rest Frame
286+ ROOT::Math::Boost boostLambda1ToCM{lambda1CM.BoostToCM ()};
287+ ROOT::Math::Boost boostLambda2ToCM{lambda2CM.BoostToCM ()};
288+
289+ ROOT::Math::XYZVector quantizationAxis = lambda1CM.Vect ().Unit (); // Unit vector along Lambda1's direction in pair rest frame
290+
291+ // Also boost the daughter protons to the same frame
292+ auto proton1pairCM = boostPairToCM (daughpart1); // proton1 to pair CM
293+ auto proton2pairCM = boostPairToCM (daughpart2); // proton2 to pair CM
294+
295+ // Boost protons into their respective Lambda rest frames
296+ auto proton1LambdaRF = boostLambda1ToCM (proton1pairCM);
297+ auto proton2LambdaRF = boostLambda2ToCM (proton2pairCM);
298+
299+ double cosTheta1 = proton1LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
300+ double cosTheta2 = proton2LambdaRF.Vect ().Unit ().Dot (quantizationAxis);
301+
302+ double cosThetaDiff = cosTheta1 * cosTheta2;
303+
304+ auto lowptcut = 0.5 ;
305+ auto highptcut = 10.0 ;
306+
307+ if (datatype == 1 ) {
308+ if (tag1 && tag3)
309+ histos.fill (HIST (" hSparseLambdaLambdaMCQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
310+ if (tag1 && tag4)
311+ histos.fill (HIST (" hSparseLambdaAntiLambdaMCQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
312+ if (tag2 && tag4)
313+ histos.fill (HIST (" hSparseAntiLambdaAntiLambdaMCQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
314+ } else {
315+ if (particle1.Pt () > lowptcut && particle1.Pt () < highptcut && particle2.Pt () > lowptcut && particle2.Pt () < highptcut) {
316+ if (tag1 && tag3)
317+ histos.fill (HIST (" hSparseLambdaLambdaQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
318+ if (tag1 && tag4)
319+ histos.fill (HIST (" hSparseLambdaAntiLambdaQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
320+ if (tag2 && tag4)
321+ histos.fill (HIST (" hSparseAntiLambdaAntiLambdaQA" ), particle1.M (), particle2.M (), cosThetaDiff, centrality, particlepair.M ());
322+ }
323+ }
324+ }
325+
265326 std::tuple<int , int , bool > getLambdaTags (const auto & v0, const auto & collision)
266327 {
267328 auto postrack = v0.template posTrack_as <AllTrackCandidates>();
@@ -444,6 +505,7 @@ struct LfTaskLambdaSpinCorr {
444505 tagb = 0 ;
445506 tagb2 = 0 ;
446507 fillHistograms (taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0 );
508+ fillHistograms2 (taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0 );
447509 }
448510
449511 tagb2 = aLambdaTag2;
@@ -453,6 +515,7 @@ struct LfTaskLambdaSpinCorr {
453515 tagb = 0 ;
454516 taga2 = 0 ;
455517 fillHistograms (taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0 );
518+ fillHistograms2 (taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0 );
456519 }
457520
458521 tagb = aLambdaTag;
@@ -463,6 +526,7 @@ struct LfTaskLambdaSpinCorr {
463526 taga = 0 ;
464527 taga2 = 0 ;
465528 fillHistograms (taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0 );
529+ fillHistograms2 (taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0 );
466530 }
467531 }
468532 }
@@ -565,6 +629,7 @@ struct LfTaskLambdaSpinCorr {
565629 tagb = 0 ;
566630 tagb2 = 0 ;
567631 fillHistograms (taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0 );
632+ fillHistograms2 (taga, tagb, taga2, tagb2, lambdaLambdapair, lambdadummy, lambdadummy2, proton, proton2, centrality, 0 );
568633 }
569634
570635 tagb2 = aLambdaTag2;
@@ -574,6 +639,7 @@ struct LfTaskLambdaSpinCorr {
574639 tagb = 0 ;
575640 taga2 = 0 ;
576641 fillHistograms (taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0 );
642+ fillHistograms2 (taga, tagb, taga2, tagb2, lambdaAntiLambdapair, lambdadummy, antiLambdadummy2, proton, antiProton2, centrality, 0 );
577643 }
578644
579645 tagb = aLambdaTag;
@@ -584,6 +650,7 @@ struct LfTaskLambdaSpinCorr {
584650 taga = 0 ;
585651 taga2 = 0 ;
586652 fillHistograms (taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0 );
653+ fillHistograms2 (taga, tagb, taga2, tagb2, antiLambdaAntiLambdapair, antiLambdadummy, antiLambdadummy2, antiProton, antiProton2, centrality, 0 );
587654 }
588655 }
589656 }
@@ -690,16 +757,19 @@ struct LfTaskLambdaSpinCorr {
690757 if (tagamc && taga2mc) {
691758 lambdaLambdapairmc = lambdadummymc + lambdadummy2mc;
692759 fillHistograms (tagamc, tagbmc, taga2mc, tagb2mc, lambdaLambdapairmc, lambdadummymc, lambdadummy2mc, protonmc, proton2mc, centrality, 1 );
760+ fillHistograms2 (tagamc, tagbmc, taga2mc, tagb2mc, lambdaLambdapairmc, lambdadummymc, lambdadummy2mc, protonmc, proton2mc, centrality, 1 );
693761 }
694762
695763 if (tagamc && tagb2mc) {
696764 lambdaAntiLambdapairmc = lambdadummymc + antiLambdadummy2mc;
697765 fillHistograms (tagamc, tagbmc, taga2mc, tagb2mc, lambdaAntiLambdapairmc, lambdadummymc, antiLambdadummy2mc, protonmc, antiProton2mc, centrality, 1 );
766+ fillHistograms2 (tagamc, tagbmc, taga2mc, tagb2mc, lambdaAntiLambdapairmc, lambdadummymc, antiLambdadummy2mc, protonmc, antiProton2mc, centrality, 1 );
698767 }
699768
700769 if (tagbmc && tagb2mc) {
701770 antiLambdaAntiLambdapairmc = antiLambdadummymc + antiLambdadummy2mc;
702771 fillHistograms (tagamc, tagbmc, taga2mc, tagb2mc, antiLambdaAntiLambdapairmc, antiLambdadummymc, antiLambdadummy2mc, antiProtonmc, antiProton2mc, centrality, 1 );
772+ fillHistograms2 (tagamc, tagbmc, taga2mc, tagb2mc, antiLambdaAntiLambdapairmc, antiLambdadummymc, antiLambdadummy2mc, antiProtonmc, antiProton2mc, centrality, 1 );
703773 }
704774 }
705775 }
0 commit comments