CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DQM/HcalMonitorTasks/interface/HcalTrigPrimMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_HCALTRIGPRIMMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALTRIGPRIMMONITOR_H
00003 
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00005 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00006 
00014 //class HcalTrigPrimMonitor: public HcalBaseMonitor {
00015 class HcalTrigPrimMonitor: public HcalBaseDQMonitor {
00016    public:
00017       HcalTrigPrimMonitor(const edm::ParameterSet& ps);
00018       ~HcalTrigPrimMonitor(); 
00019   
00020       void setup();
00021       void analyze(const edm::Event& e, const edm::EventSetup& c);
00022       void processEvent(const edm::Handle<HcalTrigPrimDigiCollection>& data_tp_col,
00023                         const edm::Handle<HcalTrigPrimDigiCollection>& emul_tp_col);
00024       void reset();
00025       void beginRun(const edm::Run& run, const edm::EventSetup& c);
00026       void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c) ;
00027       void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c);
00028       void cleanup();
00029       void endJob();
00030 
00031    private:
00032       edm::InputTag dataLabel_;
00033       edm::InputTag emulLabel_;
00034       std::vector<int> ZSBadTPThreshold_;
00035       std::vector<int> ZSAlarmThreshold_;
00036 
00037       MonitorElement* create_summary(const std::string& folder, const std::string& name);
00038       MonitorElement* create_errorflag(const std::string& folder, const std::string& name);
00039       MonitorElement* create_tp_correlation(const std::string& folder, const std::string& name);
00040       MonitorElement* create_fg_correlation(const std::string& folder, const std::string& name);
00041       MonitorElement* create_map(const std::string& folder, const std::string& name);
00042       MonitorElement* create_et_histogram(const std::string& folder, const std::string& name);
00043 
00044       enum ErrorFlag{
00045          kZeroTP=-1,
00046          kMatched = 0,
00047          kMismatchedEt = 1,
00048          kMismatchedFG = 2,
00049          kMissingData = 3,
00050          kMissingEmul = 4,
00051          kNErrorFlag = 5,
00052          kUnknown = kNErrorFlag
00053       };
00054 
00055       // Index: [isZS]
00056       MonitorElement* good_tps[2];
00057       MonitorElement* bad_tps[2];
00058       MonitorElement* errorflag[2];
00059       std::map<ErrorFlag, MonitorElement*> problem_map[2];
00060 
00061       // Index: [isZS][isHF]
00062       MonitorElement* tp_corr[2][2];
00063       MonitorElement* fg_corr[2][2];
00064       std::map<ErrorFlag, MonitorElement*> problem_et[2][2];
00065 
00066       MonitorElement* TPOccupancy_;
00067       MonitorElement* TPOccupancyEta_;
00068       MonitorElement* TPOccupancyPhi_;
00069       MonitorElement* TPOccupancyPhiHFP_;
00070       MonitorElement* TPOccupancyPhiHFM_;
00071 
00072       int nBad_TP_per_LS_HB_;
00073       int nBad_TP_per_LS_HE_;
00074       int nBad_TP_per_LS_HF_;
00075 };
00076 #endif