Skip to content

Commit 22e3f7b

Browse files
authored
Update HadNucleiFemto.cxx
1 parent afe1161 commit 22e3f7b

1 file changed

Lines changed: 29 additions & 8 deletions

File tree

PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ struct HadNucleiFemto {
594594
// ==================================================================================================================
595595

596596
template <bool isMC, typename Tcollision>
597-
bool passesCollisionSelection(const Tcollision& collision)
597+
bool passesEventSelection(const Tcollision& collision)
598598
{
599599
// CPR uses phi* and therefore needs the magnetic field for MC as well.
600600
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
@@ -608,32 +608,53 @@ struct HadNucleiFemto {
608608
if (!collision.sel8() || std::abs(collision.posZ()) > eventMixing.settingCutVertex) {
609609
return false;
610610
}
611-
if (zorro.settingSkimmedProcessing) {
612-
if (!mZorro.isSelected(bc.globalBC())) {
613-
return false;
614-
}
615-
}
616611
}
617612

618613
return true;
619614
}
620615

616+
template <typename Tcollision>
617+
bool passesZorroSelection(const Tcollision& collision)
618+
{
619+
if (!zorro.settingSkimmedProcessing) {
620+
return true;
621+
}
622+
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
623+
return mZorro.isSelected(bc.globalBC());
624+
}
625+
626+
template <bool isMC, typename Tcollision>
627+
bool passesCollisionSelection(const Tcollision& collision)
628+
{
629+
if (!passesEventSelection<isMC>(collision)) {
630+
return false;
631+
}
632+
if constexpr (!isMC) {
633+
return passesZorroSelection(collision);
634+
}
635+
return true;
636+
}
637+
621638
template <bool isMC, typename Tcollision>
622639
bool selectCollision(const Tcollision& collision, const aod::BCsWithTimestamps&)
623640
{
624641
mQaRegistry.fill(HIST("hEvents"), 0);
625642

626-
if (!passesCollisionSelection<isMC>(collision)) {
643+
if (!passesEventSelection<isMC>(collision)) {
627644
return false;
628645
}
629646

647+
mQaRegistry.fill(HIST("hEvents"), 1);
648+
630649
if constexpr (!isMC) {
631650
if (zorro.settingSkimmedProcessing) {
651+
if (!passesZorroSelection(collision)) {
652+
return false;
653+
}
632654
mQaRegistry.fill(HIST("hEvents"), 2);
633655
}
634656
}
635657

636-
mQaRegistry.fill(HIST("hEvents"), 1);
637658
mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib());
638659
mQaRegistry.fill(HIST("hVtxZ"), collision.posZ());
639660
return true;

0 commit comments

Comments
 (0)