00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <iostream>
00011 #include <fstream>
00012
00013 #include "FWCore/ServiceRegistry/interface/Service.h"
00014 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00015
00016 #include "DQMServices/Core/interface/MonitorElement.h"
00017
00018 #include "DQMServices/Core/interface/DQMStore.h"
00019
00020 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00021
00022 #include "DataFormats/EcalDetId/interface/EcalDetIdCollections.h"
00023
00024 #include "DQM/EcalCommon/interface/Numbers.h"
00025
00026 #include "DQM/EcalBarrelMonitorTasks/interface/EBIntegrityTask.h"
00027
00028 EBIntegrityTask::EBIntegrityTask(const edm::ParameterSet& ps){
00029
00030 init_ = false;
00031
00032 dqmStore_ = edm::Service<DQMStore>().operator->();
00033
00034 prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
00035
00036 subfolder_ = ps.getUntrackedParameter<std::string>("subfolder", "");
00037
00038 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00039
00040 mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
00041
00042 EBDetIdCollection0_ = ps.getParameter<edm::InputTag>("EBDetIdCollection0");
00043 EBDetIdCollection1_ = ps.getParameter<edm::InputTag>("EBDetIdCollection1");
00044 EBDetIdCollection2_ = ps.getParameter<edm::InputTag>("EBDetIdCollection2");
00045 EBDetIdCollection3_ = ps.getParameter<edm::InputTag>("EBDetIdCollection3");
00046 EcalElectronicsIdCollection1_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection1");
00047 EcalElectronicsIdCollection2_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection2");
00048 EcalElectronicsIdCollection3_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection3");
00049 EcalElectronicsIdCollection4_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection4");
00050 EcalElectronicsIdCollection5_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection5");
00051 EcalElectronicsIdCollection6_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection6");
00052
00053 meIntegrityDCCSize = 0;
00054 for (int i = 0; i < 36; i++) {
00055 meIntegrityGain[i] = 0;
00056 meIntegrityChId[i] = 0;
00057 meIntegrityGainSwitch[i] = 0;
00058 meIntegrityTTId[i] = 0;
00059 meIntegrityTTBlockSize[i] = 0;
00060 meIntegrityMemChId[i] = 0;
00061 meIntegrityMemGain[i] = 0;
00062 meIntegrityMemTTId[i] = 0;
00063 meIntegrityMemTTBlockSize[i] = 0;
00064 }
00065 meIntegrityErrorsByLumi = 0;
00066
00067 }
00068
00069
00070 EBIntegrityTask::~EBIntegrityTask(){
00071
00072 }
00073
00074 void EBIntegrityTask::beginJob(void){
00075
00076 ievt_ = 0;
00077
00078 if ( dqmStore_ ) {
00079 dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
00080 if(subfolder_.size())
00081 dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/" + subfolder_);
00082 dqmStore_->rmdir(prefixME_ + "/EBIntegrityTask");
00083 }
00084
00085 }
00086
00087 void EBIntegrityTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) {
00088
00089 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Reset();
00090
00091 }
00092
00093 void EBIntegrityTask::endLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) {
00094 }
00095
00096 void EBIntegrityTask::beginRun(const edm::Run& r, const edm::EventSetup& c) {
00097
00098 Numbers::initGeometry(c, false);
00099
00100 if ( ! mergeRuns_ ) this->reset();
00101
00102 }
00103
00104 void EBIntegrityTask::endRun(const edm::Run& r, const edm::EventSetup& c) {
00105
00106 }
00107
00108 void EBIntegrityTask::reset(void) {
00109
00110 if ( meIntegrityDCCSize ) meIntegrityDCCSize->Reset();
00111 for (int i = 0; i < 36; i++) {
00112 if ( meIntegrityGain[i] ) meIntegrityGain[i]->Reset();
00113 if ( meIntegrityChId[i] ) meIntegrityChId[i]->Reset();
00114 if ( meIntegrityGainSwitch[i] ) meIntegrityGainSwitch[i]->Reset();
00115 if ( meIntegrityTTId[i] ) meIntegrityTTId[i]->Reset();
00116 if ( meIntegrityTTBlockSize[i] ) meIntegrityTTBlockSize[i]->Reset();
00117 if ( meIntegrityMemChId[i] ) meIntegrityMemChId[i]->Reset();
00118 if ( meIntegrityMemGain[i] ) meIntegrityMemGain[i]->Reset();
00119 if ( meIntegrityMemTTId[i] ) meIntegrityMemTTId[i]->Reset();
00120 if ( meIntegrityMemTTBlockSize[i] ) meIntegrityMemTTBlockSize[i]->Reset();
00121 }
00122 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Reset();
00123
00124 }
00125
00126 void EBIntegrityTask::setup(void){
00127
00128 init_ = true;
00129
00130 std::string name;
00131 std::string dir;
00132
00133 if ( dqmStore_ ) {
00134
00135 dir = prefixME_ + "/EBIntegrityTask";
00136 if(subfolder_.size())
00137 dir += "/" + subfolder_;
00138
00139 dqmStore_->setCurrentFolder(dir);
00140
00141
00142 name = "EBIT DCC size error";
00143 meIntegrityDCCSize = dqmStore_->book1D(name, name, 36, 1., 37.);
00144 for (int i = 0; i < 36; i++) {
00145 meIntegrityDCCSize->setBinLabel(i+1, Numbers::sEB(i+1), 1);
00146 }
00147
00148
00149
00150
00151
00152 name = "EBIT weighted integrity errors by lumi";
00153 meIntegrityErrorsByLumi = dqmStore_->book1D(name, name, 36, 1., 37.);
00154 meIntegrityErrorsByLumi->setLumiFlag();
00155 for (int i = 0; i < 36; i++) {
00156 meIntegrityErrorsByLumi->setBinLabel(i+1, Numbers::sEB(i+1), 1);
00157 }
00158
00159
00160 dqmStore_->setCurrentFolder(dir + "/Gain");
00161 for (int i = 0; i < 36; i++) {
00162 name = "EBIT gain " + Numbers::sEB(i+1);
00163 meIntegrityGain[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
00164 meIntegrityGain[i]->setAxisTitle("ieta", 1);
00165 meIntegrityGain[i]->setAxisTitle("iphi", 2);
00166 dqmStore_->tag(meIntegrityGain[i], i+1);
00167 }
00168
00169
00170 dqmStore_->setCurrentFolder(dir + "/ChId");
00171 for (int i = 0; i < 36; i++) {
00172 name = "EBIT ChId " + Numbers::sEB(i+1);
00173 meIntegrityChId[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
00174 meIntegrityChId[i]->setAxisTitle("ieta", 1);
00175 meIntegrityChId[i]->setAxisTitle("iphi", 2);
00176 dqmStore_->tag(meIntegrityChId[i], i+1);
00177 }
00178
00179
00180 dqmStore_->setCurrentFolder(dir + "/GainSwitch");
00181 for (int i = 0; i < 36; i++) {
00182 name = "EBIT gain switch " + Numbers::sEB(i+1);
00183 meIntegrityGainSwitch[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
00184 meIntegrityGainSwitch[i]->setAxisTitle("ieta", 1);
00185 meIntegrityGainSwitch[i]->setAxisTitle("iphi", 2);
00186 dqmStore_->tag(meIntegrityGainSwitch[i], i+1);
00187 }
00188
00189
00190 dqmStore_->setCurrentFolder(dir + "/TTId");
00191 for (int i = 0; i < 36; i++) {
00192 name = "EBIT TTId " + Numbers::sEB(i+1);
00193 meIntegrityTTId[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
00194 meIntegrityTTId[i]->setAxisTitle("ieta'", 1);
00195 meIntegrityTTId[i]->setAxisTitle("iphi'", 2);
00196 dqmStore_->tag(meIntegrityTTId[i], i+1);
00197 }
00198
00199
00200 dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
00201 for (int i = 0; i < 36; i++) {
00202 name = "EBIT TTBlockSize " + Numbers::sEB(i+1);
00203 meIntegrityTTBlockSize[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
00204 meIntegrityTTBlockSize[i]->setAxisTitle("ieta'", 1);
00205 meIntegrityTTBlockSize[i]->setAxisTitle("iphi'", 2);
00206 dqmStore_->tag(meIntegrityTTBlockSize[i], i+1);
00207 }
00208
00209
00210 dqmStore_->setCurrentFolder(dir + "/MemChId");
00211 for (int i = 0; i < 36; i++) {
00212 name = "EBIT MemChId " + Numbers::sEB(i+1);
00213 meIntegrityMemChId[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
00214 meIntegrityMemChId[i]->setAxisTitle("pseudo-strip", 1);
00215 meIntegrityMemChId[i]->setAxisTitle("channel", 2);
00216 dqmStore_->tag(meIntegrityMemChId[i], i+1);
00217 }
00218
00219
00220
00221
00222 dqmStore_->setCurrentFolder(dir + "/MemGain");
00223 for (int i = 0; i < 36; i++) {
00224 name = "EBIT MemGain " + Numbers::sEB(i+1);
00225 meIntegrityMemGain[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
00226 meIntegrityMemGain[i]->setAxisTitle("pseudo-strip", 1);
00227 meIntegrityMemGain[i]->setAxisTitle("channel", 2);
00228 dqmStore_->tag(meIntegrityMemGain[i], i+1);
00229 }
00230
00231
00232 dqmStore_->setCurrentFolder(dir + "/MemTTId");
00233 for (int i = 0; i < 36; i++) {
00234 name = "EBIT MemTTId " + Numbers::sEB(i+1);
00235 meIntegrityMemTTId[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
00236 meIntegrityMemTTId[i]->setAxisTitle("pseudo-strip", 1);
00237 meIntegrityMemTTId[i]->setAxisTitle("channel", 2);
00238 dqmStore_->tag(meIntegrityMemTTId[i], i+1);
00239 }
00240
00241
00242 dqmStore_->setCurrentFolder(dir + "/MemSize");
00243 for (int i = 0; i < 36; i++) {
00244 name = "EBIT MemSize " + Numbers::sEB(i+1);
00245 meIntegrityMemTTBlockSize[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
00246 meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
00247 meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
00248 meIntegrityMemTTBlockSize[i]->setAxisTitle("channel", 2);
00249 dqmStore_->tag(meIntegrityMemTTBlockSize[i], i+1);
00250 }
00251
00252 }
00253
00254 }
00255
00256 void EBIntegrityTask::cleanup(void){
00257
00258 if ( ! init_ ) return;
00259
00260 if ( dqmStore_ ) {
00261 std::string dir;
00262
00263 dir = prefixME_ + "/EBIntegrityTask";
00264 if(subfolder_.size())
00265 dir += "/" + subfolder_;
00266
00267 dqmStore_->setCurrentFolder(dir + "");
00268
00269 if ( meIntegrityDCCSize ) dqmStore_->removeElement( meIntegrityDCCSize->getName() );
00270 meIntegrityDCCSize = 0;
00271
00272 if ( meIntegrityErrorsByLumi ) dqmStore_->removeElement( meIntegrityErrorsByLumi->getName() );
00273 meIntegrityErrorsByLumi = 0;
00274
00275 dqmStore_->setCurrentFolder(dir + "/Gain");
00276 for (int i = 0; i < 36; i++) {
00277 if ( meIntegrityGain[i] ) dqmStore_->removeElement( meIntegrityGain[i]->getName() );
00278 meIntegrityGain[i] = 0;
00279 }
00280
00281 dqmStore_->setCurrentFolder(dir + "/ChId");
00282 for (int i = 0; i < 36; i++) {
00283 if ( meIntegrityChId[i] ) dqmStore_->removeElement( meIntegrityChId[i]->getName() );
00284 meIntegrityChId[i] = 0;
00285 }
00286
00287 dqmStore_->setCurrentFolder(dir + "/GainSwitch");
00288 for (int i = 0; i < 36; i++) {
00289 if ( meIntegrityGainSwitch[i] ) dqmStore_->removeElement( meIntegrityGainSwitch[i]->getName() );
00290 meIntegrityGainSwitch[i] = 0;
00291 }
00292
00293 dqmStore_->setCurrentFolder(dir + "/TTId");
00294 for (int i = 0; i < 36; i++) {
00295 if ( meIntegrityTTId[i] ) dqmStore_->removeElement( meIntegrityTTId[i]->getName() );
00296 meIntegrityTTId[i] = 0;
00297 }
00298
00299 dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
00300 for (int i = 0; i < 36; i++) {
00301 if ( meIntegrityTTBlockSize[i] ) dqmStore_->removeElement( meIntegrityTTBlockSize[i]->getName() );
00302 meIntegrityTTBlockSize[i] = 0;
00303 }
00304
00305 dqmStore_->setCurrentFolder(dir + "/MemChId");
00306 for (int i = 0; i < 36; i++) {
00307 if ( meIntegrityMemChId[i] ) dqmStore_->removeElement( meIntegrityMemChId[i]->getName() );
00308 meIntegrityMemChId[i] = 0;
00309 }
00310
00311 dqmStore_->setCurrentFolder(dir + "/MemGain");
00312 for (int i = 0; i < 36; i++) {
00313 if ( meIntegrityMemGain[i] ) dqmStore_->removeElement( meIntegrityMemGain[i]->getName() );
00314 meIntegrityMemGain[i] = 0;
00315 }
00316
00317 dqmStore_->setCurrentFolder(dir + "/MemTTId");
00318 for (int i = 0; i < 36; i++) {
00319 if ( meIntegrityMemTTId[i] ) dqmStore_->removeElement( meIntegrityMemTTId[i]->getName() );
00320 meIntegrityMemTTId[i] = 0;
00321 }
00322
00323 dqmStore_->setCurrentFolder(dir + "/MemSize");
00324 for (int i = 0; i < 36; i++) {
00325 if ( meIntegrityMemTTBlockSize[i] ) dqmStore_->removeElement( meIntegrityMemTTBlockSize[i]->getName() );
00326 meIntegrityMemTTBlockSize[i] = 0;
00327 }
00328
00329 }
00330
00331 init_ = false;
00332
00333 }
00334
00335 void EBIntegrityTask::endJob(void){
00336
00337 edm::LogInfo("EBIntegrityTask") << "analyzed " << ievt_ << " events";
00338
00339 if ( enableCleanup_ ) this->cleanup();
00340
00341 }
00342
00343 void EBIntegrityTask::analyze(const edm::Event& e, const edm::EventSetup& c){
00344
00345 if ( ! init_ ) this->setup();
00346
00347 ievt_++;
00348
00349
00350 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(0.);
00351
00352 edm::Handle<EBDetIdCollection> ids0;
00353
00354 if ( e.getByLabel(EBDetIdCollection0_, ids0) ) {
00355
00356 for ( EBDetIdCollection::const_iterator idItr = ids0->begin(); idItr != ids0->end(); ++idItr ) {
00357
00358 int ism = Numbers::iSM( *idItr );
00359
00360 float xism = ism + 0.5;
00361
00362 if ( meIntegrityDCCSize ) meIntegrityDCCSize->Fill(xism);
00363
00364 }
00365
00366 } else {
00367
00368
00369
00370 }
00371
00372 edm::Handle<EBDetIdCollection> ids1;
00373
00374 if ( e.getByLabel(EBDetIdCollection1_, ids1) ) {
00375
00376 for ( EBDetIdCollection::const_iterator idItr = ids1->begin(); idItr != ids1->end(); ++idItr ) {
00377
00378 EBDetId id = (*idItr);
00379
00380 int ic = id.ic();
00381 int ie = (ic-1)/20 + 1;
00382 int ip = (ic-1)%20 + 1;
00383
00384 int ism = Numbers::iSM( id );
00385 float xism = ism + 0.5;
00386
00387 float xie = ie - 0.5;
00388 float xip = ip - 0.5;
00389
00390 if ( meIntegrityGain[ism-1] ) meIntegrityGain[ism-1]->Fill(xie, xip);
00391 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
00392
00393 }
00394
00395 } else {
00396
00397 edm::LogWarning("EBIntegrityTask") << EBDetIdCollection1_ << " not available";
00398
00399 }
00400
00401 edm::Handle<EBDetIdCollection> ids2;
00402
00403 if ( e.getByLabel(EBDetIdCollection2_, ids2) ) {
00404
00405 for ( EBDetIdCollection::const_iterator idItr = ids2->begin(); idItr != ids2->end(); ++idItr ) {
00406
00407 EBDetId id = (*idItr);
00408
00409 int ic = id.ic();
00410 int ie = (ic-1)/20 + 1;
00411 int ip = (ic-1)%20 + 1;
00412
00413 int ism = Numbers::iSM( id );
00414 float xism = ism + 0.5;
00415
00416 float xie = ie - 0.5;
00417 float xip = ip - 0.5;
00418
00419 if ( meIntegrityChId[ism-1] ) meIntegrityChId[ism-1]->Fill(xie, xip);
00420 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
00421
00422 }
00423
00424 } else {
00425
00426 edm::LogWarning("EBIntegrityTask") << EBDetIdCollection2_ << " not available";
00427
00428 }
00429
00430 edm::Handle<EBDetIdCollection> ids3;
00431
00432 if ( e.getByLabel(EBDetIdCollection3_, ids3) ) {
00433
00434 for ( EBDetIdCollection::const_iterator idItr = ids3->begin(); idItr != ids3->end(); ++idItr ) {
00435
00436 EBDetId id = (*idItr);
00437
00438 int ic = id.ic();
00439 int ie = (ic-1)/20 + 1;
00440 int ip = (ic-1)%20 + 1;
00441
00442 int ism = Numbers::iSM( id );
00443 float xism = ism + 0.5;
00444
00445 float xie = ie - 0.5;
00446 float xip = ip - 0.5;
00447
00448 if ( meIntegrityGainSwitch[ism-1] ) meIntegrityGainSwitch[ism-1]->Fill(xie, xip);
00449 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
00450
00451 }
00452
00453 } else {
00454
00455 edm::LogWarning("EBIntegrityTask") << EBDetIdCollection3_ << " not available";
00456
00457 }
00458
00459 edm::Handle<EcalElectronicsIdCollection> ids4;
00460
00461 if ( e.getByLabel(EcalElectronicsIdCollection1_, ids4) ) {
00462
00463 for ( EcalElectronicsIdCollection::const_iterator idItr = ids4->begin(); idItr != ids4->end(); ++idItr ) {
00464
00465 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00466
00467 int itt = idItr->towerId();
00468
00469 int iet = (itt-1)/4 + 1;
00470 int ipt = (itt-1)%4 + 1;
00471
00472 int ismt = Numbers::iSM( *idItr );
00473 float xismt = ismt + 0.5;
00474
00475 float xiet = iet - 0.5;
00476 float xipt = ipt - 0.5;
00477
00478 if ( meIntegrityTTId[ismt-1] ) meIntegrityTTId[ismt-1]->Fill(xiet, xipt);
00479 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xismt, 1./68.);
00480
00481 }
00482
00483 } else {
00484
00485 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection1_ << " not available";
00486
00487 }
00488
00489 edm::Handle<EcalElectronicsIdCollection> ids5;
00490
00491 if ( e.getByLabel(EcalElectronicsIdCollection2_, ids5) ) {
00492
00493 for ( EcalElectronicsIdCollection::const_iterator idItr = ids5->begin(); idItr != ids5->end(); ++idItr ) {
00494
00495 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00496
00497 int itt = idItr->towerId();
00498
00499 int iet = (itt-1)/4 + 1;
00500 int ipt = (itt-1)%4 + 1;
00501
00502 int ismt = Numbers::iSM( *idItr );
00503 float xismt = ismt + 0.5;
00504
00505 float xiet = iet - 0.5;
00506 float xipt = ipt - 0.5;
00507
00508 if ( meIntegrityTTBlockSize[ismt-1] ) meIntegrityTTBlockSize[ismt-1]->Fill(xiet, xipt);
00509 if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xismt, 1./68.);
00510
00511 }
00512
00513 } else {
00514
00515 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection2_ << " not available";
00516
00517 }
00518
00519 edm::Handle<EcalElectronicsIdCollection> ids6;
00520
00521 if ( e.getByLabel(EcalElectronicsIdCollection3_, ids6) ) {
00522
00523 for ( EcalElectronicsIdCollection::const_iterator idItr = ids6->begin(); idItr != ids6->end(); ++idItr ) {
00524
00525 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00526
00527 int ism = Numbers::iSM( *idItr );
00528
00529 int itt = idItr->towerId();
00530 float iTt = itt + 0.5 - 69;
00531
00532 if ( meIntegrityMemTTId[ism-1] ) meIntegrityMemTTId[ism-1]->Fill(iTt,0);
00533
00534 }
00535
00536 } else {
00537
00538 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection3_ << " not available";
00539
00540 }
00541
00542 edm::Handle<EcalElectronicsIdCollection> ids7;
00543
00544 if ( e.getByLabel(EcalElectronicsIdCollection4_, ids7) ) {
00545
00546 for ( EcalElectronicsIdCollection::const_iterator idItr = ids7->begin(); idItr != ids7->end(); ++idItr ) {
00547
00548 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00549
00550 int ism = Numbers::iSM( *idItr );
00551
00552 int itt = idItr->towerId();
00553 float iTt = itt + 0.5 - 69;
00554
00555 if ( meIntegrityMemTTBlockSize[ism-1] ) meIntegrityMemTTBlockSize[ism-1]->Fill(iTt,0);
00556
00557 }
00558
00559 } else {
00560
00561 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection4_ << " not available";
00562
00563 }
00564
00565 edm::Handle<EcalElectronicsIdCollection> ids8;
00566
00567 if ( e.getByLabel(EcalElectronicsIdCollection5_, ids8) ) {
00568
00569 for ( EcalElectronicsIdCollection::const_iterator idItr = ids8->begin(); idItr != ids8->end(); ++idItr ) {
00570
00571 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00572
00573 int ism = Numbers::iSM( *idItr );
00574
00575 int chid = idItr->channelId();
00576 int ie = EBIntegrityTask::chMemAbscissa[chid-1];
00577 int ip = EBIntegrityTask::chMemOrdinate[chid-1];
00578
00579 int itt = idItr->towerId();
00580 ie += (itt-69)*5;
00581
00582 float xie = ie - 0.5;
00583 float xip = ip - 0.5;
00584
00585 if ( meIntegrityMemChId[ism-1] ) meIntegrityMemChId[ism-1]->Fill(xie,xip);
00586
00587 }
00588
00589 } else {
00590
00591 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection5_ << " not available";
00592
00593 }
00594
00595 edm::Handle<EcalElectronicsIdCollection> ids9;
00596
00597 if ( e.getByLabel(EcalElectronicsIdCollection6_, ids9) ) {
00598
00599 for ( EcalElectronicsIdCollection::const_iterator idItr = ids9->begin(); idItr != ids9->end(); ++idItr ) {
00600
00601 if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
00602
00603 int ism = Numbers::iSM( *idItr );
00604
00605 int chid = idItr->channelId();
00606 int ie = EBIntegrityTask::chMemAbscissa[chid-1];
00607 int ip = EBIntegrityTask::chMemOrdinate[chid-1];
00608
00609 int itt = idItr->towerId();
00610 ie += (itt-69)*5;
00611
00612 float xie = ie - 0.5;
00613 float xip = ip - 0.5;
00614
00615 if ( meIntegrityMemGain[ism-1] ) meIntegrityMemGain[ism-1]->Fill(xie,xip);
00616
00617 }
00618
00619 } else {
00620
00621 edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection6_ << " not available";
00622
00623 }
00624
00625 }
00626
00627 const int EBIntegrityTask::chMemAbscissa [25] = {
00628 1, 1, 1, 1, 1,
00629 2, 2, 2, 2, 2,
00630 3, 3, 3, 3, 3,
00631 4, 4, 4, 4, 4,
00632 5, 5, 5, 5, 5
00633 };
00634
00635 const int EBIntegrityTask::chMemOrdinate [25] = {
00636 1, 2, 3, 4, 5,
00637 5, 4, 3, 2, 1,
00638 1, 2, 3, 4, 5,
00639 5, 4, 3, 2, 1,
00640 1, 2, 3, 4, 5
00641 };
00642