You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 698ba44
Browse filesBrowse the repository at this point in the historyBrowse files
-[Rejection of events with dead zones in ITS](#rejection-of-events-with-dead-zones-in-its)
25
+
-[Problem](#problem)
26
+
-[Using special event selection bits](#using-special-event-selection-bits)
27
+
-[Usage of RCT flags](#usage-of-rct-flags)
28
+
-[Found bunch crossings](#found-bunch-crossings)
29
+
-[Configurables](#configurables)
30
+
-[Event selection decisions for Run 2](#event-selection-decisions-for-run-2)
31
+
-[Remarks](#remarks)
32
+
-[Luminosity module](#luminosity-module)
22
33
23
34
# Event selection service wagon
24
35
@@ -111,6 +122,8 @@ In general, one has to follow the following steps:
111
122
112
123
The `sel8` event selection bit is a logical _and_ between the `kIsTriggerTVX` bit (based on FT0A & FT0C requirement, with time-based constraints on the vertex position), and (since April 2024) `kNoTimeFrameBorder` and `kNoITSROFrameBorder` bits - see [below](#integration-into-event-selection).
113
124
125
+
> [!NOTE]
126
+
> An exception for the 2026 pp data: the `kNoITSROFrameBorder` bit was excluded from `sel8` for this period because reconstruction was performed with the ITS cross-ROF mode enabled, which should almost completely eliminate the ITS ROF border effect. Note, however, that the ROF border effect is still present for the MFT readout frames!
114
127
* run your tasks in stack with event-selection-service task:
115
128
116
129
``` bash
@@ -332,7 +345,7 @@ _Notes:_
332
345
- Both occupancy estimators are pre-calculated per each collision in the event selection routine, [EventSelectionModule.h](https://github.com/AliceO2Group/O2Physics/blob/daily-20251029-0000/Common/Tools/EventSelectionModule.h#L1361).
333
346
- In the occupancy calculation, multiplicities of nearby collisions are "weighted" according to their time separation from a collision-of-interest, to reflect the "severity" of their influence on that collision
334
347
- Estimators return `-1` if a given collision is close to Time Frame borders (so, not enough information for the occupancy calculation, while we need information within -40 µs...+100 µs time range wrt a given collision), event loss ~1.2%.
335
-
348
+
- An additional column was added to evSel table in [Dec 2025](https://github.com/AliceO2Group/O2Physics/pull/14202) - the **median time** of occupancy from nearby events (i.e. the dt at which the counter of occupancy around a given event in a predefined time window becomes >=0.5 from the total occupancy), as discussed [here](https://indico.cern.ch/event/1568262/#1-study-of-the-tpc-occupancy-e). The getter: `occupancyMedianTime()`.
336
349
337
350
### Occupancy selection bits
338
351
@@ -355,6 +368,47 @@ if (col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow)) { /* do analysi
355
368
```
356
369
357
370
371
+
### Occupancy wrt bunch crossings
372
+
373
+
The occupancy can also be obtained per **bunch crossing** (e.g. for UPC studies), with the same estimators, time window and thresholds as for collisions (since [PR 12/11/2026](https://github.com/AliceO2Group/O2Physics/pull/18689)). Two tables are produced by the event selection service (only if subscribed to by a task):
374
+
- `aod::BcOccs`: joinable with `aod::BCs`, one row per BC of the BC table;
375
+
- `aod::BcOccsAll`: not joinable, values are calculated for every BC of the Time Frames in the dataframe (also BCs not stored in AO2D). The table is large (114048 rows per 32-orbit TF), so request it only when needed.
376
+
377
+
The same getters and bits described for per-collision occupancy can also be used for per-BC occupancy studies. The following additional getters are available:
| `numCollsInBC()` | number of collisions found in this BC |
383
+
| `numCollsInRof()` | number of collisions found in the ITS ROF of this BC |
384
+
385
+
**Differences from the per-collision values:**
386
+
- all collisions found in the BC are excluded from its occupancy (for a collision, only the collision itself is excluded);
387
+
- no vZ for BCs, so the close-vZ veto in `kNoCollInRofStandard` is not applied;
388
+
- the flags are stored in a separate 8-bit bitmap: bit numbers differ from `aod::evsel`;
389
+
- `kUpcMode` (filled for all BCs): the ITS ROF of this BC has no collisions, or has collisions reconstructed in the UPC mode of ITS (`Vertex::Flags::UPCMode`).
if (bc.trackOccupancyInTimeRange() >= 0 && bc.occupancyFlags_bit(o2::aod::bcocc::kNoCollInTimeRangeNarrow)) { /* do analysis */ }
398
+
}
399
+
}
400
+
```
401
+
For `aod::BcOccsAll`, a fast lookup by global BC is provided:
402
+
``` c++
403
+
// occupancy for any BC of the TFs in the DF: O(1) lookup by global BC, no search and no CCDB needed
404
+
aod::bcocc::BcOccAllIndex bcOccAllIndexed(bcOccsAll); // once per dataframe
405
+
if (bcOccAllIndexed.contains(bc.globalBC())) {
406
+
auto occ = bcOccAllIndexed[bc.globalBC()]; // iterator of aod::BcOccsAll
407
+
bool isUpcModeRof = occ.occupancyFlags_bit(o2::aod::bcocc::kUpcMode); // example; other occupancy getters can be used as well
408
+
}
409
+
```
410
+
411
+
358
412
### Discussion
359
413
360
414
More details on occupancy in Pb-Pb can be found in the [report at the APW 2024](https://indico.cern.ch/event/1462154/#7-occupancy-effects), where the concepts and observations are explained (while some figures and indicated values might be outdated).
0 commit comments