Skip to content

Commit ccf411b

Browse files
authored
[PWGDQ] Adding event selection flags to dimuonAll table (#9052)
1 parent d005eae commit ccf411b

File tree

6 files changed

+32
-24
lines changed

6 files changed

+32
-24
lines changed

PWGDQ/Core/VarManager.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,30 +1510,6 @@ void VarManager::FillEvent(T const& event, float* values)
15101510
values[kVtxY] = event.posY();
15111511
values[kVtxZ] = event.posZ();
15121512
values[kVtxNcontrib] = event.numContrib();
1513-
if (fgUsedVars[kIsNoITSROFBorder]) {
1514-
values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0);
1515-
}
1516-
if (fgUsedVars[kIsNoTFBorder]) {
1517-
values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0);
1518-
}
1519-
if (fgUsedVars[kNoCollInTimeRangeStandard]) {
1520-
values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0);
1521-
}
1522-
if (fgUsedVars[kIsNoSameBunch]) {
1523-
values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0);
1524-
}
1525-
if (fgUsedVars[kIsGoodZvtxFT0vsPV]) {
1526-
values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0);
1527-
}
1528-
if (fgUsedVars[kIsVertexITSTPC]) {
1529-
values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0);
1530-
}
1531-
if (fgUsedVars[kIsVertexTOFmatched]) {
1532-
values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0);
1533-
}
1534-
if (fgUsedVars[kIsSel8]) {
1535-
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder);
1536-
}
15371513
if (fgUsedVars[kIsDoubleGap]) {
15381514
values[kIsDoubleGap] = (event.tag_bit(56 + kDoubleGap) > 0);
15391515
}
@@ -1560,6 +1536,30 @@ void VarManager::FillEvent(T const& event, float* values)
15601536
uint16_t bcInITSROF = (event.globalBC() + 3564 - fgITSROFbias) % fgITSROFlength;
15611537
values[kIsNoITSROFBorderRecomputed] = bcInITSROF > fgITSROFBorderMarginLow && bcInITSROF < fgITSROFlength - fgITSROFBorderMarginHigh ? 1.0 : 0.0;
15621538
}
1539+
if (fgUsedVars[kIsNoITSROFBorder]) {
1540+
values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0);
1541+
}
1542+
if (fgUsedVars[kIsNoTFBorder]) {
1543+
values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0);
1544+
}
1545+
if (fgUsedVars[kNoCollInTimeRangeStandard]) {
1546+
values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0);
1547+
}
1548+
if (fgUsedVars[kIsNoSameBunch]) {
1549+
values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0);
1550+
}
1551+
if (fgUsedVars[kIsGoodZvtxFT0vsPV]) {
1552+
values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0);
1553+
}
1554+
if (fgUsedVars[kIsVertexITSTPC]) {
1555+
values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0);
1556+
}
1557+
if (fgUsedVars[kIsVertexTOFmatched]) {
1558+
values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0);
1559+
}
1560+
if (fgUsedVars[kIsSel8]) {
1561+
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder);
1562+
}
15631563
if (fgUsedVars[kIsINT7]) {
15641564
values[kIsINT7] = (event.alias_bit(kINT7) > 0);
15651565
}

PWGDQ/DataModel/ReducedInfoTables.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, ReducedTracks, "_0"); //! Ind
641641
DECLARE_SOA_INDEX_COLUMN_FULL(Index1, index1, int, ReducedTracks, "_1"); //! Index to second prong
642642
DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, Tracks, "_0"); //! Index of first prong in Tracks table
643643
DECLARE_SOA_INDEX_COLUMN_FULL(Prong1, prong1, int, Tracks, "_1"); //! Index of second prong in Tracks table
644+
DECLARE_SOA_BITMAP_COLUMN(EventSelection, evSelection, 8); //! Event selection bits (ambiguity, splitting candidate)
644645
DECLARE_SOA_COLUMN(Mass, mass, float); //!
645646
DECLARE_SOA_COLUMN(Pt, pt, float); //!
646647
DECLARE_SOA_COLUMN(Eta, eta, float); //!
@@ -783,6 +784,7 @@ DECLARE_SOA_TABLE(DielectronsAll, "AOD", "RTDIELECTRONALL", //!
783784

784785
DECLARE_SOA_TABLE(DimuonsAll, "AOD", "RTDIMUONALL", //!
785786
collision::PosX, collision::PosY, collision::PosZ, collision::NumContrib,
787+
evsel::Selection, reducedpair::EventSelection,
786788
reducedevent::MCPosX, reducedevent::MCPosY, reducedevent::MCPosZ,
787789
reducedpair::Mass,
788790
reducedpair::McDecision,

PWGDQ/Tasks/dqEfficiency.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ struct AnalysisSameEventPairing {
840840
if constexpr ((TPairType == VarManager::kDecayToMuMu) && muonHasCov) {
841841
if (fConfigFlatTables.value) {
842842
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
843+
event.selection_raw(), 0,
843844
event.reducedMCevent().mcPosX(), event.reducedMCevent().mcPosY(), event.reducedMCevent().mcPosZ(),
844845
VarManager::fgValues[VarManager::kMass],
845846
dileptonMcDecision,

PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,7 @@ struct AnalysisSameEventPairing {
15041504
if (!event.isEventSelected_bit(0)) {
15051505
continue;
15061506
}
1507+
uint8_t evSel = event.isEventSelected_raw();
15071508
// Reset the fValues array
15081509
VarManager::ResetValues(0, VarManager::kNVars);
15091510
VarManager::FillEvent<gkEventFillMap>(event, VarManager::fgValues);
@@ -1646,6 +1647,7 @@ struct AnalysisSameEventPairing {
16461647
dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
16471648
if (fConfigOptions.flatTables.value) {
16481649
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
1650+
event.selection_raw(), evSel,
16491651
-999., -999., -999.,
16501652
VarManager::fgValues[VarManager::kMass],
16511653
mcDecision,

PWGDQ/Tasks/tableReader.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,7 @@ struct AnalysisSameEventPairing {
13081308
dimuonExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
13091309
if (fConfigFlatTables.value) {
13101310
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
1311+
event.selection_raw(), 0,
13111312
-999., -999., -999.,
13121313
VarManager::fgValues[VarManager::kMass],
13131314
false,

PWGDQ/Tasks/tableReader_withAssoc.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,7 @@ struct AnalysisSameEventPairing {
14231423
if (!event.isEventSelected_bit(0)) {
14241424
continue;
14251425
}
1426+
uint8_t evSel = event.isEventSelected_raw();
14261427
// Reset the fValues array
14271428
VarManager::ResetValues(0, VarManager::kNVars);
14281429
VarManager::FillEvent<gkEventFillMap>(event, VarManager::fgValues);
@@ -1548,6 +1549,7 @@ struct AnalysisSameEventPairing {
15481549
dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
15491550
if (fConfigOptions.flatTables.value) {
15501551
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
1552+
event.selection_raw(), evSel,
15511553
-999., -999., -999.,
15521554
VarManager::fgValues[VarManager::kMass],
15531555
false,

0 commit comments

Comments
 (0)