Skip to content

Commit 263c616

Browse files
committed
More fixes
1 parent 42aa52e commit 263c616

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

PWGDQ/Tasks/muonGlobalAlignment.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,12 +1865,7 @@ struct muonGlobalAlignment { // o2-linter: disable=name/workflow-file,name/struc
18651865
auto dsy = mchParamAtRefPlane.getBendingSlope() - mftParamAtRefPlane.getBendingSlope();
18661866
dsyPlots[iRefPlane]->Fill(dsy, refTrackAtRefPlane.getX(), refTrackAtRefPlane.getY(), quadrant, posNeg, mchTrack.p());
18671867

1868-
auto dphi = mchTrackAtRefPlane.getPhi() - mftTrackAtRefPlane.getPhi();
1869-
if (dphi < -o2::constants::math::PI) {
1870-
dphi += o2::constants::math::TwoPI;
1871-
} else if (dphi > o2::constants::math::PI) {
1872-
dphi -= o2::constants::math::TwoPI;
1873-
}
1868+
auto dphi = RecoDecay::constrainAngle(mchTrackAtRefPlane.getPhi() - mftTrackAtRefPlane.getPhi(), -o2::constants::math::PI);
18741869
dphiPlots[iRefPlane]->Fill(dphi, refTrackAtRefPlane.getX(), refTrackAtRefPlane.getY(), quadrant, posNeg, mchTrack.p());
18751870
}
18761871
}

0 commit comments

Comments
 (0)