CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DQM/HcalMonitorTasks/interface/HcalRecHitMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_HCALRECHITMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALRECHITMONITOR_H
00003 
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00005 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00006 #include "CondFormats/HcalObjects/interface/HcalLogicalMap.h"
00007 
00008 #define RECHITMON_TIME_MIN -250
00009 #define RECHITMON_TIME_MAX 250
00010 
00018 class HcalRecHitMonitor: public HcalBaseDQMonitor {
00019 
00020  public:
00021   HcalRecHitMonitor(const edm::ParameterSet& ps);
00022 
00023   ~HcalRecHitMonitor();
00024 
00025   void setup();
00026   void beginRun(const edm::Run& run, const edm::EventSetup& c);
00027   void endRun(const edm::Run& run, const edm::EventSetup& c);
00028   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg,
00029                           const edm::EventSetup& c);
00030   void endJob();
00031   void cleanup();
00032   void reset();
00033   void zeroCounters();
00034  
00035   void analyze(const edm::Event&, const edm::EventSetup&);
00036 
00037   void processEvent(const HBHERecHitCollection& hbHits,
00038                     const HORecHitCollection& hoHits,
00039                     const HFRecHitCollection& hfHits,
00040                     int BCN,
00041                     const edm::Event& iEvent
00042                     );
00043 
00044   void processEvent_rechit( const HBHERecHitCollection& hbheHits,
00045                             const HORecHitCollection& hoHits,
00046                             const HFRecHitCollection& hfHits,
00047                             bool passedHcalHLT,
00048                             bool passedMinBiasHLT,
00049                             int BCN);
00050  private:
00051   
00052   void fill_Nevents();
00053 
00054   double energyThreshold_;
00055   double HBenergyThreshold_;
00056   double HEenergyThreshold_;
00057   double HOenergyThreshold_;
00058   double HFenergyThreshold_;
00059 
00060   double ETThreshold_;
00061   double HBETThreshold_;
00062   double HEETThreshold_;
00063   double HOETThreshold_;
00064   double HFETThreshold_;
00065 
00066   HcalLogicalMap* logicalMap;
00067 
00068   // Basic Histograms
00069   EtaPhiHists OccupancyByDepth;
00070   EtaPhiHists OccupancyThreshByDepth;
00071 
00072   EtaPhiHists SumEnergyByDepth;
00073   EtaPhiHists SqrtSumEnergy2ByDepth;
00074   EtaPhiHists SumEnergyThreshByDepth;
00075   EtaPhiHists SqrtSumEnergy2ThreshByDepth;
00076   EtaPhiHists SumTimeByDepth;
00077   EtaPhiHists SumTimeThreshByDepth;
00078 
00079   unsigned int occupancy_[85][72][4]; // will get filled when rechit found
00080   unsigned int occupancy_thresh_[85][72][4]; // filled when above given energy
00081   double energy_[85][72][4]; // will get filled when rechit found
00082   double energy2_[85][72][4]; // will get filled when rechit found
00083   double energy_thresh_[85][72][4]; // filled when above given  
00084   double energy2_thresh_[85][72][4]; // filled when above given
00085   double time_[85][72][4]; // will get filled when rechit found
00086   double time_thresh_[85][72][4]; // filled when above given energy
00087 
00088   double HBtime_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00089   double HBtime_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00090   double HB_occupancy_[260];
00091   double HB_occupancy_thresh_[260];
00092   double HEtime_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00093   double HEtime_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00094   double HE_occupancy_[260];
00095   double HE_occupancy_thresh_[260];
00096   double HOtime_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00097   double HOtime_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00098   double HO_occupancy_[218];
00099   double HO_occupancy_thresh_[218];
00100   double HFtime_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00101   double HFtime_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00102   double HFenergyLong_[200];
00103   double HFenergyLong_thresh_[200];
00104   double HFtimeLong_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00105   double HFtimeLong_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00106   double HFenergyShort_[200];
00107   double HFenergyShort_thresh_[200];
00108   double HFtimeShort_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00109   double HFtimeShort_thresh_[RECHITMON_TIME_MAX-RECHITMON_TIME_MIN];
00110   double HF_occupancy_[174];
00111   double HF_occupancy_thresh_[174];
00112   double HFlong_occupancy_[865];
00113   double HFlong_occupancy_thresh_[865];
00114   double HFshort_occupancy_[865];
00115   double HFshort_occupancy_thresh_[865];
00116 
00117   int HEflagcounter_[32];
00118   int HBflagcounter_[32];
00119   int HOflagcounter_[32];
00120   int HFflagcounter_[32];
00121 
00122   // Diagnostic plots
00123 
00124   MonitorElement* h_rechitieta;
00125   MonitorElement* h_rechitiphi;
00126 
00127   MonitorElement* h_rechitieta_05;
00128   MonitorElement* h_rechitieta_10;
00129   MonitorElement* h_rechitieta_25;
00130   MonitorElement* h_rechitieta_100;
00131   MonitorElement* h_rechitiphi_05;
00132   MonitorElement* h_rechitiphi_10;
00133   MonitorElement* h_rechitiphi_25;
00134   MonitorElement* h_rechitiphi_100;
00135 
00136   MonitorElement* h_rechitieta_thresh;
00137   MonitorElement* h_rechitiphi_thresh;
00138 
00139   MonitorElement* h_HBsizeVsLS;
00140   MonitorElement* h_HEsizeVsLS;
00141   MonitorElement* h_HOsizeVsLS;
00142   MonitorElement* h_HFsizeVsLS;
00143 
00144   MonitorElement* h_HBTime;
00145   MonitorElement* h_HBThreshTime;
00146   MonitorElement* h_HBOccupancy;
00147   MonitorElement* h_HBThreshOccupancy;
00148 
00149   MonitorElement* h_HETime;
00150   MonitorElement* h_HEThreshTime;
00151   MonitorElement* h_HEOccupancy;
00152   MonitorElement* h_HEThreshOccupancy;
00153 
00154   MonitorElement* h_HOTime;
00155   MonitorElement* h_HOThreshTime;
00156   MonitorElement* h_HOOccupancy;
00157   MonitorElement* h_HOThreshOccupancy;
00158 
00159   MonitorElement* h_HFTime;
00160   MonitorElement* h_HFThreshTime;
00161   MonitorElement* h_HFOccupancy;
00162   MonitorElement* h_HFThreshOccupancy;
00163 
00164   MonitorElement* h_HBflagcounter;
00165   MonitorElement* h_HEflagcounter;
00166   MonitorElement* h_HOflagcounter;
00167   MonitorElement* h_HFflagcounter;
00168   
00169   MonitorElement* h_FlagMap_HPDMULT;
00170   MonitorElement* h_FlagMap_PULSESHAPE;
00171   MonitorElement* h_FlagMap_DIGITIME;
00172   MonitorElement* h_FlagMap_LONGSHORT;
00173   MonitorElement* h_FlagMap_TIMEADD;
00174   MonitorElement* h_FlagMap_TIMESUBTRACT;
00175   MonitorElement* h_FlagMap_TIMEERROR;
00176                  
00177   MonitorElement* h_HFLongShort_vs_LS;
00178   MonitorElement* h_HFDigiTime_vs_LS;
00179   MonitorElement* h_HBHEHPDMult_vs_LS;
00180   MonitorElement* h_HBHEPulseShape_vs_LS;
00181 
00182   MonitorElement* h_HF_FlagCorr;
00183   MonitorElement* h_HBHE_FlagCorr;
00184 
00185   double timediffThresh_;
00186 
00187   MonitorElement* h_HFtimedifference;
00188   MonitorElement* h_HFenergydifference;
00189   MonitorElement* h_HEtimedifference;
00190   MonitorElement* h_HEenergydifference;
00191 
00192   MonitorElement* h_HF_HcalHLT_weightedtimedifference;
00193   MonitorElement* h_HF_HcalHLT_energydifference;
00194   MonitorElement* h_HE_HcalHLT_weightedtimedifference;
00195   MonitorElement* h_HE_HcalHLT_energydifference;
00196 
00197   MonitorElement* h_LumiPlot_LS_allevents;
00198   MonitorElement* h_LumiPlot_LS_MinBiasEvents;
00199   MonitorElement* h_LumiPlot_LS_MinBiasEvents_notimecut;
00200   MonitorElement* h_LumiPlot_LS_HcalHLTEvents;
00201   MonitorElement* h_LumiPlot_LS_HcalHLTEvents_notimecut;
00202 
00203   MonitorElement* h_LumiPlot_SumHT_HFPlus_vs_HFMinus;
00204   MonitorElement* h_LumiPlot_timeHFPlus_vs_timeHFMinus;
00205 
00206   MonitorElement* h_LumiPlot_SumEnergy_HFPlus_vs_HFMinus;
00207   
00208   MonitorElement* h_LumiPlot_BX_allevents;
00209   MonitorElement* h_LumiPlot_BX_MinBiasEvents;
00210   MonitorElement* h_LumiPlot_BX_MinBiasEvents_notimecut;
00211   MonitorElement* h_LumiPlot_BX_HcalHLTEvents;
00212   MonitorElement* h_LumiPlot_BX_HcalHLTEvents_notimecut;
00213 
00214   MonitorElement* h_LumiPlot_MinTime_vs_MinHT;
00215   MonitorElement* h_LumiPlot_timeHT_HFM;
00216   MonitorElement* h_LumiPlot_timeHT_HFP;
00217 
00218   MonitorElement* h_TriggeredEvents;
00219   MonitorElement* h_HFP_weightedTime;
00220   MonitorElement* h_HFM_weightedTime;
00221   MonitorElement* h_HEP_weightedTime;
00222   MonitorElement* h_HEM_weightedTime;
00223   MonitorElement* h_HBP_weightedTime;
00224   MonitorElement* h_HBM_weightedTime;
00225 
00226   MonitorElement* h_HBTimeVsEnergy;
00227   MonitorElement* h_HETimeVsEnergy;
00228   MonitorElement* h_HOTimeVsEnergy;
00229   MonitorElement* h_HFTimeVsEnergy;
00230   MonitorElement* HFP_HFM_Energy;
00231 
00232   bool HBpresent_, HEpresent_, HOpresent_, HFpresent_;
00233 
00234   edm::InputTag hbheRechitLabel_, hoRechitLabel_, hfRechitLabel_;
00235   edm::InputTag l1gtLabel_;
00236   edm::InputTag hltresultsLabel_;
00237   std::vector <std::string> HcalHLTBits_;
00238   std::vector <std::string> MinBiasHLTBits_;
00239 };
00240 
00241 #endif