00001 #ifndef HcalDigis_HcalSubdetDigiMonitor_h
00002 #define HcalDigis_HcalSubdetDigiMonitor_h
00003
00004 #include "DQMServices/Core/interface/DQMStore.h"
00005 #include <string>
00006 #include "DQMServices/Core/interface/MonitorElement.h"
00007
00008 class HcalSubdetDigiMonitor
00009 {
00010 public:
00011
00012 HcalSubdetDigiMonitor(DQMStore* dbe, const std::string & subdet, int noise);
00013
00014
00015 void fillmeNdigis(double v1)
00016 {fillElement(meNdigis, v1);}
00017
00018
00019 void fillmeOccupancy_map_depth1(double v1, double v2)
00020 {fillElements(meOccupancy_map_depth1, v1, v2);}
00021 void fillmeOccupancy_map_depth2(double v1, double v2)
00022 {fillElements(meOccupancy_map_depth2, v1, v2);}
00023 void fillmeOccupancy_map_depth3(double v1, double v2)
00024 {fillElements(meOccupancy_map_depth3, v1, v2);}
00025 void fillmeOccupancy_map_depth4(double v1, double v2)
00026 {fillElements(meOccupancy_map_depth4, v1, v2);}
00027
00028 void fillmeOccupancy_vs_ieta_depth1(double v1, double v2)
00029 {fillElements(meOccupancy_vs_ieta_depth1, v1, v2);}
00030 void fillmeOccupancy_vs_ieta_depth2(double v1, double v2)
00031 {fillElements(meOccupancy_vs_ieta_depth2, v1, v2);}
00032 void fillmeOccupancy_vs_ieta_depth3(double v1, double v2)
00033 {fillElements(meOccupancy_vs_ieta_depth3, v1, v2);}
00034 void fillmeOccupancy_vs_ieta_depth4(double v1, double v2)
00035 {fillElements(meOccupancy_vs_ieta_depth4, v1, v2);}
00036
00037
00038 double getBinContent_depth1(int i, int j)
00039 {return getMeElementBinContent(meOccupancy_map_depth1, i, j);}
00040 double getBinContent_depth2(int i, int j)
00041 {return getMeElementBinContent(meOccupancy_map_depth2, i, j);}
00042 double getBinContent_depth3(int i, int j)
00043 {return getMeElementBinContent(meOccupancy_map_depth3, i, j);}
00044 double getBinContent_depth4(int i, int j)
00045 {return getMeElementBinContent(meOccupancy_map_depth4, i, j);}
00046
00047 void setBinContent_depth1(int i, int j, double v)
00048 {setMeElementBinContent(meOccupancy_map_depth1, i, j, v);}
00049 void setBinContent_depth2(int i, int j, double v)
00050 {setMeElementBinContent(meOccupancy_map_depth2, i, j, v);}
00051 void setBinContent_depth3(int i, int j, double v)
00052 {setMeElementBinContent(meOccupancy_map_depth3, i, j, v);}
00053 void setBinContent_depth4(int i, int j, double v)
00054 {setMeElementBinContent(meOccupancy_map_depth4, i, j, v);}
00055
00056
00057
00058 void fillmeAmplIetaIphi1(double v1, double v2, double v3)
00059 {fillElements(meAmplIetaIphi1, v1, v2, v3);}
00060 void fillmeAmplIetaIphi2(double v1, double v2, double v3)
00061 {fillElements(meAmplIetaIphi2, v1, v2, v3);}
00062 void fillmeAmplIetaIphi3(double v1, double v2, double v3)
00063 {fillElements(meAmplIetaIphi3, v1, v2, v3);}
00064 void fillmeAmplIetaIphi4(double v1, double v2, double v3)
00065 {fillElements(meAmplIetaIphi4, v1, v2, v3);}
00066
00067
00068 void fillmeSumAmp(double v1)
00069 {fillElement(meSumAmp, v1);}
00070
00071 void fillmenDigis(double v1)
00072 {fillElement(menDigis, v1 );}
00073
00074 void fillmeADC0_depth1(double v1)
00075 {fillElement(meADC0_depth1, v1 );}
00076 void fillmeADC0_depth2(double v1)
00077 {fillElement(meADC0_depth2, v1 );}
00078 void fillmeADC0_depth3(double v1)
00079 {fillElement(meADC0_depth3, v1);}
00080 void fillmeADC0_depth4(double v1)
00081 {fillElement(meADC0_depth4, v1);}
00082
00083 void fillmeADC0fC_depth1(double v1)
00084 {fillElement(meADC0fC_depth1, v1);}
00085 void fillmeADC0fC_depth2(double v1)
00086 {fillElement(meADC0fC_depth2, v1);}
00087 void fillmeADC0fC_depth3(double v1)
00088 {fillElement(meADC0fC_depth3, v1);}
00089 void fillmeADC0fC_depth4(double v1)
00090 {fillElement(meADC0fC_depth4, v1);}
00091
00092 void fillmeSignalAmp(double v1)
00093 {fillElement(meSignalAmp, v1);}
00094 void fillmeSignalAmp1(double v1)
00095 {fillElement(meSignalAmp1, v1);}
00096 void fillmeSignalAmp2(double v1)
00097 {fillElement(meSignalAmp2, v1);}
00098 void fillmeSignalAmp3(double v1)
00099 {fillElement(meSignalAmp3, v1);}
00100 void fillmeSignalAmp4(double v1)
00101 {fillElement(meSignalAmp4, v1);}
00102
00103 void fillmeSignalTimeSlice(double v1, double v2)
00104 {fillElements(meSignalTimeSlice, v1, v2);}
00105
00106 void fillmeAll10slices_depth1(double v1, double v2)
00107 {fillElements(meAll10slices_depth1, v1, v2);}
00108 void fillmeAll10slices_depth2(double v1, double v2)
00109 {fillElements(meAll10slices_depth2, v1, v2);}
00110
00111 void fillmeAll10slices1D_depth1(double v1, double v2)
00112 {fillElements(meAll10slices1D_depth1, v1, v2);}
00113 void fillmeAll10slices1D_depth2(double v1, double v2)
00114 {fillElements(meAll10slices1D_depth2, v1, v2);}
00115
00116 void fillmeBin5Frac(double v1)
00117 {fillElement(meBin5Frac, v1);}
00118 void fillmeBin67Frac(double v1)
00119 {fillElement(meBin67Frac, v1);}
00120
00121 void fillmeDigiSimhit(double v1, double v2)
00122 {fillElements(meDigiSimhit, v1, v2);}
00123 void fillmeDigiSimhit1(double v1, double v2)
00124 {fillElements(meDigiSimhit1, v1, v2);}
00125 void fillmeDigiSimhit2(double v1, double v2)
00126 {fillElements(meDigiSimhit2, v1, v2);}
00127 void fillmeDigiSimhit3(double v1, double v2)
00128 {fillElements(meDigiSimhit3, v1, v2);}
00129 void fillmeDigiSimhit4(double v1, double v2)
00130 {fillElements(meDigiSimhit4, v1, v2);}
00131
00132 void fillmeDigiSimhitProfile(double v1, double v2)
00133 {fillElements(meDigiSimhitProfile, v1, v2);}
00134 void fillmeDigiSimhitProfile1(double v1, double v2)
00135 {fillElements(meDigiSimhitProfile1, v1, v2);}
00136 void fillmeDigiSimhitProfile2(double v1, double v2)
00137 {fillElements(meDigiSimhitProfile2, v1, v2);}
00138 void fillmeDigiSimhitProfile3(double v1, double v2)
00139 {fillElements(meDigiSimhitProfile3, v1, v2);}
00140 void fillmeDigiSimhitProfile4(double v1, double v2)
00141 {fillElements(meDigiSimhitProfile4, v1, v2);}
00142
00143 void fillmeRatioDigiSimhit(double v1)
00144 {fillElement(meRatioDigiSimhit, v1);}
00145 void fillmeRatioDigiSimhit1(double v1)
00146 {fillElement(meRatioDigiSimhit1, v1);}
00147 void fillmeRatioDigiSimhit2(double v1)
00148 {fillElement(meRatioDigiSimhit2, v1);}
00149 void fillmeRatioDigiSimhit3(double v1)
00150 {fillElement(meRatioDigiSimhit3, v1);}
00151 void fillmeRatioDigiSimhit4(double v1)
00152 {fillElement(meRatioDigiSimhit4, v1);}
00153
00154
00155
00156
00157 void fillmeGain0Depth1(double v1)
00158 {fillElement(meGain0Depth1, v1);}
00159 void fillmeGain1Depth1(double v1)
00160 {fillElement(meGain1Depth1, v1);}
00161 void fillmeGain2Depth1(double v1)
00162 {fillElement(meGain2Depth1, v1);}
00163 void fillmeGain3Depth1(double v1)
00164 {fillElement(meGain3Depth1, v1);}
00165 void fillmeGain0Depth2(double v1)
00166 {fillElement(meGain0Depth2, v1);}
00167 void fillmeGain1Depth2(double v1)
00168 {fillElement(meGain1Depth2, v1);}
00169 void fillmeGain2Depth2(double v1)
00170 {fillElement(meGain2Depth2, v1);}
00171 void fillmeGain3Depth2(double v1)
00172 {fillElement(meGain3Depth2, v1);}
00173 void fillmeGain0Depth3(double v1)
00174 {fillElement(meGain0Depth3, v1);}
00175 void fillmeGain1Depth3(double v1)
00176 {fillElement(meGain1Depth3, v1);}
00177 void fillmeGain2Depth3(double v1)
00178 {fillElement(meGain2Depth3, v1);}
00179 void fillmeGain3Depth3(double v1)
00180 {fillElement(meGain3Depth3, v1);}
00181 void fillmeGain0Depth4(double v1)
00182 {fillElement(meGain0Depth4, v1);}
00183 void fillmeGain1Depth4(double v1)
00184 {fillElement(meGain1Depth4, v1);}
00185 void fillmeGain2Depth4(double v1)
00186 {fillElement(meGain2Depth4, v1);}
00187 void fillmeGain3Depth4(double v1)
00188 {fillElement(meGain3Depth4, v1);}
00189
00190 void fillmeGainWidth0Depth1(double v1)
00191 {fillElement(meGainWidth0Depth1, v1);}
00192 void fillmeGainWidth1Depth1(double v1)
00193 {fillElement(meGainWidth1Depth1, v1);}
00194 void fillmeGainWidth2Depth1(double v1)
00195 {fillElement(meGainWidth2Depth1, v1);}
00196 void fillmeGainWidth3Depth1(double v1)
00197 {fillElement(meGainWidth3Depth1, v1);}
00198 void fillmeGainWidth0Depth2(double v1)
00199 {fillElement(meGainWidth0Depth2, v1);}
00200 void fillmeGainWidth1Depth2(double v1)
00201 {fillElement(meGainWidth1Depth2, v1);}
00202 void fillmeGainWidth2Depth2(double v1)
00203 {fillElement(meGainWidth2Depth2, v1);}
00204 void fillmeGainWidth3Depth2(double v1)
00205 {fillElement(meGainWidth3Depth2, v1);}
00206 void fillmeGainWidth0Depth3(double v1)
00207 {fillElement(meGainWidth0Depth3, v1);}
00208 void fillmeGainWidth1Depth3(double v1)
00209 {fillElement(meGainWidth1Depth3, v1);}
00210 void fillmeGainWidth2Depth3(double v1)
00211 {fillElement(meGainWidth2Depth3, v1);}
00212 void fillmeGainWidth3Depth3(double v1)
00213 {fillElement(meGainWidth3Depth3, v1);}
00214 void fillmeGainWidth0Depth4(double v1)
00215 {fillElement(meGainWidth0Depth4, v1);}
00216 void fillmeGainWidth1Depth4(double v1)
00217 {fillElement(meGainWidth1Depth4, v1);}
00218 void fillmeGainWidth2Depth4(double v1)
00219 {fillElement(meGainWidth2Depth4, v1);}
00220 void fillmeGainWidth3Depth4(double v1)
00221 {fillElement(meGainWidth3Depth4, v1);}
00222
00223 void fillmePed0Depth1(double v1)
00224 {fillElement(mePed0Depth1, v1);}
00225 void fillmePed1Depth1(double v1)
00226 {fillElement(mePed1Depth1, v1);}
00227 void fillmePed2Depth1(double v1)
00228 {fillElement(mePed2Depth1, v1);}
00229 void fillmePed3Depth1(double v1)
00230 {fillElement(mePed3Depth1, v1);}
00231 void fillmePed0Depth2(double v1)
00232 {fillElement(mePed0Depth2, v1);}
00233 void fillmePed1Depth2(double v1)
00234 {fillElement(mePed1Depth2, v1);}
00235 void fillmePed2Depth2(double v1)
00236 {fillElement(mePed2Depth2, v1);}
00237 void fillmePed3Depth2(double v1)
00238 {fillElement(mePed3Depth2, v1);}
00239 void fillmePed0Depth3(double v1)
00240 {fillElement(mePed0Depth3, v1);}
00241 void fillmePed1Depth3(double v1)
00242 {fillElement(mePed1Depth3, v1);}
00243 void fillmePed2Depth3(double v1)
00244 {fillElement(mePed2Depth3, v1);}
00245 void fillmePed3Depth3(double v1)
00246 {fillElement(mePed3Depth3, v1);}
00247 void fillmePed0Depth4(double v1)
00248 {fillElement(mePed0Depth4, v1);}
00249 void fillmePed1Depth4(double v1)
00250 {fillElement(mePed1Depth4, v1);}
00251 void fillmePed2Depth4(double v1)
00252 {fillElement(mePed2Depth4, v1);}
00253 void fillmePed3Depth4(double v1)
00254 {fillElement(mePed3Depth4, v1);}
00255
00256
00257 void fillmePedWidth0Depth1(double v1)
00258 {fillElement(mePedWidth0Depth1, v1);}
00259 void fillmePedWidth1Depth1(double v1)
00260 {fillElement(mePedWidth1Depth1, v1);}
00261 void fillmePedWidth2Depth1(double v1)
00262 {fillElement(mePedWidth2Depth1, v1);}
00263 void fillmePedWidth3Depth1(double v1)
00264 {fillElement(mePedWidth3Depth1, v1);}
00265 void fillmePedWidth0Depth2(double v1)
00266 {fillElement(mePedWidth0Depth2, v1);}
00267 void fillmePedWidth1Depth2(double v1)
00268 {fillElement(mePedWidth1Depth2, v1);}
00269 void fillmePedWidth2Depth2(double v1)
00270 {fillElement(mePedWidth2Depth2, v1);}
00271 void fillmePedWidth3Depth2(double v1)
00272 {fillElement(mePedWidth3Depth2, v1);}
00273 void fillmePedWidth0Depth3(double v1)
00274 {fillElement(mePedWidth0Depth3, v1);}
00275 void fillmePedWidth1Depth3(double v1)
00276 {fillElement(mePedWidth1Depth3, v1);}
00277 void fillmePedWidth2Depth3(double v1)
00278 {fillElement(mePedWidth2Depth3, v1);}
00279 void fillmePedWidth3Depth3(double v1)
00280 {fillElement(mePedWidth3Depth3, v1);}
00281 void fillmePedWidth0Depth4(double v1)
00282 {fillElement(mePedWidth0Depth4, v1);}
00283 void fillmePedWidth1Depth4(double v1)
00284 {fillElement(mePedWidth1Depth4, v1);}
00285 void fillmePedWidth2Depth4(double v1)
00286 {fillElement(mePedWidth2Depth4, v1);}
00287 void fillmePedWidth3Depth4(double v1)
00288 {fillElement(mePedWidth3Depth4, v1);}
00289
00290 void fillmeGainMap1(double v1, double v2, double v3)
00291 {fillElements(meGainMap1, v1, v2, v3);}
00292 void fillmeGainMap2(double v1, double v2, double v3)
00293 {fillElements(meGainMap2, v1, v2, v3);}
00294 void fillmeGainMap3(double v1, double v2, double v3)
00295 {fillElements(meGainMap3, v1, v2, v3);}
00296 void fillmeGainMap4(double v1, double v2, double v3)
00297 {fillElements(meGainMap4, v1, v2, v3);}
00298
00299 void fillmePwidthMap1(double v1, double v2, double v3)
00300 {fillElements(mePwidthMap1, v1, v2, v3);}
00301 void fillmePwidthMap2(double v1, double v2, double v3)
00302 {fillElements(mePwidthMap2, v1, v2, v3);}
00303 void fillmePwidthMap3(double v1, double v2, double v3)
00304 {fillElements(mePwidthMap3, v1, v2, v3);}
00305 void fillmePwidthMap4(double v1, double v2, double v3)
00306 {fillElements(mePwidthMap4, v1, v2, v3);}
00307
00308 private:
00309
00310 void fillElement(MonitorElement* me, double value)
00311 {
00312 if(me) me->Fill(value);
00313 }
00314 void fillElements(MonitorElement* me, double v1, double v2)
00315 {
00316 if(me) me->Fill(v1, v2);
00317 }
00318 void fillElements(MonitorElement* me, double v1, double v2, double v3)
00319 {
00320 if(me) me->Fill(v1, v2, v3);
00321 }
00322
00323 double getMeElementBinContent(MonitorElement* me, int i, int j)
00324 {
00325 double tmp = 0.;
00326 if(me) tmp = me->getBinContent(i,j);
00327 return tmp;
00328 }
00329
00330 void setMeElementBinContent(MonitorElement* me, int i, int j, double v)
00331 {
00332 if(me) me->setBinContent(i,j,v);
00333 }
00334
00335
00336
00337 struct HistLim
00338 {
00339 HistLim(int nbin, float mini, float maxi)
00340 : n(nbin), min(mini), max(maxi) {}
00341 int n;
00342 float min;
00343 float max;
00344 };
00345
00346
00347 MonitorElement * book1D(const std::string & name, HistLim lim);
00348 MonitorElement * book2D(const std::string & name, HistLim lim1,
00349 HistLim lim2);
00350 MonitorElement * bookProfile(const std::string & name, HistLim lim1,
00351 HistLim lim2);
00352
00353 DQMStore* dbe_;
00354 std::string subdet_;
00355 int noise_;
00356
00357 MonitorElement* meNdigis;
00358
00359 MonitorElement* meOccupancy_map_depth1;
00360 MonitorElement* meOccupancy_map_depth2;
00361 MonitorElement* meOccupancy_map_depth3;
00362 MonitorElement* meOccupancy_map_depth4;
00363 MonitorElement* meOccupancy_vs_ieta_depth1;
00364 MonitorElement* meOccupancy_vs_ieta_depth2;
00365 MonitorElement* meOccupancy_vs_ieta_depth3;
00366 MonitorElement* meOccupancy_vs_ieta_depth4;
00367
00368
00369 MonitorElement* meAmplIetaIphi1;
00370 MonitorElement* meAmplIetaIphi2;
00371 MonitorElement* meAmplIetaIphi3;
00372 MonitorElement* meAmplIetaIphi4;
00373 MonitorElement* meSumAmp;
00374 MonitorElement* menDigis;
00375
00376 MonitorElement* meADC0_depth1;
00377 MonitorElement* meADC0_depth2;
00378 MonitorElement* meADC0_depth3;
00379 MonitorElement* meADC0_depth4;
00380 MonitorElement* meADC0fC_depth1;
00381 MonitorElement* meADC0fC_depth2;
00382 MonitorElement* meADC0fC_depth3;
00383 MonitorElement* meADC0fC_depth4;
00384
00385 MonitorElement* meSignalAmp;
00386 MonitorElement* meSignalAmp1;
00387 MonitorElement* meSignalAmp2;
00388 MonitorElement* meSignalAmp3;
00389 MonitorElement* meSignalAmp4;
00390
00391 MonitorElement* meSignalTimeSlice;
00392 MonitorElement* meAll10slices_depth1;
00393 MonitorElement* meAll10slices_depth2;
00394 MonitorElement* meAll10slices1D_depth1;
00395 MonitorElement* meAll10slices1D_depth2;
00396 MonitorElement* meBin5Frac;
00397 MonitorElement* meBin67Frac;
00398
00399 MonitorElement* meDigiSimhit;
00400 MonitorElement* meDigiSimhit1;
00401 MonitorElement* meDigiSimhit2;
00402 MonitorElement* meDigiSimhit3;
00403 MonitorElement* meDigiSimhit4;
00404
00405 MonitorElement* meRatioDigiSimhit;
00406 MonitorElement* meRatioDigiSimhit1;
00407 MonitorElement* meRatioDigiSimhit2;
00408 MonitorElement* meRatioDigiSimhit3;
00409 MonitorElement* meRatioDigiSimhit4;
00410
00411 MonitorElement* meDigiSimhitProfile;
00412 MonitorElement* meDigiSimhitProfile1;
00413 MonitorElement* meDigiSimhitProfile2;
00414 MonitorElement* meDigiSimhitProfile3;
00415 MonitorElement* meDigiSimhitProfile4;
00416
00417
00418
00419 MonitorElement* meGain0Depth1;
00420 MonitorElement* meGain1Depth1;
00421 MonitorElement* meGain2Depth1;
00422 MonitorElement* meGain3Depth1;
00423 MonitorElement* meGain0Depth2;
00424 MonitorElement* meGain1Depth2;
00425 MonitorElement* meGain2Depth2;
00426 MonitorElement* meGain3Depth2;
00427 MonitorElement* meGain0Depth3;
00428 MonitorElement* meGain1Depth3;
00429 MonitorElement* meGain2Depth3;
00430 MonitorElement* meGain3Depth3;
00431 MonitorElement* meGain0Depth4;
00432 MonitorElement* meGain1Depth4;
00433 MonitorElement* meGain2Depth4;
00434 MonitorElement* meGain3Depth4;
00435
00436 MonitorElement* meGainWidth0Depth1;
00437 MonitorElement* meGainWidth1Depth1;
00438 MonitorElement* meGainWidth2Depth1;
00439 MonitorElement* meGainWidth3Depth1;
00440 MonitorElement* meGainWidth0Depth2;
00441 MonitorElement* meGainWidth1Depth2;
00442 MonitorElement* meGainWidth2Depth2;
00443 MonitorElement* meGainWidth3Depth2;
00444 MonitorElement* meGainWidth0Depth3;
00445 MonitorElement* meGainWidth1Depth3;
00446 MonitorElement* meGainWidth2Depth3;
00447 MonitorElement* meGainWidth3Depth3;
00448 MonitorElement* meGainWidth0Depth4;
00449 MonitorElement* meGainWidth1Depth4;
00450 MonitorElement* meGainWidth2Depth4;
00451 MonitorElement* meGainWidth3Depth4;
00452
00453 MonitorElement* mePed0Depth1;
00454 MonitorElement* mePed1Depth1;
00455 MonitorElement* mePed2Depth1;
00456 MonitorElement* mePed3Depth1;
00457 MonitorElement* mePed0Depth2;
00458 MonitorElement* mePed1Depth2;
00459 MonitorElement* mePed2Depth2;
00460 MonitorElement* mePed3Depth2;
00461 MonitorElement* mePed0Depth3;
00462 MonitorElement* mePed1Depth3;
00463 MonitorElement* mePed2Depth3;
00464 MonitorElement* mePed3Depth3;
00465 MonitorElement* mePed0Depth4;
00466 MonitorElement* mePed1Depth4;
00467 MonitorElement* mePed2Depth4;
00468 MonitorElement* mePed3Depth4;
00469
00470 MonitorElement* mePedWidth0Depth1;
00471 MonitorElement* mePedWidth1Depth1;
00472 MonitorElement* mePedWidth2Depth1;
00473 MonitorElement* mePedWidth3Depth1;
00474 MonitorElement* mePedWidth0Depth2;
00475 MonitorElement* mePedWidth1Depth2;
00476 MonitorElement* mePedWidth2Depth2;
00477 MonitorElement* mePedWidth3Depth2;
00478 MonitorElement* mePedWidth0Depth3;
00479 MonitorElement* mePedWidth1Depth3;
00480 MonitorElement* mePedWidth2Depth3;
00481 MonitorElement* mePedWidth3Depth3;
00482 MonitorElement* mePedWidth0Depth4;
00483 MonitorElement* mePedWidth1Depth4;
00484 MonitorElement* mePedWidth2Depth4;
00485 MonitorElement* mePedWidth3Depth4;
00486
00487
00488
00489 MonitorElement* meGainMap1;
00490 MonitorElement* meGainMap2;
00491 MonitorElement* meGainMap3;
00492 MonitorElement* meGainMap4;
00493 MonitorElement* mePwidthMap1;
00494 MonitorElement* mePwidthMap2;
00495 MonitorElement* mePwidthMap3;
00496 MonitorElement* mePwidthMap4;
00497
00498 };
00499
00500 #endif
00501