CMS 3D CMS Logo

L1TGCTClient.cc

Go to the documentation of this file.
00001 #include "DQM/L1TMonitorClient/interface/L1TGCTClient.h"
00002 
00003 #include "FWCore/ServiceRegistry/interface/Service.h"
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 #include "FWCore/Framework/interface/ESHandle.h"
00006 #include "FWCore/Framework/interface/EventSetup.h"
00007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00008 #include "DQMServices/Core/interface/QReport.h"
00009 #include "DQMServices/Core/interface/DQMStore.h"
00010 #include "DQMServices/Core/interface/MonitorElement.h"
00011 
00012 using namespace edm;
00013 using namespace std;
00014 
00015 // Define statics for bins etc.
00016 const unsigned int ETABINS = 22;
00017 const float ETAMIN = -0.5;
00018 const float ETAMAX = 21.5;
00019 
00020 const unsigned int PHIBINS = 18;
00021 const float PHIMIN = -0.5;
00022 const float PHIMAX = 17.5;
00023 
00024 L1TGCTClient::L1TGCTClient(const edm::ParameterSet& ps):
00025   monitorDir_(ps.getUntrackedParameter<string>("monitorDir","")),
00026   counterLS_(0), 
00027   counterEvt_(0), 
00028   prescaleLS_(ps.getUntrackedParameter<int>("prescaleLS", -1)),
00029   prescaleEvt_(ps.getUntrackedParameter<int>("prescaleEvt", -1))
00030 {
00031 }
00032 
00033 L1TGCTClient::~L1TGCTClient(){}
00034 
00035 void L1TGCTClient::beginJob(const EventSetup& context)
00036 {
00037   // Get backendinterface  
00038   dbe_ = Service<DQMStore>().operator->();
00039 
00040   // Set to directory with ME in
00041   dbe_->setCurrentFolder(monitorDir_);
00042   
00043   l1GctIsoEmHotChannelEtaMap_     = dbe_->book1D("IsoEmHotChannelEtaMap","ISO EM HOT ETA CHANNELS",
00044                                                 ETABINS, ETAMIN, ETAMAX);
00045   l1GctIsoEmHotChannelPhiMap_     = dbe_->book1D("IsoEmHotChannelPhiMap","ISO EM HOT PHI CHANNELS",
00046                                                  PHIBINS, PHIMIN, PHIMAX);                  
00047   l1GctIsoEmDeadChannelEtaMap_    = dbe_->book1D("IsoEmDeadChannelEtaMap","ISO EM DEAD ETA CHANNELS",
00048                                                  ETABINS, ETAMIN, ETAMAX);
00049   l1GctIsoEmDeadChannelPhiMap_    = dbe_->book1D("IsoEmDeadChannelPhiMap","ISO EM DEAD PHI CHANNELS",
00050                                                  PHIBINS, PHIMIN, PHIMAX);                  
00051   l1GctNonIsoEmHotChannelEtaMap_  = dbe_->book1D("NonIsoEmHotChannelEtaMap","NON-ISO EM HOT ETA CHANNELS",
00052                                                  ETABINS, ETAMIN, ETAMAX);
00053   l1GctNonIsoEmHotChannelPhiMap_  = dbe_->book1D("NonIsoEmHotChannelPhiMap","NON-ISO EM HOT PHI CHANNELS",
00054                                                  PHIBINS, PHIMIN, PHIMAX);                  
00055   l1GctNonIsoEmDeadChannelEtaMap_ = dbe_->book1D("NonIsoEmDeadChannelEtaMap","NON-ISO EM DEAD ETA CHANNELS",
00056                                                  ETABINS, ETAMIN, ETAMAX);
00057   l1GctNonIsoEmDeadChannelPhiMap_ = dbe_->book1D("NonIsoEmDeadChannelPhiMap","NON-ISO EM DEAD PHI CHANNELS",
00058                                                  PHIBINS, PHIMIN, PHIMAX);                  
00059   l1GctForJetsHotChannelEtaMap_   = dbe_->book1D("ForJetsHotChannelEtaMap","FOR JETS HOT ETA CHANNELS",
00060                                                  ETABINS, ETAMIN, ETAMAX);
00061   l1GctForJetsHotChannelPhiMap_   = dbe_->book1D("ForJetsHotChannelPhiMap","FOR JETS HOT PHI CHANNELS",
00062                                                  PHIBINS, PHIMIN, PHIMAX);                  
00063   l1GctForJetsDeadChannelEtaMap_  = dbe_->book1D("ForJetsDeadChannelEtaMap","FOR JETS DEAD ETA CHANNELS",
00064                                                  ETABINS, ETAMIN, ETAMAX);
00065   l1GctForJetsDeadChannelPhiMap_  = dbe_->book1D("ForJetsDeadChannelPhiMap","FOR JETS DEAD PHI CHANNELS",
00066                                                  PHIBINS, PHIMIN, PHIMAX);                  
00067   l1GctCenJetsHotChannelEtaMap_   = dbe_->book1D("CenJetsHotChannelEtaMap","CEN JETS HOT ETA CHANNELS",
00068                                                  ETABINS, ETAMIN, ETAMAX);
00069   l1GctCenJetsHotChannelPhiMap_   = dbe_->book1D("CenJetsHotChannelPhiMap","CEN JETS HOT PHI CHANNELS",
00070                                                  PHIBINS, PHIMIN, PHIMAX);                  
00071   l1GctCenJetsDeadChannelEtaMap_  = dbe_->book1D("CenJetsDeadChannelEtaMap","CEN JETS DEAD ETA CHANNELS",
00072                                                  ETABINS, ETAMIN, ETAMAX);
00073   l1GctCenJetsDeadChannelPhiMap_  = dbe_->book1D("CenJetsDeadChannelPhiMap","CEN JETS DEAD PHI CHANNELS",
00074                                                  PHIBINS, PHIMIN, PHIMAX);              
00075   l1GctTauJetsHotChannelEtaMap_   = dbe_->book1D("TauJetsHotChannelEtaMap","TAU JETS HOT ETA CHANNELS",
00076                                                  ETABINS, ETAMIN, ETAMAX);
00077   l1GctTauJetsHotChannelPhiMap_   = dbe_->book1D("TauJetsHotChannelPhiMap","TAU JETS HOT PHI CHANNELS",
00078                                                  PHIBINS, PHIMIN, PHIMAX);                  
00079   l1GctTauJetsDeadChannelEtaMap_  = dbe_->book1D("TauJetsDeadChannelEtaMap","TAU JETS DEAD ETA CHANNELS",
00080                                                  ETABINS, ETAMIN, ETAMAX);
00081   l1GctTauJetsDeadChannelPhiMap_  = dbe_->book1D("TauJetsDeadChannelPhiMap","TAU JETS DEAD PHI CHANNELS",
00082                                                  PHIBINS, PHIMIN, PHIMAX);                  
00083 }
00084 
00085 void L1TGCTClient::beginRun(const Run& r, const EventSetup& context) {}
00086 
00087 void L1TGCTClient::beginLuminosityBlock(const LuminosityBlock& lumiSeg, const EventSetup& context) {}
00088 
00089 void L1TGCTClient::endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c)
00090 {
00091 
00092   // Get results of Q tests.
00093   // Will code this in a more elegant way in the future!
00094 
00095   // Iso EM
00096   MonitorElement *IsoEmHotEtaChannels = dbe_->get("L1T/L1TGCT/IsoEmOccEta");
00097   if (IsoEmHotEtaChannels){
00098     const QReport *IsoEmHotEtaQReport = IsoEmHotEtaChannels->getQReport("HotChannels");
00099     if (IsoEmHotEtaQReport) {
00100       vector<dqm::me_util::Channel> badChannels = IsoEmHotEtaQReport->getBadChannels();
00101       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00102            channel != badChannels.end(); channel++) {
00103         l1GctIsoEmHotChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00104       }
00105     } 
00106   }
00107 
00108   MonitorElement *IsoEmHotPhiChannels = dbe_->get("L1T/L1TGCT/IsoEmOccPhi");
00109   if (IsoEmHotPhiChannels){
00110     const QReport *IsoEmHotPhiQReport = IsoEmHotPhiChannels->getQReport("HotChannels");
00111     if (IsoEmHotPhiQReport) {
00112       vector<dqm::me_util::Channel> badChannels = IsoEmHotPhiQReport->getBadChannels();
00113       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00114            channel != badChannels.end(); channel++) {
00115         l1GctIsoEmHotChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00116       }
00117     } 
00118   }
00119 
00120   MonitorElement *IsoEmDeadEtaChannels = dbe_->get("L1T/L1TGCT/IsoEmOccEta");
00121   if (IsoEmDeadEtaChannels){
00122     const QReport *IsoEmDeadEtaQReport = IsoEmDeadEtaChannels->getQReport("DeadChannels");
00123     if (IsoEmDeadEtaQReport) {
00124       vector<dqm::me_util::Channel> badChannels = IsoEmDeadEtaQReport->getBadChannels();
00125       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00126            channel != badChannels.end(); channel++) {
00127         l1GctIsoEmDeadChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00128       }
00129     } 
00130   }
00131 
00132   MonitorElement *IsoEmDeadPhiChannels = dbe_->get("L1T/L1TGCT/IsoEmOccPhi");
00133   if (IsoEmDeadPhiChannels){
00134     const QReport *IsoEmDeadPhiQReport = IsoEmDeadPhiChannels->getQReport("DeadChannels");
00135     if (IsoEmDeadPhiQReport) {
00136       vector<dqm::me_util::Channel> badChannels = IsoEmDeadPhiQReport->getBadChannels();
00137       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00138            channel != badChannels.end(); channel++) {
00139         l1GctIsoEmDeadChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00140       }
00141     } 
00142   }
00143   
00144   // Non-iso EM
00145   MonitorElement *NonIsoEmHotEtaChannels = dbe_->get("L1T/L1TGCT/NonIsoEmOccEta");
00146   if (NonIsoEmHotEtaChannels){
00147     const QReport *NonIsoEmHotEtaQReport = NonIsoEmHotEtaChannels->getQReport("HotChannels");
00148     if (NonIsoEmHotEtaQReport) {
00149       vector<dqm::me_util::Channel> badChannels = NonIsoEmHotEtaQReport->getBadChannels();
00150       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00151            channel != badChannels.end(); channel++) {
00152         l1GctNonIsoEmHotChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00153       }
00154     } 
00155   }
00156 
00157   MonitorElement *NonIsoEmHotPhiChannels = dbe_->get("L1T/L1TGCT/NonIsoEmOccPhi");
00158   if (NonIsoEmHotPhiChannels){
00159     const QReport *NonIsoEmHotPhiQReport = NonIsoEmHotPhiChannels->getQReport("HotChannels");
00160     if (NonIsoEmHotPhiQReport) {
00161       vector<dqm::me_util::Channel> badChannels = NonIsoEmHotPhiQReport->getBadChannels();
00162       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00163            channel != badChannels.end(); channel++) {
00164         l1GctNonIsoEmHotChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00165       }
00166     } 
00167   }
00168 
00169   MonitorElement *NonIsoEmDeadEtaChannels = dbe_->get("L1T/L1TGCT/NonIsoEmOccEta");
00170   if (NonIsoEmDeadEtaChannels){
00171     const QReport *NonIsoEmDeadEtaQReport = NonIsoEmDeadEtaChannels->getQReport("DeadChannels");
00172     if (NonIsoEmDeadEtaQReport) {
00173       vector<dqm::me_util::Channel> badChannels = NonIsoEmDeadEtaQReport->getBadChannels();
00174       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00175            channel != badChannels.end(); channel++) {
00176         l1GctNonIsoEmDeadChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00177       }
00178     } 
00179   }
00180 
00181   MonitorElement *NonIsoEmDeadPhiChannels = dbe_->get("L1T/L1TGCT/NonIsoEmOccPhi");
00182   if (NonIsoEmDeadPhiChannels){
00183     const QReport *NonIsoEmDeadPhiQReport = NonIsoEmDeadPhiChannels->getQReport("DeadChannels");
00184     if (NonIsoEmDeadPhiQReport) {
00185       vector<dqm::me_util::Channel> badChannels = NonIsoEmDeadPhiQReport->getBadChannels();
00186       for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00187            channel != badChannels.end(); channel++) {
00188         l1GctNonIsoEmDeadChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00189       }
00190     } 
00191   }
00192   
00193   // Forward Jets
00194   MonitorElement *ForJetsHotEtaChannels = dbe_->get("L1T/L1TGCT/ForJetsOccEta");
00195   if (ForJetsHotEtaChannels){
00196     const QReport *ForJetsHotEtaQReport = ForJetsHotEtaChannels->getQReport("HotChannels");
00197         if (ForJetsHotEtaQReport) {
00198         vector<dqm::me_util::Channel> badChannels = ForJetsHotEtaQReport->getBadChannels();
00199         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00200           channel != badChannels.end(); channel++ ) {
00201         l1GctForJetsHotChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00202           }
00203         }
00204   }
00205 
00206   MonitorElement *ForJetsHotPhiChannels = dbe_->get("L1T/L1TGCT/ForJetsOccPhi");
00207   if (ForJetsHotPhiChannels){
00208     const QReport *ForJetsHotPhiQReport = ForJetsHotPhiChannels->getQReport("HotChannels");
00209         if (ForJetsHotPhiQReport) {
00210         vector<dqm::me_util::Channel> badChannels = ForJetsHotPhiQReport->getBadChannels();
00211         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00212           channel != badChannels.end(); channel++ ) {
00213         l1GctForJetsHotChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00214           }
00215         }
00216   }
00217 
00218   MonitorElement *ForJetsDeadEtaChannels = dbe_->get("L1T/L1TGCT/ForJetsOccEta");
00219   if (ForJetsDeadEtaChannels){
00220     const QReport *ForJetsDeadEtaQReport = ForJetsDeadEtaChannels->getQReport("DeadChannels");
00221         if (ForJetsDeadEtaQReport) {
00222         vector<dqm::me_util::Channel> badChannels = ForJetsDeadEtaQReport->getBadChannels();
00223         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00224           channel != badChannels.end(); channel++ ) {
00225         l1GctForJetsDeadChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00226           }
00227         }
00228   }
00229 
00230   MonitorElement *ForJetsDeadPhiChannels = dbe_->get("L1T/L1TGCT/ForJetsOccPhi");
00231   if (ForJetsDeadPhiChannels){
00232     const QReport *ForJetsDeadPhiQReport = ForJetsDeadPhiChannels->getQReport("DeadChannels");
00233         if (ForJetsDeadPhiQReport) {
00234         vector<dqm::me_util::Channel> badChannels = ForJetsDeadPhiQReport->getBadChannels();
00235         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00236           channel != badChannels.end(); channel++ ) {
00237         l1GctForJetsDeadChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00238           }
00239         }
00240   }
00241 
00242   //Central Jets
00243   MonitorElement *CenJetsHotEtaChannels = dbe_->get("L1T/L1TGCT/CenJetsOccEta");
00244   if (CenJetsHotEtaChannels){
00245     const QReport *CenJetsHotEtaQReport = CenJetsHotEtaChannels->getQReport("HotChannels");
00246         if (CenJetsHotEtaQReport) {
00247         vector<dqm::me_util::Channel> badChannels = CenJetsHotEtaQReport->getBadChannels();
00248         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00249           channel != badChannels.end(); channel++ ) {
00250         l1GctCenJetsHotChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00251           }
00252         }
00253   }
00254 
00255   MonitorElement *CenJetsHotPhiChannels = dbe_->get("L1T/L1TGCT/CenJetsOccPhi");
00256   if (CenJetsHotPhiChannels){
00257     const QReport *CenJetsHotPhiQReport = CenJetsHotPhiChannels->getQReport("HotChannels");
00258         if (CenJetsHotPhiQReport) {
00259         vector<dqm::me_util::Channel> badChannels = CenJetsHotPhiQReport->getBadChannels();
00260         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00261           channel != badChannels.end(); channel++ ) {
00262         l1GctCenJetsHotChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00263           }
00264         }
00265   }
00266 
00267   MonitorElement *CenJetsDeadEtaChannels = dbe_->get("L1T/L1TGCT/CenJetsOccEta");
00268   if (CenJetsDeadEtaChannels){
00269     const QReport *CenJetsDeadEtaQReport = CenJetsDeadEtaChannels->getQReport("DeadChannels");
00270         if (CenJetsDeadEtaQReport) {
00271         vector<dqm::me_util::Channel> badChannels = CenJetsDeadEtaQReport->getBadChannels();
00272         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00273           channel != badChannels.end(); channel++ ) {
00274         l1GctCenJetsDeadChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00275           }
00276         }
00277   }
00278 
00279   MonitorElement *CenJetsDeadPhiChannels = dbe_->get("L1T/L1TGCT/CenJetsOccPhi");
00280   if (CenJetsDeadPhiChannels){
00281     const QReport *CenJetsDeadPhiQReport = CenJetsDeadPhiChannels->getQReport("DeadChannels");
00282         if (CenJetsDeadPhiQReport) {
00283         vector<dqm::me_util::Channel> badChannels = CenJetsDeadPhiQReport->getBadChannels();
00284         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00285           channel != badChannels.end(); channel++ ) {
00286         l1GctCenJetsDeadChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00287           }
00288         }
00289   }
00290 
00291   //Tau Jets
00292   MonitorElement *TauJetsHotEtaChannels = dbe_->get("L1T/L1TGCT/TauJetsOccEta");
00293   if (TauJetsHotEtaChannels){
00294     const QReport *TauJetsHotEtaQReport = TauJetsHotEtaChannels->getQReport("HotChannels");
00295         if (TauJetsHotEtaQReport) {
00296         vector<dqm::me_util::Channel> badChannels = TauJetsHotEtaQReport->getBadChannels();
00297         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00298           channel != badChannels.end(); channel++ ) {
00299         l1GctTauJetsHotChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00300           }
00301         }
00302   }
00303 
00304   MonitorElement *TauJetsHotPhiChannels = dbe_->get("L1T/L1TGCT/TauJetsOccPhi");
00305   if (TauJetsHotPhiChannels){
00306     const QReport *TauJetsHotPhiQReport = TauJetsHotPhiChannels->getQReport("HotChannels");
00307         if (TauJetsHotPhiQReport) {
00308         vector<dqm::me_util::Channel> badChannels = TauJetsHotPhiQReport->getBadChannels();
00309         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00310           channel != badChannels.end(); channel++ ) {
00311         l1GctTauJetsHotChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00312           }
00313         }
00314   }
00315 
00316   MonitorElement *TauJetsDeadEtaChannels = dbe_->get("L1T/L1TGCT/TauJetsOccEta");
00317   if (TauJetsDeadEtaChannels){
00318     const QReport *TauJetsDeadEtaQReport = TauJetsDeadEtaChannels->getQReport("DeadChannels");
00319         if (TauJetsDeadEtaQReport) {
00320         vector<dqm::me_util::Channel> badChannels = TauJetsDeadEtaQReport->getBadChannels();
00321         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00322           channel != badChannels.end(); channel++ ) {
00323         l1GctTauJetsDeadChannelEtaMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00324           }
00325         }
00326   }
00327 
00328   MonitorElement *TauJetsDeadPhiChannels = dbe_->get("L1T/L1TGCT/TauJetsOccPhi");
00329   if (TauJetsDeadPhiChannels){
00330     const QReport *TauJetsDeadPhiQReport = TauJetsDeadPhiChannels->getQReport("DeadChannels");
00331         if (TauJetsDeadPhiQReport) {
00332         vector<dqm::me_util::Channel> badChannels = TauJetsDeadPhiQReport->getBadChannels();
00333         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); 
00334           channel != badChannels.end(); channel++ ) {
00335         l1GctTauJetsDeadChannelPhiMap_->setBinContent((*channel).getBin(),(*channel).getContents());
00336           }
00337         }
00338   }
00339 
00340 }
00341 
00342 void L1TGCTClient::analyze(const Event& e, const EventSetup& context){}
00343 
00344 void L1TGCTClient::endRun(const Run& r, const EventSetup& context){}
00345 
00346 void L1TGCTClient::endJob(){}

Generated on Tue Jun 9 17:33:16 2009 for CMSSW by  doxygen 1.5.4