CMS 3D CMS Logo

HcalLEDMonitor.h

Go to the documentation of this file.
00001 #ifndef DQM_HCALMONITORTASKS_HCALLEDMONITOR_H
00002 #define DQM_HCALMONITORTASKS_HCALLEDMONITOR_H
00003 
00004 #include "DQM/HcalMonitorTasks/interface/HcalBaseMonitor.h"
00005 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
00006 #include "DQMServices/Core/interface/DQMStore.h"
00007 #include "DQMServices/Core/interface/MonitorElement.h"
00008 
00015   static const float LedMonAdc2fc[128]={-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5,
00016                                      8.5,  9.5, 10.5, 11.5, 12.5, 13.5, 15., 17., 
00017                                      19., 21., 23., 25., 27., 29.5,
00018                                      32.5, 35.5, 38.5, 42., 46., 50., 54.5, 59.5, 
00019                                      64.5, 59.5, 64.5, 69.5, 74.5,
00020                                      79.5, 84.5, 89.5, 94.5, 99.5, 104.5, 109.5, 
00021                                      114.5, 119.5, 124.5, 129.5, 137.,
00022                                      147., 157., 167., 177., 187., 197., 209.5, 224.5, 
00023                                      239.5, 254.5, 272., 292.,
00024                                      312., 334.5, 359.5, 384.5, 359.5, 384.5, 409.5, 
00025                                      434.5, 459.5, 484.5, 509.5,
00026                                      534.5, 559.5, 584.5, 609.5, 634.5, 659.5, 684.5, 709.5, 
00027                                      747., 797., 847.,
00028                                      897.,  947., 997., 1047., 1109.5, 1184.5, 1259.5, 
00029                                      1334.5, 1422., 1522., 1622.,
00030                                      1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5, 
00031                                      2234.5, 2359.5, 2484.5,
00032                                      2609.5, 2734.5, 2859.5, 2984.5, 3109.5, 
00033                                      3234.5, 3359.5, 3484.5, 3609.5, 3797.,
00034                                      4047., 4297., 4547., 4797., 5047., 5297., 
00035                                      5609.5, 5984.5, 6359.5, 6734.5,
00036                                      7172., 7672., 8172., 8734.5, 9359.5, 9984.5};
00037 
00038 
00039 
00040 
00041 class HcalLEDMonitor: public HcalBaseMonitor {
00042 
00043 public:
00044   HcalLEDMonitor(); 
00045   ~HcalLEDMonitor(); 
00046 
00047   void setup(const edm::ParameterSet& ps, DQMStore* dbe);
00048 
00049   void processEvent(const HBHEDigiCollection& hbhe,
00050                     const HODigiCollection& ho,
00051                     const HFDigiCollection& hf,
00052                     const HcalDbService& cond);
00053 
00054   void reset();
00055 
00056   void done();
00057 
00058  private: //members vars...
00059 
00060   // and this is just a very dumb way of doing the adc->fc conversion in the
00061   // full range (and is the same for all channels and cap-ids)
00062 
00063 
00064 
00065 
00066   void perChanHists(int type, const HcalDetId detid, float* vals, 
00067                     map<HcalDetId, MonitorElement*> &tShape, 
00068                     map<HcalDetId, MonitorElement*> &tTime, 
00069                     map<HcalDetId, MonitorElement*> &tEnergy,
00070                     string baseFolder);
00071 
00072   void createFEDmap(unsigned int fed);
00073 
00074   map<HcalDetId, MonitorElement*>::iterator _meIter;
00075   map<unsigned int, MonitorElement*>::iterator _fedIter;
00076 
00077   bool doPerChannel_;
00078 
00079   int sigS0_, sigS1_;
00080   float adcThresh_;
00081 
00082   int ievt_, jevt_;
00083   HcalCalibrations calibs_;
00084 
00085 
00086  private: //monitoring elements...
00087   MonitorElement* meEVT_;
00088 
00089   struct{
00090     map<HcalDetId,MonitorElement*> shape;
00091     map<HcalDetId,MonitorElement*> time;
00092     map<HcalDetId,MonitorElement*> energy;
00093 
00094     MonitorElement* shapePED;
00095     MonitorElement* shapeALL;
00096     MonitorElement* timeALL;
00097     MonitorElement* energyALL;
00098 
00099     MonitorElement* rms_shape;
00100     MonitorElement* mean_shape;
00101 
00102     MonitorElement* rms_time;
00103     MonitorElement* mean_time;
00104 
00105     MonitorElement* rms_energy;
00106     MonitorElement* mean_energy;
00107 
00108     MonitorElement* err_map_geo;
00109     MonitorElement* err_map_elec;
00110 
00111   } hbHists, heHists, hfHists, hoHists;
00112 
00113 
00114   MonitorElement* HFlumi_ETsum_perwedge;
00115   MonitorElement* HFlumi_Occupancy_above_thr_r1;
00116   MonitorElement* HFlumi_Occupancy_between_thrs_r1;
00117   MonitorElement* HFlumi_Occupancy_below_thr_r1;
00118   MonitorElement* HFlumi_Occupancy_above_thr_r2;
00119   MonitorElement* HFlumi_Occupancy_between_thrs_r2;
00120   MonitorElement* HFlumi_Occupancy_below_thr_r2;
00121 
00122 
00123   /*  
00124   MonitorElement* mean_map_ADCraw;
00125   MonitorElement* rms_map_ADCraw;
00126   MonitorElement* mean_map_ADCnorm;
00127   MonitorElement* rms_map_ADCnorm;
00128   */
00129 
00130   MonitorElement* MEAN_MAP_TIME_L1;
00131   MonitorElement*  RMS_MAP_TIME_L1;
00132 
00133   MonitorElement* MEAN_MAP_TIME_L2;
00134   MonitorElement*  RMS_MAP_TIME_L2;
00135 
00136   MonitorElement* MEAN_MAP_TIME_L3;
00137   MonitorElement*  RMS_MAP_TIME_L3;
00138 
00139   MonitorElement* MEAN_MAP_TIME_L4;
00140   MonitorElement*  RMS_MAP_TIME_L4;
00141 
00142   MonitorElement* MEAN_MAP_SHAPE_L1;
00143   MonitorElement*  RMS_MAP_SHAPE_L1;
00144 
00145   MonitorElement* MEAN_MAP_SHAPE_L2;
00146   MonitorElement*  RMS_MAP_SHAPE_L2;
00147 
00148   MonitorElement* MEAN_MAP_SHAPE_L3;
00149   MonitorElement*  RMS_MAP_SHAPE_L3;
00150 
00151   MonitorElement* MEAN_MAP_SHAPE_L4;
00152   MonitorElement*  RMS_MAP_SHAPE_L4;
00153 
00154   MonitorElement* MEAN_MAP_ENERGY_L1;
00155   MonitorElement*  RMS_MAP_ENERGY_L1;
00156 
00157   MonitorElement* MEAN_MAP_ENERGY_L2;
00158   MonitorElement*  RMS_MAP_ENERGY_L2;
00159 
00160   MonitorElement* MEAN_MAP_ENERGY_L3;
00161   MonitorElement*  RMS_MAP_ENERGY_L3;
00162 
00163   MonitorElement* MEAN_MAP_ENERGY_L4;
00164   MonitorElement*  RMS_MAP_ENERGY_L4;
00165 
00166   map<unsigned int,MonitorElement*> MEAN_MAP_ENERGY_DCC;
00167   map<unsigned int,MonitorElement*> RMS_MAP_ENERGY_DCC;
00168   
00169   map<unsigned int,MonitorElement*> MEAN_MAP_SHAPE_DCC;
00170   map<unsigned int,MonitorElement*> RMS_MAP_SHAPE_DCC;
00171 
00172   map<unsigned int,MonitorElement*> MEAN_MAP_TIME_DCC;
00173   map<unsigned int,MonitorElement*> RMS_MAP_TIME_DCC;
00174 
00175 };
00176 
00177 #endif

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