00001 #ifndef HcalPedestalClient_H 00002 #define HcalPedestalClient_H 00003 00004 #include "DQM/HcalMonitorClient/interface/HcalBaseClient.h" 00005 #include "CalibFormats/HcalObjects/interface/HcalDbService.h" 00006 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h" 00007 #include "CondFormats/HcalObjects/interface/HcalPedestal.h" 00008 #include "CondFormats/HcalObjects/interface/HcalPedestalWidth.h" 00009 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h" 00010 #include <CalibCalorimetry/HcalAlgos/interface/HcalAlgoUtils.h> 00011 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00012 #include "DataFormats/HcalDetId/interface/HcalElectronicsId.h" 00013 #include "FWCore/Framework/interface/ESHandle.h" 00014 #include "DQMServices/Core/interface/DQMStore.h" 00015 00016 #include "DQM/HcalMonitorClient/interface/HcalClientUtils.h" 00017 #include "DQM/HcalMonitorClient/interface/HcalHistoUtils.h" 00018 00019 00020 class HcalPedestalClient : public HcalBaseClient { 00021 00022 public: 00023 00025 HcalPedestalClient(); 00027 ~HcalPedestalClient(); 00028 00029 void init(const edm::ParameterSet& ps, DQMStore* dbe, string clientName); 00030 00032 void analyze(void); 00033 00035 void beginJob(); 00036 00038 void endJob(void); 00039 00041 void beginRun(const EventSetup& c); 00042 00044 void endRun(void); 00045 00047 void setup(void); 00048 00050 void cleanup(void); 00051 00053 void htmlOutput(int run, string htmlDir, string htmlName); 00054 void htmlExpertOutput(int run, string htmlDir, string htmlName); 00055 void getHistograms(); 00056 void loadHistograms(TFile* f); 00057 00059 void report(); 00060 00061 void resetAllME(); 00062 void createTests(); 00063 00064 // Introduce temporary error/warning checks 00065 bool hasErrors_Temp(); 00066 bool hasWarnings_Temp(); 00067 bool hasOther_Temp() {return false;} 00068 00069 00070 private: 00071 00072 //void generateBadChanList(string dir); 00073 vector<int> badChan_; 00074 vector<double> badMean_; 00075 vector<double> badRMS_; 00076 00077 vector <std::string> subdets_; 00078 vector <std::string> subdets1D_; 00079 00080 bool doFCpeds_; // pedestal units in fC (if false, assume ADC) 00081 // specify time slices over which to calculate pedestals -- are these needed in client? 00082 bool startingTimeSlice_; 00083 bool endingTimeSlice_; 00084 00085 // Specify maximum allowed difference between ADC pedestal and nominal value 00086 double nominalPedMeanInADC_; 00087 double nominalPedWidthInADC_; 00088 double maxPedMeanDiffADC_; 00089 double maxPedWidthDiffADC_; // specify maximum width of pedestal (in ADC) 00090 double minErrorFlag_; // minimum error rate which causes problem cells to be dumped in client 00091 bool makeDiagnostics_; 00092 TH2F* MeanMapByDepth[4]; 00093 TH2F* RMSMapByDepth[4]; 00094 00095 // Problem Pedestal Plots 00096 TH2F* ProblemPedestals; 00097 TH2F* ProblemPedestalsByDepth[4]; 00098 00099 // Pedestals from Database 00100 TH2F* ADC_PedestalFromDBByDepth[4]; 00101 TH2F* ADC_WidthFromDBByDepth[4]; 00102 TH2F* fC_PedestalFromDBByDepth[4]; 00103 TH2F* fC_WidthFromDBByDepth[4]; 00104 TH1F* ADC_PedestalFromDBByDepth_1D[4]; 00105 TH1F* ADC_WidthFromDBByDepth_1D[4]; 00106 TH1F* fC_PedestalFromDBByDepth_1D[4]; 00107 TH1F* fC_WidthFromDBByDepth_1D[4]; 00108 00109 // Raw pedestals in ADC 00110 TH2F* rawADCPedestalMean[4]; 00111 TH2F* rawADCPedestalRMS[4]; 00112 TH1F* rawADCPedestalMean_1D[4]; 00113 TH1F* rawADCPedestalRMS_1D[4]; 00114 00115 // subtracted pedestals in ADC 00116 TH2F* subADCPedestalMean[4]; 00117 TH2F* subADCPedestalRMS[4]; 00118 TH1F* subADCPedestalMean_1D[4]; 00119 TH1F* subADCPedestalRMS_1D[4]; 00120 00121 // Raw pedestals in FC 00122 TH2F* rawfCPedestalMean[4]; 00123 TH2F* rawfCPedestalRMS[4]; 00124 TH1F* rawfCPedestalMean_1D[4]; 00125 TH1F* rawfCPedestalRMS_1D[4]; 00126 00127 // subtracted pedestals in FC 00128 TH2F* subfCPedestalMean[4]; 00129 TH2F* subfCPedestalRMS[4]; 00130 TH1F* subfCPedestalMean_1D[4]; 00131 TH1F* subfCPedestalRMS_1D[4]; 00132 00133 }; 00134 00135 #endif