Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Detectors/AOD/src/AODProducerWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr
if (!needToStore(mGIDToTableID)) {
continue;
}
if (mcTruth.isValid()) { // if not set, -1 will be stored
if (mcTruth.isValid()) { // if not set, -1 will be stored
labelHolder.labelID = (mToStore[mcTruth.getSourceID()][mcTruth.getEventID()])[mcTruth.getTrackID()]; // defined by TPC if it contributes, otherwise: by ITS
if (mcTruth.isFake()) {
labelHolder.labelMask |= (0x1 << 15);
Expand All @@ -1139,6 +1139,21 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr
}
}
}
if (trackIndex.includesDet(DetID::ITS)) {
auto itsGID = data.getITSContributorGID(trackIndex);
auto itsSource = itsGID.getSource();
if (itsSource == GIndex::ITS) {
auto& itsTrack = data.getITSTrack(itsGID);
for (unsigned int iL = 0; iL < 7; ++iL) {
if (itsTrack.isFakeOnLayer(iL)) {
labelHolder.labelMask |= (0x1 << iL);
}
}
} else if (itsSource == GIndex::ITSAB) {
labelHolder.labelMask |= (data.getTrackMCLabel(itsGID).isFake() << 12);
}
}

} else if (mcTruth.isNoise()) {
labelHolder.labelMask |= (0x1 << 14);
}
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/AnalysisDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ namespace aod
namespace mctracklabel
{
DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); //! MC particle
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate detector mismatches (bit ON means mismatch). Bit 0-6: mismatch at ITS layer. Bit 7-9: # of TPC mismatches in the ranges 0, 1, 2-3, 4-7, 8-15, 16-31, 32-63, >64. Bit 10: TRD, bit 11: TOF, bit 15: indicates negative label
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate detector mismatches (bit ON means mismatch). Bit 0-6: mismatch at ITS layer. Bit 12: ITSAB tracklet mismatch. Bit 13: ITS-TPC mismatch. Bit 14: isNoise == True (global track), Bit 15: isFake == True (global track)
} // namespace mctracklabel

DECLARE_SOA_TABLE(McTrackLabels, "AOD", "MCTRACKLABEL", //! Table joined to the track table containing the MC index
Expand Down