Skip to content

Commit e90d371

Browse files
aferrero2707mcoquet642
authored andcommitted
Fixed computation of phi angle difference
1 parent 9c0d107 commit e90d371

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PWGDQ/Tasks/global-muon-matcher.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ static float getDeltaPhi(float phi1, float phi2)
111111
{
112112
float dphi = phi1 - phi2;
113113
static constexpr float pi = TMath::Pi();
114-
static constexpr float twopi = pi;
114+
static constexpr float twopi = pi * 2.f;
115115
if (dphi > pi) {
116116
dphi -= twopi;
117117
}
118-
if (dphi < pi) {
118+
if (dphi < -pi) {
119119
dphi += twopi;
120120
}
121121
return dphi;

0 commit comments

Comments
 (0)