Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76724
b: "refs/heads/CMSSW_7_1_X"
c: 2bc27f5
h: "refs/heads/CMSSW_7_1_X"
v: v3
  • Loading branch information
kvtsang committed Oct 30, 2009
1 parent 6fe42a4 commit 98d9fa5
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 9f18f301896367d4856b4ee96430f58b9c190386
"refs/heads/CMSSW_7_1_X": 2bc27f50c170a199e51921b3f0527af2ec0cda73
20 changes: 10 additions & 10 deletions trunk/DQM/HcalMonitorClient/src/HcalSummaryClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ void HcalSummaryClient::setup(void)
if(dqmStore_->get(rootFolder_+"/EventInfo/HB HE HF Depth 1 Summary Map"))
{
depthME.push_back(dqmStore_->get(rootFolder_+"/EventInfo/HB HE HF Depth 1 Summary Map"));
(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
//(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
//(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
int etabins=depthME[depthME.size()-1]->getNbinsX();
for (int ieta=0;ieta<etabins;++ieta)
{
Expand All @@ -300,8 +300,8 @@ void HcalSummaryClient::setup(void)
if(dqmStore_->get(rootFolder_+"/EventInfo/HB HE HF Depth 2 Summary Map"))
{
depthME.push_back(dqmStore_->get(rootFolder_+"/EventInfo/HB HE HF Depth 2 Summary Map"));
(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
//(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
//(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
int etabins=depthME[depthME.size()-1]->getNbinsX();
for (int ieta=0;ieta<etabins;++ieta)
{
Expand All @@ -313,8 +313,8 @@ void HcalSummaryClient::setup(void)
if(dqmStore_->get(rootFolder_+"/EventInfo/HE Depth 3 Summary Map"))
{
depthME.push_back(dqmStore_->get(rootFolder_+"/EventInfo/HE Depth 3 Summary Map"));
(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
//(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
//(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
int etabins=depthME[depthME.size()-1]->getNbinsX();
for (int ieta=0;ieta<etabins;++ieta)
{
Expand All @@ -325,8 +325,8 @@ void HcalSummaryClient::setup(void)
if(dqmStore_->get(rootFolder_+"/EventInfo/HO Depth 4 Summary Map"))
{
depthME.push_back(dqmStore_->get(rootFolder_+"/EventInfo/HO Depth 4 Summary Map"));
(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
//(depthME[depthME.size()-1]->getTH2F())->SetMaximum(1);
//(depthME[depthME.size()-1]->getTH2F())->SetMinimum(-1);
int etabins=depthME[depthME.size()-1]->getNbinsX();
for (int ieta=0;ieta<etabins;++ieta)
{
Expand All @@ -341,8 +341,8 @@ void HcalSummaryClient::setup(void)
std::cout <<"<HcalSummaryClient::setup> Could not get reportSummaryMap!"<<std::endl;
return;
}
reportMap->getTH2F()->SetMaximum(1);
reportMap->getTH2F()->SetMinimum(-1);
//reportMap->getTH2F()->SetMaximum(1);
//reportMap->getTH2F()->SetMinimum(-1);
for (int i=1;i<=5;++i)
reportMap->setBinContent(i,1,-1);

Expand Down
43 changes: 43 additions & 0 deletions trunk/DQM/HcalMonitorClient/src/HcalTrigPrimClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ HcalTrigPrimClient::HcalTrigPrimClient(){
histo2d["TrigPrimMonitor/Error Flag for ZS run"] = 0;
histo2d["TrigPrimMonitor/EtCorr HBHE"] = 0;
histo2d["TrigPrimMonitor/EtCorr HF"] = 0;
histo2d["TrigPrimMonitor/FGCorr HBHE"] = 0;
histo2d["TrigPrimMonitor/FGCorr HF"] = 0;

// TP Occupancy
histo2d["TrigPrimMonitor/TP Map/TP Occupancy"] = 0;
Expand All @@ -26,6 +28,10 @@ HcalTrigPrimClient::HcalTrigPrimClient(){
histo2d["TrigPrimMonitor/TP Map/Missing Data"] = 0;
histo2d["TrigPrimMonitor/TP Map/Missing Emul"] = 0;

// TP Occupancy for ZS
histo2d["TrigPrimMonitor/TP Map for ZS/Mismatched Et ZS"] = 0;
histo2d["TrigPrimMonitor/TP Map for ZS/Missing Data ZS"] = 0;
histo2d["TrigPrimMonitor/TP Map for ZS/Missing Emul ZS"] = 0;
// Energy Plots
histo1d["TrigPrimMonitor/Energy Plots/HBHE/Energy HBHE - All Data"] = 0;
histo1d["TrigPrimMonitor/Energy Plots/HBHE/Energy HBHE - All Emul"] = 0;
Expand All @@ -42,6 +48,11 @@ HcalTrigPrimClient::HcalTrigPrimClient(){
histo1d["TrigPrimMonitor/Energy Plots/HF/Energy HF - Emul Only"] = 0;
histo1d["TrigPrimMonitor/Energy Plots/HF/Energy HF - Missing Emul"] = 0;
histo1d["TrigPrimMonitor/Energy Plots/HF/Energy HF - Missing Data"] = 0;

histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HBHE - Missing Emul - ZS"] = 0;
histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HBHE - Missing Data - ZS"] = 0;
histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HF - Missing Emul - ZS"] = 0;
histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HF - Missing Data - ZS"] = 0;
}

void HcalTrigPrimClient::init(const ParameterSet& ps, DQMStore* dbe, string clientName)
Expand Down Expand Up @@ -289,6 +300,12 @@ void HcalTrigPrimClient::htmlOutput(int runNo, string htmlDir, string htmlName)
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/EtCorr HBHE"],"data","emul", 10, htmlFile,htmlDir);
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/EtCorr HF"],"data","emul", 10, htmlFile,htmlDir);
htmlFile << "</tr>" << std::endl;

htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/FGCorr HBHE"],"data","emul", 10, htmlFile,htmlDir);
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/FGCorr HF"],"data","emul", 10, htmlFile,htmlDir);
htmlFile << "</tr>" << std::endl;

//----------------------------------------

//------------- TP Occupancy --------------
Expand Down Expand Up @@ -323,6 +340,17 @@ htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/TP Map/Missing Emul"],"ieta","iphi", 10, htmlFile,htmlDir);
htmlFile << "</tr>" << std::endl;

///------------- TP Occupancy ZS--------------
htmlFile << "<tr><td>&nbsp;&nbsp;&nbsp;<h3>TP Map for ZS</h3></td></tr>" << std::endl;

htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/TP Map for ZS/Mismatched Et ZS"],"ieta","iphi", 10, htmlFile,htmlDir);
htmlFile << "</tr>" << std::endl;

htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/TP Map for ZS/Missing Data ZS"],"ieta","iphi", 10, htmlFile,htmlDir);
htmlAnyHisto(runNo,histo2d["TrigPrimMonitor/TP Map for ZS/Missing Emul ZS"],"ieta","iphi", 10, htmlFile,htmlDir);
htmlFile << "</tr>" << std::endl;
//----------------------------------------

//------------- Energy (HBHE) --------------
Expand Down Expand Up @@ -370,6 +398,21 @@ htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo1d["TrigPrimMonitor/Energy Plots/HF/Energy HF - Mismatched FG"],"ieta","iphi", 10, htmlFile,htmlDir,true);
htmlFile << "</tr>" << std::endl;

//----------------------------------------
//
//------------- Energy for ZS--------------
htmlFile << "<tr><td>&nbsp;&nbsp;&nbsp;<h3>Energy Plots for ZS</h3></td></tr>" << std::endl;

htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HBHE - Missing Data - ZS"],"ieta","iphi", 10, htmlFile,htmlDir,true);
htmlAnyHisto(runNo,histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HBHE - Missing Emul - ZS"],"ieta","iphi", 10, htmlFile,htmlDir,true);
htmlFile << "</tr>" << std::endl;

htmlFile << "<tr align=\"left\">" << std::endl;
htmlAnyHisto(runNo,histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HF - Missing Data - ZS"],"ieta","iphi", 10, htmlFile,htmlDir,true);
htmlAnyHisto(runNo,histo1d["TrigPrimMonitor/Energy Plots for ZS/Energy HF - Missing Emul - ZS"],"ieta","iphi", 10, htmlFile,htmlDir,true);
htmlFile << "</tr>" << std::endl;

//----------------------------------------

htmlFile << "</table>" << std::endl;
Expand Down
13 changes: 11 additions & 2 deletions trunk/DQM/HcalMonitorTasks/interface/HcalTrigPrimMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

/** \class HcalTrigPrimMonitor
*
* $Date: 2009/08/24 11:22:14 $
* $Revision: 1.18 $
* $Date: 2009/10/12 15:10:05 $
* $Revision: 1.19 $
* \author W. Fisher - FNAL
*/

Expand Down Expand Up @@ -71,6 +71,7 @@ class HcalTrigPrimMonitor: public HcalBaseMonitor {
MonitorElement* ErrorFlagSummary_;
MonitorElement* ErrorFlagSummaryZS_;
MonitorElement* EtCorr_[2];
MonitorElement* FGCorr_[2];

// TP Occupancy
MonitorElement* TPOccupancy_;
Expand All @@ -86,6 +87,11 @@ class HcalTrigPrimMonitor: public HcalBaseMonitor {
MonitorElement* MissingData_;
MonitorElement* MissingEmul_;

// TP Map for ZS run
MonitorElement* MismatchedEtZS_;
MonitorElement* MissingDataZS_;
MonitorElement* MissingEmulZS_;

// Energy Plots
// 0 - HBHE
// 1 - HF
Expand All @@ -96,6 +102,9 @@ class HcalTrigPrimMonitor: public HcalBaseMonitor {
MonitorElement* EnergyPlotsEmulOnly_[2];
MonitorElement* EnergyPlotsMissingData_[2];
MonitorElement* EnergyPlotsMissingEmul_[2];
// For ZS run
MonitorElement* EnergyPlotsMissingDataZS_[2];
MonitorElement* EnergyPlotsMissingEmulZS_[2];

};
#endif
74 changes: 64 additions & 10 deletions trunk/DQM/HcalMonitorTasks/src/HcalTrigPrimMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ void HcalTrigPrimMonitor::setup(const edm::ParameterSet& ps, DQMStore* dbe){
EtCorr_[0] = m_dbe->book2D(type,type,50,0,256,50,0,256);

type = "EtCorr HF";
EtCorr_[1] = m_dbe->book2D(type,type,50,0,100,50,0,100);
EtCorr_[1] = m_dbe->book2D(type,type,50,0,256,50,0,256);

type = "FGCorr HBHE";
FGCorr_[0] = m_dbe->book2D(type,type,2,0,2,2,0,2);

type = "FGCorr HF";
FGCorr_[1] = m_dbe->book2D(type,type,2,0,2,2,0,2);

//---------------------------------------------

//-------------- TP Occupancy ----------------
Expand Down Expand Up @@ -106,6 +113,17 @@ void HcalTrigPrimMonitor::setup(const edm::ParameterSet& ps, DQMStore* dbe){
MissingEmul_ = m_dbe->book2D(type,type,etaBins_,etaMin_,etaMax_,phiBins_,phiMin_,phiMax_);
//---------------------------------------------

//-------------- TP Occupancy for ZS----------------
m_dbe->setCurrentFolder(baseFolder_ + "/TP Map for ZS");

type = "Mismatched Et ZS";
MismatchedEtZS_ = m_dbe->book2D(type,type,etaBins_,etaMin_,etaMax_,phiBins_,phiMin_,phiMax_);
type = "Missing Data ZS";
MissingDataZS_ = m_dbe->book2D(type,type,etaBins_,etaMin_,etaMax_,phiBins_,phiMin_,phiMax_);
type = "Missing Emul ZS";
MissingEmulZS_ = m_dbe->book2D(type,type,etaBins_,etaMin_,etaMax_,phiBins_,phiMin_,phiMax_);
//---------------------------------------------

//------------ Energy Plots ------------------
// HBHE
m_dbe->setCurrentFolder(baseFolder_ + "/Energy Plots/HBHE");
Expand Down Expand Up @@ -142,6 +160,19 @@ void HcalTrigPrimMonitor::setup(const edm::ParameterSet& ps, DQMStore* dbe){
EnergyPlotsMissingData_[1] = m_dbe->book1D(type, type, 256, 0, 256);
type = "Energy HF - Missing Emul";
EnergyPlotsMissingEmul_[1] = m_dbe->book1D(type, type, 256, 0, 256);

// ZS
m_dbe->setCurrentFolder(baseFolder_ + "/Energy Plots for ZS");

type = "Energy HBHE - Missing Data - ZS";
EnergyPlotsMissingDataZS_[0] = m_dbe->book1D(type, type, 256, 0, 256);
type = "Energy HBHE - Missing Emul - ZS";
EnergyPlotsMissingEmulZS_[0] = m_dbe->book1D(type, type, 256, 0, 256);
type = "Energy HF - Missing Data - ZS";
EnergyPlotsMissingDataZS_[1] = m_dbe->book1D(type, type, 256, 0, 256);
type = "Energy HF - Missing Emul - ZS";
EnergyPlotsMissingEmulZS_[1] = m_dbe->book1D(type, type, 256, 0, 256);

}

return;
Expand All @@ -167,7 +198,7 @@ void HcalTrigPrimMonitor::processEvent(const HBHERecHitCollection& hbHits,

HcalBaseMonitor::processEvent();

buildFrontEndErrMap(rawraw, emap);
//buildFrontEndErrMap(rawraw, emap);
ErrorFlagPerEvent_[0] = 0;
ErrorFlagPerEvent_[1] = 0;
ErrorFlagPerEventZS_[0] = 0;
Expand Down Expand Up @@ -198,14 +229,18 @@ void HcalTrigPrimMonitor::processEvent(const HBHERecHitCollection& hbHits,
EnergyPlotsMissingEmul_[IsHF]->Fill(dataEt);
}
// Check ZS Alarm Threshold
if (dataTPmax > ZSAlarmThreshold_) ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMissingEmul);
if (dataTPmax > ZSAlarmThreshold_) {
ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMissingEmul);
MissingEmulZS_->Fill(ieta, iphi);
EnergyPlotsMissingEmulZS_[IsHF]->Fill(dataTPmax);
}
continue;
}

if (FrontEndErrors.find( data->id().rawId() ) != FrontEndErrors.end()) {
//if (FrontEndErrors.find( data->id().rawId() ) != FrontEndErrors.end()) {
//Front End Format Error
continue;
}
// continue;
//}


for (int i=0; i < data->size(); ++i){
Expand Down Expand Up @@ -233,27 +268,33 @@ void HcalTrigPrimMonitor::processEvent(const HBHERecHitCollection& hbHits,
}

//TODO: Message log Unknown errflag for debug
//if (errflag != kZeroTP) FGCorr_[IsHF]->Fill(dataFG, emulFG);
// Fill histogram for non-zero TPs
switch (errflag){
case kMatched:
MatchedTP_->Fill(ieta, iphi);
EtCorr_[IsHF]->Fill(dataEt, emulEt);
FGCorr_[IsHF]->Fill(dataFG, emulFG);
break;
case kMismatchedEt:
MismatchedEt_->Fill(ieta, iphi);
EtCorr_[IsHF]->Fill(dataEt, emulEt);
FGCorr_[IsHF]->Fill(dataFG, emulFG);
break;
case kMismatchedFG:
MismatchedFG_->Fill(ieta, iphi);
EtCorr_[IsHF]->Fill(dataEt, emulEt);
FGCorr_[IsHF]->Fill(dataFG, emulFG);
EnergyPlotsMismatchedFG_[IsHF]->Fill(dataEt);
break;
case kDataOnly:
DataOnly_->Fill(ieta, iphi);
EnergyPlotsDataOnly_[IsHF]->Fill(dataEt);
break;
case kEmulOnly:
EmulOnly_->Fill(ieta, iphi);
EnergyPlotsEmulOnly_[IsHF]->Fill(emulEt);
break;
default:
break;
}
Expand All @@ -276,17 +317,23 @@ void HcalTrigPrimMonitor::processEvent(const HBHERecHitCollection& hbHits,
int diff = abs(data->sample(i).compressedEt() - emul->sample(i).compressedEt());
if (diff > maxdiff) maxdiff = diff;
}
if (maxdiff > ZSAlarmThreshold_) ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMismatchedEt);
if (maxdiff > ZSAlarmThreshold_) {
ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMismatchedEt);
MismatchedEtZS_->Fill(ieta, iphi);
}
}
else {
int dataEtSOI = data->SOI_compressedEt();
int mindiff = 0;
int mindiff = 1024;
for (int i=data->presamples()-1; i<=data->presamples()+1 && i<emul->size(); ++i){
if (i<0) continue;
int diff = abs(emul->sample(i).compressedEt() - dataEtSOI);
if (diff < mindiff) mindiff = diff;
}
if (mindiff > ZSAlarmThreshold_) ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMismatchedEt);
if (mindiff > ZSAlarmThreshold_) {
ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMismatchedEt);
MismatchedEtZS_->Fill(ieta, iphi);
}
}
}

Expand All @@ -309,19 +356,26 @@ void HcalTrigPrimMonitor::processEvent(const HBHERecHitCollection& hbHits,
if (emulEt > emulTPmax) emulTPmax = emulEt;
EnergyPlotsMissingData_[IsHF]->Fill(emulEt);
}
if (emulTPmax > ZSAlarmThreshold_) ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMissingData);
if (emulTPmax > ZSAlarmThreshold_) {
ErrorFlagPerEventZS_[IsHF] |= (0x1 << kMissingData);
MissingDataZS_->Fill(ieta, iphi);
EnergyPlotsMissingDataZS_[IsHF]->Fill(emulTPmax);
}
}
} //loop emul TP digis

// Fill Summary (Per Event)
for (unsigned int IsHF=0; IsHF<=1; ++IsHF){
// Non ZS run
if (ErrorFlagPerEvent_[IsHF] == 0) {
// 0 - Good = No Error Flag per event
// 1 - Bad
Summary_->Fill(0, IsHF);
ErrorFlagSummary_->Fill(kMatched, IsHF);
}
else Summary_->Fill(1, IsHF);

// ZS run
if (ErrorFlagPerEventZS_[IsHF] == 0) {
SummaryZS_->Fill(0, IsHF);
ErrorFlagSummaryZS_->Fill(kMatched, IsHF);
Expand Down

0 comments on commit 98d9fa5

Please sign in to comment.