Skip to content

Commit

Permalink
[PWGDQ] Adding event selection flags to dimuonAll table (AliceO2Group…
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoquet642 authored and Sabrina Hernandez committed Dec 20, 2024
1 parent 6f82954 commit 614b131
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 24 deletions.
48 changes: 24 additions & 24 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -1510,30 +1510,6 @@ void VarManager::FillEvent(T const& event, float* values)
values[kVtxY] = event.posY();
values[kVtxZ] = event.posZ();
values[kVtxNcontrib] = event.numContrib();
if (fgUsedVars[kIsNoITSROFBorder]) {
values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0);
}
if (fgUsedVars[kIsNoTFBorder]) {
values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0);
}
if (fgUsedVars[kNoCollInTimeRangeStandard]) {
values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0);
}
if (fgUsedVars[kIsNoSameBunch]) {
values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0);
}
if (fgUsedVars[kIsGoodZvtxFT0vsPV]) {
values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0);
}
if (fgUsedVars[kIsVertexITSTPC]) {
values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0);
}
if (fgUsedVars[kIsVertexTOFmatched]) {
values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0);
}
if (fgUsedVars[kIsSel8]) {
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder);
}
if (fgUsedVars[kIsDoubleGap]) {
values[kIsDoubleGap] = (event.tag_bit(56 + kDoubleGap) > 0);
}
Expand All @@ -1560,6 +1536,30 @@ void VarManager::FillEvent(T const& event, float* values)
uint16_t bcInITSROF = (event.globalBC() + 3564 - fgITSROFbias) % fgITSROFlength;
values[kIsNoITSROFBorderRecomputed] = bcInITSROF > fgITSROFBorderMarginLow && bcInITSROF < fgITSROFlength - fgITSROFBorderMarginHigh ? 1.0 : 0.0;
}
if (fgUsedVars[kIsNoITSROFBorder]) {
values[kIsNoITSROFBorder] = (event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) > 0);
}
if (fgUsedVars[kIsNoTFBorder]) {
values[kIsNoTFBorder] = (event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) > 0);
}
if (fgUsedVars[kNoCollInTimeRangeStandard]) {
values[kNoCollInTimeRangeStandard] = (event.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard) > 0);
}
if (fgUsedVars[kIsNoSameBunch]) {
values[kIsNoSameBunch] = (event.selection_bit(o2::aod::evsel::kNoSameBunchPileup) > 0);
}
if (fgUsedVars[kIsGoodZvtxFT0vsPV]) {
values[kIsGoodZvtxFT0vsPV] = (event.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV) > 0);
}
if (fgUsedVars[kIsVertexITSTPC]) {
values[kIsVertexITSTPC] = (event.selection_bit(o2::aod::evsel::kIsVertexITSTPC) > 0);
}
if (fgUsedVars[kIsVertexTOFmatched]) {
values[kIsVertexTOFmatched] = (event.selection_bit(o2::aod::evsel::kIsVertexTOFmatched) > 0);
}
if (fgUsedVars[kIsSel8]) {
values[kIsSel8] = event.selection_bit(o2::aod::evsel::kIsTriggerTVX) && event.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && event.selection_bit(o2::aod::evsel::kNoITSROFrameBorder);
}
if (fgUsedVars[kIsINT7]) {
values[kIsINT7] = (event.alias_bit(kINT7) > 0);
}
Expand Down
2 changes: 2 additions & 0 deletions PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, ReducedTracks, "_0"); //! Ind
DECLARE_SOA_INDEX_COLUMN_FULL(Index1, index1, int, ReducedTracks, "_1"); //! Index to second prong
DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, Tracks, "_0"); //! Index of first prong in Tracks table
DECLARE_SOA_INDEX_COLUMN_FULL(Prong1, prong1, int, Tracks, "_1"); //! Index of second prong in Tracks table
DECLARE_SOA_BITMAP_COLUMN(EventSelection, evSelection, 8); //! Event selection bits (ambiguity, splitting candidate)
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
Expand Down Expand Up @@ -783,6 +784,7 @@ DECLARE_SOA_TABLE(DielectronsAll, "AOD", "RTDIELECTRONALL", //!

DECLARE_SOA_TABLE(DimuonsAll, "AOD", "RTDIMUONALL", //!
collision::PosX, collision::PosY, collision::PosZ, collision::NumContrib,
evsel::Selection, reducedpair::EventSelection,
reducedevent::MCPosX, reducedevent::MCPosY, reducedevent::MCPosZ,
reducedpair::Mass,
reducedpair::McDecision,
Expand Down
1 change: 1 addition & 0 deletions PWGDQ/Tasks/dqEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ struct AnalysisSameEventPairing {
if constexpr ((TPairType == VarManager::kDecayToMuMu) && muonHasCov) {
if (fConfigFlatTables.value) {
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
event.selection_raw(), 0,
event.reducedMCevent().mcPosX(), event.reducedMCevent().mcPosY(), event.reducedMCevent().mcPosZ(),
VarManager::fgValues[VarManager::kMass],
dileptonMcDecision,
Expand Down
2 changes: 2 additions & 0 deletions PWGDQ/Tasks/dqEfficiency_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,7 @@ struct AnalysisSameEventPairing {
if (!event.isEventSelected_bit(0)) {
continue;
}
uint8_t evSel = event.isEventSelected_raw();
// Reset the fValues array
VarManager::ResetValues(0, VarManager::kNVars);
VarManager::FillEvent<gkEventFillMap>(event, VarManager::fgValues);
Expand Down Expand Up @@ -1646,6 +1647,7 @@ struct AnalysisSameEventPairing {
dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
if (fConfigOptions.flatTables.value) {
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
event.selection_raw(), evSel,
-999., -999., -999.,
VarManager::fgValues[VarManager::kMass],
mcDecision,
Expand Down
1 change: 1 addition & 0 deletions PWGDQ/Tasks/tableReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ struct AnalysisSameEventPairing {
dimuonExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
if (fConfigFlatTables.value) {
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
event.selection_raw(), 0,
-999., -999., -999.,
VarManager::fgValues[VarManager::kMass],
false,
Expand Down
2 changes: 2 additions & 0 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ struct AnalysisSameEventPairing {
if (!event.isEventSelected_bit(0)) {
continue;
}
uint8_t evSel = event.isEventSelected_raw();
// Reset the fValues array
VarManager::ResetValues(0, VarManager::kNVars);
VarManager::FillEvent<gkEventFillMap>(event, VarManager::fgValues);
Expand Down Expand Up @@ -1548,6 +1549,7 @@ struct AnalysisSameEventPairing {
dimuonsExtraList(t1.globalIndex(), t2.globalIndex(), VarManager::fgValues[VarManager::kVertexingTauz], VarManager::fgValues[VarManager::kVertexingLz], VarManager::fgValues[VarManager::kVertexingLxy]);
if (fConfigOptions.flatTables.value) {
dimuonAllList(event.posX(), event.posY(), event.posZ(), event.numContrib(),
event.selection_raw(), evSel,
-999., -999., -999.,
VarManager::fgValues[VarManager::kMass],
false,
Expand Down

0 comments on commit 614b131

Please sign in to comment.