CMS 3D CMS Logo

HcalPedestalMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_HCALPEDESTALMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALPEDESTALMONITOR_H
00003 
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseMonitor.h"
00005 #include "CondFormats/HcalObjects/interface/HcalPedestal.h"
00006 #include "CondFormats/HcalObjects/interface/HcalPedestalWidth.h"
00007 #include "DQMServices/Core/interface/DQMStore.h"
00008 #include "DQMServices/Core/interface/MonitorElement.h"
00009 #include <cmath>
00010 
00019 class HcalPedestalMonitor: public HcalBaseMonitor {
00020 public:
00021   HcalPedestalMonitor(); 
00022   ~HcalPedestalMonitor(); 
00023 
00024   void setup(const edm::ParameterSet& ps, DQMStore* dbe);
00025 
00026   void processEvent(const HBHEDigiCollection& hbhe,
00027                     const HODigiCollection& ho,
00028                     const HFDigiCollection& hf,
00029                     // const ZDCDigiCollection& zdc,
00030                     const HcalDbService& cond);
00031   void done();
00032   void reset();
00033   void fillDBValues(const HcalDbService& cond);
00034   void fillPedestalHistos(void); // fills histograms once every (checkNevents_) events
00035   void clearME(); // overrides base class function
00036 
00037 private:
00038 
00039   // Configurable parameters
00040   //bool doPerChannel_; // enable histograms for each channel (not yet (or ever?) operational)
00041   bool doFCpeds_; // pedestal units in fC (if false, assume ADC)
00042   // specify time slices over which to calculate pedestals
00043   bool startingTimeSlice_;
00044   bool endingTimeSlice_;
00045   
00046   // Specify maximum allowed difference between ADC pedestal and nominal value
00047   double nominalPedMeanInADC_;
00048   double nominalPedWidthInADC_;
00049   double maxPedMeanDiffADC_;
00050   double maxPedWidthDiffADC_; // specify maximum width of pedestal (in ADC)
00051   unsigned int minEntriesPerPed_; // minimum # of events needed to calculate pedestals
00052   // Haven't yet figured out how to implement these reasonably.
00053   // I'd like for them to default to whatever the global minErrorFlag_ has been set to,
00054   // but user should be able to also set them directly.  Hmm... 
00055   double pedmon_minErrorFlag_;
00056   int pedmon_checkNevents_;
00057 
00058   // Pedestal ADC/fC conversion stuffx
00059   const HcalQIEShape* shape_;
00060   const HcalQIECoder* channelCoder_;
00061   HcalCalibrations calibs_;
00062 
00063   MonitorElement* meEVT_;
00064   int ievt_;
00065   
00066   // Store means, RMS of pedestals by depth
00067   std::vector<MonitorElement*> MeanMapByDepth;
00068   std::vector<MonitorElement*> RMSMapByDepth;
00069 
00070   // Original pedestal read info from database
00071   MonitorElement* ADC_PedestalFromDB;
00072   std::vector<MonitorElement*> ADC_PedestalFromDBByDepth;
00073   MonitorElement* ADC_WidthFromDB;
00074   std::vector<MonitorElement*> ADC_WidthFromDBByDepth;
00075   MonitorElement* fC_PedestalFromDB;
00076   std::vector<MonitorElement*> fC_PedestalFromDBByDepth;
00077   MonitorElement* fC_WidthFromDB;
00078   std::vector<MonitorElement*> fC_WidthFromDBByDepth;
00079 
00080   // "raw" pedestal plots in ADC
00081   std::vector<MonitorElement*> rawADCPedestalMean;
00082   std::vector<MonitorElement*> rawADCPedestalRMS;
00083   std::vector<MonitorElement*> rawADCPedestalMean_1D;
00084   std::vector<MonitorElement*> rawADCPedestalRMS_1D;
00085 
00086   // subtracted ADC pedestal plots
00087   std::vector<MonitorElement*> subADCPedestalMean;
00088   std::vector<MonitorElement*> subADCPedestalRMS;
00089   std::vector<MonitorElement*> subADCPedestalMean_1D;
00090   std::vector<MonitorElement*> subADCPedestalRMS_1D;
00091 
00092   // raw pedestal plots in femtocoulombs
00093   std::vector<MonitorElement*> rawFCPedestalMean;
00094   std::vector<MonitorElement*> rawFCPedestalRMS;
00095   std::vector<MonitorElement*> rawFCPedestalMean_1D;
00096   std::vector<MonitorElement*> rawFCPedestalRMS_1D;
00097 
00098   // subtracted pedestal plots in femtocoulombs
00099   std::vector<MonitorElement*> subFCPedestalMean;
00100   std::vector<MonitorElement*> subFCPedestalRMS;
00101   std::vector<MonitorElement*> subFCPedestalMean_1D;
00102   std::vector<MonitorElement*> subFCPedestalRMS_1D;
00103 
00104   // Problem Histograms 
00105   MonitorElement* ProblemPedestals;
00106   std::vector<MonitorElement*> ProblemPedestalsByDepth;
00107 
00108 
00109   //Quick pedestal arrays -- these store the values that are used to compute pedestals
00110   unsigned int pedcounts[ETABINS][PHIBINS][6];
00111   float rawpedsum[ETABINS][PHIBINS][6];
00112   float rawpedsum2[ETABINS][PHIBINS][6];
00113   float subpedsum[ETABINS][PHIBINS][6];
00114   float subpedsum2[ETABINS][PHIBINS][6];
00115   float fC_rawpedsum[ETABINS][PHIBINS][6];
00116   float fC_rawpedsum2[ETABINS][PHIBINS][6];
00117   float fC_subpedsum[ETABINS][PHIBINS][6];
00118   float fC_subpedsum2[ETABINS][PHIBINS][6];
00119 
00120 
00121 
00122 };
00123 
00124 #endif

Generated on Tue Jun 9 17:32:59 2009 for CMSSW by  doxygen 1.5.4