// ECABits.cc // Contact person: Gabriel Orebi Gann - Author and contact // Contact person: Javier Caravaca - Contact // See ECABits.hh for more details //———————————————————————// #include #include #include #include #include #include #include #include #include #include #include "TStyle.h" using namespace std; namespace RAT { ECABits::ECABits() { fOverallMask.resize(32); fCellMask.resize(32); } ECABits::~ECABits() { } void ECABits::InitialiseStatusWords(int eca_type) { if(eca_type==0)return; if(eca_type==1){ fOverallMask[0] = "N Channels with 0 events > Max"; fOverallMask[1] = "N Channels with <160 events > Max"; fOverallMask[2] = "N Channels failing board ID > Max"; fOverallMask[3] = "N Channels failing QHS tests > Max"; fOverallMask[4] = "N Channels failing QHL tests > Max"; fOverallMask[5] = "N Channels failing QLX tests > Max"; fOverallMask[6] = "N Channels failing TAC tests > Max"; fOverallMask[7] = "QHS: average pedestal outside required range"; fOverallMask[8] = "QHL: average pedestal outside required range"; fOverallMask[9] = "QLX: average pedestal outside required range"; fOverallMask[10] = "TAC: average pedestal outside required range"; fOverallMask[11] = "QHS: average width outside required range"; fOverallMask[12] = "QHL: average width outside required range"; fOverallMask[13] = "QLX: average width outside required range"; fOverallMask[14] = "TAC: average width outside required range"; fOverallMask[15] = "QHS: average |difference| outside required range"; fOverallMask[16] = "QHL: average |difference| outside required range"; fOverallMask[17] = "QLX: average |difference| outside required range"; fOverallMask[18] = "TAC: average |difference| outside required range"; fOverallMask[19] = "N flagged channels > Max"; fOverallMask[20] = "Too many channels using default fSig value (i.e. less than 4 events)"; fOverallMask[21] = "Spare"; fOverallMask[22] = "Spare"; fOverallMask[23] = "Spare"; fOverallMask[24] = "Spare"; fOverallMask[25] = "Spare"; fOverallMask[26] = "UC bit set"; fOverallMask[27] = "DQID bank not present"; fOverallMask[28] = "DQCH and DQCR banks not present"; fOverallMask[29] = "Previous PDST bank not present"; fOverallMask[30] = "Did not reach end of run"; fOverallMask[31] = "Problem in requested merge with previous run"; fCellMask[0] = "Cell status (OR of bits 1-14,28)"; fCellMask[1] = "QHS median outside required range"; fCellMask[2] = "QHS width outside required range"; fCellMask[3] = "QHS difference from previous outside required range"; fCellMask[4] = "QHL median outside required range"; fCellMask[5] = "QHL width outside required range"; fCellMask[6] = "QHL difference from previous outside required range"; fCellMask[7] = "QLX median outside required range"; fCellMask[8] = "QLX width outside required range"; fCellMask[9] = "QLX difference from previous outside required range"; fCellMask[10] = "TAC median outside required range"; fCellMask[11] = "TAC width outside required range"; fCellMask[12] = "TAC difference from previous outside required range"; fCellMask[13] = "Nev < 10"; fCellMask[14] = "Nev = 0"; fCellMask[15] = "Channel status (OR of bits 16-27,29)"; fCellMask[16] = "MB ID check : DQID entry does not match previous ECA run"; fCellMask[17] = "DB ID check : DQID entry does not match previous ECA run"; fCellMask[18] = "Overall QHS : >=1 cells failed >=1 of the 3 tests"; fCellMask[19] = "Overall QHL : >=1 cells failed >=1 of the 3 tests"; fCellMask[20] = "Overall QLX : >=1 cells failed >=1 of the 3 tests"; fCellMask[21] = "Overall TAC : >=1 cells failed >=1 of the 3 tests"; fCellMask[22] = "Overall median : >=1 cells failed this test for >=1 variable (Q/T)"; fCellMask[23] = "Overall width : >=1 cells failed this test for >=1 variable (Q/T)"; fCellMask[24] = "Overall diff : >=1 cells failed this test for >=1 variable (Q/T)"; fCellMask[25] = "Channel sequencer disabled"; fCellMask[26] = "Channel Nev < 10*16"; fCellMask[27] = "Channel Nev = 0"; fCellMask[28] = "Cell using default fSig value (i.e. less than 4 events)"; fCellMask[29] = "Channel has at least 1 cell Using default fSig value (i.e. less than 4 events)"; fCellMask[30] = "Spare"; fCellMask[31] = "Spare"; } if(eca_type==2){ fOverallMask[0] = "N Channels failing board ID check > Max"; fOverallMask[1] = "N Channels with 0 events > Max"; fOverallMask[2] = "N Channels failing test on N events > Max"; fOverallMask[3] = "N Channels failing width test > Max"; fOverallMask[4] = "N Channels failing test on N TSteps in fit > Max"; fOverallMask[5] = "N Channels failing test on N susp TSteps > Max"; fOverallMask[6] = "N Channels failing Frati TAC jump test > Max (NOT USED)"; fOverallMask[7] = "N Channels failing x^3 coeff tests > Max"; fOverallMask[8] = "N Channels failing x^2 coeff tests > Max"; fOverallMask[9] = "N Channels failing x^1 coeff tests > Max"; fOverallMask[10] = "x^3 coeff: average outside required range"; fOverallMask[11] = "x^2 coeff: average outside required range"; fOverallMask[12] = "x^1 coeff: average outside required range"; fOverallMask[13] = "x^3 coeff: average |difference| outside required range"; fOverallMask[14] = "x^2 coeff: average |difference| outside required range"; fOverallMask[15] = "x^1 coeff: average |difference| outside required range"; fOverallMask[16] = "N flagged channels > Max"; fOverallMask[17] = "N railed TACs > Max"; fOverallMask[18] = "Too many channels with bad first point on TSlope"; fOverallMask[19] = "Too many channels with post-reset behavior not consistent with noise"; fOverallMask[20] = "Spare"; fOverallMask[21] = "Spare"; fOverallMask[22] = "Spare"; fOverallMask[23] = "Spare"; fOverallMask[24] = "Spare"; fOverallMask[25] = "Spare"; fOverallMask[26] = "UC bit set"; fOverallMask[27] = "DQID bank not present"; fOverallMask[28] = "DQCH and DQCR banks not present"; fOverallMask[29] = "Previous PDST bank not present"; fOverallMask[30] = "Did not reach end of run"; fOverallMask[31] = "Problem in requested merge with previous run"; fCellMask[0] = "Cell status (OR of bits 1-12,28,30)"; fCellMask[1] = "Nev = 0 at all TSteps"; fCellMask[2] = "N TSteps used in fit < Min"; fCellMask[3] = "N suspicious TSteps > Max"; fCellMask[4] = "x^3 coeff outside required range"; fCellMask[5] = "x^3 coeff difference from previous outside required range "; fCellMask[6] = "x^2 coeff outside required range"; fCellMask[7] = "x^2 coeff difference from previous outside required range "; fCellMask[8] = "x^1 coeff outside required range"; fCellMask[9] = "x^1 coeff difference from previous outside required range "; fCellMask[10] = "N TSteps failing width test > Max"; fCellMask[11] = "N TSteps with Nev<6 > Max"; fCellMask[12] = "TAC Railed"; fCellMask[13] = "Channel status (OR of bits 14-27,29,31)"; fCellMask[14] = "Channel Nev = 0"; fCellMask[15] = "Channel had >=1 cell with N TSteps used in fit < Min"; fCellMask[16] = "Channel had >=1 cell with N suspicious TSteps > Max"; fCellMask[17] = "Overall x^3 coeff : >=1 cells failed >=1 of the 2 tests"; fCellMask[18] = "Overall x^2 coeff : >=1 cells failed >=1 of the 2 tests"; fCellMask[19] = "Overall x^1 coeff : >=1 cells failed >=1 of the 2 tests"; fCellMask[20] = "Overall range : >=1 cells failed this test for >=1 fit coeff"; fCellMask[21] = "Overall diff : >=1 cells failed this test for >=1 fit coeff"; fCellMask[22] = "Overall width : >=1 cells had N TSteps failing width test > Max"; fCellMask[23] = "Overall Nev : >=1 cells had N TSteps with Nev<6 > Max"; fCellMask[24] = "MB ID check : DQID entry does not match previous ECA run"; fCellMask[25] = "DB ID check : DQID entry does not match previous ECA run"; fCellMask[26] = "Channel sequencer disabled"; fCellMask[27] = "Channel had >=1 cell with railed TAC"; fCellMask[28] = "Cell had bad first point on TSlope"; fCellMask[29] = "Channel had >=1 cell with bad first point on TSlope"; fCellMask[30] = "Cell had post-reset hits not consistent with noise"; fCellMask[31] = "Channel had >=1 cell with post-reset hits not consistent with noise"; } } } // namespace RAT