@@ -1537,21 +1537,23 @@ struct PiKpRAA {
15371537 bool hasbc{false };
15381538 bool hasft0{false };
15391539 bool hastvx{false };
1540+ bool hasBcFT0TVX{false };
15401541
15411542 hasbc = collision.has_foundBC ();
15421543 hasft0 = collision.has_foundFT0 ();
15431544 hastvx = collision.selection_bit (o2::aod::evsel::kIsTriggerTVX );
1545+ hasBcFT0TVX = (hasbc && hasft0 && hastvx);
15441546
1545- if (hasbc && hasft0 && hastvx ) {
1547+ if (hasBcFT0TVX ) {
15461548 // NUMERATOR/DENOMINATOR OF THE EVENT LOSS
15471549 registry.fill (HIST (" NchMC_WithRecoEvt_HasFT0AndTVX" ), nChMCTPCAcc);
1548- if (hasbc && hasft0 && hastvx && isBestCollIndex) {
1550+ if (hasBcFT0TVX && isBestCollIndex) {
15491551 registry.fill (HIST (" NchMC_WithRecoEvt_HasFT0AndTVX_BestCollIdx" ), nChMCTPCAcc);
15501552 }
15511553 }
15521554
15531555 // TVX-triggered + bestCollisionIndex
1554- if (hasbc && hasft0 && hastvx && isBestCollIndex) {
1556+ if (hasBcFT0TVX && isBestCollIndex) {
15551557 registry.fill (HIST (" EventCounterMC" ), 4.5 );
15561558 }
15571559
@@ -1600,28 +1602,28 @@ struct PiKpRAA {
16001602
16011603 // TO COMPUTE SIGNAL LOSS RELATIVE TO THE MC SIGNAL OF EVENTS WITH FT0 INFO + TVX-TRIGGERED
16021604 if (particle.pdgCode () == PDG_t::kPiPlus || particle.pdgCode () == PDG_t::kPiMinus ) {
1603- if (hasbc && hasft0 && hastvx ) {
1605+ if (hasBcFT0TVX ) {
16041606 registry.fill (HIST (" PtPiVsNchMC_HasFT0AndTVX" ), particle.pt (), nChMCTPCAcc);
16051607 registry.fill (HIST (" PtPiVsNchMCFwd_HasFT0AndTVX" ), particle.pt (), nChMCForward);
1606- if (hasbc && hasft0 && hastvx && isBestCollIndex) {
1608+ if (hasBcFT0TVX && isBestCollIndex) {
16071609 registry.fill (HIST (" PtPiVsNchMC_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCTPCAcc);
16081610 registry.fill (HIST (" PtPiVsNchMCFwd_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCForward);
16091611 }
16101612 }
16111613 } else if (particle.pdgCode () == PDG_t::kKPlus || particle.pdgCode () == PDG_t::kKMinus ) {
1612- if (hasbc && hasft0 && hastvx ) {
1614+ if (hasBcFT0TVX ) {
16131615 registry.fill (HIST (" PtKaVsNchMC_HasFT0AndTVX" ), particle.pt (), nChMCTPCAcc);
16141616 registry.fill (HIST (" PtKaVsNchMCFwd_HasFT0AndTVX" ), particle.pt (), nChMCForward);
1615- if (hasbc && hasft0 && hastvx && isBestCollIndex) {
1617+ if (hasBcFT0TVX && isBestCollIndex) {
16161618 registry.fill (HIST (" PtKaVsNchMC_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCTPCAcc);
16171619 registry.fill (HIST (" PtKaVsNchMCFwd_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCForward);
16181620 }
16191621 }
16201622 } else if (particle.pdgCode () == PDG_t::kProton || particle.pdgCode () == PDG_t::kProtonBar ) {
1621- if (hasbc && hasft0 && hastvx ) {
1623+ if (hasBcFT0TVX ) {
16221624 registry.fill (HIST (" PtPrVsNchMC_HasFT0AndTVX" ), particle.pt (), nChMCTPCAcc);
16231625 registry.fill (HIST (" PtPrVsNchMCFwd_HasFT0AndTVX" ), particle.pt (), nChMCForward);
1624- if (hasbc && hasft0 && hastvx && isBestCollIndex) {
1626+ if (hasBcFT0TVX && isBestCollIndex) {
16251627 registry.fill (HIST (" PtPrVsNchMC_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCTPCAcc);
16261628 registry.fill (HIST (" PtPrVsNchMCFwd_HasFT0AndTVX_BestCollIdx" ), particle.pt (), nChMCForward);
16271629 }
0 commit comments