Skip to content

Commit

Permalink
[EMCAL-711] Add monitoring of TRU decoding errors
Browse files Browse the repository at this point in the history
- Integrate TRU decoding errors into global error
  monitoring
- Add histograms for TRU error type vs. Link and index
  of the TRU raising the error (STU index scheme) vs.
  link
  • Loading branch information
mfasDa committed May 7, 2024
1 parent 4e96453 commit 6ab7ac1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 36 deletions.
2 changes: 2 additions & 0 deletions Modules/EMCAL/include/EMCAL/RawErrorTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class RawErrorTask final : public TaskInterface
TH2* mChannelGainLow = nullptr; ///< Tower with LGnoHG error
TH2* mChannelGainHigh = nullptr; ///< Tower with HGnoLG error
TH2* mFecIdMinorAltroError = nullptr; ///< Minor Altro Error per DDL
TH2* mTRUErrorType = nullptr; ///< TRU decoding error type
TH2* mTRUErrorPosition = nullptr; ///< TRU decoding error position

bool mExcludeGainErrorsFromOverview; ///< exclude gain error from global overview panel

Expand Down
75 changes: 39 additions & 36 deletions Modules/EMCAL/src/RawErrorTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "EMCAL/RawErrorTask.h"
#include "EMCALBase/Geometry.h"
#include "EMCALBase/Mapper.h"
#include "EMCALBase/TriggerMappingV2.h"
#include "EMCALReconstruction/AltroDecoder.h"
#include "EMCALReconstruction/CaloRawFitter.h"
#include "EMCALReconstruction/RawDecodingError.h"
Expand All @@ -36,38 +37,18 @@ namespace o2::quality_control_modules::emcal
RawErrorTask::~RawErrorTask()
{
// delete mHistogram;
if (mErrorTypeAltro)
delete mErrorTypeAltro;

if (mErrorTypePage)
delete mErrorTypePage;

if (mErrorTypeMinAltro)
delete mErrorTypeMinAltro;

if (mErrorTypeFit)
delete mErrorTypeFit;

if (mErrorTypeGeometry)
delete mErrorTypeGeometry;

if (mErrorTypeGain)
delete mErrorTypeGain;

if (mErrorTypeUnknown)
delete mErrorTypeUnknown;

if (mErrorGainLow)
delete mErrorGainLow;

if (mErrorGainHigh)
delete mErrorGainHigh;

if (mFecIdMinorAltroError)
delete mFecIdMinorAltroError;

// histo per categoty with details
// histo summary with error per category
delete mErrorTypeAltro;
delete mErrorTypePage;
delete mErrorTypeMinAltro;
delete mErrorTypeFit;
delete mErrorTypeGeometry;
delete mErrorTypeGain;
delete mErrorTypeUnknown;
delete mErrorGainLow;
delete mErrorGainHigh;
delete mFecIdMinorAltroError;
delete mTRUErrorType;
delete mTRUErrorPosition;
}

void RawErrorTask::initialize(o2::framework::InitContext& /*ctx*/)
Expand Down Expand Up @@ -152,13 +133,13 @@ void RawErrorTask::initialize(o2::framework::InitContext& /*ctx*/)
for (int ierror = 0; ierror < o2::emcal::reconstructionerrors::getNumberOfGainErrorCodes(); ierror++) {
mErrorTypeGain->GetYaxis()->SetBinLabel(ierror + 1, o2::emcal::reconstructionerrors::getGainErrorTitle(ierror));
}
mErrorTypeGain->SetStats(0);
mErrorTypeGain->SetStats(false);
getObjectsManager()->startPublishing(mErrorTypeGain);

mErrorGainLow = new TH2F("NoHGPerDDL", "High Gain bunch missing", NFEC, 0, NFEC, NDDL_FEE, 0, NDDL_FEE);
mErrorGainLow->GetYaxis()->SetTitle("fecID");
mErrorGainLow->GetXaxis()->SetTitle("Link");
mErrorGainLow->SetStats(0);
mErrorGainLow->SetStats(false);
getObjectsManager()->startPublishing(mErrorGainLow);

mErrorGainHigh = new TH2F("NoLGPerDDL", "Low Gain bunch missing for saturated High Gain", NFEC, 0, NFEC, NDDL_FEE, 0, NDDL_FEE);
Expand All @@ -176,15 +157,30 @@ void RawErrorTask::initialize(o2::framework::InitContext& /*ctx*/)
mChannelGainLow = new TH2F("ChannelLGnoHG", "Channel with HG bunch missing", 96, -0.5, 95.5, 208, -0.5, 207.5);
mChannelGainLow->GetXaxis()->SetTitle("Column");
mChannelGainLow->GetYaxis()->SetTitle("Row");
mChannelGainLow->SetStats(0);
mChannelGainLow->SetStats(false);
getObjectsManager()->startPublishing(mChannelGainLow);

mChannelGainHigh = new TH2F("ChannelHGnoLG", "Channel with LG bunch missing", 96, -0.5, 95.5, 208, -0.5, 207.5);
mChannelGainHigh->GetXaxis()->SetTitle("Column");
mChannelGainHigh->GetYaxis()->SetTitle("Row");
mChannelGainHigh->SetStats(0);
mChannelGainHigh->SetStats(false);
getObjectsManager()->startPublishing(mChannelGainHigh);

mTRUErrorType = new TH2F("TRUErrorType", "TRU decoding error (type)", NDDL_FEE, 0., NDDL_FEE, o2::emcal::reconstructionerrors::getNumberOfTRUErrorCodes(), 0, o2::emcal::reconstructionerrors::getNumberOfTRUErrorCodes());
mTRUErrorType->GetXaxis()->SetTitle("Link");
mTRUErrorType->GetYaxis()->SetTitle("Error type");
mTRUErrorType->SetStats(false);
for (int ierror = 0; ierror < o2::emcal::reconstructionerrors::getNumberOfTRUErrorCodes(); ierror++) {
mTRUErrorType->GetYaxis()->SetBinLabel(ierror + 1, o2::emcal::reconstructionerrors::getTRUDecodingErrorName(ierror));
}
getObjectsManager()->startPublishing(mTRUErrorType);

mTRUErrorPosition = new TH2F("TRUErrorPosition", "TRU decoding error (position)", NDDL_FEE, 0., NDDL_FEE, o2::emcal::TriggerMappingV2::ALLTRUS, binshift, o2::emcal::TriggerMappingV2::ALLTRUS + binshift);
mTRUErrorPosition->GetXaxis()->SetTitle("Link");
mTRUErrorPosition->GetYaxis()->SetTitle("TRU ID");
mTRUErrorPosition->SetStats(false);
getObjectsManager()->startPublishing(mTRUErrorPosition);

mErrorTypeUnknown = new TH1F("UnknownErrorType", "Unknown error types", NDDL_ALL, 0., NDDL_ALL);
mErrorTypeUnknown->GetXaxis()->SetTitle("Link");
mErrorTypeUnknown->GetYaxis()->SetTitle("Number of errors");
Expand Down Expand Up @@ -292,6 +288,11 @@ void RawErrorTask::monitorData(o2::framework::ProcessingContext& ctx)
auto fecID = error.getSubspecification(); // check: hardware address, or tower id (after markus implementation)
mFecIdMinorAltroError->Fill(feeid, fecID);
}
if (error.getErrorType() == o2::emcal::ErrorTypeFEE::ErrorSource_t::TRU_ERROR) {
auto truID = error.getSubspecification();
mTRUErrorType->Fill(feeid, errorCode);
mTRUErrorPosition->Fill(feeid, truID);
}
} // end for error in errorcont
} // end of loop on raw error data
} // end of monitorData
Expand Down Expand Up @@ -322,6 +323,8 @@ void RawErrorTask::reset()
mErrorGainLow->Reset();
mErrorGainHigh->Reset();
mFecIdMinorAltroError->Reset();
mTRUErrorType->Reset();
mTRUErrorPosition->Reset();
}
std::string RawErrorTask::getConfigValue(const std::string_view key)
{
Expand Down

0 comments on commit 6ab7ac1

Please sign in to comment.