Skip to content

Commit

Permalink
Merge pull request #9749 from barvic/cscdqm_run2_histos_patch_75X
Browse files Browse the repository at this point in the history
CSC DQM Run2 histograms adjustments and fixes for CMSSW_7_5_X
  • Loading branch information
cmsbuild committed Jun 25, 2015
2 parents ea41bc9 + a7a508e commit 379b435
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 29 deletions.
50 changes: 37 additions & 13 deletions DQM/CSCMonitorModule/data/emuDQMBooking.xml
Expand Up @@ -740,6 +740,30 @@
<YMin>0</YMin>
<Name>All_DDUs_Format_Errors</Name>
</Histogram>
<Histogram>
<Prefix>EMU</Prefix>
<SetGridx>1</SetGridx>
<SetGridy>1</SetGridy>
<SetLabelSizeX>0.03</SetLabelSizeX>
<SetLabelSizeY>0.04</SetLabelSizeY>
<SetLabelSizeZ>0.02</SetLabelSizeZ>
<SetLeftMargin>0.3</SetLeftMargin>
<SetNdivisionsX>40</SetNdivisionsX>
<SetOption>colz</SetOption>
<SetOptStat>e</SetOptStat>
<SetStats>0</SetStats>
<SetYLabels>1='No Errors'|2='Any errors'|3='DCC Link is Not ready: 01'|4='GbE/SPY FIFO is Not Empty: 02'|5='GbE/SPY Path was Not Enabled: 03'|6='GbE/SPY FIFO is Full: 04'|7='Not Ready is set by DDU S-Link: 05'|8='Link Full (LFF) is set by DDU S-Link: 06'|9='DAQ Wait is set by DCC/S-Link: 07'|10='DDU Buffer Overflow caused by DAQ Wait: 08'|11='GbE/SPY Fiber Connection Error: 09'|12='GbE/SPY FIFO Always Empty: 10'|13='GbE/SPY Event skipped to prevent overflow: 11'|14='GbE/SPY FIFO Overflow occured: 12'|15='DDU S-Link Never Ready: 13'|16='Link Full (LFF) was asserted by S-Link: 14'|17='DAQWait was asserted by S-Link or DCC: 15'|18='DDU Output-Limited Buffer Overflow: 16'|</SetYLabels>
<Title>DDU Output Path Status</Title>
<Type>h2</Type>
<XBins>36</XBins>
<XMax>37</XMax>
<XMin>1</XMin>
<XTitle>DDU IDs</XTitle>
<YBins>18</YBins>
<YMax>18</YMax>
<YMin>0</YMin>
<Name>All_DDUs_Output_Path_Status</Name>
</Histogram>
<Histogram>
<Prefix>EMU</Prefix>
<SetLabelSizeX>0.03</SetLabelSizeX>
Expand Down Expand Up @@ -839,7 +863,7 @@
<SetOption>textcolz</SetOption>
<SetOptStat>e</SetOptStat>
<SetStats>0</SetStats>
<SetYLabels>1='1'|2='2'|3='3'|4='4'|5='5'|6='6'|7='7'|8='8'|9='9'|10='10'|11='11'|12='12'|13='13'|14='14'|15='15</SetYLabels>
<SetYLabels>1='1'|2='2'|3='3'|4='4'|5='5'|6='6'|7='7'|8='8'|9='9'|10='10'|11='11'|12='12'|13='13'|14='14'|15='15|</SetYLabels>
<Title>DDU Inputs with data (DAV)</Title>
<Type>h2</Type>
<XBins>36</XBins>
Expand Down Expand Up @@ -982,9 +1006,9 @@
<SetOptStat>emruo</SetOptStat>
<Title>Plus Endcap CLCT0 BXN - CLCT_L1A BXN difference</Title>
<Type>h1</Type>
<XBins>30</XBins>
<XBins>60</XBins>
<XMax>-140</XMax>
<XMin>-170</XMin>
<XMin>-200</XMin>
<XTitle>CLCT0 BXN - CLCT_L1A BXN</XTitle>
<YTitle>Number of events</YTitle>
<Name>Plus_endcap_CLCT0_dTime</Name>
Expand All @@ -996,9 +1020,9 @@
<SetOptStat>emruo</SetOptStat>
<Title>Minus Endcap CLCT0 BXN - CLCT_L1A BXN difference</Title>
<Type>h1</Type>
<XBins>30</XBins>
<XBins>60</XBins>
<XMax>-140</XMax>
<XMin>-170</XMin>
<XMin>-200</XMin>
<XTitle>CLCT0 BXN - CLCT_L1A BXN</XTitle>
<YTitle>Number of events</YTitle>
<Name>Minus_endcap_CLCT0_dTime</Name>
Expand Down Expand Up @@ -2029,9 +2053,9 @@
<XMax>224</XMax>
<XMin>0</XMin>
<XTitle>Key Half Strip</XTitle>
<YBins>30</YBins>
<YBins>60</YBins>
<YMax>-140</YMax>
<YMin>-170</YMin>
<YMin>-200</YMin>
<YTitle>Average (CLCT%d BXN - L1A BXN)</YTitle>
<Name from="0" to="1">CLCT%d_dTime_Profile</Name>
</Histogram>
Expand Down Expand Up @@ -2583,9 +2607,9 @@
<SetOptStat>emuo</SetOptStat>
<Title>CLCT%d BXN - TMB_L1A BXN Difference</Title>
<Type>h1</Type>
<XBins>30</XBins>
<XBins>60</XBins>
<XMax>-140</XMax>
<XMin>-170</XMin>
<XMin>-200</XMin>
<XTitle>CLCT%d BXN - TMB_L1A BXN</XTitle>
<YTitle>Number of events</YTitle>
<Name from="0" to="1">CLCT%d_dTime</Name>
Expand All @@ -2601,9 +2625,9 @@
<XMax>224</XMax>
<XMin>0</XMin>
<XTitle>Key DiStrip</XTitle>
<YBins>30</YBins>
<YBins>60</YBins>
<YMax>-140</YMax>
<YMin>-170</YMin>
<YMin>-200</YMin>
<YTitle>CLCT%d BXN - TMB_L1A BXN</YTitle>
<Name from="0" to="1">CLCT%d_dTime_vs_DiStrip</Name>
</Histogram>
Expand All @@ -2618,9 +2642,9 @@
<XMax>224</XMax>
<XMin>0</XMin>
<XTitle>Key Half Strip</XTitle>
<YBins>30</YBins>
<YBins>60</YBins>
<YMax>-140</YMax>
<YMin>-170</YMin>
<YMin>-200</YMin>
<YTitle>CLCT%d BXN - TMB_L1A BXN</YTitle>
<Name from="0" to="1">CLCT%d_dTime_vs_Half_Strip</Name>
</Histogram>
Expand Down
2 changes: 2 additions & 0 deletions DQM/CSCMonitorModule/plugins/CSCDQM_Collection.cc
Expand Up @@ -532,13 +532,15 @@ namespace cscdqm {
if(checkHistoValue(p, "SetXLabels", s)) {
std::map<int, std::string> labels;
ParseAxisLabels(s, labels);
th->GetXaxis()->SetNoAlphanumeric(); // For ROOT6 to prevent getting zero means values
for (std::map<int, std::string>::iterator l_itr = labels.begin(); l_itr != labels.end(); ++l_itr) {
th->GetXaxis()->SetBinLabel(l_itr->first, l_itr->second.c_str());
}
}
if(checkHistoValue(p, "SetYLabels", s)) {
std::map<int, std::string> labels;
ParseAxisLabels(s, labels);
th->GetYaxis()->SetNoAlphanumeric(); // For ROOT6 to prevent getting zero means values
for (std::map<int, std::string>::iterator l_itr = labels.begin(); l_itr != labels.end(); ++l_itr) {
th->GetYaxis()->SetBinLabel(l_itr->first, l_itr->second.c_str());
}
Expand Down
35 changes: 31 additions & 4 deletions DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processCSC.cc
Expand Up @@ -449,7 +449,7 @@ namespace cscdqm {
if (getCSCHisto(h::CSC_ALCT_DMB_BXN_DIFF, crateID, dmbID, mo)) {
int alct_dmb_bxn_diff = (int)(alctHeader->BXNCount()-dmbHeader->bxn12());
if (alct_dmb_bxn_diff > 0) alct_dmb_bxn_diff -= 3564;
alct_dmb_bxn_diff %= 64;
alct_dmb_bxn_diff %= 32;
mo->Fill(alct_dmb_bxn_diff);
mo->SetAxisRange(0.1, 1.1 * (1.0 + mo->GetBinContent(mo->GetMaximumBin())), "Y");
}
Expand Down Expand Up @@ -506,6 +506,17 @@ namespace cscdqm {
alct_dtime = (int) (alctsDatas[lct].getBX() - (alctHeader->BXNCount()&0x1F));
}

// == Those two summary histos need to be outside of per-chamber CSC_ALCTXX_DTIME histo check.
// Otherwise will be empty in Offline DQM
if (lct == 0) {
if (cid.endcap() == 1) {
if (mo_CSC_Plus_endcap_ALCT0_dTime) mo_CSC_Plus_endcap_ALCT0_dTime->Fill(alct_dtime);
}
if (cid.endcap() == 2) {
if (mo_CSC_Minus_endcap_ALCT0_dTime) mo_CSC_Minus_endcap_ALCT0_dTime->Fill(alct_dtime);
}
}

if (getCSCHisto(h::CSC_ALCTXX_DTIME, crateID, dmbID, lct, mo)) {

if(alct_dtime < -16) {
Expand All @@ -522,21 +533,23 @@ namespace cscdqm {

// == For ALCT0 Fill Summary dTime Histograms
if (lct == 0) {
/* -- Moved outside of CSC histo check
if (cid.endcap() == 1) {
if (mo_CSC_Plus_endcap_ALCT0_dTime) mo_CSC_Plus_endcap_ALCT0_dTime->Fill(alct_dtime);
}
if (cid.endcap() == 2) {
if (mo_CSC_Minus_endcap_ALCT0_dTime) mo_CSC_Minus_endcap_ALCT0_dTime->Fill(alct_dtime);
}
*/
if (cscPosition && mo_CSC_ALCT0_BXN_mean) {
mo_CSC_ALCT0_BXN_mean->SetBinContent(cscPosition, cscType + 1, dTime_mean);
}
if (cscPosition && mo_CSC_ALCT0_BXN_rms) {
mo_CSC_ALCT0_BXN_rms->SetBinContent(cscPosition, cscType + 1, dTime_rms);
}
}

}


if (getCSCHisto(h::CSC_ALCTXX_DTIME_VS_KEYWG, crateID, dmbID, lct, mo)) {
if(alct_dtime < -16) {
Expand Down Expand Up @@ -949,9 +962,20 @@ namespace cscdqm {
clct_dtime -= 3564;
}

int dTime = clct_dtime;

if (lct == 0) {
if (cid.endcap() == 1) {
if (mo_CSC_Plus_endcap_CLCT0_dTime) mo_CSC_Plus_endcap_CLCT0_dTime->Fill(dTime);
}
if (cid.endcap() == 2) {
if (mo_CSC_Minus_endcap_CLCT0_dTime) mo_CSC_Minus_endcap_CLCT0_dTime->Fill(dTime);
}
}

if (getCSCHisto(h::CSC_CLCTXX_DTIME, crateID, dmbID, lct, mo)) {
int dTime = clct_dtime;
/*
int dTime = clct_dtime;
if (clct_dtime < -16) {
dTime = clct_dtime + 32;
} else {
Expand All @@ -967,12 +991,14 @@ namespace cscdqm {

// == For CLCT0 Fill Summary dTime Histograms
if (lct == 0) {
/* -- Moved
if (cid.endcap() == 1) {
if (mo_CSC_Plus_endcap_CLCT0_dTime) mo_CSC_Plus_endcap_CLCT0_dTime->Fill(dTime);
}
if (cid.endcap() == 2) {
if (mo_CSC_Minus_endcap_CLCT0_dTime) mo_CSC_Minus_endcap_CLCT0_dTime->Fill(dTime);
}
*/
if (cscPosition && mo_CSC_CLCT0_BXN_mean) {
mo_CSC_CLCT0_BXN_mean->SetBinContent(cscPosition, cscType + 1, dTime_mean);
}
Expand Down Expand Up @@ -1057,8 +1083,9 @@ namespace cscdqm {
mo->Fill((int)(clctsDatas[lct].getQuality()));
if (lct == 0) {
MonitorObject* mo1 = 0;
if (cscPosition && getEMUHisto(h::EMU_CSC_CLCT0_QUALITY, mo1))
if (cscPosition && getEMUHisto(h::EMU_CSC_CLCT0_QUALITY, mo1)) {
mo1->SetBinContent(cscPosition, cscType + 1, mo->getTH1()->GetMean());
}
}
}

Expand Down
28 changes: 25 additions & 3 deletions DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processDDU.cc
Expand Up @@ -42,9 +42,10 @@ void EventProcessor::processDDU(const CSCDDUEventData& dduData, const CSCDCCExam
{
// dduID -= (FEDNumbering::MINCSCDDUFEDID - 1); /// TODO: Can require DDU-RUI remapping for actual system
dduID = cscdqm::Utility::getRUIfromDDUId(dduHeader.source_id());
if (dduID < 0) {
LOG_WARN << "DDU source ID (" << dduHeader.source_id() << ") is out of valid range. Remapping to DDU ID 1.";
dduID = 1;
if (dduID < 0)
{
LOG_WARN << "DDU source ID (" << dduHeader.source_id() << ") is out of valid range. Remapping to DDU ID 1.";
dduID = 1;
}
}
else
Expand Down Expand Up @@ -334,6 +335,27 @@ void EventProcessor::processDDU(const CSCDDUEventData& dduData, const CSCDCCExam
if (getDDUHisto(h::DDU_TRAILER_ERRORSTAT_TABLE, dduID, mo)) mo->SetEntries(config->getNEvents());
if (getDDUHisto(h::DDU_TRAILER_ERRORSTAT_FREQUENCY, dduID, mo)) mo->SetEntries(config->getNEvents());

///** Check DDU Output Path status in DDU Header
uint32_t ddu_output_path_status = dduHeader.output_path_status();
if (getEMUHisto(h::EMU_ALL_DDUS_OUTPUT_PATH_STATUS, mo))
{
if (ddu_output_path_status)
{
mo->Fill(dduID,1); // Any Error
for (int i=0; i<16; i++)
{
if ((ddu_output_path_status>>i) & 0x1)
{
mo->Fill(dduID,i+2); // Fill Summary Histo
}
}
}
else
{
mo->Fill(dduID,0); // No Errors
}
}


uint32_t nCSCs = 0;

Expand Down
7 changes: 5 additions & 2 deletions DQM/CSCMonitorModule/plugins/CSCDQM_HistoNames.h
Expand Up @@ -420,7 +420,9 @@ namespace h {
HIST_ID(EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA_FRACT) \
HIST_ID(EMU_FED_DDU_L1A_MISMATCH_CNT) \
HIST_ID(EMU_FED_DDU_L1A_MISMATCH_WITH_CSC_DATA_CNT) \
HIST_ID(EMU_FED_STATS)
HIST_ID(EMU_FED_STATS) \
HIST_ID(EMU_ALL_DDUS_OUTPUT_PATH_STATUS)


#define HIST_NAME_TABLE \
HIST_NAME("Actual_DMB_CFEB_DAV_Frequency") \
Expand Down Expand Up @@ -811,7 +813,8 @@ namespace h {
HIST_NAME("FED_DDU_L1A_mismatch_with_CSC_data_fract") \
HIST_NAME("FED_DDU_L1A_mismatch_cnt") \
HIST_NAME("FED_DDU_L1A_mismatch_with_CSC_data_cnt") \
HIST_NAME("FED_Stats")
HIST_NAME("FED_Stats") \
HIST_NAME("All_DDUs_Output_Path_Status")

#define HIST_ID(a) a,
enum HistoId {
Expand Down
11 changes: 10 additions & 1 deletion DQM/CSCMonitorModule/python/csc_dqm_sourceclient_cfi.py
Expand Up @@ -47,8 +47,17 @@
MO_FILTER = cms.untracked.vstring(
'+/^.*$/',
'-/All_Readout_Errors/',
'-/FEDBufferSize/',
'-/FEDEntries/',
'-/FEDFatal/',
'-/FED_Stats/',
'-/FEDNonFatal/',
'-/FEDFormatFatal/',
'-/FEDFormat_Errors/',
'-/FED_DDU_L1A_.*$/',
'-/^FED_[0-9]+/',
'-/^DMB_.*$/',
'-/DDU_[0-9]+/',
'+/DDU_[0-9]+/',
'-/CSC_[0-9]+_[0-9]+/',
'+/CSC_[0-9]+_[0-9]+\/BinCheck_ErrorStat_Table/',
'+/CSC_[0-9]+_[0-9]+\/BinCheck_DataFlow_Problems_Table/',
Expand Down
12 changes: 6 additions & 6 deletions DQMOffline/Muon/src/CSCOfflineMonitor.cc
Expand Up @@ -57,7 +57,7 @@ void CSCOfflineMonitor::bookHistograms(DQMStore::IBooker & ibooker,
// wire digis
ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Digis");

hWirenGroupsTotal = ibooker.book1D("hWirenGroupsTotal","Fired Wires per Event; # Wiregroups Fired",100,-0.5,99.5);
hWirenGroupsTotal = ibooker.book1D("hWirenGroupsTotal","Fired Wires per Event; # Wiregroups Fired",200,-0.5,199.5);
hWireTBin.push_back(ibooker.book1D("hWireTBin_m42","Wire TBin Fired (ME -4/2); Time Bin (25ns)",17,-0.5,16.5));
hWireTBin.push_back(ibooker.book1D("hWireTBin_m41","Wire TBin Fired (ME -4/1); Time Bin (25ns)",17,-0.5,16.5));
hWireTBin.push_back(ibooker.book1D("hWireTBin_m32","Wire TBin Fired (ME -3/2); Time Bin (25ns)",17,-0.5,16.5));
Expand Down Expand Up @@ -100,7 +100,7 @@ void CSCOfflineMonitor::bookHistograms(DQMStore::IBooker & ibooker,
hWireNumber.push_back(ibooker.book1D("hWireNumber_p42","Wiregroup Number Fired (ME +4/2); Wiregroup #",113,-0.5,112.5));

// strip digis
hStripNFired = ibooker.book1D("hStripNFired","Fired Strips per Event; # Strips Fired (above 13 ADC)",200,-0.5,199.5);
hStripNFired = ibooker.book1D("hStripNFired","Fired Strips per Event; # Strips Fired (above 13 ADC)",300,-0.5,299.5);
hStripNumber.push_back(ibooker.book1D("hStripNumber_m42","Strip Number Fired (ME -4/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
hStripNumber.push_back(ibooker.book1D("hStripNumber_m41","Strip Number Fired (ME -4/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
hStripNumber.push_back(ibooker.book1D("hStripNumber_m32","Strip Number Fired (ME -3/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
Expand Down Expand Up @@ -149,7 +149,7 @@ void CSCOfflineMonitor::bookHistograms(DQMStore::IBooker & ibooker,
// rechits
ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/recHits");

hRHnrechits = ibooker.book1D("hRHnrechits","recHits per Event (all chambers); # of RecHits",100,-0.50,99.5);
hRHnrechits = ibooker.book1D("hRHnrechits","recHits per Event (all chambers); # of RecHits",200,-0.50,199.5);
hRHGlobal.push_back(ibooker.book2D("hRHGlobalp1","recHit global X,Y station +1; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
hRHGlobal.push_back(ibooker.book2D("hRHGlobalp2","recHit global X,Y station +2; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
hRHGlobal.push_back(ibooker.book2D("hRHGlobalp3","recHit global X,Y station +3; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
Expand Down Expand Up @@ -282,7 +282,7 @@ void CSCOfflineMonitor::bookHistograms(DQMStore::IBooker & ibooker,
// segments
ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Segments");

hSnSegments = ibooker.book1D("hSnSegments","Number of Segments per Event; # of Segments",21,-0.5,20.5);
hSnSegments = ibooker.book1D("hSnSegments","Number of Segments per Event; # of Segments",26,-0.5,25.5);
hSnhitsAll = ibooker.book1D("hSnhits","N hits on Segments; # of hits",8,-0.5,7.5);
hSnhits.push_back(ibooker.book1D("hSnhitsm42","# of hits on Segments (ME -4/2); # of hits",8,-0.5,7.5));
hSnhits.push_back(ibooker.book1D("hSnhitsm41","# of hits on Segments (ME -4/1); # of hits",8,-0.5,7.5));
Expand Down Expand Up @@ -427,9 +427,9 @@ void CSCOfflineMonitor::bookHistograms(DQMStore::IBooker & ibooker,
hALCTMatch2Denominator = ibooker.book2D("hALCTMatch2Denominator","Number of ALCT-CLCT matches checked",36,0.5,36.5,20,0.5,20.5);
// hALCTMatch2DMeans->setAxisTitle("Chamber #");
hALCTMatch2Denominator->setAxisTitle("Chamber #");
hCLCTL1A = ibooker.book1D("hCLCTL1A","L1A - CLCTpreTrigger at TMB [BX]",10,149.5,159.5);
hCLCTL1A = ibooker.book1D("hCLCTL1A","L1A - CLCTpreTrigger at TMB [BX]",40,149.5,189.5);
// hCLCTL1AChamberMeans = ibooker.book1D("hCLCTL1AChamberMeans","Chamber Mean L1A - CLCTpreTrigger at TMB [BX]",90,150,159);
hCLCTL1ASerial = ibooker.book2D("hCLCTL1ASerial","L1A - CLCTpreTrigger at TMB [BX]",601,-0.5,600.5,10,149.5,159.5);
hCLCTL1ASerial = ibooker.book2D("hCLCTL1ASerial","L1A - CLCTpreTrigger at TMB [BX]",601,-0.5,600.5,40,149.5,189.5);
hCLCTL1ASerial->setAxisTitle("Chamber Serial Number");
hCLCTL1A2DNumerator = ibooker.book2D("hCLCTL1A2DNumerator","L1A - CLCTpreTrigger at TMB [BX] (sum)",36,0.5,36.5,20,0.5,20.5);
// hCLCTL1A2DMeans = ibooker.book2D("hCLCTL1A2DMeans","L1A - CLCTpreTrigger at TMB [BX]",36,0.5,36.5,20,0.5,20.5);
Expand Down

0 comments on commit 379b435

Please sign in to comment.