Skip to content

Commit 1e592d6

Browse files
committed
fix in tof digit task
1 parent f2fd020 commit 1e592d6

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

Modules/TOF/src/TaskDigits.cxx

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ void TaskDigits::initialize(o2::framework::InitContext& /*ctx*/)
117117

118118
if (mFlagEnableDiagnostic) {
119119
mHistoDecodingErrors = std::make_shared<TH2I>("DecodingErrors", "TOF decoding error;Crate;Error", RawDataDecoder::ncrates, 0, RawDataDecoder::ncrates, 13, 1, 14);
120-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(1, "DRM");
121-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(2, "LTM");
122-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(3, "TRM 3");
123-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(4, "TRM 4");
124-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(5, "TRM 5");
125-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(6, "TRM 6");
126-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(7, "TRM 7");
127-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(8, "TRM 8");
128-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(9, "TRM 9");
129-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(10, "TRM 10");
130-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(11, "TRM 11");
131-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(12, "TRM 12");
132-
mHistoDecodingErrors->GetYaxis()->SetBinLabel(13, "recovered");
120+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(1, "DRM Header");
121+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(2, "LTM Err.");
122+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(3, "TRM 3 Err.");
123+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(4, "TRM 4 Err.");
124+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(5, "TRM 5 Err.");
125+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(6, "TRM 6 Err.");
126+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(7, "TRM 7 Err.");
127+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(8, "TRM 8 Err.");
128+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(9, "TRM 9 Err.");
129+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(10, "TRM 10 Err.");
130+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(11, "TRM 11 Err.");
131+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(12, "TRM 12 Err.");
132+
mHistoDecodingErrors->GetYaxis()->SetBinLabel(13, "DRM Error");
133133
getObjectsManager()->startPublishing(mHistoDecodingErrors.get());
134134
}
135135

@@ -292,27 +292,27 @@ void TaskDigits::monitorData(o2::framework::ProcessingContext& ctx)
292292
mHistoOrbitID->Fill(row.mFirstIR.orbit % mRangeMaxOrbitId, crate);
293293
mHistoBCID->Fill(row.mFirstIR.bc, crate);
294294
mHistoEventCounter->Fill(row.mEventCounter % mRangeMaxEventCounter, crate);
295+
}
295296

296-
// check patterns
297-
int trmMult[72][10] = { 0 }; // multiplicity in TRM and ROW
298-
for (auto const& digit : digits_in_row) {
299-
if (digit.getChannel() < 0) {
300-
LOG(error) << "No valid channel";
301-
continue;
302-
}
303-
int ech = o2::tof::Geo::getECHFromCH(digit.getChannel());
304-
int crate = o2::tof::Geo::getCrateFromECH(ech);
305-
int trm = o2::tof::Geo::getTRMFromECH(ech) - 3;
306-
trmMult[crate][trm]++;
297+
// check patterns
298+
int trmMult[72][10] = { 0 }; // multiplicity in TRM and ROW
299+
for (auto const& digit : digits_in_row) {
300+
if (digit.getChannel() < 0) {
301+
LOG(error) << "No valid channel";
302+
continue;
307303
}
304+
int ech = o2::tof::Geo::getECHFromCH(digit.getChannel());
305+
int crate = o2::tof::Geo::getCrateFromECH(ech);
306+
int trm = o2::tof::Geo::getTRMFromECH(ech) - 3;
307+
trmMult[crate][trm]++;
308+
}
308309

309-
for (int crate = 0; crate < 72; crate++) {
310-
if (row.isEmptyCrate(crate)) { // Only for active crates
311-
continue;
312-
}
313-
for (int trm = 0; trm < 10; trm++) {
314-
mHistoDecodingCrate[trm]->Fill(0., crate, trmMult[crate][trm]);
315-
}
310+
for (int crate = 0; crate < 72; crate++) {
311+
if (row.isEmptyCrate(crate)) { // Only for active crates
312+
continue;
313+
}
314+
for (int trm = 0; trm < 10; trm++) {
315+
mHistoDecodingCrate[trm]->Fill(0., crate, trmMult[crate][trm]);
316316
}
317317

318318
if (mFlagEnableDiagnostic) {
@@ -330,11 +330,15 @@ void TaskDigits::monitorData(o2::framework::ProcessingContext& ctx)
330330

331331
if (el > 28) { // new slot
332332
slot = el - 28;
333-
} else if (slot > -1 && lastslot != slot) { // fill only one time per TRM and row
333+
} else if (slot > 1 && lastslot != slot) { // fill only one time per TRM and row
334334
// fill error
335335
mHistoDecodingErrors->Fill(crate, slot);
336336
lastslot = slot;
337-
} else { // fill TRM mult for the current bit error for this TRM
337+
} else if (slot == 1 && lastslot != slot) {
338+
mHistoDecodingErrors->Fill(crate, 13); // DRM error
339+
lastslot = slot;
340+
}
341+
if (el <= 28 && slot > 2 && slot < 13) { // fill TRM mult for the current bit error for this TRM
338342
mHistoDecodingCrate[slot - 3]->Fill(el, crate, trmMult[crate][slot - 3]);
339343
}
340344
}

0 commit comments

Comments
 (0)