Skip to content

Commit c864689

Browse files
fmazzascFrancesco Mazzaschi
andauthored
Add ITS fake clusters information to the mcMask (#14666)
* Add ITS fake clusters information to the mcMask * remove redundant check --------- Co-authored-by: Francesco Mazzaschi <fmazzasc@alipap1.cern.ch>
1 parent 1b04a9a commit c864689

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr
11261126
if (!needToStore(mGIDToTableID)) {
11271127
continue;
11281128
}
1129-
if (mcTruth.isValid()) { // if not set, -1 will be stored
1129+
if (mcTruth.isValid()) { // if not set, -1 will be stored
11301130
labelHolder.labelID = (mToStore[mcTruth.getSourceID()][mcTruth.getEventID()])[mcTruth.getTrackID()]; // defined by TPC if it contributes, otherwise: by ITS
11311131
if (mcTruth.isFake()) {
11321132
labelHolder.labelMask |= (0x1 << 15);
@@ -1139,6 +1139,21 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr
11391139
}
11401140
}
11411141
}
1142+
if (trackIndex.includesDet(DetID::ITS)) {
1143+
auto itsGID = data.getITSContributorGID(trackIndex);
1144+
auto itsSource = itsGID.getSource();
1145+
if (itsSource == GIndex::ITS) {
1146+
auto& itsTrack = data.getITSTrack(itsGID);
1147+
for (unsigned int iL = 0; iL < 7; ++iL) {
1148+
if (itsTrack.isFakeOnLayer(iL)) {
1149+
labelHolder.labelMask |= (0x1 << iL);
1150+
}
1151+
}
1152+
} else if (itsSource == GIndex::ITSAB) {
1153+
labelHolder.labelMask |= (data.getTrackMCLabel(itsGID).isFake() << 12);
1154+
}
1155+
}
1156+
11421157
} else if (mcTruth.isNoise()) {
11431158
labelHolder.labelMask |= (0x1 << 14);
11441159
}

Framework/Core/include/Framework/AnalysisDataModel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ namespace aod
20172017
namespace mctracklabel
20182018
{
20192019
DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle); //! MC particle
2020-
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
2020+
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)
20212021
} // namespace mctracklabel
20222022

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

0 commit comments

Comments
 (0)