Skip to content

Commit de4f0a0

Browse files
committed
Fix linter constrain angle
1 parent b87ee01 commit de4f0a0

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,7 @@ struct DqJPsiMuonCorrelations {
209209

210210
// Compute deltaEta and deltaPhi between the dilepton and the associated muon
211211
float deltaEta = dilepton.eta() - track.eta();
212-
float deltaPhi = dilepton.phi() - track.phi();
213-
if (deltaPhi < -constants::math::PI / 2.0f) {
214-
deltaPhi += 2.0f * constants::math::PI;
215-
} else if (deltaPhi > constants::math::PI * 3.0f / 2.0f) {
216-
deltaPhi -= 2.0f * constants::math::PI;
217-
}
212+
float deltaPhi = RecoDecay::constrainAngle(dilepton.phi() - track.phi(), -constants::math::PIHalf);
218213

219214
// Fill signal and background histograms based on the dilepton mass
220215
double w_muon = getWeight(track.pt(), axisPt.value, fConfigBinEffMuon.value, fConfigMuonEtaMin, fConfigMuonEtaMax);

0 commit comments

Comments
 (0)