Skip to content

Commit 368dfb8

Browse files
authored
[PWGLF]/Nuspex: Fix mc event selection and fill of mc output table (AliceO2Group#8057)
1 parent 64d1339 commit 368dfb8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

PWGLF/TableProducer/Nuspex/threebodyRecoTask.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ struct threebodyRecoTask {
9595
Configurable<float> TofPidNsigmaMax{"TofPidNsigmaMax", 5, "TofPidNsigmaMax"};
9696
Configurable<float> TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"};
9797
Configurable<bool> event_sel8_selection{"event_sel8_selection", true, "event selection count post sel8 cut"};
98+
Configurable<bool> mc_event_selection{"mc_event_selection", true, "mc event selection count post kIsTriggerTVX and kNoTimeFrameBorder"};
9899
Configurable<bool> event_posZ_selection{"event_posZ_selection", true, "event selection count post poZ cut"};
99100
Configurable<float> lifetimecut{"lifetimecut", 40., "lifetimecut"}; // ct
100101
Configurable<float> minProtonPt{"minProtonPt", 0.3, "minProtonPt"};
@@ -513,14 +514,14 @@ struct threebodyRecoTask {
513514
// process mc analysis
514515
void processMC(soa::Join<aod::Collisions, o2::aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs> const& collisions, aod::Vtx3BodyDatas const& vtx3bodydatas, aod::McParticles const& particlesMC, MCLabeledTracksIU const& /*tracks*/, aod::McCollisions const& mcCollisions)
515516
{
516-
Candidates3body.clear();
517517
filledMothers.clear();
518518
GetGeneratedH3LInfo(particlesMC);
519519
isGoodCollision.resize(mcCollisions.size(), false);
520520

521521
for (const auto& collision : collisions) {
522+
Candidates3body.clear();
522523
registry.fill(HIST("hEventCounter"), 0.5);
523-
if (event_sel8_selection && !collision.sel8()) {
524+
if (mc_event_selection && (!collision.selection_bit(aod::evsel::kIsTriggerTVX) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
524525
continue;
525526
}
526527
registry.fill(HIST("hEventCounter"), 1.5);

PWGLF/Tasks/Nuspex/hypertriton3bodyanalysis.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct hypertriton3bodyAnalysis {
156156
Configurable<float> TofPidNsigmaMax{"TofPidNsigmaMax", 5, "TofPidNsigmaMax"};
157157
Configurable<float> TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"};
158158
Configurable<bool> event_sel8_selection{"event_sel8_selection", true, "event selection count post sel8 cut"};
159+
Configurable<bool> mc_event_selection{"mc_event_selection", true, "mc event selection count post kIsTriggerTVX and kNoTimeFrameBorder"};
159160
Configurable<bool> event_posZ_selection{"event_posZ_selection", true, "event selection count post poZ cut"};
160161
Configurable<float> lifetimecut{"lifetimecut", 40., "lifetimecut"}; // ct
161162
Configurable<float> minProtonPt{"minProtonPt", 0.3, "minProtonPt"};
@@ -538,7 +539,7 @@ struct hypertriton3bodyAnalysis {
538539

539540
for (const auto& collision : collisions) {
540541
registry.fill(HIST("hEventCounter"), 0.5);
541-
if (event_sel8_selection && !collision.sel8()) {
542+
if (mc_event_selection && (!collision.selection_bit(aod::evsel::kIsTriggerTVX) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
542543
continue;
543544
}
544545
registry.fill(HIST("hEventCounter"), 1.5);
@@ -633,7 +634,7 @@ struct hypertriton3bodyLabelCheck {
633634
}
634635
}
635636

636-
Configurable<bool> event_sel8_selection{"event_sel8_selection", false, "event selection count post sel8 cut"};
637+
Configurable<bool> mc_event_selection{"mc_event_selection", true, "mc event selection count post kIsTriggerTVX and kNoTimeFrameBorder"};
637638
Configurable<bool> event_posZ_selection{"event_posZ_selection", false, "event selection count post poZ cut"};
638639
Configurable<float> TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"};
639640

@@ -696,7 +697,7 @@ struct hypertriton3bodyLabelCheck {
696697
}
697698
}
698699

699-
if (event_sel8_selection && !collision.sel8()) {
700+
if (mc_event_selection && (!collision.selection_bit(aod::evsel::kIsTriggerTVX) || !collision.selection_bit(aod::evsel::kNoTimeFrameBorder))) {
700701
return;
701702
}
702703

0 commit comments

Comments
 (0)