Skip to content

Commit e184680

Browse files
committed
More fixes
1 parent 89be488 commit e184680

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
@@ -1857,12 +1857,7 @@ struct muonGlobalAlignment { // o2-linter: disable=name/workflow-file,name/struc
18571857
auto dsy = mchParamAtRefPlane.getBendingSlope() - mftParamAtRefPlane.getBendingSlope();
18581858
dsyPlots[iRefPlane]->Fill(dsy, refTrackAtRefPlane.getX(), refTrackAtRefPlane.getY(), quadrant, posNeg, mchTrack.p());
18591859

1860-
auto dphi = mchTrackAtRefPlane.getPhi() - mftTrackAtRefPlane.getPhi();
1861-
if (dphi < -o2::constants::math::PI) {
1862-
dphi += o2::constants::math::TwoPI;
1863-
} else if (dphi > o2::constants::math::PI) {
1864-
dphi -= o2::constants::math::TwoPI;
1865-
}
1860+
auto dphi = RecoDecay::constrainAngle(mchTrackAtRefPlane.getPhi() - mftTrackAtRefPlane.getPhi(), -o2::constants::math::PI);
18661861
dphiPlots[iRefPlane]->Fill(dphi, refTrackAtRefPlane.getX(), refTrackAtRefPlane.getY(), quadrant, posNeg, mchTrack.p());
18671862
}
18681863
}

0 commit comments

Comments
 (0)