Skip to content

Commit 7bb4fac

Browse files
Modified constrainAngle range from (0, 2π] to (−π, π].
1 parent 994e419 commit 7bb4fac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

PWGJE/Tasks/jetShape.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ struct JetShapeTask {
214214
float preDeltaPhiBg1 = track.phi() - phiBg1;
215215
float preDeltaPhiBg2 = track.phi() - phiBg2;
216216

217-
float deltaPhiBg1 = RecoDecay::constrainAngle(preDeltaPhiBg1);
218-
float deltaPhiBg2 = RecoDecay::constrainAngle(preDeltaPhiBg2);
217+
float deltaPhiBg1 = RecoDecay::constrainAngle(preDeltaPhiBg1, -o2::constants::math::PI);
218+
float deltaPhiBg2 = RecoDecay::constrainAngle(preDeltaPhiBg2, -o2::constants::math::PI);
219219

220220
float distanceBg1 = std::sqrt(deltaEta * deltaEta + deltaPhiBg1 * deltaPhiBg1);
221221
float distanceBg2 = std::sqrt(deltaEta * deltaEta + deltaPhiBg2 * deltaPhiBg2);
@@ -320,8 +320,8 @@ struct JetShapeTask {
320320
// Calculate delta phi for background cones
321321
float preDeltaPhiBg1 = track.phi() - phiBg1;
322322
float preDeltaPhiBg2 = track.phi() - phiBg2;
323-
float deltaPhiBg1 = RecoDecay::constrainAngle(preDeltaPhiBg1);
324-
float deltaPhiBg2 = RecoDecay::constrainAngle(preDeltaPhiBg2);
323+
float deltaPhiBg1 = RecoDecay::constrainAngle(preDeltaPhiBg1, -o2::constants::math::PI);
324+
float deltaPhiBg2 = RecoDecay::constrainAngle(preDeltaPhiBg2, -o2::constants::math::PI);
325325

326326
// Calculate distance to background cone axes
327327
// Note: deltaEta is the same for all cones at the same eta

0 commit comments

Comments
 (0)