@@ -148,12 +148,20 @@ struct DqJPsiMuonCorrelations {
148148 }
149149 auto track = assoc.template reducedmuon_as <TMuonTracks>();
150150
151+ float deltaEta = track.eta () - dilepton.eta ();
152+ float deltaPhi = track.phi () - dilepton.phi ();
153+ if (deltaPhi < -constants::math::PI /2 .0f ) {
154+ deltaPhi += 2 .0f * constants::math::PI ;
155+ } else if (deltaPhi > constants::math::PI *3 .0f /2 .0f ) {
156+ deltaPhi -= 2 .0f * constants::math::PI ;
157+ }
158+
151159 if (dilepton.mass () > fConfigDileptonLowMass && dilepton.mass () < fConfigDileptonHighMass ) {
152- registry.fill (HIST (" h2dDimuonMuonDeltaEtaVsMuonPtSignal" ), track. eta () - dilepton. eta () , track.pt ());
153- registry.fill (HIST (" h2dDimuonMuonDeltaPhiVsMuonPtSignal" ), track. phi () - dilepton. phi () , track.pt ());
160+ registry.fill (HIST (" h2dDimuonMuonDeltaEtaVsMuonPtSignal" ), deltaEta , track.pt ());
161+ registry.fill (HIST (" h2dDimuonMuonDeltaPhiVsMuonPtSignal" ), deltaPhi , track.pt ());
154162 } else if (dilepton.mass () > fConfigBackgroundLowMass && dilepton.mass () < fConfigBackgroundHighMass ) {
155- registry.fill (HIST (" h2dDimuonMuonDeltaEtaVsMuonPtBackground" ), track. eta () - dilepton. eta () , track.pt ());
156- registry.fill (HIST (" h2dDimuonMuonDeltaPhiVsMuonPtBackground" ), track. phi () - dilepton. phi () , track.pt ());
163+ registry.fill (HIST (" h2dDimuonMuonDeltaEtaVsMuonPtBackground" ), deltaEta , track.pt ());
164+ registry.fill (HIST (" h2dDimuonMuonDeltaPhiVsMuonPtBackground" ), deltaPhi , track.pt ());
157165 }
158166 }
159167
0 commit comments