00001 #include "DQM/CastorMonitor/interface/CastorHIMonitor.h"
00002 #include "DQMServices/Core/interface/DQMStore.h"
00003 #include "DQMServices/Core/interface/MonitorElement.h"
00004
00005
00006
00007
00008
00009
00012
00013
00014
00015
00016 CastorHIMonitor::CastorHIMonitor() {
00017 doPerChannel_ = true;
00018
00019 ievt_ = 0;
00020 module = -99;
00021 sector = -99;
00022 energy = -99;
00023 time = -99;
00024 EtotalEM =-99;
00025 EtotalHAD =-99;
00026 EtotalCASTOR =-99;
00027
00028 }
00029
00030
00031
00032
00033 CastorHIMonitor::~CastorHIMonitor(){
00034 }
00035
00036 void CastorHIMonitor::reset(){
00037 }
00038
00039
00040
00041
00042
00043
00044 void CastorHIMonitor::setup(const edm::ParameterSet& ps, DQMStore* dbe){
00045
00046 CastorBaseMonitor::setup(ps,dbe);
00047 baseFolder_ = rootFolder_+"CastorHIMonitor/EnergyUnits";
00048
00049 if(fVerbosity>0) std::cout << "CastorHIMonitor::setup (start)" << std::endl;
00050
00051 if ( ps.getUntrackedParameter<bool>("RecHitsPerChannel", false) ){
00052 doPerChannel_ = true;
00053 }
00054
00055 ievt_=0; EtotalEM =0; EtotalHAD =0; EtotalCASTOR =0;
00056
00057
00059 for (int mod=0; mod<14; mod++) {
00060 for (int sec=0; sec<16; sec++){
00061 energyInEachChannel[mod][sec] = 0;
00062 energyTotalChannel[mod][sec] = 0;
00063 }
00064 }
00065
00067 for (int sec=0; sec<16; sec++){
00068 energyHADsector[sec] = 0;
00069 energySectors[sec] = 0;
00070 energyTotalSector[sec] =0;
00071 }
00072
00073 if ( m_dbe !=NULL ) {
00074 m_dbe->setCurrentFolder(baseFolder_);
00075
00076
00078
00079
00083
00085 meEtotalCASTOR = m_dbe->book1D("CASTOR Absolute RecHit Energy per event","CASTOR Absolute RecHit Energy per event",400,0,2000);
00086
00088 meEtotalSector = m_dbe->book1D("CASTOR Total RecHit Energy in phi-sectors per run","Total RecHit Energy in phi-sectors per run",16,0,16);
00089
00091 meEtotalEM = m_dbe->book1D("CASTOR Total EM RecHit Energy per event","Total EM RecHit Energy per event",300,0,1500);
00092
00094 meEtotalHAD = m_dbe->book1D("CASTOR Total HAD RecHit Energy per event","Total HAD RecHit Energy per event",300,0,1500);
00095
00097 meEtotalEMvsHAD = m_dbe->book1D("CASTOR Total Energy ratio EM to HAD per event","Total Energy ratio EM to HAD per event",50,0,5);
00098
00099
00101 meEsector1 = m_dbe->book1D("RecHit Energy in phi-sector1 vs z-module","RecHit Energy in phi-sector1 vs z-module",14,0,14);
00102 meEsector2 = m_dbe->book1D("RecHit Energy in phi-sector2 vs z-module","RecHit Energy in phi-sector2 vs z-module",14,0,14);
00103 meEsector3 = m_dbe->book1D("RecHit Energy in phi-sector3 vs z-module","RecHit Energy in phi-sector3 vs z-module",14,0,14);
00104 meEsector4 = m_dbe->book1D("RecHit Energy in phi-sector4 vs z-module","RecHit Energy in phi-sector4 vs z-module",14,0,14);
00105 meEsector5 = m_dbe->book1D("RecHit Energy in phi-sector5 vs z-module","RecHit Energy in phi-sector5 vs z-module",14,0,14);
00106 meEsector6 = m_dbe->book1D("RecHit Energy in phi-sector6 vs z-module","RecHit Energy in phi-sector6 vs z-module",14,0,14);
00107 meEsector7 = m_dbe->book1D("RecHit Energy in phi-sector7 vs z-module","RecHit Energy in phi-sector7 vs z-module",14,0,14);
00108 meEsector8 = m_dbe->book1D("RecHit Energy in phi-sector8 vs z-module","RecHit Energy in phi-sector8 vs z-module",14,0,14);
00109 meEsector9 = m_dbe->book1D("RecHit Energy in phi-sector9 vs z-module","RecHit Energy in phi-sector9 vs z-module",14,0,14);
00110 meEsector10 = m_dbe->book1D("RecHit Energy in phi-sector10 vs z-module","RecHit Energy in phi-sector10 vs z-module",14,0,14);
00111 meEsector11 = m_dbe->book1D("RecHit Energy in phi-sector11 vs z-module","RecHit Energy in phi-sector11 vs z-module",14,0,14);
00112 meEsector12 = m_dbe->book1D("RecHit Energy in phi-sector12 vs z-module","RecHit Energy in phi-sector12 vs z-module",14,0,14);
00113 meEsector13 = m_dbe->book1D("RecHit Energy in phi-sector13 vs z-module","RecHit Energy in phi-sector13 vs z-module",14,0,14);
00114 meEsector14 = m_dbe->book1D("RecHit Energy in phi-sector14 vs z-module","RecHit Energy in phi-sector14 vs z-module",14,0,14);
00115 meEsector15 = m_dbe->book1D("RecHit Energy in phi-sector15 vs z-module","RecHit Energy in phi-sector15 vs z-module",14,0,14);
00116 meEsector16 = m_dbe->book1D("RecHit Energy in phi-sector16 vs z-module","RecHit Energy in phi-sector16 vs z-module",14,0,14);
00117
00118
00119
00120 m_dbe->setCurrentFolder(baseFolder_+"/furtherPlots");
00121
00123 meEVT_ = m_dbe->bookInt("HI Event Number");
00124
00126 meEmodule1 = m_dbe->book1D("RecHit Energy in z-module1 vs phi-sector","RecHit Energy in z-module1 vs phi-sector",16,0,16);
00127 meEmodule2 = m_dbe->book1D("RecHit Energy in z-module2 vs phi-sector","RecHit Energy in z-module2 vs phi-sector",16,0,16);
00128 meEmodule3 = m_dbe->book1D("RecHit Energy in z-module3 vs phi-sector","RecHit Energy in z-module3 vs phi-sector",16,0,16);
00129 meEmodule4 = m_dbe->book1D("RecHit Energy in z-module4 vs phi-sector","RecHit Energy in z-module4 vs phi-sector",16,0,16);
00130 meEmodule5 = m_dbe->book1D("RecHit Energy in z-module5 vs phi-sector","RecHit Energy in z-module5 vs phi-sector",16,0,16);
00131 meEmodule6 = m_dbe->book1D("RecHit Energy in z-module6 vs phi-sector","RecHit Energy in z-module6 vs phi-sector",16,0,16);
00132 meEmodule7 = m_dbe->book1D("RecHit Energy in z-module7 vs phi-sector","RecHit Energy in z-module7 vs phi-sector",16,0,16);
00133 meEmodule8 = m_dbe->book1D("RecHit Energy in z-module8 vs phi-sector","RecHit Energy in z-module8 vs phi-sector",16,0,16);
00134 meEmodule9 = m_dbe->book1D("RecHit Energy in z-module9 vs phi-sector","RecHit Energy in z-module9 vs phi-sector",16,0,16);
00135 meEmodule10 = m_dbe->book1D("RecHit Energy in z-module10 vs phi-sector","RecHit Energy in z-module10 vs phi-sector",16,0,16);
00136 meEmodule11 = m_dbe->book1D("RecHit Energy in z-module11 vs phi-sector","RecHit Energy in z-module11 vs phi-sector",16,0,16);
00137 meEmodule12 = m_dbe->book1D("RecHit Energy in z-module12 vs phi-sector","RecHit Energy in z-module12 vs phi-sector",16,0,16);
00138 meEmodule13 = m_dbe->book1D("RecHit Energy in z-module13 vs phi-sector","RecHit Energy in z-module13 vs phi-sector",16,0,16);
00139 meEmodule14 = m_dbe->book1D("RecHit Energy in z-module14 vs phi-sector","RecHit Energy in z-module14 vs phi-sector",16,0,16);
00140
00141 double EmaxSector=800;
00142 double NbinsSector=200;
00143
00145 meEsectorEM1 = m_dbe->book1D("RecHit Energy in EM phi-sector1","RecHit Energy in EM phi-sector1",NbinsSector,0,EmaxSector);
00146 meEsectorEM2 = m_dbe->book1D("RecHit Energy in EM phi-sector2","RecHit Energy in EM phi-sector2",NbinsSector,0,EmaxSector);
00147 meEsectorEM3 = m_dbe->book1D("RecHit Energy in EM phi-sector3","RecHit Energy in EM phi-sector3",NbinsSector,0,EmaxSector);
00148 meEsectorEM4 = m_dbe->book1D("RecHit Energy in EM phi-sector4","RecHit Energy in EM phi-sector4",NbinsSector,0,EmaxSector);
00149 meEsectorEM5 = m_dbe->book1D("RecHit Energy in EM phi-sector5","RecHit Energy in EM phi-sector5",NbinsSector,0,EmaxSector);
00150 meEsectorEM6 = m_dbe->book1D("RecHit Energy in EM phi-sector6","RecHit Energy in EM phi-sector6",NbinsSector,0,EmaxSector);
00151 meEsectorEM7 = m_dbe->book1D("RecHit Energy in EM phi-sector7","RecHit Energy in EM phi-sector7",NbinsSector,0,EmaxSector);
00152 meEsectorEM8 = m_dbe->book1D("RecHit Energy in EM phi-sector8","RecHit Energy in EM phi-sector8",NbinsSector,0,EmaxSector);
00153 meEsectorEM9 = m_dbe->book1D("RecHit Energy in EM phi-sector9","RecHit Energy in EM phi-sector9",NbinsSector,0,EmaxSector);
00154 meEsectorEM10 = m_dbe->book1D("RecHit Energy in EM phi-sector10","RecHit Energy in EM phi-sector10",NbinsSector,0,EmaxSector);
00155 meEsectorEM11 = m_dbe->book1D("RecHit Energy in EM phi-sector11","RecHit Energy in EM phi-sector11",NbinsSector,0,EmaxSector);
00156 meEsectorEM12 = m_dbe->book1D("RecHit Energy in EM phi-sector12","RecHit Energy in EM phi-sector12",NbinsSector,0,EmaxSector);
00157 meEsectorEM13 = m_dbe->book1D("RecHit Energy in EM phi-sector13","RecHit Energy in EM phi-sector13",NbinsSector,0,EmaxSector);
00158 meEsectorEM14 = m_dbe->book1D("RecHit Energy in EM phi-sector14","RecHit Energy in EM phi-sector14",NbinsSector,0,EmaxSector);
00159 meEsectorEM15 = m_dbe->book1D("RecHit Energy in EM phi-sector15","RecHit Energy in EM phi-sector15",NbinsSector,0,EmaxSector);
00160 meEsectorEM16 = m_dbe->book1D("RecHit Energy in EM phi-sector16","RecHit Energy in EM phi-sector16",NbinsSector,0,EmaxSector);
00161
00163 meEsectorHAD1 = m_dbe->book1D("RecHit Energy in HAD phi-sector1","RecHit Energy in HAD phi-sector1",NbinsSector,0,EmaxSector);
00164 meEsectorHAD2 = m_dbe->book1D("RecHit Energy in HAD phi-sector2","RecHit Energy in HAD phi-sector2",NbinsSector,0,EmaxSector);
00165 meEsectorHAD3 = m_dbe->book1D("RecHit Energy in HAD phi-sector3","RecHit Energy in HAD phi-sector3",NbinsSector,0,EmaxSector);
00166 meEsectorHAD4 = m_dbe->book1D("RecHit Energy in HAD phi-sector4","RecHit Energy in HAD phi-sector4",NbinsSector,0,EmaxSector);
00167 meEsectorHAD5 = m_dbe->book1D("RecHit Energy in HAD phi-sector5","RecHit Energy in HAD phi-sector5",NbinsSector,0,EmaxSector);
00168 meEsectorHAD6 = m_dbe->book1D("RecHit Energy in HAD phi-sector6","RecHit Energy in HAD phi-sector6",NbinsSector,0,EmaxSector);
00169 meEsectorHAD7 = m_dbe->book1D("RecHit Energy in HAD phi-sector7","RecHit Energy in HAD phi-sector7",NbinsSector,0,EmaxSector);
00170 meEsectorHAD8 = m_dbe->book1D("RecHit Energy in HAD phi-sector8","RecHit Energy in HAD phi-sector8",NbinsSector,0,EmaxSector);
00171 meEsectorHAD9 = m_dbe->book1D("RecHit Energy in HAD phi-sector9","RecHit Energy in HAD phi-sector9",NbinsSector,0,EmaxSector);
00172 meEsectorHAD10 = m_dbe->book1D("RecHit Energy in HAD phi-sector10","RecHit Energy in HAD phi-sector10",NbinsSector,0,EmaxSector);
00173 meEsectorHAD11 = m_dbe->book1D("RecHit Energy in HAD phi-sector11","RecHit Energy in HAD phi-sector11",NbinsSector,0,EmaxSector);
00174 meEsectorHAD12 = m_dbe->book1D("RecHit Energy in HAD phi-sector12","RecHit Energy in HAD phi-sector12",NbinsSector,0,EmaxSector);
00175 meEsectorHAD13 = m_dbe->book1D("RecHit Energy in HAD phi-sector13","RecHit Energy in HAD phi-sector13",NbinsSector,0,EmaxSector);
00176 meEsectorHAD14 = m_dbe->book1D("RecHit Energy in HAD phi-sector14","RecHit Energy in HAD phi-sector14",NbinsSector,0,EmaxSector);
00177 meEsectorHAD15 = m_dbe->book1D("RecHit Energy in HAD phi-sector15","RecHit Energy in HAD phi-sector15",NbinsSector,0,EmaxSector);
00178 meEsectorHAD16 = m_dbe->book1D("RecHit Energy in HAD phi-sector16","RecHit Energy in HAD phi-sector16",NbinsSector,0,EmaxSector);
00179
00180
00182 meEsectorEMvsHAD1 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector1","Ratio E_EM to E_HAD phi-sector1",50,0,5);
00183 meEsectorEMvsHAD2 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector2","Ratio E_EM to E_HAD phi-sector2",50,0,5);
00184 meEsectorEMvsHAD3 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector3","Ratio E_EM to E_HAD phi-sector3",50,0,5);
00185 meEsectorEMvsHAD4 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector4","Ratio E_EM to E_HAD phi-sector4",50,0,5);
00186 meEsectorEMvsHAD5 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector5","Ratio E_EM to E_HAD phi-sector5",50,0,5);
00187 meEsectorEMvsHAD6 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector6","Ratio E_EM to E_HAD phi-sector6",50,0,5);
00188 meEsectorEMvsHAD7 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector7","Ratio E_EM to E_HAD phi-sector7",50,0,5);
00189 meEsectorEMvsHAD8 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector8","Ratio E_EM to E_HAD phi-sector8",50,0,5);
00190 meEsectorEMvsHAD9 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector9","Ratio E_EM to E_HAD phi-sector9",50,0,5);
00191 meEsectorEMvsHAD10 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector10","Ratio E_EM to E_HAD phi-sector10",50,0,5);
00192 meEsectorEMvsHAD11 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector11","Ratio E_EM to E_HAD phi-sector11",50,0,5);
00193 meEsectorEMvsHAD12 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector12","Ratio E_EM to E_HAD phi-sector12",50,0,5);
00194 meEsectorEMvsHAD13 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector13","Ratio E_EM to E_HAD phi-sector13",50,0,5);
00195 meEsectorEMvsHAD14 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector14","Ratio E_EM to E_HAD phi-sector14",50,0,5);
00196 meEsectorEMvsHAD15 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector15","Ratio E_EM to E_HAD phi-sector15",50,0,5);
00197 meEsectorEMvsHAD16 = m_dbe->book1D("Ratio E_EM to E_HAD phi-sector16","Ratio E_EM to E_HAD phi-sector16",50,0,5);
00198
00199
00200
00201
00202
00203
00207
00208
00209
00211
00212
00214
00215
00217
00218
00220
00221
00223
00224
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328 }
00329
00330 else{
00331 if(fVerbosity>0) std::cout << "CastorHIMonitor::setup - NO DQMStore service" << std::endl;
00332 }
00333
00334 if(fVerbosity>0) std::cout << "CastorHIMonitor::setup (end)" << std::endl;
00335
00336 return;
00337 }
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349 void CastorHIMonitor::processEvent(const CastorRecHitCollection& castorHits, const CastorDigiCollection& castorDigis, const CastorDbService& cond ){
00350
00351 if(fVerbosity>0) std::cout << "==>CastorHIMonitor::processEvent !!!"<< std::endl;
00352
00353 if(!m_dbe) {
00354 if(fVerbosity>0) std::cout <<"CastorHIMonitor::processEvent => DQMStore is not instantiated !!!"<<std::endl;
00355 return;
00356 }
00357
00359 meEVT_->Fill(ievt_);
00360
00362 EtotalEM =0; EtotalHAD =0; EtotalCASTOR =0;
00363
00365 for (int mod=0; mod<14; mod++) {
00366 for (int sec=0; sec<16; sec++) {
00367 energyInEachChannel[mod][sec] = 0;
00368 }
00369 }
00370
00372 for (int sec=0; sec<16; sec++)
00373 energyHADsector[sec] = 0;
00374
00375
00376
00378 CastorRecHitCollection::const_iterator CASTORiter;
00379 if (showTiming) { cpu_timer.reset(); cpu_timer.start(); }
00380
00381
00382
00383
00384
00385 if(castorHits.size()>0)
00386 {
00387
00388 if(fVerbosity>0) std::cout << "==>CastorHIMonitor::processEvent: castorHits.size()>0 !!!" << std::endl;
00389
00391 for (CASTORiter=castorHits.begin(); CASTORiter!=castorHits.end(); ++CASTORiter) {
00392
00394 HcalCastorDetId id(CASTORiter->detid().rawId());
00396 module = (int)id.module();
00397 sector = (int)id.sector();
00398
00400 energy = CASTORiter->energy();
00401 time = CASTORiter->time();
00402
00403 if(fVerbosity>0)
00404 std::cout<<"CastorHIMonitor==> module:"<< module << " sector:"<< sector << " energy:" << energy<<std::endl;
00405
00407 if (energy<0) energy=0;
00408
00410 energyInEachChannel[module-1][sector-1] = energy;
00411
00413 energyTotalChannel[module-1][sector-1] += energy;
00414
00415
00416 }
00417
00418
00419
00420
00421
00422
00423
00424 for (int mod=0; mod<14;mod++){
00425 meEsector1->Fill(mod,energyInEachChannel[mod][0]);
00426 meEsector2->Fill(mod,energyInEachChannel[mod][1]);
00427 meEsector3->Fill(mod,energyInEachChannel[mod][2]);
00428 meEsector4->Fill(mod,energyInEachChannel[mod][3]);
00429 meEsector5->Fill(mod,energyInEachChannel[mod][4]);
00430 meEsector6->Fill(mod,energyInEachChannel[mod][5]);
00431 meEsector7->Fill(mod,energyInEachChannel[mod][6]);
00432 meEsector8->Fill(mod,energyInEachChannel[mod][7]);
00433 meEsector9->Fill(mod,energyInEachChannel[mod][8]);
00434 meEsector10->Fill(mod,energyInEachChannel[mod][9]);
00435 meEsector11->Fill(mod,energyInEachChannel[mod][10]);
00436 meEsector12->Fill(mod,energyInEachChannel[mod][11]);
00437 meEsector13->Fill(mod,energyInEachChannel[mod][12]);
00438 meEsector14->Fill(mod,energyInEachChannel[mod][13]);
00439 meEsector15->Fill(mod,energyInEachChannel[mod][14]);
00440 meEsector16->Fill(mod,energyInEachChannel[mod][15]);
00441 }
00442
00443
00444
00445
00446
00447
00448 for (int sec=0; sec<16;sec++){
00449 meEmodule1->Fill(sec,energyInEachChannel[0][sec]);
00450 meEmodule2->Fill(sec,energyInEachChannel[1][sec]);
00451 meEmodule3->Fill(sec,energyInEachChannel[2][sec]);
00452 meEmodule4->Fill(sec,energyInEachChannel[3][sec]);
00453 meEmodule5->Fill(sec,energyInEachChannel[4][sec]);
00454 meEmodule6->Fill(sec,energyInEachChannel[5][sec]);
00455 meEmodule7->Fill(sec,energyInEachChannel[6][sec]);
00456 meEmodule8->Fill(sec,energyInEachChannel[7][sec]);
00457 meEmodule9->Fill(sec,energyInEachChannel[8][sec]);
00458 meEmodule10->Fill(sec,energyInEachChannel[9][sec]);
00459 meEmodule11->Fill(sec,energyInEachChannel[10][sec]);
00460 meEmodule12->Fill(sec,energyInEachChannel[11][sec]);
00461 meEmodule13->Fill(sec,energyInEachChannel[12][sec]);
00462 meEmodule14->Fill(sec,energyInEachChannel[13][sec]);
00463 }
00464
00465
00466
00467
00468
00469
00470 meEsectorEM1->Fill(energyInEachChannel[0][0]+energyInEachChannel[1][0]);
00471 meEsectorEM2->Fill(energyInEachChannel[0][1]+energyInEachChannel[1][1]);
00472 meEsectorEM3->Fill(energyInEachChannel[0][2]+energyInEachChannel[1][2]);
00473 meEsectorEM4->Fill(energyInEachChannel[0][3]+energyInEachChannel[1][3]);
00474 meEsectorEM5->Fill(energyInEachChannel[0][4]+energyInEachChannel[1][4]);
00475 meEsectorEM6->Fill(energyInEachChannel[0][5]+energyInEachChannel[1][5]);
00476 meEsectorEM7->Fill(energyInEachChannel[0][6]+energyInEachChannel[1][6]);
00477 meEsectorEM8->Fill(energyInEachChannel[0][7]+energyInEachChannel[1][7]);
00478 meEsectorEM9->Fill(energyInEachChannel[0][8]+energyInEachChannel[1][8]);
00479 meEsectorEM10->Fill(energyInEachChannel[0][9]+energyInEachChannel[1][9]);
00480 meEsectorEM11->Fill(energyInEachChannel[0][10]+energyInEachChannel[1][10]);
00481 meEsectorEM12->Fill(energyInEachChannel[0][11]+energyInEachChannel[1][11]);
00482 meEsectorEM13->Fill(energyInEachChannel[0][12]+energyInEachChannel[1][12]);
00483 meEsectorEM14->Fill(energyInEachChannel[0][13]+energyInEachChannel[1][13]);
00484 meEsectorEM15->Fill(energyInEachChannel[0][14]+energyInEachChannel[1][14]);
00485 meEsectorEM16->Fill(energyInEachChannel[0][15]+energyInEachChannel[1][15]);
00486
00487
00488
00489
00490
00491
00492
00493 for(int sec=0; sec<16;sec++){
00494
00496 energyHADsector[sec]= energyInEachChannel[2][sec]+energyInEachChannel[3][sec]+energyInEachChannel[4][sec]+
00497 energyInEachChannel[5][sec]+energyInEachChannel[6][sec]+energyInEachChannel[7][sec]+
00498 energyInEachChannel[8][sec]+energyInEachChannel[9][sec]+energyInEachChannel[10][sec]+
00499 energyInEachChannel[11][sec]+energyInEachChannel[12][sec]+energyInEachChannel[13][sec];
00500 }
00501
00502 meEsectorHAD1->Fill(energyHADsector[0]);
00503 meEsectorHAD2->Fill(energyHADsector[1]);
00504 meEsectorHAD3->Fill(energyHADsector[2]);
00505 meEsectorHAD4->Fill(energyHADsector[3]);
00506 meEsectorHAD5->Fill(energyHADsector[4]);
00507 meEsectorHAD6->Fill(energyHADsector[5]);
00508 meEsectorHAD7->Fill(energyHADsector[6]);
00509 meEsectorHAD8->Fill(energyHADsector[7]);
00510 meEsectorHAD9->Fill(energyHADsector[8]);
00511 meEsectorHAD10->Fill(energyHADsector[9]);
00512 meEsectorHAD11->Fill(energyHADsector[10]);
00513 meEsectorHAD12->Fill(energyHADsector[11]);
00514 meEsectorHAD13->Fill(energyHADsector[12]);
00515 meEsectorHAD14->Fill(energyHADsector[13]);
00516 meEsectorHAD15->Fill(energyHADsector[14]);
00517 meEsectorHAD16->Fill(energyHADsector[15]);
00518
00519
00520
00521
00522 if(energyHADsector[0]!=0) meEsectorEMvsHAD1->Fill((energyInEachChannel[0][0]+energyInEachChannel[1][0])/energyHADsector[0]);
00523 if(energyHADsector[1]!=0) meEsectorEMvsHAD2->Fill((energyInEachChannel[0][1]+energyInEachChannel[1][1])/energyHADsector[1]);
00524 if(energyHADsector[2]!=0) meEsectorEMvsHAD3->Fill((energyInEachChannel[0][2]+energyInEachChannel[1][2])/energyHADsector[2]);
00525 if(energyHADsector[3]!=0) meEsectorEMvsHAD4->Fill((energyInEachChannel[0][3]+energyInEachChannel[1][3])/energyHADsector[3]);
00526 if(energyHADsector[4]!=0) meEsectorEMvsHAD5->Fill((energyInEachChannel[0][4]+energyInEachChannel[1][4])/energyHADsector[4]);
00527 if(energyHADsector[5]!=0) meEsectorEMvsHAD6->Fill((energyInEachChannel[0][5]+energyInEachChannel[1][5])/energyHADsector[5]);
00528 if(energyHADsector[6]!=0) meEsectorEMvsHAD7->Fill((energyInEachChannel[0][6]+energyInEachChannel[1][6])/energyHADsector[6]);
00529 if(energyHADsector[7]!=0) meEsectorEMvsHAD8->Fill((energyInEachChannel[0][7]+energyInEachChannel[1][7])/energyHADsector[7]);
00530 if(energyHADsector[8]!=0) meEsectorEMvsHAD9->Fill((energyInEachChannel[0][8]+energyInEachChannel[1][8])/energyHADsector[8]);
00531 if(energyHADsector[9]!=0) meEsectorEMvsHAD10->Fill((energyInEachChannel[0][9]+energyInEachChannel[1][9])/energyHADsector[9]);
00532 if(energyHADsector[10]!=0) meEsectorEMvsHAD11->Fill((energyInEachChannel[0][10]+energyInEachChannel[1][10])/energyHADsector[10]);
00533 if(energyHADsector[11]!=0) meEsectorEMvsHAD12->Fill((energyInEachChannel[0][11]+energyInEachChannel[1][11])/energyHADsector[11]);
00534 if(energyHADsector[12]!=0) meEsectorEMvsHAD13->Fill((energyInEachChannel[0][12]+energyInEachChannel[1][12])/energyHADsector[12]);
00535 if(energyHADsector[13]!=0) meEsectorEMvsHAD14->Fill((energyInEachChannel[0][13]+energyInEachChannel[1][13])/energyHADsector[13]);
00536 if(energyHADsector[14]!=0) meEsectorEMvsHAD15->Fill((energyInEachChannel[0][14]+energyInEachChannel[1][14])/energyHADsector[14]);
00537 if(energyHADsector[15]!=0) meEsectorEMvsHAD16->Fill((energyInEachChannel[0][15]+energyInEachChannel[1][15])/energyHADsector[15]);
00538
00539
00540
00541
00542
00543
00545 for(int mod=0; mod<2;mod++)
00546 for(int sec=0; sec<16;sec++)
00547 EtotalEM += energyInEachChannel[mod][sec];
00548
00549
00550 meEtotalEM->Fill(EtotalEM);
00551
00552
00553
00554
00555
00557 for(int mod=2; mod<14;mod++)
00558 for(int sec=0; sec<16;sec++)
00559 EtotalHAD += energyInEachChannel[mod][sec];
00560
00561
00562 meEtotalHAD->Fill(EtotalHAD);
00563
00564
00565
00566
00567
00568 if(EtotalHAD!=0) meEtotalEMvsHAD->Fill(EtotalEM/EtotalHAD);
00569
00570
00571
00572
00573 for(int mod=0; mod<14;mod++)
00574 for(int sec=0; sec<16;sec++)
00575 EtotalCASTOR += energyInEachChannel[mod][sec];
00576
00577 meEtotalCASTOR->Fill(EtotalCASTOR);
00578
00579
00580
00581
00582
00583
00584 for(int sec=0; sec<16;sec++){
00585
00587 energyTotalSector[sec] = energyTotalChannel[0][sec]+energyTotalChannel[1][sec]+energyTotalChannel[2][sec]+
00588 energyTotalChannel[3][sec]+energyTotalChannel[4][sec]+energyTotalChannel[5][sec]+
00589 energyTotalChannel[6][sec]+energyTotalChannel[7][sec]+energyTotalChannel[8][sec]+
00590 energyTotalChannel[9][sec]+energyTotalChannel[10][sec]+energyTotalChannel[11][sec]+
00591 energyTotalChannel[12][sec]+energyTotalChannel[13][sec];
00592 }
00593
00594 for(int sec=0; sec<16;sec++)
00595 meEtotalSector->Fill(sec,energyTotalSector[sec]);
00596
00597
00598
00599 }
00600
00601 else { if(fVerbosity>0) std::cout<<"CastorHIMonitor::processEvent NO Castor RecHits !!!"<<std::endl; }
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611 if(castorDigis.size()>0) {
00612
00614
00615 }
00616
00617
00618
00619
00620
00621 else { if(fVerbosity>0) std::cout<<"CastorHIMonitor::processEvent NO Castor Digis !!!"<<std::endl; }
00622
00623
00624 if (showTiming) {
00625 cpu_timer.stop(); std::cout << " TIMER::CastorRecHit -> " << cpu_timer.cpuTime() << std::endl;
00626 cpu_timer.reset(); cpu_timer.start();
00627 }
00628
00629 ievt_++;
00630
00631 return;
00632
00633 }
00634
00635