Go to the documentation of this file.00001 #ifndef GUARD_DQM_HCALMONITORTASKS_HCALBEAMMONITOR_H
00002 #define GUARD_DQM_HCALMONITORTASKS_HCALBEAMMONITOR_H
00003
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00005 #include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
00006 #include "CondFormats/DataRecord/interface/HcalChannelQualityRcd.h"
00007 #include "Geometry/HcalTowerAlgo/src/HcalHardcodeGeometryData.h"
00008
00009 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00010 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00011
00012
00013 #include <iostream>
00014 #include <fstream>
00015
00023 class HcalBeamMonitor: public HcalBaseDQMonitor {
00024 public:
00025 HcalBeamMonitor(const edm::ParameterSet& ps);
00026 ~HcalBeamMonitor();
00027
00028 void setup();
00029 void beginRun(const edm::Run& run, const edm::EventSetup& c);
00030 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00031 const edm::EventSetup& c);
00032 void analyze(const edm::Event& e, const edm::EventSetup& c);
00033 void processEvent(const HBHERecHitCollection& hbHits,
00034 const HORecHitCollection& hoHits,
00035 const HFRecHitCollection& hfHits,
00036 const HFDigiCollection& hf,
00037 int bunchCrossing
00038 );
00039
00040 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00041 const edm::EventSetup& c);
00042 void reset();
00043 void cleanup();
00044
00045 private:
00046 void SetEtaLabels(MonitorElement* h);
00047 double occThresh_;
00048 double hotrate_;
00049 int minEvents_;
00050 std::string lumiqualitydir_;
00051
00052 std::map<int,MonitorElement* > HB_CenterOfEnergyRadius;
00053 std::map<int,MonitorElement* > HE_CenterOfEnergyRadius;
00054 std::map<int,MonitorElement* > HF_CenterOfEnergyRadius;
00055 std::map<int,MonitorElement* > HO_CenterOfEnergyRadius;
00056
00057 MonitorElement* CenterOfEnergyRadius;
00058 MonitorElement* CenterOfEnergy;
00059 MonitorElement* COEradiusVSeta;
00060
00061 MonitorElement* HBCenterOfEnergyRadius;
00062 MonitorElement* HBCenterOfEnergy;
00063 MonitorElement* HECenterOfEnergyRadius;
00064 MonitorElement* HECenterOfEnergy;
00065 MonitorElement* HOCenterOfEnergyRadius;
00066 MonitorElement* HOCenterOfEnergy;
00067 MonitorElement* HFCenterOfEnergyRadius;
00068 MonitorElement* HFCenterOfEnergy;
00069
00070 MonitorElement* Etsum_eta_L;
00071 MonitorElement* Etsum_eta_S;
00072 MonitorElement* Etsum_phi_L;
00073 MonitorElement* Etsum_phi_S;
00074 MonitorElement* Etsum_ratio_p;
00075 MonitorElement* Etsum_ratio_m;
00076 MonitorElement* Etsum_map_L;
00077 MonitorElement* Etsum_map_S;
00078 MonitorElement* Etsum_ratio_map;
00079 MonitorElement* Etsum_rphi_L;
00080 MonitorElement* Etsum_rphi_S;
00081 MonitorElement* Energy_Occ;
00082
00083 MonitorElement* Occ_rphi_L;
00084 MonitorElement* Occ_rphi_S;
00085 MonitorElement* Occ_eta_L;
00086 MonitorElement* Occ_eta_S;
00087 MonitorElement* Occ_phi_L;
00088 MonitorElement* Occ_phi_S;
00089 MonitorElement* Occ_map_L;
00090 MonitorElement* Occ_map_S;
00091
00092 MonitorElement* HFlumi_ETsum_perwedge;
00093 MonitorElement* HFlumi_Occupancy_above_thr_r1;
00094 MonitorElement* HFlumi_Occupancy_between_thrs_r1;
00095 MonitorElement* HFlumi_Occupancy_below_thr_r1;
00096 MonitorElement* HFlumi_Occupancy_above_thr_r2;
00097 MonitorElement* HFlumi_Occupancy_between_thrs_r2;
00098 MonitorElement* HFlumi_Occupancy_below_thr_r2;
00099
00100 MonitorElement* HFlumi_Occupancy_per_channel_vs_lumiblock_RING1;
00101 MonitorElement* HFlumi_Occupancy_per_channel_vs_lumiblock_RING2;
00102 MonitorElement* HFlumi_Occupancy_per_channel_vs_BX_RING1;
00103 MonitorElement* HFlumi_Occupancy_per_channel_vs_BX_RING2;
00104 MonitorElement* HFlumi_ETsum_vs_BX;
00105 MonitorElement* HFlumi_Et_per_channel_vs_lumiblock;
00106
00107 MonitorElement* HFlumi_occ_LS;
00108 MonitorElement* HFlumi_total_hotcells;
00109 MonitorElement* HFlumi_total_deadcells;
00110 MonitorElement* HFlumi_diag_hotcells;
00111 MonitorElement* HFlumi_diag_deadcells;
00112
00113 MonitorElement* HFlumi_Ring1Status_vs_LS;
00114 MonitorElement* HFlumi_Ring2Status_vs_LS;
00115 std::map <HcalDetId, int> BadCells_;
00116
00117 int ring1totalchannels_;
00118 int ring2totalchannels_;
00119
00120 const int ETA_OFFSET_HB;
00121 const int ETA_OFFSET_HE;
00122 const int ETA_BOUND_HE;
00123 const int ETA_OFFSET_HO;
00124 const int ETA_OFFSET_HF;
00125 const int ETA_BOUND_HF;
00126
00127 static const float area[];
00128 static const float radius[];
00129
00130 std::ostringstream outfile_;
00131 unsigned int lastProcessedLS_;
00132 int runNumber_;
00133 bool Overwrite_;
00134
00135 int minBadCells_;
00136 edm::InputTag digiLabel_;
00137 edm::InputTag hbheRechitLabel_, hfRechitLabel_, hoRechitLabel_;
00138 };
00139
00140 #endif