From 1a6d3e97a8373b83e7276801bbbbaeff590b7aeb Mon Sep 17 00:00:00 2001 From: romainschotter Date: Thu, 13 Jun 2024 22:47:23 +0200 Subject: [PATCH 1/2] Add occupancy selections (+ extra event selections) in MC --- .../derivedlambdakzeroanalysis.cxx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index d304d958d34..06772efc0fa 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -1146,6 +1146,39 @@ struct derivedlambdakzeroanalysis { return; } histos.fill(HIST("hEventSelection"), 4 /* Not at TF border */); + + if (requireIsVertexITSTPC && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + return; + } + histos.fill(HIST("hEventSelection"), 5 /* Contains at least one ITS-TPC track */); + + if (requireIsGoodZvtxFT0VsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + return; + } + histos.fill(HIST("hEventSelection"), 6 /* PV position consistency check */); + + if (requireIsVertexTOFmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + return; + } + histos.fill(HIST("hEventSelection"), 7 /* PV with at least one contributor matched with TOF */); + + if (requireIsVertexTRDmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + return; + } + histos.fill(HIST("hEventSelection"), 8 /* PV with at least one contributor matched with TRD */); + + if (rejectSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + return; + } + histos.fill(HIST("hEventSelection"), 9 /* Not at same bunch pile-up */); + + if (minOccupancy > 0 && collision.trackOccupancyInTimeRange() < minOccupancy) { + return; + } + histos.fill(HIST("hEventSelection"), 10 /* Below min occupancy */); + if (maxOccupancy > 0 && collision.trackOccupancyInTimeRange() > maxOccupancy) { + return; + } float centrality = collision.centFT0C(); if (qaCentrality) { From fa201de6485089ffefe91f342bedf4ec5ad924e8 Mon Sep 17 00:00:00 2001 From: romainschotter Date: Thu, 13 Jun 2024 22:52:05 +0200 Subject: [PATCH 2/2] Fix whitespaces --- PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx index 06772efc0fa..a9fb5fbbdc8 100644 --- a/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/derivedlambdakzeroanalysis.cxx @@ -1146,7 +1146,7 @@ struct derivedlambdakzeroanalysis { return; } histos.fill(HIST("hEventSelection"), 4 /* Not at TF border */); - + if (requireIsVertexITSTPC && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { return; }