|
9 | 9 | // granted to it by virtue of its status as an Intergovernmental Organization |
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 | // |
12 | | -// Task for analysing (anti)deuteron production in jets using pT-triggered data - update: 04-02-2026 |
| 12 | +// Task for analysing (anti)deuteron production in jets using pT-triggered data - update: 05-02-2026 |
13 | 13 | // |
14 | 14 | // Executable : o2-analysis-lf-deuteron-in-jet-trg-pt |
15 | 15 |
|
16 | 16 | #include "PWGJE/Core/JetBkgSubUtils.h" |
17 | 17 | #include "PWGJE/Core/JetUtilities.h" |
18 | 18 |
|
| 19 | +#include "Common/Core/RecoDecay.h" |
19 | 20 | #include "Common/Core/TrackSelection.h" |
20 | 21 | #include "Common/Core/Zorro.h" |
21 | 22 | #include "Common/Core/ZorroSummary.h" |
@@ -256,25 +257,9 @@ struct DeuteronInJetsTrgPt { |
256 | 257 | u2.SetXYZ(u2x, u2y, pz); |
257 | 258 | } |
258 | 259 |
|
259 | | - // Compute delta phi |
260 | | - double getDeltaPhi(double a1, double a2) |
261 | | - { |
262 | | - double deltaPhi(0); |
263 | | - double phi1 = TVector2::Phi_0_2pi(a1); |
264 | | - double phi2 = TVector2::Phi_0_2pi(a2); |
265 | | - double diff = std::fabs(phi1 - phi2); |
266 | | - |
267 | | - if (diff <= PI) |
268 | | - deltaPhi = diff; |
269 | | - if (diff > PI) |
270 | | - deltaPhi = TwoPI - diff; |
271 | | - |
272 | | - return deltaPhi; |
273 | | - } |
274 | | - |
275 | | - // Find ITS hit |
| 260 | + // Find hit on ITS layer |
276 | 261 | template <typename TrackIts> |
277 | | - bool hasITShit(const TrackIts& track, int layer) |
| 262 | + bool hasHitITS(const TrackIts& track, int layer) |
278 | 263 | { |
279 | 264 | int ibit = layer - 1; |
280 | 265 | return (track.itsClusterMap() & (1 << ibit)); |
@@ -305,7 +290,7 @@ struct DeuteronInJetsTrgPt { |
305 | 290 | // Part relative to ITS |
306 | 291 | if (!track.hasITS()) |
307 | 292 | return false; |
308 | | - if ((!hasITShit(track, 1)) && (!hasITShit(track, 2)) && (!hasITShit(track, 3))) |
| 293 | + if ((!hasHitITS(track, 1)) && (!hasHitITS(track, 2)) && (!hasHitITS(track, 3))) |
309 | 294 | return false; // Has Inner Barrel hit |
310 | 295 | if (track.itsChi2NCl() >= MaxChi2Its) |
311 | 296 | return false; |
@@ -334,7 +319,7 @@ struct DeuteronInJetsTrgPt { |
334 | 319 | // Part relative to ITS |
335 | 320 | if (!track.hasITS()) |
336 | 321 | return false; // Flag to check if track has a ITS match |
337 | | - if ((!hasITShit(track, 1)) && (!hasITShit(track, 2)) && (!hasITShit(track, 3))) |
| 322 | + if ((!hasHitITS(track, 1)) && (!hasHitITS(track, 2)) && (!hasHitITS(track, 3))) |
338 | 323 | return false; // Require IB hit |
339 | 324 | if (track.itsNCls() < cfgTrackCut.ITSnClusMin) |
340 | 325 | return false; // Minimum number of ITS cluster |
@@ -498,10 +483,10 @@ struct DeuteronInJetsTrgPt { |
498 | 483 |
|
499 | 484 | // Calculate the angular distance between the track and the UE axes in eta-phi space |
500 | 485 | double deltaEtaUe1 = track.eta() - ueAxis1.Eta(); |
501 | | - double deltaPhiUe1 = getDeltaPhi(track.phi(), ueAxis1.Phi()); |
| 486 | + double deltaPhiUe1 = std::fabs(RecoDecay::constrainAngle(track.phi() - ueAxis1.Phi(), -PI)); |
502 | 487 | double deltaRUe1 = std::sqrt(deltaEtaUe1 * deltaEtaUe1 + deltaPhiUe1 * deltaPhiUe1); |
503 | 488 | double deltaEtaUe2 = track.eta() - ueAxis2.Eta(); |
504 | | - double deltaPhiUe2 = getDeltaPhi(track.phi(), ueAxis2.Phi()); |
| 489 | + double deltaPhiUe2 = std::fabs(RecoDecay::constrainAngle(track.phi() - ueAxis2.Phi(), -PI)); |
505 | 490 | double deltaRUe2 = std::sqrt(deltaEtaUe2 * deltaEtaUe2 + deltaPhiUe2 * deltaPhiUe2); |
506 | 491 |
|
507 | 492 | double maxConeRadius = coneRadius; |
|
0 commit comments