Skip to content

Commit b2fa2bb

Browse files
authored
[PWGLF] Fixed bug:Using isBestCollIndex instead of bestCollisionIndex (#18398)
1 parent 4d34755 commit b2fa2bb

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎PWGLF/Tasks/Nuspex/piKpRAA.cxx‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,21 +1542,20 @@ struct PiKpRAA {
15421542
hasbc = collision.has_foundBC();
15431543
hasft0 = collision.has_foundFT0();
15441544
hastvx = collision.selection_bit(o2::aod::evsel::kIsTriggerTVX);
1545-
hasBcFT0TVX = hasbc && hasft0 && hastvx;
1545+
hasBcFT0TVX = (hasbc && hasft0 && hastvx);
15461546

15471547
if (hasBcFT0TVX) {
15481548
// NUMERATOR/DENOMINATOR OF THE EVENT LOSS
15491549
registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX"), nChMCTPCAcc);
1550-
if (hasBcFT0TVX && bestCollisionIndex) {
1550+
1551+
// TVX-triggered + bestCollisionIndex
1552+
if (isBestCollIndex) {
1553+
registry.fill(HIST("EventCounterMC"), 4.5);
1554+
// NUMERATOR/DENOMINATOR OF THE EVENT LOSS
15511555
registry.fill(HIST("NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx"), nChMCTPCAcc);
15521556
}
15531557
}
15541558

1555-
// TVX-triggered + bestCollisionIndex
1556-
if (hasBcFT0TVX && isBestCollIndex) {
1557-
registry.fill(HIST("EventCounterMC"), 4.5);
1558-
}
1559-
15601559
//---------------------------
15611560
// LOOPING OVER THE MC EVENT
15621561
//---------------------------
@@ -1605,7 +1604,7 @@ struct PiKpRAA {
16051604
if (hasBcFT0TVX) {
16061605
registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
16071606
registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
1608-
if (hasBcFT0TVX && isBestCollIndex) {
1607+
if (isBestCollIndex) {
16091608
registry.fill(HIST("PtPiVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc);
16101609
registry.fill(HIST("PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward);
16111610
}
@@ -1614,7 +1613,7 @@ struct PiKpRAA {
16141613
if (hasBcFT0TVX) {
16151614
registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
16161615
registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
1617-
if (hasBcFT0TVX && isBestCollIndex) {
1616+
if (isBestCollIndex) {
16181617
registry.fill(HIST("PtKaVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc);
16191618
registry.fill(HIST("PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward);
16201619
}
@@ -1623,7 +1622,7 @@ struct PiKpRAA {
16231622
if (hasBcFT0TVX) {
16241623
registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX"), particle.pt(), nChMCTPCAcc);
16251624
registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX"), particle.pt(), nChMCForward);
1626-
if (hasBcFT0TVX && isBestCollIndex) {
1625+
if (isBestCollIndex) {
16271626
registry.fill(HIST("PtPrVsNchMC_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCTPCAcc);
16281627
registry.fill(HIST("PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx"), particle.pt(), nChMCForward);
16291628
}

0 commit comments

Comments
 (0)