@@ -146,8 +146,8 @@ struct lambdaspincorrderived {
146146 histos.add (" hPtYSame" , " hPtYSame" , kTH2F , {{100 , 0.0 , 10.0 }, {200 , -1.0 , 1.0 }});
147147 histos.add (" hPtYMix" , " hPtYMix" , kTH2F , {{100 , 0.0 , 10.0 }, {200 , -1.0 , 1.0 }});
148148 histos.add (" hCentrality" , " Centrality distribution" , kTH1F , {{configThnAxisCentrality}});
149- histos.add (" deltaPhiSame" , " deltaPhiSame" , HistType::kTH1D , {{72 , 0.0 , 2.0 * TMath::Pi ()}}, true );
150- histos.add (" deltaPhiMix" , " deltaPhiMix" , HistType::kTH1D , {{72 , 0.0 , 2.0 * TMath::Pi ()}}, true );
149+ histos.add (" deltaPhiSame" , " deltaPhiSame" , HistType::kTH1D , {{72 , - TMath::Pi (), TMath::Pi ()}}, true );
150+ histos.add (" deltaPhiMix" , " deltaPhiMix" , HistType::kTH1D , {{72 , - TMath::Pi (), TMath::Pi ()}}, true );
151151 histos.add (" ptCent" , " ptCent" , HistType::kTH2D , {{100 , 0.0 , 10.0 }, {8 , 0.0 , 80.0 }}, true );
152152 histos.add (" etaCent" , " etaCent" , HistType::kTH2D , {{32 , -0.8 , 0.8 }, {8 , 0.0 , 80.0 }}, true );
153153
@@ -377,7 +377,7 @@ struct lambdaspincorrderived {
377377 double deta2 = particle2.Eta ();
378378
379379 double deta_pair = std::abs (deta1 - deta2);
380- double dphi_pair = RecoDecay::constrainAngle (particle1.Phi () - particle2.Phi (), 0 . 0F , harmonicDphi);
380+ double dphi_pair = RecoDecay::constrainAngle (particle1.Phi () - particle2.Phi (), - TMath::Pi () , harmonicDphi);
381381
382382 double deltaR = TMath::Sqrt (deta_pair * deta_pair + dphi_pair * dphi_pair);
383383 double deltaRap = std::abs (particle1.Rapidity () - particle2.Rapidity ());
@@ -536,7 +536,7 @@ struct lambdaspincorrderived {
536536 }
537537 proton2 = ROOT::Math::PtEtaPhiMVector (v02.protonPt (), v02.protonEta (), v02.protonPhi (), o2::constants::physics::MassProton);
538538 lambda2 = ROOT::Math::PtEtaPhiMVector (v02.lambdaPt (), v02.lambdaEta (), v02.lambdaPhi (), v02.lambdaMass ());
539- histos.fill (HIST (" deltaPhiSame" ), RecoDecay::constrainAngle (v0.lambdaPhi () - v02.lambdaPhi (), 0 . 0F , harmonicDphi));
539+ histos.fill (HIST (" deltaPhiSame" ), RecoDecay::constrainAngle (v0.lambdaPhi () - v02.lambdaPhi (), - TMath::Pi () , harmonicDphi));
540540 if (v0.v0Status () == 0 && v02.v0Status () == 0 ) {
541541 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, 0 , 1.0 );
542542 }
@@ -608,7 +608,7 @@ struct lambdaspincorrderived {
608608 lambda = ROOT::Math::PtEtaPhiMVector (t3.lambdaPt (), t3.lambdaEta (), t3.lambdaPhi (), t3.lambdaMass ());
609609 proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
610610 lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
611- histos.fill (HIST (" deltaPhiMix" ), RecoDecay::constrainAngle (t3.lambdaPhi () - t2.lambdaPhi (), 0 . 0F , harmonicDphi));
611+ histos.fill (HIST (" deltaPhiMix" ), RecoDecay::constrainAngle (t3.lambdaPhi () - t2.lambdaPhi (), - TMath::Pi () , harmonicDphi));
612612 if (t3.v0Status () == 0 && t2.v0Status () == 0 ) {
613613 fillHistograms (0 , 0 , lambda, lambda2, proton, proton2, 1 , 1.0 );
614614 }
@@ -686,7 +686,7 @@ struct lambdaspincorrderived {
686686 proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
687687 lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
688688
689- float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic));
689+ float dPhi = RecoDecay::constrainAngle (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0.0 , harmonic), - TMath::Pi (), harmonicDphi );
690690 histos.fill (HIST (" deltaPhiMix" ), dPhi, invN);
691691
692692 if (t3.v0Status () == 0 && t2.v0Status () == 0 ) {
@@ -796,7 +796,7 @@ struct lambdaspincorrderived {
796796 auto proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
797797 auto lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
798798
799- const float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic));
799+ const float dPhi = RecoDecay::constrainAngle (RecoDecay::constrainAngle (lambda.Phi (), 0 .0F , harmonic) - RecoDecay::constrainAngle (lambda2.Phi (), 0 .0F , harmonic), - TMath::Pi (), harmonicDphi );
800800 histos.fill (HIST (" deltaPhiMix" ), dPhi, wBase);
801801 fillHistograms (tX.v0Status (), t2.v0Status (), lambda, lambda2, proton, proton2, 1 , wBase);
802802 }
@@ -1030,7 +1030,7 @@ struct lambdaspincorrderived {
10301030 auto proton2 = ROOT::Math::PtEtaPhiMVector (t2.protonPt (), t2.protonEta (), t2.protonPhi (), o2::constants::physics::MassProton);
10311031 auto lambda2 = ROOT::Math::PtEtaPhiMVector (t2.lambdaPt (), t2.lambdaEta (), t2.lambdaPhi (), t2.lambdaMass ());
10321032
1033- const float dPhi = std::fabs (RecoDecay::constrainAngle (lambda.Phi () - lambda2.Phi (), 0 .0F , harmonicDphi) );
1033+ const float dPhi = RecoDecay::constrainAngle (RecoDecay::constrainAngle (lambda.Phi (), 0 . 0F , harmonic) - RecoDecay::constrainAngle ( lambda2.Phi (), 0 .0F , harmonic), - TMath::Pi (), harmonicDphi );
10341034 histos.fill (HIST (" deltaPhiMix" ), dPhi, wBase);
10351035 fillHistograms (tX.v0Status (), t2.v0Status (), lambda, lambda2, proton, proton2, 1 , wBase);
10361036 }
0 commit comments