Skip to content
Merged
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
11 changes: 6 additions & 5 deletions Detectors/TRD/reconstruction/src/TrackletsParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ int TrackletsParser::Parse()
incParsingError(TRDParsingTrackletBit11NotSetInTrackletHCHeader);
continue; //go back to the start of loop, walk the data till the above code of the tracklet end marker is hit, padding is hit or we get to the end of the data.
}
//fix to missing bit on supermodule 16 and 17, to set the uniquely identifying bit.
if (mState == StateTrackletHCHeader) {
if ((mFEEID.supermodule > 15) && mOptions[TRDFixSM1617Bit] && mTrackletHCHeaderState == 2) {
*word |= 1 << 11; //flip bit eleven for the tracklethcheader for the last 2 supermodules (bug/misconfiguration/broken/other) not sure why its like this yet, but it is.
}
}
//now for Tracklet hc header
if ((((*word) & (0x1 << 11)) != 0) && !mIgnoreTrackletHCHeader && mState == StateTrackletHCHeader) { //TrackletHCHeader has bit 11 set to 1 always. Check for state because raw data can have bit 11 set!
if (mState != StateTrackletHCHeader) {
Expand All @@ -201,11 +207,6 @@ int TrackletsParser::Parse()
mWordsRead++;
mState = StateTrackletMCMHeader; // now we should read a MCMHeader next time through loop
} else { //not TrackletHCHeader
if (mState == StateTrackletHCHeader) {
if ((mFEEID.supermodule > 15) && mOptions[TRDFixSM1617Bit] && mTrackletHCHeaderState == 2) {
*word |= 1 << 11; //flip bit eleven for the tracklethcheader for the last 2 supermodules (bug/misconfiguration/broken/other) not sure why its like this yet, but it is.
}
}
if (((*word) & 0x80000001) == 0x80000001 && mState == StateTrackletMCMHeader) { //TrackletMCMHeader has the bits on either end always 1
//mcmheader
mTrackletMCMHeader = (TrackletMCMHeader*)&(*word);
Expand Down