@@ -96,7 +96,8 @@ struct lambdaspincorrderived {
9696 Configurable<int > rngSeed{" rngSeed" , 12345 , " Seed for random mixing (reproducible)" };
9797 std::mt19937 rng{12345 };
9898 // Lambda selection ////////////
99- Configurable<unsigned > harmonic{" harmonic" , 1 , " Harmonic delta phi" };
99+ Configurable<unsigned > harmonic{" harmonic" , 1 , " Harmonic phi" };
100+ Configurable<unsigned > harmonicDphi{" harmonicDphi" , 2 , " Harmonic delta phi" };
100101 Configurable<bool > useweight{" useweight" , 0 , " Use weight" };
101102 Configurable<bool > usebothweight{" usebothweight" , 1 , " Use both weight" };
102103 // Configurable<bool> useNUA{"useNUA", 0, "Use NUA weight"};
@@ -376,7 +377,7 @@ struct lambdaspincorrderived {
376377 double deta2 = particle2.Eta ();
377378
378379 double deta_pair = std::abs (deta1 - deta2);
379- double dphi_pair = std::abs (dphi1 - dphi2 );
380+ double dphi_pair = RecoDecay::constrainAngle (particle1. Phi () - particle2. Phi (), 0 . 0F , harmonicDphi );
380381
381382 double deltaR = TMath::Sqrt (deta_pair * deta_pair + dphi_pair * dphi_pair);
382383 double deltaRap = std::abs (particle1.Rapidity () - particle2.Rapidity ());
@@ -535,7 +536,7 @@ struct lambdaspincorrderived {
535536 }
536537 proton2 = ROOT::Math::PtEtaPhiMVector (v02.protonPt (), v02.protonEta (), v02.protonPhi (), o2::constants::physics::MassProton);
537538 lambda2 = ROOT::Math::PtEtaPhiMVector (v02.lambdaPt (), v02.lambdaEta (), v02.lambdaPhi (), v02.lambdaMass ());
538- histos.fill (HIST (" deltaPhiSame" ), std::abs ( RecoDecay::constrainAngle (v0.lambdaPhi (), 0 . 0F , harmonic) - RecoDecay::constrainAngle ( v02.lambdaPhi (), 0 .0F , harmonic) ));
539+ histos.fill (HIST (" deltaPhiSame" ), RecoDecay::constrainAngle (v0.lambdaPhi () - v02.lambdaPhi (), 0 .0F , harmonicDphi ));
539540 if (v0.v0Status () == 0 && v02.v0Status () == 0 ) {
540541 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, 0 , 1.0 );
541542 }
@@ -607,7 +608,7 @@ struct lambdaspincorrderived {
607608 lambda = ROOT::Math::PtEtaPhiMVector (t3.lambdaPt (), t3.lambdaEta (), t3.lambdaPhi (), t3.lambdaMass ());
608609 proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
609610 lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
610- histos.fill (HIST (" deltaPhiMix" ), std::abs ( RecoDecay::constrainAngle (t3.lambdaPhi (), 0 . 0F , harmonic) - RecoDecay::constrainAngle ( t2.lambdaPhi (), 0 .0F , harmonic) ));
611+ histos.fill (HIST (" deltaPhiMix" ), RecoDecay::constrainAngle (t3.lambdaPhi () - t2.lambdaPhi (), 0 .0F , harmonicDphi ));
611612 if (t3.v0Status () == 0 && t2.v0Status () == 0 ) {
612613 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, 1 , 1.0 );
613614 }
@@ -1029,9 +1030,7 @@ struct lambdaspincorrderived {
10291030 auto proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
10301031 auto lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
10311032
1032- const float dPhi = std::fabs (
1033- RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) -
1034- RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic));
1033+ const float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi () - lambda2.Phi (), 0 .0F , harmonicDphi));
10351034 histos.fill (HIST (" deltaPhiMix" ), dPhi, wBase);
10361035 fillHistograms (tX.v0Status (), t2.v0Status (), lambda, lambda2, proton, proton2, 1 , wBase);
10371036 }
0 commit comments