|
17 | 17 | #include "PWGDQ/Core/VarManager.h" |
18 | 18 |
|
19 | 19 | #include "Common/Core/fwdtrackUtilities.h" |
| 20 | +#include "Common/Core/RecoDecay.h" |
20 | 21 | #include "Common/DataModel/EventSelection.h" |
21 | 22 | #include "Common/DataModel/FwdTrackReAlignTables.h" |
22 | 23 | #include "Tools/ML/MlResponse.h" |
@@ -109,17 +110,8 @@ constexpr std::array<int, 11> SNDetElemCh = {0, 4, 8, 12, 16, 34, 52, 78, 104, 1 |
109 | 110 | // compute minimum difference between azimuthal angles |
110 | 111 | static float getDeltaPhi(float phi1, float phi2) |
111 | 112 | { |
112 | | - float dphi = phi1 - phi2; |
113 | | - static constexpr float pi = TMath::Pi(); |
114 | | - static constexpr float twopi = pi * 2.f; |
115 | | - if (dphi > pi) { |
116 | | - dphi -= twopi; |
117 | | - } |
118 | | - if (dphi < -pi) { |
119 | | - dphi += twopi; |
120 | | - } |
121 | | - return dphi; |
122 | | -}; |
| 113 | + return RecoDecay::constrainAngle(phi1 - phi2, -o2::constants::math::PI); |
| 114 | +} |
123 | 115 |
|
124 | 116 | struct GlobalMuonMatching { |
125 | 117 |
|
@@ -220,7 +212,7 @@ struct GlobalMuonMatching { |
220 | 212 | struct : ConfigurableGroup { |
221 | 213 | Configurable<int> cfgMixingDepth{"cfgMixingDepth", -1, "Maximum number of mixed candidate groups per MCH track (-1: no limit)"}; |
222 | 214 | Configurable<int64_t> cfgMinDeltaBc{"cfgMinDeltaBc", 3564, "Minimum DeltaBc between mixed collisions"}; |
223 | | - Configurable<float> cfgMaxDeltaPhi{"cfgMaxDeltaPhi", static_cast<float>(TMath::Pi() / 10), "Maximum DelptaPhi between mixed MCH tracks (rad)"}; |
| 215 | + Configurable<float> cfgMaxDeltaPhi{"cfgMaxDeltaPhi", static_cast<float>(o2::constants::math::PI / 10), "Maximum DelptaPhi between mixed MCH tracks (rad)"}; |
224 | 216 | Configurable<float> cfgMaxDeltaR{"cfgMaxDeltaR", 10.f, "Maximum DeltaR between mixed MCH tracks"}; |
225 | 217 | Configurable<float> cfgMaxDeltaAttempts{"cfgMaxDeltaAttempts", 0.1f, "Maximum relative difference in match attempts"}; |
226 | 218 | Configurable<float> cfgMaxDeltaZ{"cfgMaxDeltaZ", 1.f, "Maximum deltaZ between mixed collisions"}; |
|
0 commit comments