Skip to content

Commit 1d2c445

Browse files
EloviyoShirajum Monira
andauthored
used global index to extract v0 daughters (#5819)
Co-authored-by: Shirajum Monira <shirajum.monira@cernch>
1 parent 0359617 commit 1d2c445

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class FemtoUniverseDetaDphiStar
181181

182182
bool pass = false;
183183
for (int i = 0; i < 2; i++) {
184-
auto indexOfDaughter = part2.index() - 2 + i;
184+
auto indexOfDaughter = part2.globalIndex() - 2 + i;
185185
auto daughter = particles.begin() + indexOfDaughter;
186186
auto deta = part1.eta() - daughter.eta();
187187
auto dphiAvg = AveragePhiStar(part1, *daughter, i);
@@ -217,8 +217,8 @@ class FemtoUniverseDetaDphiStar
217217

218218
bool pass = false;
219219
for (int i = 0; i < 2; i++) {
220-
auto indexOfDaughterpart1 = part1.index() - 2 + i;
221-
auto indexOfDaughterpart2 = part2.index() - 2 + i;
220+
auto indexOfDaughterpart1 = part1.globalIndex() - 2 + i;
221+
auto indexOfDaughterpart2 = part2.globalIndex() - 2 + i;
222222
auto daughterpart1 = particles.begin() + indexOfDaughterpart1;
223223
auto daughterpart2 = particles.begin() + indexOfDaughterpart2;
224224
auto deta = daughterpart1.eta() - daughterpart2.eta();

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ struct femtoUniversePairTaskTrackV0Extended {
214214

215215
/// Histogramming same event
216216
for (auto& part : groupPartsTwo) {
217-
const auto& posChild = parts.iteratorAt(part.index() - 2);
218-
const auto& negChild = parts.iteratorAt(part.index() - 1);
217+
const auto& posChild = parts.iteratorAt(part.globalIndex() - 2);
218+
const auto& negChild = parts.iteratorAt(part.globalIndex() - 1);
219219
/// Daughters that do not pass this condition are not selected
220220
if (!IsParticleTPC(posChild, V0ChildTable[ConfV0Type1][0]) || !IsParticleTPC(negChild, V0ChildTable[ConfV0Type1][1]))
221221
continue;
@@ -257,8 +257,8 @@ struct femtoUniversePairTaskTrackV0Extended {
257257
/// PID using stored binned nsigma
258258
if (!IsParticleCombined(p1, ConfTrackChoicePartOne))
259259
continue;
260-
const auto& posChild = parts.iteratorAt(p2.index() - 2);
261-
const auto& negChild = parts.iteratorAt(p2.index() - 1);
260+
const auto& posChild = parts.iteratorAt(p2.globalIndex() - 2);
261+
const auto& negChild = parts.iteratorAt(p2.globalIndex() - 1);
262262

263263
/// Daughters that do not pass this condition are not selected
264264
if (!IsParticleTPC(posChild, V0ChildTable[ConfV0Type1][0]) || !IsParticleTPC(negChild, V0ChildTable[ConfV0Type1][1]))
@@ -282,8 +282,8 @@ struct femtoUniversePairTaskTrackV0Extended {
282282

283283
/// Histogramming same event
284284
for (auto& part : groupPartsTwo) {
285-
const auto& posChild = parts.iteratorAt(part.index() - 2);
286-
const auto& negChild = parts.iteratorAt(part.index() - 1);
285+
const auto& posChild = parts.iteratorAt(part.globalIndex() - 2);
286+
const auto& negChild = parts.iteratorAt(part.globalIndex() - 1);
287287

288288
/// Check daughters of first V0 particle
289289
if (IsParticleTPC(posChild, V0ChildTable[ConfV0Type1][0]) && IsParticleTPC(negChild, V0ChildTable[ConfV0Type1][1])) {
@@ -310,14 +310,14 @@ struct femtoUniversePairTaskTrackV0Extended {
310310
continue;
311311
}
312312
}
313-
const auto& posChild1 = parts.iteratorAt(p1.index() - 2);
314-
const auto& negChild1 = parts.iteratorAt(p1.index() - 1);
313+
const auto& posChild1 = parts.iteratorAt(p1.globalIndex() - 2);
314+
const auto& negChild1 = parts.iteratorAt(p1.globalIndex() - 1);
315315
/// Daughters that do not pass this condition are not selected
316316
if (!IsParticleTPC(posChild1, V0ChildTable[ConfV0Type1][0]) || !IsParticleTPC(negChild1, V0ChildTable[ConfV0Type1][1]))
317317
continue;
318318

319-
const auto& posChild2 = parts.iteratorAt(p2.index() - 2);
320-
const auto& negChild2 = parts.iteratorAt(p2.index() - 1);
319+
const auto& posChild2 = parts.iteratorAt(p2.globalIndex() - 2);
320+
const auto& negChild2 = parts.iteratorAt(p2.globalIndex() - 1);
321321
/// Daughters that do not pass this condition are not selected
322322
if (!IsParticleTPC(posChild2, V0ChildTable[ConfV0Type2][0]) || !IsParticleTPC(negChild2, V0ChildTable[ConfV0Type2][1]))
323323
continue;
@@ -360,8 +360,8 @@ struct femtoUniversePairTaskTrackV0Extended {
360360
/// PID using stored binned nsigma
361361
if (!IsParticleCombined(p1, ConfTrackChoicePartOne))
362362
continue;
363-
const auto& posChild = parts.iteratorAt(p2.index() - 2);
364-
const auto& negChild = parts.iteratorAt(p2.index() - 1);
363+
const auto& posChild = parts.iteratorAt(p2.globalIndex() - 2);
364+
const auto& negChild = parts.iteratorAt(p2.globalIndex() - 1);
365365
/// Daughters that do not pass this condition are not selected
366366
if (!IsParticleTPC(posChild, V0ChildTable[ConfV0Type1][0]) || !IsParticleTPC(negChild, V0ChildTable[ConfV0Type1][1]))
367367
continue;
@@ -402,14 +402,14 @@ struct femtoUniversePairTaskTrackV0Extended {
402402
continue;
403403
}
404404
}
405-
const auto& posChild1 = parts.iteratorAt(p1.index() - 2);
406-
const auto& negChild1 = parts.iteratorAt(p1.index() - 1);
405+
const auto& posChild1 = parts.iteratorAt(p1.globalIndex() - 2);
406+
const auto& negChild1 = parts.iteratorAt(p1.globalIndex() - 1);
407407
/// Daughters that do not pass this condition are not selected
408408
if (!IsParticleTPC(posChild1, V0ChildTable[ConfV0Type1][0]) || !IsParticleTPC(negChild1, V0ChildTable[ConfV0Type1][1]))
409409
continue;
410410

411-
const auto& posChild2 = parts.iteratorAt(p2.index() - 2);
412-
const auto& negChild2 = parts.iteratorAt(p2.index() - 1);
411+
const auto& posChild2 = parts.iteratorAt(p2.globalIndex() - 2);
412+
const auto& negChild2 = parts.iteratorAt(p2.globalIndex() - 1);
413413
/// Daughters that do not pass this condition are not selected
414414
if (!IsParticleTPC(posChild2, V0ChildTable[ConfV0Type2][0]) || !IsParticleTPC(negChild2, V0ChildTable[ConfV0Type2][1]))
415415
continue;

0 commit comments

Comments
 (0)