-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mask for fake/mismatch hits #13902
base: dev
Are you sure you want to change the base?
Conversation
REQUEST FOR PRODUCTION RELEASES:
This will add The following labels are available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @njacazio thanks, I agree that the fake/correct flags should be rectified, but there are some points I don't understand, see below.
Most important: in the current code I see bit 15 always fired when the TOF is present, I suspect some bug in TOFFake extraction. Did you check if your PR fixes that?
@@ -1083,7 +1083,7 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr | |||
}; | |||
|
|||
if (GIndex::includesSource(src, mInputSources)) { | |||
auto mcTruth = data.getTrackMCLabel(trackIndex); | |||
const auto& mcTruth = data.getTrackMCLabel(trackIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding const
is fine but I don't see why reference in this case is better than the value: label object is 8 bytes, the reference also but it needs dereferencing.
if (mcTruthITS.isValid()) { | ||
labelHolder.labelITS = (mToStore[mcTruthITS.getSourceID()][mcTruthITS.getEventID()])[mcTruthITS.getTrackID()]; | ||
} | ||
if (labelHolder.labelITS != labelHolder.labelTPC) { | ||
LOG(debug) << "ITS-TPC MCTruth: labelIDs do not match at " << trackIndex.getIndex() << ", src = " << src; | ||
labelHolder.labelMask |= (0x1 << 13); | ||
labelHolder.labelMask |= o2::aod::mctracklabel::McMaskEnum::MismatchInITS0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why it goes to ITS0?
if (isTOFFake) { | ||
labelHolder.labelMask |= o2::aod::mctracklabel::McMaskEnum::MismatchInTOF; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the data I checked (when discussing with Sebastian) the TOFFake was always set to true when the TOF was present, I don't see what should be fixed here, except that it will not overwrite the general isFake bit 15 as before).
namespace o2::aod::mctracklabel | ||
{ | ||
// ! 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 | ||
enum McMaskEnum : uint16_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the correspondence between these enums and what is actually filled? Note that the ITS track per see may have no fakes (all clusters having the same label) but can be matched to TPC track with a different label. In this case ITS-TPC label will have isFake()==true
. With your PR it will be flagged in bit0, why?
@@ -1145,13 +1145,16 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(MCTrackLabelCursorType& mcTr | |||
break; | |||
} | |||
} | |||
if (isTOFFake) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njacazio the line https://github.com/AliceO2Group/AliceO2/pull/13902/files#diff-6dc278732c5ed5f43d5567ad2c469ac11acf0e85339ae708bdf977ddd8fba392R1143 is simply wrong: it compares the original full MCCompLabel of TOF cluster with uint label of TPC assigned for storage in the AOD! All these manipulations with mToStore
container are extremely heavy and unnecessary: the MCCompLabel are much lighter. I'll fix this part, then let's continue from that point on.
No description provided.