Skip to content
Snippets Groups Projects
Commit 5815d080 authored by Siarhei Harkusha's avatar Siarhei Harkusha
Browse files

Monitor Tile channels with bad pulse shape

New histograms have been added for online and offline
monitoring of masking on the fly of Tile channels
due to bad pulse shape.
parent f3f53063
No related merge requests found
......@@ -16,6 +16,8 @@
#include "TileMonitoring/TileFatherMonTool.h"
#include <array>
class ITileBadChanTool;
class TileDCSSvc;
class TileBeamInfoProvider;
......@@ -103,6 +105,8 @@ class TileDQFragLWMonTool: public TileFatherMonTool {
TH2I_LW* m_errors[4][64];
TProfile_LW* m_errorsLB[4][64];
std::array<TH2I_LW*, 4> m_badPulseQuality;
std::vector<std::string> m_errorsLabels;
std::vector<std::string> m_partitionsLabels;
std::vector<std::string> m_moduleLabel[NumPart]; // array of module names
......@@ -118,7 +122,7 @@ class TileDQFragLWMonTool: public TileFatherMonTool {
static const int NDMU = 16;
int m_nLumiblocks;
float m_qualityCut;
/*---------------------------------------------------------*/
};
......
......@@ -16,6 +16,8 @@
#include "TileMonitoring/TileFatherMonTool.h"
#include <array>
class ITileBadChanTool;
class TileDCSSvc;
class TileBeamInfoProvider;
......@@ -113,6 +115,7 @@ class TileDQFragMonTool: public TileFatherMonTool {
TProfile* m_hist_error_lb[4][64];
std::array<TH2I*, 4> m_badPulseQuality;
static const int NERROR = 17;
static const int MASKEDERROR = NERROR - 3;
......@@ -122,7 +125,7 @@ class TileDQFragMonTool: public TileFatherMonTool {
static const int NDMU = 16;
int m_nLumiblocks;
float m_qualityCut;
/*---------------------------------------------------------*/
};
......
......@@ -46,8 +46,10 @@ TileDQFragLWMonTool::TileDQFragLWMonTool(const std::string & type, const std::st
, m_badChannelNeg2DNotMasked{}
, m_errors{{}}
, m_errorsLB{{}}
, m_badPulseQuality{nullptr}
, m_isFirstEvent(true)
, m_nLumiblocks(3000)
, m_qualityCut(254.0)
/*---------------------------------------------------------*/
{
declareInterface<IMonitorToolBase>(this);
......@@ -65,6 +67,7 @@ TileDQFragLWMonTool::TileDQFragLWMonTool(const std::string & type, const std::st
declareProperty("CheckDCS", m_checkDCS = false);
declareProperty("TileBadChanTool", m_tileBadChanTool);
declareProperty("NumberOfLumiblocks", m_nLumiblocks = 3000);
declareProperty("QualityCut", m_qualityCut = 254.0);
m_path = "/Tile/DMUErrors";
// starting up the label variable....
......@@ -223,6 +226,14 @@ void TileDQFragLWMonTool::bookFirstEventHistograms() {
"# Not Masked Negative Amp in " + m_PartNames[p], 64, 0.5, 64.5, 48, -0.5, 47.5);
SetBinLabel(m_badChannelNeg2DNotMasked[p]->GetXaxis(), m_moduleLabel[p]);
SetBinLabel(m_badChannelNeg2DNotMasked[p]->GetYaxis(), m_cellchLabel[p]);
m_badPulseQuality[p] = book2ILW(badDrawersDir, "TileBadPulseQuality" + m_PartNames[p],
"Run " + runNumStr + ": " + m_PartNames[p] +
" Bad pulse shape or #chi^{2} from Optimal filtering algorithm",
64, 0.5, 64.5, 48, -0.5, 47.5);
SetBinLabel(m_badPulseQuality[p]->GetXaxis(), m_moduleLabel[p]);
SetBinLabel(m_badPulseQuality[p]->GetYaxis(), m_cellchLabel[p]);
}
} else {
......@@ -399,6 +410,17 @@ void TileDQFragLWMonTool::fillBadDrawer() {
int channel = m_tileHWID->channel(adcId);
int gain = m_tileHWID->adc(adcId);
float pedestal = rawChannel->pedestal(); // errors are saved in ped as 100000 + 10000*error
float quality = rawChannel->quality(); //
if ((pedestal > 80000. || quality > m_qualityCut)
&& !(m_tileBadChanTool->getAdcStatus(adcId).isBad()
|| m_tileDCSSvc->statusIsBad(ROS, drawer, channel))) {
m_badPulseQuality[partition]->Fill(module, channel);
}
if (findChannelErrors(rawChannel, gain) > 0) {
++nBadCh[gain];
......@@ -407,8 +429,7 @@ void TileDQFragLWMonTool::fillBadDrawer() {
++nBadChNM[gain];
m_badChannelNeg2DNotMasked[partition]->Fill(module, channel);
float ped = rawChannel->pedestal(); // errors are saved in ped as 100000 + 10000*error
if (ped > 100000. && digitsContainer) {
if (pedestal > 100000. && digitsContainer) {
while (((*digitsCollectionIt)->identify() != fragId) && (digitsCollectionIt != lastDigitsCollectionIt)) {
++digitsCollectionIt;
}
......@@ -435,7 +456,7 @@ void TileDQFragLWMonTool::fillBadDrawer() {
msg(MSG::INFO) << vdigits[i] << " ";
}
msg(MSG::INFO) << " error = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
msg(MSG::INFO) << " error = " << TileRawChannelBuilder::BadPatternName(pedestal) << endmsg;
}
}
}
......
......@@ -54,7 +54,9 @@ TileDQFragMonTool::TileDQFragMonTool(const std::string & type, const std::string
, m_hist_BadChannelJump2D_nonmask{}
, m_hist_BadChannelNeg2D_nonmask{}
, m_hist_error_lb{}
, m_badPulseQuality{nullptr}
, m_nLumiblocks(3000)
, m_qualityCut(254.0)
/*---------------------------------------------------------*/
{
declareInterface<IMonitorToolBase>(this);
......@@ -74,6 +76,7 @@ TileDQFragMonTool::TileDQFragMonTool(const std::string & type, const std::string
declareProperty("CheckDCS",m_checkDCS = false);
declareProperty("TileBadChanTool" , m_tileBadChanTool);
declareProperty("NumberOfLumiblocks", m_nLumiblocks = 3000);
declareProperty("QualityCut", m_qualityCut = 254.0);
m_path = "/Tile/DMUErrors";
// starting up the label variable....
......@@ -304,6 +307,14 @@ void TileDQFragMonTool::bookFirstHist( )
"# Not Masked Negative Amp in " + m_PartNames[p], 64, 0.5, 64.5, 48, -0.5, 47.5);
SetBinLabel(m_hist_BadChannelNeg2D_nonmask[p]->GetXaxis(), m_moduleLabel[p]);
SetBinLabel(m_hist_BadChannelNeg2D_nonmask[p]->GetYaxis(), m_cellchLabel[p]);
m_badPulseQuality[p] = book2I(badDrawersDir, "TileBadPulseQuality" + m_PartNames[p],
"Run " + runNumStr + ": " + m_PartNames[p] +
" Bad pulse shape or #chi^{2} from Optimal filtering algorithm",
64, 0.5, 64.5, 48, -0.5, 47.5);
SetBinLabel(m_badPulseQuality[p]->GetXaxis(), m_moduleLabel[p]);
SetBinLabel(m_badPulseQuality[p]->GetYaxis(), m_cellchLabel[p]);
}
} else {
......@@ -533,6 +544,17 @@ void TileDQFragMonTool::fillBadDrawer() {
int channel = m_tileHWID->channel(adcId);
int gain = m_tileHWID->adc(adcId);
float pedestal = rawChannel->pedestal(); // errors are saved in ped as 100000 + 10000*error
float quality = rawChannel->quality(); //
if ((pedestal > 80000. || quality > m_qualityCut)
&& !(m_tileBadChanTool->getAdcStatus(adcId).isBad()
|| m_tileDCSSvc->statusIsBad(ROS, drawer, channel))) {
m_badPulseQuality[partition]->Fill(module, channel);
}
if (findChannelErrors(rawChannel, gain) > 0) {
++nBadCh[gain];
......@@ -541,8 +563,7 @@ void TileDQFragMonTool::fillBadDrawer() {
++nBadChNM[gain];
m_hist_BadChannelNeg2D_nonmask[partition]->Fill(module, channel);
float ped = rawChannel->pedestal(); // errors are saved in ped as 100000 + 10000*error
if (ped > 100000. && DigCnt) {
if (pedestal > 100000. && DigCnt) {
while (((*DigCollItr)->identify() != fragId) && (DigCollItr != lastDigColl)) {
++DigCollItr;
}
......@@ -569,7 +590,7 @@ void TileDQFragMonTool::fillBadDrawer() {
msg(MSG::INFO) << vdigits[i] << " ";
}
msg(MSG::INFO) << " error = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
msg(MSG::INFO) << " error = " << TileRawChannelBuilder::BadPatternName(pedestal) << endmsg;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment