Go to the documentation of this file.00001 #ifndef DQM_HCALMONITORTASKS_HCALHOTCELLMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALHOTCELLMONITOR_H
00003
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00005 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00006
00007 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00008 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00009
00010 #include <cmath>
00011
00012
00020 struct hotNeighborParams{
00021 int DeltaIphi;
00022 int DeltaIeta;
00023 int DeltaDepth;
00024 double minCellEnergy;
00025 double minNeighborEnergy;
00026 double maxEnergy;
00027 double HotEnergyFrac;
00028 };
00029
00030 class HcalHotCellMonitor: public HcalBaseDQMonitor {
00031
00032 public:
00033 HcalHotCellMonitor(const edm::ParameterSet& ps);
00034
00035 ~HcalHotCellMonitor();
00036
00037 void setup();
00038 void beginRun(const edm::Run& run, const edm::EventSetup& c);
00039 void endRun(const edm::Run& run, const edm::EventSetup& c);
00040
00041 void done();
00042 void cleanup(void);
00043 void reset();
00044 void endJob();
00045
00046
00047 void analyze(edm::Event const&e, edm::EventSetup const&s);
00048
00049
00050 void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00051 const edm::EventSetup& c) ;
00052
00053
00054 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00055 const edm::EventSetup& c);
00056
00057 void processEvent(const HBHERecHitCollection& hbHits,
00058 const HORecHitCollection& hoHits,
00059 const HFRecHitCollection& hfHits
00060 );
00061
00062 void processEvent_rechitenergy( const HBHERecHitCollection& hbheHits,
00063 const HORecHitCollection& hoHits,
00064 const HFRecHitCollection& hfHits);
00065
00066 template <class R, class C> void processHit_rechitNeighbors(R& rechititer,
00067 C& collection,
00068 hotNeighborParams& params);
00069
00070 void periodicReset();
00071
00072
00073 private:
00074 void fillNevents_neighbor();
00075 void fillNevents_energy();
00076 void fillNevents_persistentenergy();
00077
00078 void fillNevents_problemCells();
00079 void zeroCounters();
00080
00081 int minEvents_;
00082
00083 bool test_neighbor_;
00084 bool test_energy_;
00085 bool test_et_;
00086 bool test_persistent_;
00087
00088 double energyThreshold_, HBenergyThreshold_, HEenergyThreshold_, HOenergyThreshold_, HFenergyThreshold_;
00089 double ETThreshold_, HBETThreshold_, HEETThreshold_, HOETThreshold_, HFETThreshold_;
00090 double persistentThreshold_, HBpersistentThreshold_, HEpersistentThreshold_, HOpersistentThreshold_, HFpersistentThreshold_;
00091 double persistentETThreshold_, HBpersistentETThreshold_, HEpersistentETThreshold_, HOpersistentETThreshold_, HFpersistentETThreshold_;
00092
00093 double HFfarfwdScale_;
00094
00095 double minErrorFlag_;
00096
00097 double nsigma_;
00098 double HBnsigma_, HEnsigma_, HOnsigma_, HFnsigma_;
00099 EtaPhiHists AboveNeighborsHotCellsByDepth;
00100 EtaPhiHists AboveEnergyThresholdCellsByDepth;
00101 EtaPhiHists AboveETThresholdCellsByDepth;
00102 EtaPhiHists AbovePersistentThresholdCellsByDepth;
00103 EtaPhiHists AbovePersistentETThresholdCellsByDepth;
00104
00105 double SiPMscale_;
00106 int aboveneighbors[85][72][4];
00107 int aboveenergy[85][72][4];
00108 int aboveet[85][72][4];
00109 int abovepersistent[85][72][4];
00110 int abovepersistentET[85][72][4];
00111 int rechit_occupancy_sum[85][72][4];
00112
00113 bool excludeHORing2_;
00114
00115
00116
00117 MonitorElement* d_HBenergyVsNeighbor;
00118 MonitorElement* d_HEenergyVsNeighbor;
00119 MonitorElement* d_HOenergyVsNeighbor;
00120 MonitorElement* d_HFenergyVsNeighbor;
00121
00122 int hbVsNeighbor[500];
00123 int heVsNeighbor[500];
00124 int hoVsNeighbor[500];
00125 int hfVsNeighbor[500];
00126
00127 hotNeighborParams HBHENeighborParams_, HONeighborParams_, HFNeighborParams_;
00128
00129 edm::InputTag hbheRechitLabel_, hoRechitLabel_, hfRechitLabel_;
00130 };
00131
00132 #endif