Skip to content

Commit a093fa8

Browse files
noferinishahor02
authored andcommitted
bug fix in TOF diagnostics
1 parent 6d8b429 commit a093fa8

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

Detectors/TOF/reconstruction/src/Clusterer.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ void Clusterer::calibrateStrip()
5151
for (int idig = 0; idig < mStripData.digits.size(); idig++) {
5252
// LOG(debug) << "Checking digit " << idig;
5353
Digit* dig = &mStripData.digits[idig];
54+
// LOG(info) << "channel = " << dig->getChannel();
5455
dig->setBC(dig->getBC() - mBCOffset); // RS Don't use raw BC, always start from the beginning of the TF
5556
double calib = mCalibApi->getTimeCalibration(dig->getChannel(), dig->getTOT() * Geo::TOTBIN_NS);
5657
//printf("channel %d) isProblematic = %d, fractionUnderPeak = %f\n",dig->getChannel(),mCalibApi->isProblematic(dig->getChannel()),mCalibApi->getFractionUnderPeak(dig->getChannel())); // toberem

Detectors/TOF/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ void Digitizer::fillOutputContainer(std::vector<Digit>& digits)
857857
// add diagnostic if needed
858858
if (trmProg[itrm].second > p) {
859859
// fill diagnostic
860-
mCalibApi->processError(crate, itrm, trmErr[itrm]);
860+
mCalibApi->processError(crate, slot, trmErr[itrm]);
861861
mPatterns.push_back(slot + 28); // add slot
862862
info.addedDiagnostic(crate);
863863
uint32_t cbit = 1;

Detectors/TOF/workflow/src/TOFClusterizerSpec.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ class TOFDPLClustererTask
186186
}
187187
slot = patterns[kw] - 28;
188188
eword = 0;
189+
190+
if (slot < 3 || slot > 12) { // not a valid slot -> don't fill otherwise mapping fails (slot 1 crate 0 is a bad condition)
191+
slot = -1;
192+
// LOG(info) << "not a valid slot in diagnostic words: slot = " << slot << " for crate " << crate;
193+
}
189194
} else if (slot > -1) { // process error in this slot
190195
eword += 1 << patterns[kw];
191196
}

0 commit comments

Comments
 (0)