![]() |
![]() |
#include <DQM/HcalMonitorTasks/interface/HcalHotCellMonitor.h>
Definition at line 32 of file HcalHotCellMonitor.h.
HcalHotCellMonitor::HcalHotCellMonitor | ( | ) |
Definition at line 8 of file HcalHotCellMonitor.cc.
References HcalBaseMonitor::fVerbosity, hotmon_makeDiagnostics_, hotmon_test_energy_, hotmon_test_neighbor_, hotmon_test_pedestal_, hotmon_test_persistent_, ievt_, and HcalBaseMonitor::showTiming.
00009 { 00010 ievt_=0; 00011 // Default initialization 00012 hotmon_makeDiagnostics_ = false; 00013 hotmon_test_pedestal_ = false; 00014 hotmon_test_energy_ = false; 00015 hotmon_test_neighbor_ = false; 00016 hotmon_test_persistent_ = false; 00017 showTiming = false; 00018 fVerbosity = 0; 00019 } //constructor
HcalHotCellMonitor::~HcalHotCellMonitor | ( | ) |
void HcalHotCellMonitor::clearME | ( | ) | [virtual] |
Reimplemented from HcalBaseMonitor.
Definition at line 533 of file HcalHotCellMonitor.cc.
References HcalBaseMonitor::baseFolder_, HcalBaseMonitor::m_dbe, DQMStore::removeContents(), and DQMStore::setCurrentFolder().
Referenced by HcalMonitorModule::~HcalMonitorModule().
00534 { 00535 // I don't think this function gets cleared any more. 00536 // And need to add code to clear out subfolders as well? 00537 if (m_dbe) 00538 { 00539 m_dbe->setCurrentFolder(baseFolder_); 00540 m_dbe->removeContents(); 00541 } 00542 return; 00543 } // void HcalHotCellMonitor::clearME()
void HcalHotCellMonitor::createMaps | ( | const HcalDbService & | cond | ) |
Definition at line 331 of file HcalHotCellMonitor.cc.
References HcalQIECoder::adc(), GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, doFCpeds_, lat::endl(), HcalBaseMonitor::etaMax_, HcalBaseMonitor::etaMin_, HcalBaseMonitor::fVerbosity, HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HcalDbService::getPedestalWidth(), HcalPedestalWidth::getSigma(), HBnsigma_, ReconstructionGR_cff::hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HEnsigma_, HFnsigma_, HOnsigma_, hotmon_test_pedestal_, int, HcalCalibrations::pedestal(), pedestal_thresholds_, pedestals_, HcalBaseMonitor::phiMax_, HcalBaseMonitor::phiMin_, funct::pow(), edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), HcalDetId::subdet(), HcalBaseMonitor::validDetId(), width, and widths_.
Referenced by HcalMonitorModule::beginJob().
00332 { 00333 00334 // Creates maps for pedestals, widths, and pedestals+Nsigma*widths, using HcalDetIds as keys 00335 00336 if (!hotmon_test_pedestal_) return; // no need to create maps if we're not running the pedestal-based hot cell finder 00337 00338 if (showTiming) 00339 { 00340 cpu_timer.reset(); cpu_timer.start(); 00341 } 00342 00343 if (fVerbosity>0) 00344 cout <<"<HcalHotCellMonitor::createMaps>: Making pedestal maps"<<endl; 00345 double ped=0; 00346 double width=0; 00347 HcalCalibrations calibs; 00348 const HcalQIEShape* shape = cond.getHcalShape(); 00349 00350 double myNsigma=0; 00351 double myADC=0; 00352 00353 for (int ieta=(int)etaMin_;ieta<=(int)etaMax_;++ieta) 00354 { 00355 for (int iphi=(int)phiMin_;iphi<=(int)phiMax_;++iphi) 00356 { 00357 for (int depth=1;depth<=4;++depth) 00358 { 00359 for (int subdet=1;subdet<=4;++subdet) 00360 { 00361 if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth)) 00362 continue; 00363 HcalDetId hcal((HcalSubdetector)(subdet), ieta, iphi, depth); 00364 00365 if (hcal.subdet()==HcalBarrel) 00366 myNsigma=HBnsigma_; 00367 else if (hcal.subdet()==HcalEndcap) 00368 myNsigma=HEnsigma_; 00369 else if (hcal.subdet()==HcalOuter) 00370 myNsigma=HOnsigma_; 00371 else if (hcal.subdet()==HcalForward) 00372 myNsigma=HFnsigma_; 00373 00374 calibs=cond.getHcalCalibrations(hcal); 00375 const HcalPedestalWidth* pedw = cond.getPedestalWidth(hcal); 00376 00377 ped=0.; 00378 width=0.; 00379 myADC=0.; 00380 // loop over capids 00381 for (int capid=0;capid<4;++capid) 00382 { 00383 // pedestals from calibs.pedestal are always in fC 00384 const HcalQIECoder* channelCoder=cond.getHcalCoder(hcal); 00385 00386 // Convert pedestals to ADC 00387 myADC=channelCoder->adc(*shape, 00388 (float)calibs.pedestal(capid), 00389 capid); 00390 ped+=myADC; 00391 // Now the tricky part -- need to convert widths to ADC if provided in fC 00392 if (doFCpeds_) 00393 { 00394 // Form width by summing the diagonal terms of the covariance matrix (sigma_ii), 00395 // and scale by ADC/fC ratio to convert from fC^2 to ADC^2 00396 width+=(pedw->getSigma(capid,capid)*pow(myADC/calibs.pedestal(capid),2)); 00397 } 00398 else 00399 width+=pedw->getSigma(capid,capid); 00400 } // for (int capid=0;capid<4;++capid) 00401 00402 ped/=4.; // pedestal value is average over capids 00403 width=pow(width,0.5)/4.; 00404 00405 pedestals_[hcal]=ped; 00406 widths_[hcal]=width; 00407 if (fVerbosity>1) cout <<"<HcalHotCellMonitor::createMaps> Pedestal Value -- ID = "<<(HcalSubdetector)subdet<<" ("<<ieta<<", "<<iphi<<", "<<depth<<"): "<<ped<<"; width = "<<width<<endl; 00408 pedestal_thresholds_[hcal]=ped+myNsigma*width; 00409 } // for (int subdet=1,...) 00410 } // for (int depth=1;...) 00411 } // for (int phi ...) 00412 } // for (int ieta...) 00413 00414 return; 00415 } // void HcalHotCellMonitor::createMaps
Definition at line 422 of file HcalHotCellMonitor.cc.
References funct::abs(), BITSHIFT, GenMuonPlsPt100GeV_cfg::cout, d, HcalBaseMonitor::dump2database, lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::etaMin_, HcalBaseMonitor::fVerbosity, hotmon_minErrorFlag_, int, phi, HcalBaseMonitor::phiBins_, HcalBaseMonitor::phiMin_, ProblemHotCellsByDepth, HcalBaseMonitor::validDetId(), and value.
Referenced by HcalMonitorModule::endJob().
00423 { 00424 if (dump2database==0) // don't do anything special unless specifically asked to dump db file 00425 return; 00426 00427 // Dump to ascii file for database -- now handled in Channel Status objects 00428 /* 00429 char buffer [1024]; 00430 ofstream fOutput("hcalHotCells.txt", ios::out); 00431 sprintf (buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId"); 00432 fOutput << buffer; 00433 */ 00434 00435 int eta,phi; 00436 float binval; 00437 int mydepth; 00438 00439 int subdet; 00440 char* subdetname; 00441 if (fVerbosity>1) 00442 { 00443 cout <<"<HcalHotCellMonitor> Summary of Hot Cells in Run: "<<endl; 00444 cout <<"(Error rate must be >= "<<hotmon_minErrorFlag_*100.<<"% )"<<endl; 00445 } 00446 for (int ieta=1;ieta<=etaBins_;++ieta) 00447 { 00448 for (int iphi=1;iphi<=phiBins_;++iphi) 00449 { 00450 eta=ieta+int(etaMin_)-1; 00451 phi=iphi+int(phiMin_)-1; 00452 00453 for (int d=0;d<6;++d) 00454 { 00455 binval=ProblemHotCellsByDepth[d]->getBinContent(ieta,iphi); 00456 00457 // Set subdetector labels for output 00458 if (d<2) // HB/HF 00459 { 00460 if (abs(eta)<29) 00461 { 00462 subdetname="HB"; 00463 subdet=1; 00464 } 00465 else 00466 { 00467 subdetname="HF"; 00468 subdet=4; 00469 } 00470 } 00471 else if (d==3) 00472 { 00473 if (abs(eta)==43) 00474 { 00475 subdetname="ZDC"; 00476 subdet=7; // correct value?? 00477 } 00478 else 00479 { 00480 subdetname="HO"; 00481 subdet=3; 00482 } 00483 } 00484 else 00485 { 00486 subdetname="HE"; 00487 subdet=2; 00488 } 00489 // Set correct depth label 00490 if (d>3) 00491 mydepth=d-3; 00492 else 00493 mydepth=d+1; 00494 HcalDetId myid((HcalSubdetector)(subdet), eta, phi, mydepth); 00495 if (!validDetId((HcalSubdetector)(subdet), eta, phi, mydepth)) 00496 continue; 00497 if (fVerbosity>0 && binval>hotmon_minErrorFlag_) 00498 cout <<"Hot Cell "<<subdet<<"("<<eta<<", "<<phi<<", "<<mydepth<<"): "<<binval*100.<<"%"<<endl; 00499 int value = 0; 00500 if (binval>hotmon_minErrorFlag_) 00501 value=1; 00502 00503 if (myqual.find(myid)==myqual.end()) 00504 { 00505 myqual[myid]=(value<<BITSHIFT); // hotcell shifted to bit 6 00506 } 00507 else 00508 { 00509 int mask=(1<<BITSHIFT); 00510 if (value==1) 00511 myqual[myid] |=mask; 00512 00513 else 00514 myqual[myid] &=~mask; 00515 } 00516 /* 00517 sprintf(buffer, " %15i %15i %15i %15s %8X %10X \n",eta,phi,mydepth,subdetname,int(value<<BITSHIFT),int(myid.rawId())); 00518 fOutput<<buffer; 00519 */ 00520 } // for (int d=0;d<6;++d) // loop over depth histograms 00521 } // for (int iphi=1;iphi<=phiBins_;++iphi) 00522 } // for (int ieta=1;ieta<=etaBins_;++ieta) 00523 //fOutput.close(); 00524 00525 return; 00526 00527 } // void HcalHotCellMonitor::done()
void HcalHotCellMonitor::fillHotHistosAtEndRun | ( | ) |
Definition at line 600 of file HcalHotCellMonitor.cc.
References fillNevents_energy(), fillNevents_neighbor(), fillNevents_pedestal(), fillNevents_persistentenergy(), fillNevents_problemCells(), hotmon_checkNevents_energy_, hotmon_checkNevents_neighbor_, hotmon_checkNevents_pedestal_, hotmon_checkNevents_persistent_, hotmon_test_energy_, hotmon_test_neighbor_, hotmon_test_pedestal_, hotmon_test_persistent_, and ievt_.
00601 { 00602 // Fill histograms one last time at endRun call 00603 00604 /* 00605 I'm not sure I like this feature. Suppose checkNevents=500, and the end run occurs at 501? 00606 Then the occupancy plot would create errors for whichever digis were not found in a single event. 00607 That's not desired behavior. 00608 We could just exclude the occupancy test from running here, but I'm not sure that's the best solution either. 00609 For now (28 Oct. 2008), just disable this functionality. We'll come back to it if necessary. 00610 */ 00611 return; 00612 00613 if (hotmon_test_persistent_ && ievt_%hotmon_checkNevents_persistent_>0) fillNevents_persistentenergy(); 00614 if (hotmon_test_pedestal_ && ievt_%hotmon_checkNevents_pedestal_ >0) fillNevents_pedestal(); 00615 if (hotmon_test_neighbor_ && ievt_%hotmon_checkNevents_neighbor_ >0) fillNevents_neighbor(); 00616 if (hotmon_test_energy_ && ievt_%hotmon_checkNevents_energy_ >0) fillNevents_energy(); 00617 if (hotmon_test_persistent_ || hotmon_test_pedestal_ || 00618 hotmon_test_neighbor_ || hotmon_test_energy_) 00619 fillNevents_problemCells(); 00620 }
Definition at line 1526 of file HcalHotCellMonitor.cc.
References aboveenergy, AboveEnergyThresholdCellsByDepth, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::FillUnphysicalHEHFBins(), HcalBaseMonitor::fVerbosity, hotmon_checkNevents_pedestal_, ievt_, int, phi, edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), edm::CPUTimer::stop(), and HcalBaseMonitor::validDetId().
Referenced by fillHotHistosAtEndRun(), and processEvent_rechitenergy().
01527 { 01528 // Fill Histograms showing rec hits that are above some energy value 01529 // (Fill for each instance when cell is above energy; don't require it to be hot for a number of consecutive events) 01530 01531 if (showTiming) 01532 { 01533 cpu_timer.reset(); cpu_timer.start(); 01534 } 01535 01536 if (fVerbosity>0) 01537 cout <<"<HcalHotCellMonitor::fillNevents_energy> ABOVE-ENERGY-THRESHOLD PLOTS"<<endl; 01538 01539 int mydepth=0; 01540 int ieta=0; 01541 int iphi=0; 01542 for (int eta=0;eta<(etaBins_-2);++eta) 01543 { 01544 ieta=eta-int((etaBins_-2)/2); 01545 for (int phi=0;phi<72;++phi) 01546 { 01547 iphi=phi+1; 01548 for (int depth=0;depth<4;++depth) // this is one unit less "true" depth (for indexing purposes) 01549 { 01550 for (int subdet=1;subdet<=4;++subdet) 01551 { 01552 if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1)) 01553 continue; 01554 mydepth=depth; 01555 if (subdet==4) // remember that HF's elements stored in depths (2,3), not (0,1) 01556 mydepth=depth+2; 01557 01558 if (aboveenergy[eta][phi][mydepth]==0) 01559 { 01560 // Cell never was above threshold energy; skip it 01561 continue; 01562 } 01563 // Allow for case when we perform check at end of run, so that ievt_%checkNevents != 0 ? 01564 01565 // Calculate total number of events in prior histogram filled (= ievt_-N in most circumstances). 01566 int oldevts=(ievt_/hotmon_checkNevents_pedestal_); 01567 if (ievt_%hotmon_checkNevents_pedestal_==0) 01568 oldevts-=1; 01569 oldevts*=hotmon_checkNevents_pedestal_; 01570 int newevts=aboveenergy[eta][phi][mydepth]; // number 01571 01572 if (fVerbosity>2) 01573 cout <<"HOT CELL; ABOVE ENERGY THRESHOLD = "<<subdet<<" eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<endl; 01574 if (subdet==2 && depth<2) // HE depth positions(0,1) found -- shift up to positions (4,5) 01575 mydepth=depth+4; 01576 else 01577 mydepth=depth; // switches back HF to its correct depth 01578 01579 // BinContent starts at 1, not 0 (offset by 0) 01580 // Offset by another 1 due to empty bins at edges 01581 AboveEnergyThresholdCellsByDepth[mydepth]->setBinContent( eta+2,phi+2, 01582 (oldevts*AboveEnergyThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2)+newevts)*1./ievt_); 01583 } // for (int subdet=1;subdet<=4;++subdet) 01584 // reset counter -- shouldn't be necessary (should already be 0) 01585 aboveenergy[eta][phi][depth]=0; 01586 } // for (int depth=0;depth<4;++depth) 01587 } // for (int phi=0;...) 01588 } // for (int eta=0;...) 01589 FillUnphysicalHEHFBins(AboveEnergyThresholdCellsByDepth); 01590 if (showTiming) 01591 { 01592 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor FILLNEVENTS_ENERGY -> "<<cpu_timer.cpuTime()<<endl; 01593 } 01594 01595 return; 01596 01597 01598 } // void HcalHotCellMonitor::fillNevents_energy(void)
Definition at line 1604 of file HcalHotCellMonitor.cc.
References aboveneighbors, AboveNeighborsHotCellsByDepth, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::FillUnphysicalHEHFBins(), HcalBaseMonitor::fVerbosity, hotmon_checkNevents_neighbor_, ievt_, int, phi, edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), edm::CPUTimer::stop(), and HcalBaseMonitor::validDetId().
Referenced by fillHotHistosAtEndRun(), and processEvent_rechitneighbors().
01605 { 01606 // Fill Histograms showing rec hits with energy much less than neighbors' average 01607 01608 if (showTiming) 01609 { 01610 cpu_timer.reset(); cpu_timer.start(); 01611 } 01612 01613 if (fVerbosity>0) 01614 cout <<"<HcalHotCellMonitor::fillNevents_neighbor> FILLING ABOVE-NEIGHBOR-ENERGY PLOTS"<<endl; 01615 01616 int mydepth=0; 01617 int ieta=0; 01618 int iphi=0; 01619 for (int eta=0;eta<(etaBins_-2);++eta) 01620 { 01621 ieta=eta-int((etaBins_-2)/2); 01622 for (int phi=0;phi<72;++phi) 01623 { 01624 iphi=phi+1; 01625 for (int depth=0;depth<4;++depth) // this is one unit less "true" depth (for indexing purposes) 01626 { 01627 for (int subdet=1;subdet<=4;++subdet) 01628 { 01629 if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1)) 01630 continue; 01631 mydepth=depth; 01632 if (subdet==4) // remember that HF's elements stored in depths (2,3), not (0,1) 01633 mydepth=depth+2; 01634 if (aboveneighbors[eta][phi][mydepth]>0) 01635 { 01636 if (fVerbosity>2) cout <<"HOT CELL; ABOVE NEIGHBORS = "<<subdet<<" eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<endl; 01637 if (subdet==2 && depth<2) // HE depth positions(0,1) found -- shift up to positions (4,5) 01638 mydepth=depth+4; 01639 else 01640 mydepth=depth; // switches back HF to its correct depth 01641 // no digi was found for the N events; set histogram error rate 01642 int oldevts=(ievt_/hotmon_checkNevents_neighbor_); 01643 if (ievt_%hotmon_checkNevents_neighbor_==0) 01644 oldevts-=1; 01645 oldevts*=hotmon_checkNevents_neighbor_; 01646 // BinContent starts at 1, not 0 (offset by 0) 01647 // Offset by another 1 due to empty bins at edges 01648 AboveNeighborsHotCellsByDepth[mydepth]->setBinContent( eta+2,phi+2, 01649 (oldevts*AboveNeighborsHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2)+aboveneighbors[eta][phi][mydepth])*1./ievt_); 01650 //reset counter 01651 aboveneighbors[eta][phi][depth]=0; 01652 } // if (aboveneighbors[eta][phi][mydepth]>0) 01653 } // for (int subdet=1;subdet<=4;++subdet) 01654 01655 } // for (int depth=0;depth<4;++depth) 01656 } // for (int phi=0;...) 01657 } // for (int eta=0;...) 01658 FillUnphysicalHEHFBins(AboveNeighborsHotCellsByDepth); 01659 01660 if (showTiming) 01661 { 01662 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor FILLNEVENTS_NEIGHBOR -> "<<cpu_timer.cpuTime()<<endl; 01663 } 01664 01665 return; 01666 01667 01668 } // void HcalHotCellMonitor::fillNevents_neighbor(void)
Definition at line 1429 of file HcalHotCellMonitor.cc.
References abovepedestal, AbovePedestalHotCellsByDepth, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), d_HBnormped, d_HEnormped, d_HFnormped, d_HOnormped, diagADC_HB, diagADC_HE, diagADC_HF, diagADC_HO, lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::FillUnphysicalHEHFBins(), HcalBaseMonitor::fVerbosity, hotmon_checkNevents_pedestal_, i, ievt_, int, phi, edm::CPUTimer::reset(), MonitorElement::setBinContent(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), edm::CPUTimer::stop(), and HcalBaseMonitor::validDetId().
Referenced by fillHotHistosAtEndRun(), and processEvent_pedestal().
01430 { 01431 // Fill Histograms showing digi cells consistently above pedestal values 01432 01433 if (showTiming) 01434 { 01435 cpu_timer.reset(); cpu_timer.start(); 01436 } 01437 01438 if (fVerbosity>0) 01439 cout <<"<HcalHotCellMonitor::fillNevents_pedestal> FILLING HOT CELL PEDESTAL PLOTS"<<endl; 01440 01441 for (int i=0;i<300;++i) 01442 { 01443 if (diagADC_HB[i]>0) 01444 d_HBnormped->setBinContent(i+1,diagADC_HB[i]); 01445 if (diagADC_HE[i]>0) 01446 d_HEnormped->setBinContent(i+1,diagADC_HE[i]); 01447 if (diagADC_HO[i]>0) 01448 d_HOnormped->setBinContent(i+1,diagADC_HO[i]); 01449 if (diagADC_HF[i]>0) 01450 d_HFnormped->setBinContent(i+1,diagADC_HF[i]); 01451 // Add ZDC later! 01452 } 01453 01454 int mydepth=0; 01455 int ieta=0; 01456 int iphi=0; 01457 for (int eta=0;eta<(etaBins_-2);++eta) 01458 { 01459 ieta=eta-int((etaBins_-2)/2); 01460 for (int phi=0;phi<72;++phi) 01461 { 01462 iphi=phi+1; 01463 for (int depth=0;depth<4;++depth) // this is one unit less "true" depth (for indexing purposes) 01464 { 01465 for (int subdet=1;subdet<=4;++subdet) 01466 { 01467 if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1)) 01468 continue; 01469 01470 int oldevts=(ievt_/hotmon_checkNevents_pedestal_); 01471 if (ievt_%hotmon_checkNevents_pedestal_==0) 01472 oldevts-=1; 01473 oldevts*=hotmon_checkNevents_pedestal_; 01474 int newevts=ievt_-oldevts; 01475 if (newevts<0) newevts=0; // shouldn't happen 01476 01477 mydepth=depth; 01478 if (subdet==4) // remember that HF's elements stored in depths (2,3), not (0,1) 01479 mydepth=depth+2; 01480 01481 // Now that we have a valid cell, check whether it was above pedestal threshold for all N events 01482 if (abovepedestal[eta][phi][mydepth]<(unsigned int)newevts) 01483 { 01484 abovepedestal[eta][phi][mydepth]=0; 01485 continue; // cell was above pedestal threshold at least once; ignore it 01486 } 01487 if (fVerbosity>0) 01488 cout <<"HOT CELL; ABOVE PEDESTAL THRESHOLD = "<<subdet<<" eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<endl; 01489 if (subdet==2 && depth<2) // HE depth positions(0,1) found -- shift up to positions (4,5) 01490 mydepth=depth+4; 01491 else 01492 mydepth=depth; // switches back HF to its correct depth 01493 01494 if (fVerbosity>0) 01495 { 01496 cout <<"\t MYDEPTH = "<<mydepth<<endl; 01497 cout <<"\t oldevents = "<<oldevts<<" new = "<<newevts<<endl; 01498 cout <<"\t\t"<<(oldevts*AbovePedestalHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2)+newevts)*1./ievt_<<endl; 01499 } 01500 // BinContent starts at 1, not 0 (offset by 0) 01501 // Offset by another 1 due to empty bins at edges 01502 AbovePedestalHotCellsByDepth[mydepth]->setBinContent( eta+2,phi+2, 01503 (oldevts*AbovePedestalHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2)+newevts)*1./ievt_); 01504 //reset counter -- shouldn't be necessary (counter should already be 0). 01505 abovepedestal[eta][phi][depth]=0; 01506 } // for (int subdet=1;subdet<=4;++subdet) 01507 01508 } // for (int depth=0;depth<4;++depth) 01509 } // for (int phi=0;...) 01510 } // for (int eta=0;...) 01511 FillUnphysicalHEHFBins(AbovePedestalHotCellsByDepth); 01512 01513 if (showTiming) 01514 { 01515 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor FILLNEVENTS_ABOVEPEDESTAL -> "<<cpu_timer.cpuTime()<<endl; 01516 } 01517 01518 return; 01519 01520 01521 } // void HcalHotCellMonitor::fillNevents_pedestal(void)
Definition at line 1351 of file HcalHotCellMonitor.cc.
References abovepersistent, AbovePersistentThresholdCellsByDepth, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), d_avgrechitenergymap, lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::FillUnphysicalHEHFBins(), HcalBaseMonitor::fVerbosity, hotmon_checkNevents_persistent_, hotmon_makeDiagnostics_, ievt_, int, phi, rechit_energy_sum, rechit_occupancy_sum, edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), edm::CPUTimer::stop(), and HcalBaseMonitor::validDetId().
Referenced by fillHotHistosAtEndRun(), and processEvent_rechitenergy().
01352 { 01353 // Fill Histograms showing rechits with energies > some threshold for N consecutive events 01354 01355 if (showTiming) 01356 { 01357 cpu_timer.reset(); cpu_timer.start(); 01358 } 01359 01360 if (fVerbosity>0) 01361 cout <<"<HcalHotCellMonitor::fillNevents_persistentenergy> FILLING PERSISTENT ENERGY PLOTS"<<endl; 01362 01363 int mydepth=0; 01364 int ieta=0; 01365 int iphi=0; 01366 for (int eta=0;eta<(etaBins_-2);++eta) 01367 { 01368 ieta=eta-int((etaBins_-2)/2); 01369 for (int phi=0;phi<72;++phi) 01370 { 01371 iphi=phi+1; 01372 for (int depth=0;depth<4;++depth) // this is one unit less "true" depth (for indexing purposes) 01373 { 01374 for (int subdet=1;subdet<=4;++subdet) 01375 { 01376 if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1)) 01377 continue; 01378 mydepth=depth; 01379 if (subdet==4) // remember that HF's elements stored in depths (2,3), not (0,1) 01380 mydepth=depth+2; 01381 if (hotmon_makeDiagnostics_ && rechit_occupancy_sum[eta][phi][mydepth]>0) 01382 { 01383 // Fill average energy plots 01384 int filldepth=depth; 01385 if (subdet==2 && depth<2) filldepth+=4; // HB depths 1&2 get shifted to last two histograms 01386 d_avgrechitenergymap[filldepth]->setBinContent(eta+2,phi+2,rechit_energy_sum[eta][phi][mydepth]/rechit_occupancy_sum[eta][phi][mydepth]); 01387 } 01388 01389 int oldevts=(ievt_/hotmon_checkNevents_persistent_); 01390 if (ievt_%hotmon_checkNevents_persistent_==0) 01391 oldevts-=1; 01392 oldevts*=hotmon_checkNevents_persistent_; 01393 int newevts=ievt_-oldevts; 01394 if (newevts<=0) continue; // shouldn't happen? 01395 // MUST BE ABOVE ENERGY THRESHOLD FOR ALL N EVENTS 01396 if (abovepersistent[eta][phi][mydepth]<(unsigned int)newevts) 01397 { 01398 abovepersistent[eta][phi][mydepth]=0; 01399 continue; // should never be > newevts, either, right? 01400 } 01401 if (fVerbosity>0) cout <<"HOT CELL; PERSISTENT ENERGY = "<<subdet<<" eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<endl; 01402 if (subdet==2 && depth<2) // HE depth positions(0,1) found -- shift up to positions (4,5) 01403 mydepth=depth+4; 01404 else 01405 mydepth=depth; // switches back HF to its correct depth 01406 // BinContent starts at 1, not 0 (offset by 0) 01407 // Offset by another 1 due to empty bins at edges 01408 AbovePersistentThresholdCellsByDepth[mydepth]->setBinContent( eta+2,phi+2, 01409 (oldevts*AbovePersistentThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2)+newevts)*1./ievt_); 01410 } // for (int subdet=1;subdet<=4;++subdet) 01411 abovepersistent[eta][phi][mydepth]=0; // reset counter 01412 } // for (int depth=0;depth<4;++depth) 01413 } // for (int phi=0;...) 01414 } // for (int eta=0;...) 01415 FillUnphysicalHEHFBins(AbovePersistentThresholdCellsByDepth); 01416 01417 if (showTiming) 01418 { 01419 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor FILLNEVENTS_PERSISTENTENERGY -> "<<cpu_timer.cpuTime()<<endl; 01420 } 01421 01422 return; 01423 } // void HcalHotCellMonitor::fillNevents_persistentenergy(void)
Definition at line 1675 of file HcalHotCellMonitor.cc.
References AboveEnergyThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, AbovePedestalHotCellsByDepth, AbovePersistentThresholdCellsByDepth, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), lat::endl(), eta, HcalBaseMonitor::etaBins_, HcalBaseMonitor::FillUnphysicalHEHFBins(), HcalBaseMonitor::fVerbosity, hotmon_test_energy_, hotmon_test_neighbor_, hotmon_test_pedestal_, hotmon_test_persistent_, int, min, phi, ProblemHotCells, ProblemHotCellsByDepth, edm::CPUTimer::reset(), MonitorElement::setBinContent(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), and edm::CPUTimer::stop().
Referenced by fillHotHistosAtEndRun(), and processEvent().
01676 { 01677 if (showTiming) 01678 { 01679 cpu_timer.reset(); cpu_timer.start(); 01680 } 01681 01682 if (fVerbosity>0) 01683 cout <<"<HcalHotCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<endl; 01684 01685 int ieta=0; 01686 int iphi=0; 01687 01688 double problemvalue=0; 01689 double sumproblemvalue=0; // summed over all depths 01690 for (int eta=0;eta<(etaBins_-2);++eta) 01691 { 01692 ieta=eta-int((etaBins_-2)/2); 01693 for (int phi=0;phi<72;++phi) 01694 { 01695 iphi=phi+1; 01696 sumproblemvalue=0; 01697 for (int mydepth=0;mydepth<6;++mydepth) 01698 { 01699 // total bad fraction is sum of fractions from individual tests 01700 // (eventually, do we want to be more careful about how we handle this, in case checkNevents is 01701 // drastically different for the different tests?) 01702 problemvalue=0; 01703 if (hotmon_test_persistent_) 01704 { 01705 problemvalue+=AbovePersistentThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01706 sumproblemvalue+=AbovePersistentThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01707 } 01708 if (hotmon_test_pedestal_) 01709 { 01710 problemvalue+=AbovePedestalHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01711 sumproblemvalue+=AbovePedestalHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01712 } 01713 if (hotmon_test_neighbor_) 01714 { 01715 problemvalue+=AboveNeighborsHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01716 sumproblemvalue+=AboveNeighborsHotCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01717 } 01718 if (hotmon_test_energy_) 01719 { 01720 problemvalue+=AboveEnergyThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01721 sumproblemvalue+=AboveEnergyThresholdCellsByDepth[mydepth]->getBinContent(eta+2,phi+2); 01722 } 01723 problemvalue=min(1.,problemvalue); 01724 ProblemHotCellsByDepth[mydepth]->setBinContent(eta+2,phi+2,problemvalue); 01725 } // for (int mydepth=0;mydepth<6;...) 01726 sumproblemvalue=min(1.,sumproblemvalue); 01727 ProblemHotCells->setBinContent(eta+2,phi+2,sumproblemvalue); 01728 } // loop on phi=0;phi<72 01729 } // loop on eta=0; eta<(etaBins_-2) 01730 01731 FillUnphysicalHEHFBins(ProblemHotCellsByDepth); 01732 01733 if (showTiming) 01734 { 01735 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor FILLNEVENTS_PROBLEMCELLS -> "<<cpu_timer.cpuTime()<<endl; 01736 } 01737 01738 } // void HcalHotCellMonitor::fillNevents_problemCells(void)
void HcalHotCellMonitor::processEvent | ( | const HBHERecHitCollection & | hbHits, | |
const HORecHitCollection & | hoHits, | |||
const HFRecHitCollection & | hfHits, | |||
const HBHEDigiCollection & | hbhedigi, | |||
const HODigiCollection & | hodigi, | |||
const HFDigiCollection & | hfdigi, | |||
const HcalDbService & | cond | |||
) |
Definition at line 548 of file HcalHotCellMonitor.cc.
References GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, lat::endl(), MonitorElement::Fill(), fillNevents_problemCells(), HcalBaseMonitor::fVerbosity, hotmon_checkNevents_energy_, hotmon_checkNevents_neighbor_, hotmon_checkNevents_pedestal_, hotmon_checkNevents_persistent_, hotmon_test_energy_, hotmon_test_neighbor_, hotmon_test_pedestal_, hotmon_test_persistent_, ievt_, HcalBaseMonitor::m_dbe, meEVT_, processEvent_pedestal(), processEvent_rechitenergy(), processEvent_rechitneighbors(), edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, and edm::CPUTimer::start().
Referenced by HcalMonitorModule::analyze().
00558 { 00559 00560 if (showTiming) 00561 { 00562 cpu_timer.reset(); cpu_timer.start(); 00563 } 00564 00565 ++ievt_; 00566 if (m_dbe) meEVT_->Fill(ievt_); 00567 00568 if (fVerbosity>1) cout <<"<HcalHotCellMonitor::processEvent> Processing event..."<<endl; 00569 00570 // Search for cells consistently above (pedestal + N sigma) 00571 if (hotmon_test_pedestal_) 00572 processEvent_pedestal(hbhedigi,hodigi,hfdigi,cond); 00573 00574 // Search for hot cells above a certain energy 00575 if (hotmon_test_energy_ || hotmon_test_persistent_) 00576 { 00577 processEvent_rechitenergy(hbHits, hoHits,hfHits); 00578 } 00579 00580 // Search for cells that are hot compared to their neighbors 00581 if (hotmon_test_neighbor_) 00582 { 00583 processEvent_rechitneighbors(hbHits, hoHits, hfHits); 00584 } 00585 00586 // Fill problem cells 00587 if (((ievt_%hotmon_checkNevents_persistent_ ==0) && hotmon_test_persistent_ )|| 00588 ((ievt_%hotmon_checkNevents_pedestal_ ==0) && hotmon_test_pedestal_ )|| 00589 ((ievt_%hotmon_checkNevents_neighbor_ ==0) && hotmon_test_neighbor_ )|| 00590 ((ievt_%hotmon_checkNevents_energy_ ==0) && hotmon_test_energy_ )) 00591 { 00592 fillNevents_problemCells(); 00593 } 00594 00595 return; 00596 } // void HcalHotCellMonitor::processEvent(...)
void HcalHotCellMonitor::processEvent_pedestal | ( | const HBHEDigiCollection & | hbhedigi, | |
const HODigiCollection & | hodigi, | |||
const HFDigiCollection & | hfdigi, | |||
const HcalDbService & | cond | |||
) |
Definition at line 1080 of file HcalHotCellMonitor.cc.
References abovepedestal, HcalQIESample::adc(), edm::SortedCollection< T, SORT >::begin(), HcalQIESample::capid(), HcalQIECoder::charge(), HcalBaseMonitor::checkHB_, HcalBaseMonitor::checkHE_, HcalBaseMonitor::checkHF_, HcalBaseMonitor::checkHO_, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), HcalDetId::depth(), diagADC_HB, diagADC_HE, diagADC_HF, diagADC_HO, doFCpeds_, edm::SortedCollection< T, SORT >::end(), lat::endl(), HcalBaseMonitor::etaBins_, fillNevents_pedestal(), HcalBaseMonitor::fVerbosity, HcalDbService::getHcalCalibrations(), HcalDbService::getHcalCoder(), HcalDbService::getHcalShape(), HcalBarrel, HcalEndcap, hotmon_checkNevents_pedestal_, hotmon_makeDiagnostics_, hotmon_test_pedestal_, i, HODataFrame::id(), HBHEDataFrame::id(), HFDataFrame::id(), HcalDetId::ieta(), ievt_, int, HcalDetId::iphi(), j, HcalDbService::makeHcalCalibrationWidth(), max, min, HcalCalibrations::pedestal(), pedestal_thresholds_, pedestals_, edm::CPUTimer::reset(), HFDataFrame::sample(), HBHEDataFrame::sample(), HODataFrame::sample(), HcalBaseMonitor::showTiming, HODataFrame::size(), HBHEDataFrame::size(), HFDataFrame::size(), edm::CPUTimer::start(), edm::CPUTimer::stop(), HcalDetId::subdet(), and widths_.
Referenced by processEvent().
01086 { 01087 if (!hotmon_test_pedestal_) return; 01088 if (showTiming) 01089 { 01090 cpu_timer.reset(); cpu_timer.start(); 01091 } 01092 01093 if (fVerbosity>1) cout <<"<HcalHotCellMonitor::processEvent_pedestal> Processing digis..."<<endl; 01094 01095 // Variables used in pedestal check 01096 float digival=0; 01097 float maxval=0; 01098 int maxbin=0; 01099 float ADCsum=0; 01100 01101 // Variables used in occupancy check 01102 int ieta=0; 01103 int iphi=0; 01104 int depth=0; 01105 01106 HcalCalibrationWidths widths; 01107 HcalCalibrations calibs; 01108 const HcalQIEShape* shape=cond.getHcalShape(); 01109 01110 // Loop over HBHE digis 01111 01112 if (fVerbosity>2) cout <<"<HcalHotCellMonitor::processEvent_pedestal> Processing HBHE..."<<endl; 01113 01114 for (HBHEDigiCollection::const_iterator j=hbhedigi.begin(); 01115 j!=hbhedigi.end(); ++j) 01116 { 01117 digival=0; 01118 maxval=0; 01119 maxbin=0; 01120 ADCsum=0; 01121 const HBHEDataFrame digi = (const HBHEDataFrame)(*j); 01122 if (!checkHB_ && (HcalSubdetector)(digi.id().subdet())==HcalBarrel) continue; 01123 if (!checkHE_ && (HcalSubdetector)(digi.id().subdet())==HcalEndcap) continue; 01124 01125 ieta=digi.id().ieta(); 01126 iphi=digi.id().iphi(); 01127 depth=digi.id().depth(); 01128 01129 HcalDetId myid = digi.id(); 01130 cond.makeHcalCalibrationWidth(digi.id(),&widths); 01131 //const HcalCalibrationWidths widths = cond.getHcalCalibrationWidths(digi.id()); 01132 01133 calibs = cond.getHcalCalibrations(digi.id()); 01134 01135 // Find digi time slice with maximum (pedestal-subtracted) ADC count 01136 for (int i=0;i<digi.size();++i) 01137 { 01138 int thisCapid = digi.sample(i).capid(); 01139 if (doFCpeds_) 01140 { 01141 const HcalQIECoder* coder = cond.getHcalCoder(digi.id()); 01142 digival = coder->charge(*shape,digi.sample(i).adc(),digi.sample(i).capid())-calibs.pedestal(thisCapid); 01143 } 01144 else 01145 digival=digi.sample(i).adc()-calibs.pedestal(thisCapid); 01146 01147 // Find maximum pedestal-subtracted digi value 01148 if (digival>maxval) 01149 { 01150 maxval=digival; 01151 maxbin=i; 01152 } 01153 } // for (int i=0;i<digi.size();++i) 01154 01155 // We'll assume steeply-peaked distribution, so that charge deposit occurs 01156 // in slices (i-1) -> (i+2) around maximum deposit time i 01157 01158 int bins=0; 01159 for (int i=max(0,maxbin-1);i<=min(digi.size()-1,maxbin+2);++i) 01160 { 01161 ADCsum+=digi.sample(i).adc(); 01162 ++bins; 01163 } // for (int i=max(0,maxbin-1);...) 01164 01165 // Compare ADCsum to minimum expected value (pedestal+nsigma) 01166 // we want to compare the average over the sum to the average (ped+nsigma) 01167 ADCsum*=1./bins; 01168 // Search for digi in map of pedestal+threshold values 01169 if (pedestal_thresholds_.find(myid)!=pedestal_thresholds_.end()) 01170 { 01171 if (ADCsum > pedestal_thresholds_[myid]) 01172 abovepedestal[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 01173 if (hotmon_makeDiagnostics_) 01174 { 01175 if (widths_[myid]==0) continue; 01176 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]<=-10) 01177 continue; 01178 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]>=20) 01179 continue; 01180 if (myid.subdet()==HcalBarrel) 01181 ++diagADC_HB[int(10*(10+1.*(ADCsum-pedestals_[myid])/widths_[myid]))]; 01182 else 01183 ++diagADC_HE[int(10*(10+1.*(ADCsum-pedestals_[myid])/widths_[myid]))]; 01184 } // if (hotmon_makeDiagnostics) 01185 } 01186 } // for (HBHEDigiCollection...) 01187 01188 // Loop over HO 01189 if (checkHO_) 01190 { 01191 if (fVerbosity>2) cout <<"<HcalHotCellMonitor::processEvent_pedestal> Processing HO..."<<endl; 01192 01193 for (HODigiCollection::const_iterator j=hodigi.begin(); 01194 j!=hodigi.end(); ++j) 01195 { 01196 digival=0; 01197 maxval=0; 01198 maxbin=0; 01199 ADCsum=0; 01200 const HODataFrame digi = (const HODataFrame)(*j); 01201 01202 ieta=digi.id().ieta(); 01203 iphi=digi.id().iphi(); 01204 depth=digi.id().depth(); 01205 01206 HcalDetId myid = digi.id(); 01207 cond.makeHcalCalibrationWidth(digi.id(),&widths); 01208 //const HcalCalibrationWidths widths = cond.getHcalCalibrationWidths(digi.id()); 01209 01210 calibs = cond.getHcalCalibrations(digi.id()); 01211 01212 for (int i=0;i<digi.size();++i) 01213 { 01214 int thisCapid = digi.sample(i).capid(); 01215 if (doFCpeds_) 01216 { 01217 const HcalQIECoder* coder = cond.getHcalCoder(digi.id()); 01218 digival = coder->charge(*shape,digi.sample(i).adc(),digi.sample(i).capid())-calibs.pedestal(thisCapid); 01219 } 01220 else 01221 digival=digi.sample(i).adc()-calibs.pedestal(thisCapid); 01222 01223 // Find maximum pedestal-subtracted digi value 01224 if (digival>maxval) 01225 { 01226 maxval=digival; 01227 maxbin=i; 01228 } 01229 } // for (int i=0;i<digi.size();++i) 01230 01231 // We'll assume steeply-peaked distribution, so that charge deposit occurs 01232 // in slices (i-1) -> (i+2) around maximum deposit time i 01233 01234 int bins=0; 01235 for (int i=max(0,maxbin-1);i<=min(digi.size()-1,maxbin+2);++i) 01236 { 01237 ADCsum+=digi.sample(i).adc(); 01238 ++bins; 01239 } // for (int i=max(0,maxbin-1);...) 01240 01241 ADCsum*=1./bins; 01242 // Search for digi in map of pedestal+threshold values 01243 if (pedestal_thresholds_.find(myid)!=pedestal_thresholds_.end()) 01244 { 01245 if (ADCsum > pedestal_thresholds_[myid]) 01246 abovepedestal[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 01247 if (hotmon_makeDiagnostics_) 01248 { 01249 if (widths_[myid]==0) continue; 01250 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]<=-10) 01251 continue; 01252 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]>=20) 01253 continue; 01254 ++diagADC_HO[int(10*(10+1.*(ADCsum-pedestals_[myid])/widths_[myid]))]; 01255 } // if (hotmon_makeDiagnostics) 01256 } 01257 } // for (HODigiCollection...) 01258 } // if (checkHO_) 01259 01260 if (checkHF_) 01261 { 01262 // Loop over HF 01263 if (fVerbosity>2) cout <<"<HcalHotCellMonitor::processEvent_pedestal> Processing HF..."<<endl; 01264 01265 for (HFDigiCollection::const_iterator j=hfdigi.begin(); 01266 j!=hfdigi.end(); ++j) 01267 { 01268 digival=0; 01269 maxval=0; 01270 maxbin=0; 01271 ADCsum=0; 01272 const HFDataFrame digi = (const HFDataFrame)(*j); 01273 01274 ieta=digi.id().ieta(); 01275 iphi=digi.id().iphi(); 01276 depth=digi.id().depth()+2; // offset depth by 2 for HF 01277 01278 HcalDetId myid = digi.id(); 01279 cond.makeHcalCalibrationWidth(digi.id(),&widths); 01280 //const HcalCalibrationWidths widths = cond.getHcalCalibrationWidths(digi.id()); 01281 01282 calibs = cond.getHcalCalibrations(digi.id()); 01283 01284 for (int i=0;i<digi.size();++i) 01285 { 01286 int thisCapid = digi.sample(i).capid(); 01287 if (doFCpeds_) 01288 { 01289 const HcalQIECoder* coder = cond.getHcalCoder(digi.id()); 01290 digival = coder->charge(*shape,digi.sample(i).adc(),digi.sample(i).capid())-calibs.pedestal(thisCapid); 01291 } 01292 else 01293 digival=digi.sample(i).adc()-calibs.pedestal(thisCapid); 01294 01295 // Find maximum pedestal-subtracted digi value 01296 if (digival>maxval) 01297 { 01298 maxval=digival; 01299 maxbin=i; 01300 } 01301 } // for (int i=0;i<digi.size();++i) 01302 01303 // We'll assume steeply-peaked distribution, so that charge deposit occurs 01304 // in slices (i-1) -> (i+2) around maximum deposit time i 01305 01306 int bins=0; 01307 for (int i=max(0,maxbin-1);i<=min(digi.size()-1,maxbin+2);++i) 01308 { 01309 ADCsum+=digi.sample(i).adc(); 01310 ++bins; 01311 } // for (int i=max(0,maxbin-1);...) 01312 01313 ADCsum*=1./bins; 01314 // Search for digi in map of pedestal+threshold values 01315 if (pedestal_thresholds_.find(myid)!=pedestal_thresholds_.end()) 01316 { 01317 if (ADCsum > pedestal_thresholds_[myid]) 01318 abovepedestal[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 01319 if (hotmon_makeDiagnostics_) 01320 { 01321 if (widths_[myid]==0) continue; 01322 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]<=-10) 01323 continue; 01324 if (1.*(ADCsum-pedestals_[myid])/widths_[myid]>=20) 01325 continue; 01326 ++diagADC_HF[int(10*(10+1.*(ADCsum-pedestals_[myid])/widths_[myid]))]; 01327 } // if (hotmon_makeDiagnostics) 01328 } 01329 } // for (HFDigiCollection...) 01330 } // if (checkHF_) 01331 01332 // Fill histograms 01333 if (ievt_%hotmon_checkNevents_pedestal_==0) 01334 { 01335 if (fVerbosity) cout <<"<HcalHotCellMonitor::processEvent_pedestal> Filling HotCell Pedestal plots"<<endl; 01336 fillNevents_pedestal(); 01337 } 01338 01339 if (showTiming) 01340 { 01341 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor PROCESSEVENT_PEDESTAL -> "<<cpu_timer.cpuTime()<<endl; 01342 } 01343 01344 return; 01345 } // void HcalHotCellMonitor::processEvent_pedestal
void HcalHotCellMonitor::processEvent_rechitenergy | ( | const HBHERecHitCollection & | hbheHits, | |
const HORecHitCollection & | hoHits, | |||
const HFRecHitCollection & | hfHits | |||
) |
Definition at line 625 of file HcalHotCellMonitor.cc.
References aboveenergy, abovepersistent, edm::SortedCollection< T, SORT >::begin(), HcalBaseMonitor::checkHB_, HcalBaseMonitor::checkHE_, HcalBaseMonitor::checkHF_, HcalBaseMonitor::checkHO_, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), d_HBrechitenergy, d_HErechitenergy, d_HFrechitenergy, d_HOrechitenergy, edm::SortedCollection< T, SORT >::end(), lat::endl(), HcalBaseMonitor::etaBins_, MonitorElement::Fill(), fillNevents_energy(), fillNevents_persistentenergy(), HcalBaseMonitor::fVerbosity, HBenergyThreshold_, HBpersistentThreshold_, HcalBarrel, HcalEndcap, HEenergyThreshold_, HEpersistentThreshold_, HFenergyThreshold_, HOenergyThreshold_, HOpersistentThreshold_, hotmon_checkNevents_energy_, hotmon_checkNevents_persistent_, hotmon_makeDiagnostics_, hotmon_test_neighbor_, id, ievt_, int, rechit_energy_sum, rechit_occupancy_sum, rechitEnergies_, edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), and edm::CPUTimer::stop().
Referenced by processEvent().
00629 { 00630 // Looks at rechits of cells and compares to threshold energies. 00631 // Cells above thresholds get marked as hot candidates 00632 00633 if (showTiming) 00634 { 00635 cpu_timer.reset(); cpu_timer.start(); 00636 } 00637 00638 if (fVerbosity>1) cout <<"<HcalHotCellMonitor::processEvent_rechitenergy> Processing rechits..."<<endl; 00639 if (hotmon_test_neighbor_) rechitEnergies_.clear(); 00640 00641 // loop over HBHE 00642 for (HBHERecHitCollection::const_iterator HBHEiter=hbheHits.begin(); HBHEiter!=hbheHits.end(); ++HBHEiter) 00643 { // loop over all hits 00644 float en = HBHEiter->energy(); 00645 //float ti = HBHEiter->time(); 00646 00647 HcalDetId id(HBHEiter->detid().rawId()); 00648 int ieta = id.ieta(); 00649 int iphi = id.iphi(); 00650 int depth = id.depth(); 00651 00652 if (hotmon_makeDiagnostics_) 00653 { 00654 ++rechit_occupancy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00655 rechit_energy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]+=en; 00656 } 00657 if (id.subdet()==HcalBarrel) 00658 { 00659 if (!checkHB_) continue; 00660 if (hotmon_makeDiagnostics_) d_HBrechitenergy->Fill(en); 00661 if (en>=HBenergyThreshold_) 00662 ++aboveenergy[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00663 if (en>=HBpersistentThreshold_) 00664 ++abovepersistent[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00665 } 00666 else if (id.subdet()==HcalEndcap) 00667 { 00668 if (!checkHE_) continue; 00669 if (hotmon_makeDiagnostics_) d_HErechitenergy->Fill(en); 00670 if (en>=HEenergyThreshold_) 00671 ++aboveenergy[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00672 if (en>=HEpersistentThreshold_) 00673 ++abovepersistent[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00674 } 00675 if (hotmon_test_neighbor_) rechitEnergies_[id]=en; 00676 } //for (HBHERecHitCollection::const_iterator HBHEiter=...) 00677 00678 // loop over HO 00679 if (checkHO_) 00680 { 00681 for (HORecHitCollection::const_iterator HOiter=hoHits.begin(); HOiter!=hoHits.end(); ++HOiter) 00682 { // loop over all hits 00683 float en = HOiter->energy(); 00684 00685 HcalDetId id(HOiter->detid().rawId()); 00686 int ieta = id.ieta(); 00687 int iphi = id.iphi(); 00688 int depth = id.depth(); 00689 00690 if (hotmon_makeDiagnostics_) 00691 { 00692 ++rechit_occupancy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00693 rechit_energy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]+=en; 00694 } 00695 if (hotmon_makeDiagnostics_) d_HOrechitenergy->Fill(en); 00696 if (en>=HOenergyThreshold_) 00697 ++aboveenergy[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00698 if (en>=HOpersistentThreshold_) 00699 ++abovepersistent[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]; 00700 if (hotmon_test_neighbor_) rechitEnergies_[id]=en; 00701 } 00702 } // if (checkHO_) 00703 00704 // loop over HF 00705 if (checkHF_) 00706 { 00707 for (HFRecHitCollection::const_iterator HFiter=hfHits.begin(); HFiter!=hfHits.end(); ++HFiter) 00708 { // loop over all hits 00709 float en = HFiter->energy(); 00710 00711 HcalDetId id(HFiter->detid().rawId()); 00712 int ieta = id.ieta(); 00713 int iphi = id.iphi(); 00714 int depth = id.depth(); 00715 00716 if (hotmon_makeDiagnostics_) 00717 { 00718 ++rechit_occupancy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth+1]; 00719 rechit_energy_sum[ieta+(int)((etaBins_-2)/2)][iphi-1][depth+1]+=en; 00720 } 00721 if (hotmon_makeDiagnostics_) d_HFrechitenergy->Fill(en); 00722 if (en>=HFenergyThreshold_) 00723 ++aboveenergy[ieta+(int)((etaBins_-2)/2)][iphi-1][depth+1]; // HF depths get shifted up by +2 00724 if (en>=HBpersistentThreshold_) 00725 ++abovepersistent[ieta+(int)((etaBins_-2)/2)][iphi-1][depth+1]; 00726 if (hotmon_test_neighbor_) rechitEnergies_[id]=en; 00727 } 00728 } // if (checkHF_) 00729 00730 00731 // Fill histograms 00732 if (ievt_%hotmon_checkNevents_energy_==0) 00733 { 00734 if (fVerbosity) cout <<"<HcalHotCellMonitor::processEvent_digi> Filling HotCell Energy plots"<<endl; 00735 fillNevents_energy(); 00736 } 00737 if (ievt_%hotmon_checkNevents_persistent_==0) 00738 { 00739 if (fVerbosity) cout <<"<HcalHotCellMonitor::processEvent_digi> Filling HotCell Persistent Energy plots"<<endl; 00740 fillNevents_persistentenergy(); 00741 } 00742 00743 if (showTiming) 00744 { 00745 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor PROCESSEVENT_RECHITENERGY -> "<<cpu_timer.cpuTime()<<endl; 00746 } 00747 00748 return; 00749 } // void HcalHotCellMonitor::processEvent_rechitenergy
void HcalHotCellMonitor::processEvent_rechitneighbors | ( | const HBHERecHitCollection & | hbheHits, | |
const HORecHitCollection & | hoHits, | |||
const HFRecHitCollection & | hfHits | |||
) |
Definition at line 754 of file HcalHotCellMonitor.cc.
References aboveneighbors, funct::abs(), edm::SortedCollection< T, SORT >::begin(), HcalBaseMonitor::checkHB_, HcalBaseMonitor::checkHE_, HcalBaseMonitor::checkHF_, HcalBaseMonitor::checkHO_, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, edm::CPUTimer::cpuTime(), d_HBenergyVsNeighbor, d_HEenergyVsNeighbor, d_HFenergyVsNeighbor, d_HOenergyVsNeighbor, hotNeighborParams::DeltaDepth, hotNeighborParams::DeltaIeta, hotNeighborParams::DeltaIphi, edm::SortedCollection< T, SORT >::end(), lat::endl(), HcalBaseMonitor::etaBins_, MonitorElement::Fill(), fillNevents_neighbor(), HcalBaseMonitor::fVerbosity, HBNeighborParams_, HcalBarrel, HcalEndcap, HENeighborParams_, HFNeighborParams_, HONeighborParams_, hotNeighborParams::HotEnergyFrac, hotmon_checkNevents_neighbor_, hotmon_makeDiagnostics_, hotmon_test_energy_, hotmon_test_persistent_, id, ievt_, int, hotNeighborParams::maxEnergy, hotNeighborParams::minCellEnergy, hotNeighborParams::minNeighborEnergy, rechitEnergies_, edm::CPUTimer::reset(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), edm::CPUTimer::stop(), and HcalBaseMonitor::validDetId().
Referenced by processEvent().
00758 { 00759 // Compares energy to energy of neighboring cells. 00760 // This is a slightly simplified version of D0's NADA algorithm 00761 00762 if (showTiming) 00763 { 00764 cpu_timer.reset(); cpu_timer.start(); 00765 } 00766 00767 if (fVerbosity>1) cout <<"<HcalHotCellMonitor::processEvent_rechitneighbors> Processing rechits..."<<endl; 00768 00769 // if Energy tests weren't run, need to create map of Detid:rechitenergy here 00770 if (!hotmon_test_energy_ && !hotmon_test_persistent_) 00771 { 00772 rechitEnergies_.clear(); // clear old map 00773 for (HBHERecHitCollection::const_iterator HBHEiter=hbheHits.begin(); HBHEiter!=hbheHits.end(); ++HBHEiter) 00774 { // loop over all hits 00775 float en = HBHEiter->energy(); 00776 HcalDetId id(HBHEiter->detid().rawId()); 00777 if (!checkHB_ && id.subdet()==HcalBarrel) 00778 continue; 00779 if (!checkHE_ && id.subdet()==HcalEndcap) 00780 continue; 00781 rechitEnergies_[id]=en; 00782 } 00783 // HO 00784 if (checkHO_) 00785 { 00786 for (HORecHitCollection::const_iterator HOiter=hoHits.begin(); HOiter!=hoHits.end(); ++HOiter) 00787 { // loop over all hits 00788 float en = HOiter->energy(); 00789 HcalDetId id(HOiter->detid().rawId()); 00790 rechitEnergies_[id]=en; 00791 } 00792 } // if (checkHO_) 00793 //HF 00794 if (checkHF_) 00795 { 00796 for (HFRecHitCollection::const_iterator HFiter=hfHits.begin(); HFiter!=hfHits.end(); ++HFiter) 00797 { // loop over all hits 00798 float en = HFiter->energy(); 00799 HcalDetId id(HFiter->detid().rawId()); 00800 rechitEnergies_[id]=en; 00801 } 00802 } // if (checkHF_) 00803 00804 } // if (!hotmon_test_energy_ && !hotmon_test_persistent_) 00805 00806 // Now do "real" loop, checking against each cell against its neighbors 00807 00808 /* Note: This works a little differently than the other tests. The other tests check that a cell consistently 00809 fails its test condition for N consecutive events. The neighbor test will flag a cell for every event in which 00810 it's significantly less than its neighbors, regardless of whether that condition persists for a number of events. 00811 */ 00812 00813 int ieta, iphi, depth; 00814 float en; 00815 00816 int neighborsfound=0; 00817 float enNeighbor=0; 00818 00819 // loop over HBHE 00820 for (HBHERecHitCollection::const_iterator HBHEiter=hbheHits.begin(); 00821 HBHEiter!=hbheHits.end(); 00822 ++HBHEiter) 00823 { // loop over all hits 00824 00825 en = HBHEiter->energy(); 00826 HcalDetId id(HBHEiter->detid().rawId()); 00827 ieta = id.ieta(); 00828 iphi = id.iphi(); 00829 depth = id.depth(); 00830 00831 if (id.subdet()==HcalBarrel) 00832 { 00833 if (!checkHB_) continue; 00834 // Case 0: energy > max value; it's marked as hot regardless of neighbors 00835 if (en>HBNeighborParams_.maxEnergy) 00836 { 00837 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00838 continue; 00839 } 00840 00841 // Search keys for neighboring cells 00842 if (en<HBNeighborParams_.minCellEnergy) // cells below minCellEnergy not considered hot 00843 continue; 00844 neighborsfound=0; 00845 enNeighbor=0; 00846 for (int nD=-1*HBNeighborParams_.DeltaDepth;nD<=HBNeighborParams_.DeltaDepth;++nD) 00847 { 00848 for (int nP =-1*HBNeighborParams_.DeltaIphi;nP<=HBNeighborParams_.DeltaIphi;++nP) 00849 { 00850 for (int nE =-1*HBNeighborParams_.DeltaIeta;nE<=HBNeighborParams_.DeltaIeta;++nE) 00851 { 00852 if (nD==0 && nE==0 && nP==0) 00853 continue; // don't count the cell itself 00854 int myphi=nP+iphi; 00855 if (myphi>72) myphi-=72; // allow for wrapping of cells 00856 if (myphi<=0) myphi+=72; 00857 if (!validDetId((HcalSubdetector)(1),nE+ieta, myphi, nD+depth)) continue; 00858 HcalDetId myid((HcalSubdetector)(1), nE+ieta, myphi, nD+depth); // HB 00859 if (rechitEnergies_.find(myid)==rechitEnergies_.end()) 00860 continue; 00861 if (rechitEnergies_[myid]<HBNeighborParams_.minNeighborEnergy) 00862 continue; 00863 ++neighborsfound; 00864 enNeighbor+=rechitEnergies_[myid]; 00865 } // loop over nE (neighbor eta) 00866 } // loop over nP (neighbor phi) 00867 } // loop over nD depths 00868 00869 if (hotmon_makeDiagnostics_) 00870 d_HBenergyVsNeighbor->Fill(en,enNeighbor); 00871 00872 // Case 1: Not enough good neighbors found 00873 if (neighborsfound==0) 00874 continue; 00875 // Case 2: energy/(avg. neighbor energy) too large for cell to be considered hot 00876 if ((1.*enNeighbor/en)>HBNeighborParams_.HotEnergyFrac && en>0 && enNeighbor>0) 00877 continue; 00878 // Case 3: Tests passed; cell marked as hot 00879 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00880 } 00881 00882 else if (id.subdet()==HcalEndcap) 00883 { 00884 if (!checkHE_) continue; 00885 00886 // Case 0: energy > max value; it's marked as hot regardless of neighbors 00887 if (en>HENeighborParams_.maxEnergy) 00888 { 00889 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00890 continue; 00891 } 00892 if (en<HENeighborParams_.minCellEnergy) 00893 continue; // cells below this value can never be considered hot 00894 // Search keys for neighboring cells 00895 neighborsfound=0; 00896 enNeighbor=0; 00897 int HEDeltaIphi = HENeighborParams_.DeltaIphi; 00898 // now correct for boundaries 00899 if (abs(ieta)>20) HEDeltaIphi*=2; // double iphi boundary range when segmentation switches to 10 degrees 00900 // This still needs to be worked on to properly deal with boundaries 00901 for (int nD=-1*HENeighborParams_.DeltaDepth;nD<=HENeighborParams_.DeltaDepth;++nD) 00902 { 00903 for (int nP =-1*HEDeltaIphi;nP<=HEDeltaIphi;++nP) 00904 { 00905 for (int nE =-1*HENeighborParams_.DeltaIeta;nE<=HENeighborParams_.DeltaIeta;++nE) 00906 { 00907 if (nD==0 && nE==0 && nP==0) 00908 continue; // don't count the cell itself 00909 00910 int myphi=nP+iphi; 00911 if (myphi>72) myphi-=72; // allow for wrapping of cells 00912 if (myphi<=0) myphi+=72; 00913 if (!validDetId((HcalSubdetector)(2),nE+ieta, myphi, nD+depth)) continue; 00914 HcalDetId myid((HcalSubdetector)(2), nE+ieta, myphi, nD+depth); // HE 00915 if (rechitEnergies_.find(myid)==rechitEnergies_.end()) 00916 continue; 00917 if (rechitEnergies_[myid]<HENeighborParams_.minNeighborEnergy) 00918 continue; 00919 ++neighborsfound; 00920 enNeighbor+=rechitEnergies_[myid]; 00921 } // loop over nE (neighbor eta) 00922 } // loop over nP (neighbor phi) 00923 } // loop over nD depths 00924 00925 if (hotmon_makeDiagnostics_) 00926 d_HEenergyVsNeighbor->Fill(en,enNeighbor); 00927 00928 // Case 1: Not enough good neighbors found 00929 if (neighborsfound==0) 00930 continue; 00931 // Case 2: energy/(avg. neighbor energy) too large for cell to be considered hot 00932 if ((1.*enNeighbor/en)>HENeighborParams_.HotEnergyFrac && en>0 && enNeighbor>0) 00933 continue; 00934 // Case 3: Tests passed; cell marked as hot 00935 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00936 } 00937 } //for (HBHERecHitCollection::const_iterator HBHEiter=...) 00938 00939 // loop over HO 00940 if (checkHO_) 00941 { 00942 for (HORecHitCollection::const_iterator HOiter=hoHits.begin(); HOiter!=hoHits.end(); ++HOiter) 00943 { // loop over all hits 00944 float en = HOiter->energy(); 00945 HcalDetId id(HOiter->detid().rawId()); 00946 int ieta = id.ieta(); 00947 int iphi = id.iphi(); 00948 int depth = id.depth(); 00949 00950 // Case 0: energy > max value; it's marked as hot regardless of neighbors 00951 if (en>HONeighborParams_.maxEnergy) 00952 { 00953 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00954 continue; 00955 } 00956 if (en<HONeighborParams_.minCellEnergy) 00957 continue; // cells below this value can never be considered hot 00958 00959 // Search keys for neighboring cells 00960 neighborsfound=0; 00961 enNeighbor=0; 00962 for (int nD=-1*HONeighborParams_.DeltaDepth;nD<=HONeighborParams_.DeltaDepth;++nD) 00963 { 00964 for (int nP =-1*HONeighborParams_.DeltaIphi;nP<=HONeighborParams_.DeltaIphi;++nP) 00965 { 00966 for (int nE =-1*HONeighborParams_.DeltaIeta;nE<=HONeighborParams_.DeltaIeta;++nE) 00967 { 00968 if (nD==0 && nE==0 && nP==0) 00969 continue; // don't count the cell itself 00970 int myphi=nP+iphi; 00971 if (myphi>72) myphi-=72; // allow for wrapping of cells 00972 if (myphi<=0) myphi+=72; 00973 if (!validDetId((HcalSubdetector)(3),nE+ieta, myphi, nD+depth)) continue; 00974 HcalDetId myid((HcalSubdetector)(3), nE+ieta, myphi, nD+depth); // HO 00975 if (rechitEnergies_.find(myid)==rechitEnergies_.end()) 00976 continue; 00977 if (rechitEnergies_[myid]<HONeighborParams_.minNeighborEnergy) 00978 continue; 00979 ++neighborsfound; 00980 enNeighbor+=rechitEnergies_[myid]; 00981 } // loop over nE (neighbor eta) 00982 } // loop over nP (neighbor phi) 00983 } // loop over nD depths 00984 00985 if (hotmon_makeDiagnostics_) 00986 d_HOenergyVsNeighbor->Fill(en,enNeighbor); 00987 00988 // Case 1: Not enough good neighbors found 00989 if (neighborsfound==0) 00990 continue; 00991 // Case 2: energy/(avg. neighbor energy) too large for cell to be considered hot 00992 if ((1.*enNeighbor/en)>HONeighborParams_.HotEnergyFrac && en>0 && enNeighbor>0) 00993 continue; 00994 // Case 3: Tests passed; cell marked as hot 00995 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 00996 } // loop over hits 00997 } // if (checkHO_) 00998 00999 // loop over HF 01000 if (checkHF_) 01001 { 01002 for (HFRecHitCollection::const_iterator HFiter=hfHits.begin(); HFiter!=hfHits.end(); ++HFiter) 01003 { // loop over all hits 01004 float en = HFiter->energy(); 01005 HcalDetId id(HFiter->detid().rawId()); 01006 int ieta = id.ieta(); 01007 int iphi = id.iphi(); 01008 int depth = id.depth(); 01009 01010 // Case 0: energy > max value; it's marked as hot regardless of neighbors 01011 if (en>HFNeighborParams_.maxEnergy) 01012 { 01013 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth-1]++; 01014 continue; 01015 } 01016 if (en<HFNeighborParams_.minCellEnergy) 01017 continue; // cells below this value can never be considered hot 01018 // Search keys for neighboring cells 01019 neighborsfound=0; 01020 enNeighbor=0; 01021 int HFDeltaIphi = HFNeighborParams_.DeltaIphi; 01022 if (abs(ieta)>39) HFDeltaIphi*=2; // double phi range when segmentation switches to 20 degrees 01023 // Still need to create a more robust handling of boundary cases 01024 for (int nD=-1*HFNeighborParams_.DeltaDepth;nD<=HFNeighborParams_.DeltaDepth;++nD) 01025 { 01026 for (int nP =-1*HFDeltaIphi;nP<=HFDeltaIphi;++nP) 01027 { 01028 for (int nE =-1*HFNeighborParams_.DeltaIeta;nE<=HFNeighborParams_.DeltaIeta;++nE) 01029 { 01030 if (nD==0 && nE==0 && nP==0) 01031 continue; // don't count the cell itself 01032 int myphi=nP+iphi; 01033 if (myphi>72) myphi-=72; // allow for wrapping of cells 01034 if (myphi<=0) myphi+=72; 01035 if (!validDetId((HcalSubdetector)(4),nE+ieta, myphi, nD+depth)) continue; 01036 HcalDetId myid((HcalSubdetector)(4), nE+ieta, myphi, nD+depth); // HF 01037 if (rechitEnergies_.find(myid)==rechitEnergies_.end()) 01038 continue; 01039 if (rechitEnergies_[myid]<HFNeighborParams_.minNeighborEnergy) 01040 continue; 01041 ++neighborsfound; 01042 enNeighbor+=rechitEnergies_[myid]; 01043 } // loop over nE (neighbor eta) 01044 } // loop over nP (neighbor phi) 01045 } // loop over nD depths 01046 01047 if (hotmon_makeDiagnostics_) 01048 d_HFenergyVsNeighbor->Fill(en,enNeighbor); 01049 01050 // Case 1: Not enough good neighbors found 01051 if (neighborsfound==0) 01052 continue; 01053 // Case 2: energy/(avg. neighbor energy) too large for cell to be considered hot 01054 if ((1.*enNeighbor/en)>HFNeighborParams_.HotEnergyFrac && en>0 && enNeighbor>0) 01055 continue; 01056 // Case 3: Tests passed; cell marked as hot 01057 aboveneighbors[ieta+(int)((etaBins_-2)/2)][iphi-1][depth+1]++; 01058 } // loop over all hits 01059 } // if (checkHF_) 01060 01061 01062 // Fill histograms 01063 if (ievt_%hotmon_checkNevents_neighbor_==0) 01064 { 01065 if (fVerbosity) cout <<"<HcalHotCellMonitor::processEvent_digi> Filling HotCell Neighbor plots"<<endl; 01066 fillNevents_neighbor(); 01067 } 01068 01069 if (showTiming) 01070 { 01071 cpu_timer.stop(); cout <<"TIMER:: HcalHotCellMonitor PROCESSEVENT_RECHITNEIGHBOR -> "<<cpu_timer.cpuTime()<<endl; 01072 } 01073 return; 01074 } // void HcalHotCellMonitor::processEvent_rechitneighbor
void HcalHotCellMonitor::setup | ( | const edm::ParameterSet & | ps, | |
DQMStore * | dbe | |||
) | [virtual] |
Reimplemented from HcalBaseMonitor.
Definition at line 28 of file HcalHotCellMonitor.cc.
References aboveenergy, AboveEnergyThresholdCellsByDepth, aboveneighbors, AboveNeighborsHotCellsByDepth, abovepedestal, AbovePedestalHotCellsByDepth, abovepersistent, AbovePersistentThresholdCellsByDepth, HcalBaseMonitor::baseFolder_, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), HcalBaseMonitor::checkNevents_, GenMuonPlsPt100GeV_cfg::cout, HcalBaseMonitor::cpu_timer, d_avgrechitenergymap, d_HBenergyVsNeighbor, d_HBnormped, d_HBrechitenergy, d_HEenergyVsNeighbor, d_HEnormped, d_HErechitenergy, d_HFenergyVsNeighbor, d_HFnormped, d_HFrechitenergy, d_HOenergyVsNeighbor, d_HOnormped, d_HOrechitenergy, defaultNeighborParams_, hotNeighborParams::DeltaDepth, hotNeighborParams::DeltaIeta, hotNeighborParams::DeltaIphi, diagADC_HB, diagADC_HE, diagADC_HF, diagADC_HO, diagADC_ZDC, doFCpeds_, lat::endl(), energyThreshold_, ETABINS, HcalBaseMonitor::etaBins_, HcalBaseMonitor::etaMax_, HcalBaseMonitor::etaMin_, MonitorElement::Fill(), HcalBaseMonitor::fVerbosity, MonitorElement::getTH2F(), edm::ParameterSet::getUntrackedParameter(), HBenergyThreshold_, HBNeighborParams_, HBnsigma_, HBpersistentThreshold_, HEenergyThreshold_, HENeighborParams_, HEnsigma_, HEpersistentThreshold_, HFenergyThreshold_, HFNeighborParams_, HFnsigma_, HFpersistentThreshold_, HOenergyThreshold_, HONeighborParams_, HOnsigma_, HOpersistentThreshold_, hotNeighborParams::HotEnergyFrac, hotmon_checkNevents_, hotmon_checkNevents_energy_, hotmon_checkNevents_neighbor_, hotmon_checkNevents_pedestal_, hotmon_checkNevents_persistent_, hotmon_makeDiagnostics_, hotmon_minErrorFlag_, hotmon_test_energy_, hotmon_test_neighbor_, hotmon_test_pedestal_, hotmon_test_persistent_, i, ievt_, j, k, HcalBaseMonitor::m_dbe, HcalBaseMonitor::makeDiagnostics, hotNeighborParams::maxEnergy, meEVT_, hotNeighborParams::minCellEnergy, hotNeighborParams::minNeighborEnergy, nsigma_, persistentThreshold_, PHIBINS, HcalBaseMonitor::phiBins_, HcalBaseMonitor::phiMax_, HcalBaseMonitor::phiMin_, ProblemHotCells, ProblemHotCellsByDepth, rechit_energy_sum, rechit_occupancy_sum, edm::CPUTimer::reset(), HcalBaseMonitor::rootFolder_, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), HcalBaseMonitor::setMinMaxHists2D(), HcalBaseMonitor::setup(), HcalBaseMonitor::setupDepthHists2D(), setupNeighborParams(), HcalBaseMonitor::showTiming, edm::CPUTimer::start(), ZDCenergyThreshold_, ZDCNeighborParams_, ZDCnsigma_, and ZDCpersistentThreshold_.
Referenced by HcalMonitorModule::HcalMonitorModule().
00030 { 00031 HcalBaseMonitor::setup(ps,dbe); 00032 if (showTiming) 00033 { 00034 cpu_timer.reset(); cpu_timer.start(); 00035 } 00036 baseFolder_ = rootFolder_+"HotCellMonitor_Hcal"; 00037 00038 if (fVerbosity>0) 00039 cout <<"<HcalHotCellMonitor::setup> Setting up histograms"<<endl; 00040 00041 // Hot Cell Monitor - specific cfg variables 00042 00043 if (fVerbosity>1) 00044 cout <<"<HcalHotCellMonitor::setup> Getting variable values from cfg files"<<endl; 00045 // determine whether database pedestals are in FC or ADC 00046 doFCpeds_ = ps.getUntrackedParameter<bool>("HotCellMonitor_pedestalsInFC", true); 00047 00048 // hotmon_makeDiagnostics_ will take on base task value unless otherwise specified 00049 hotmon_makeDiagnostics_ = ps.getUntrackedParameter<bool>("HotCellMonitor_makeDiagnosticPlots",makeDiagnostics); 00050 00051 // Set checkNevents values 00052 hotmon_checkNevents_ = ps.getUntrackedParameter<int>("HotCellMonitor_checkNevents",checkNevents_); 00053 hotmon_checkNevents_persistent_ = ps.getUntrackedParameter<int>("HotCellMonitor_checkNevents_persistent",hotmon_checkNevents_); 00054 hotmon_checkNevents_pedestal_ = ps.getUntrackedParameter<int>("HotCellMonitor_checkNevents_pedestal" ,hotmon_checkNevents_); 00055 hotmon_checkNevents_neighbor_ = ps.getUntrackedParameter<int>("HotCellMonitor_checkNevents_neighbor" ,hotmon_checkNevents_); 00056 hotmon_checkNevents_energy_ = ps.getUntrackedParameter<int>("HotCellMonitor_checkNevents_energy" ,hotmon_checkNevents_); 00057 00058 // Set which hot cell checks will be performed 00059 hotmon_test_persistent_ = ps.getUntrackedParameter<bool>("HotCellMonitor_test_persistent",true); 00060 hotmon_test_pedestal_ = ps.getUntrackedParameter<bool>("HotCellMonitor_test_pedestal",true); 00061 hotmon_test_neighbor_ = ps.getUntrackedParameter<bool>("HotCellMonitor_test_neighbor",true); 00062 hotmon_test_energy_ = ps.getUntrackedParameter<bool>("HotCellMonitor_test_energy",true); 00063 00064 hotmon_minErrorFlag_ = ps.getUntrackedParameter<double>("HotCellMonitor_minErrorFlag",0.0); 00065 00066 // pedestal test -- cell must be above pedestal+nsigma for a number of consecutive events to be considered hot 00067 nsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_Nsigma", -10); 00068 HBnsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_HB_Nsigma",nsigma_); 00069 HEnsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_HE_Nsigma",nsigma_); 00070 HOnsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_HO_Nsigma",nsigma_); 00071 HFnsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_HF_Nsigma",nsigma_); 00072 ZDCnsigma_ = ps.getUntrackedParameter<double>("HotCellMonitor_pedestal_ZDC_Nsigma", nsigma_); 00073 00074 // rechit energy test -- cell must be above threshold value for a number of consecutive events to be considered hot 00075 energyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_energyThreshold", 1); 00076 HBenergyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HB_energyThreshold",energyThreshold_); 00077 HEenergyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HE_energyThreshold",energyThreshold_); 00078 HOenergyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HO_energyThreshold",energyThreshold_); 00079 HFenergyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HF_energyThreshold",energyThreshold_); 00080 ZDCenergyThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HF_energyThreshold",-999); 00081 00082 // rechit event-by-event energy test -- cell must be above threshold to be considered hot 00083 persistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_persistentThreshold", 1); 00084 HBpersistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HB_persistentThreshold",persistentThreshold_); 00085 HEpersistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HE_persistentThreshold",persistentThreshold_); 00086 HOpersistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HO_persistentThreshold",persistentThreshold_); 00087 HFpersistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HF_persistentThreshold",persistentThreshold_); 00088 ZDCpersistentThreshold_ = ps.getUntrackedParameter<double>("HotCellMonitor_HF_persistentThreshold",-999); 00089 00090 // neighboring-cell tests 00091 defaultNeighborParams_.DeltaIphi = ps.getUntrackedParameter<int>("HotCellMonitor_neighbor_deltaIphi", 1); 00092 defaultNeighborParams_.DeltaIeta = ps.getUntrackedParameter<int>("HotCellMonitor_neighbor_deltaIeta", 1); 00093 defaultNeighborParams_.DeltaDepth = ps.getUntrackedParameter<int>("HotCellMonitor_neighbor_deltaDepth", 0); 00094 defaultNeighborParams_.minCellEnergy = ps.getUntrackedParameter<double>("HotCellMonitor_neighbor_minCellEnergy",3.); 00095 defaultNeighborParams_.minNeighborEnergy = ps.getUntrackedParameter<double>("HotCellMonitor_neighbor_minNeighborEnergy",0.); 00096 defaultNeighborParams_.maxEnergy = ps.getUntrackedParameter<double>("HotCellMonitor_neighbor_maxEnergy",50); 00097 defaultNeighborParams_.HotEnergyFrac = ps.getUntrackedParameter<double>("HotCellMonitor_neighbor_HotEnergyFrac",0.01); 00098 00099 setupNeighborParams(ps,HBNeighborParams_ ,"HB"); 00100 setupNeighborParams(ps,HENeighborParams_ ,"HE"); 00101 setupNeighborParams(ps,HONeighborParams_ ,"HO"); 00102 setupNeighborParams(ps,HFNeighborParams_ ,"HF"); 00103 setupNeighborParams(ps,ZDCNeighborParams_,"ZDC"); 00104 HFNeighborParams_.DeltaIphi*=2; // HF cell segmentation is 10 degrees, not 5 (mostly). Need to multiply by 2 to convert from cell range to degree format 00105 00106 // Set initial event # to 0 00107 ievt_=0; 00108 00109 // zero all counters 00110 for (int i=0;i<ETABINS;++i) 00111 { 00112 for (int j=0;j<PHIBINS;++j) 00113 { 00114 for (int k=0;k<4;++k) 00115 { 00116 abovepersistent[i][j][k]=0; 00117 abovepedestal[i][j][k]=0; 00118 aboveneighbors[i][j][k]=0; 00119 aboveenergy[i][j][k]=0; 00120 rechit_occupancy_sum[i][j][k]=0; 00121 rechit_energy_sum[i][j][k]=0.; 00122 } 00123 } 00124 } 00125 00126 // zero diagnostic counters 00127 for (int i=0;i<300;++i) 00128 { 00129 diagADC_HB[i]=0; 00130 diagADC_HE[i]=0; 00131 diagADC_HO[i]=0; 00132 diagADC_HF[i]=0; 00133 diagADC_ZDC[i]=0; 00134 } 00135 // Add other diagnostic counters here later 00136 00137 // Set up histograms 00138 if (m_dbe) 00139 { 00140 if (fVerbosity>1) 00141 cout <<"<HcalHotCellMonitor::setup> Setting up histograms"<<endl; 00142 00143 m_dbe->setCurrentFolder(baseFolder_); 00144 meEVT_ = m_dbe->bookInt("Hot Cell Task Event Number"); 00145 meEVT_->Fill(ievt_); 00146 00147 // Create problem cell plots 00148 // Overall plot gets an initial " " in its name 00149 ProblemHotCells=m_dbe->book2D(" ProblemHotCells", 00150 " Problem Hot Cell Rate for all HCAL", 00151 etaBins_,etaMin_,etaMax_, 00152 phiBins_,phiMin_,phiMax_); 00153 ProblemHotCells->setAxisTitle("i#eta",1); 00154 ProblemHotCells->setAxisTitle("i#phi",2); 00155 00156 (ProblemHotCells->getTH2F())->SetMinimum(hotmon_minErrorFlag_); 00157 (ProblemHotCells->getTH2F())->SetMaximum(1.); 00158 00159 // Overall Problem plot appears in main directory; plots by depth appear \in subdirectory 00160 m_dbe->setCurrentFolder(baseFolder_+"/problem_hotcells"); 00161 setupDepthHists2D(ProblemHotCellsByDepth, " Problem Hot Cell Rate",""); 00162 00163 setMinMaxHists2D(ProblemHotCellsByDepth,hotmon_minErrorFlag_,1.); // set minimum to hotmon_minErrorFlag_? 00164 00165 // Set up plots for each failure mode of hot cells 00166 stringstream units; // We'll need to set the titles individually, rather than passing units to setupDepthHists2D (since this also would affect the name of the histograms) 00167 00168 m_dbe->setCurrentFolder(baseFolder_+"/hot_rechit_above_threshold"); 00169 setupDepthHists2D(AboveEnergyThresholdCellsByDepth, 00170 "Hot Cells Above Energy Threshold",""); 00171 setMinMaxHists2D(AboveEnergyThresholdCellsByDepth,0.,1.); 00172 00173 // set more descriptive titles for plots 00174 units.str(""); 00175 units<<"Hot Cells: Depth 1 -- HB > "<<HBenergyThreshold_<<" GeV, HF > "<<HFenergyThreshold_<<" GeV"; 00176 AboveEnergyThresholdCellsByDepth[0]->setTitle(units.str().c_str()); 00177 units.str(""); 00178 units<<"Hot Cells: Depth 2 -- HB > "<<HBenergyThreshold_<<" GeV, HF > "<<HFenergyThreshold_<<" GeV"; 00179 AboveEnergyThresholdCellsByDepth[1]->setTitle(units.str().c_str()); 00180 units.str(""); 00181 units<<"Hot Cells: Depth 3 -- HE > "<<HEenergyThreshold_<<" GeV"; 00182 AboveEnergyThresholdCellsByDepth[2]->setTitle(units.str().c_str()); 00183 units.str(""); 00184 units<<"Hot Cells: HO > "<<HOenergyThreshold_<<" GeV, ZDC TBD"; 00185 AboveEnergyThresholdCellsByDepth[3]->setTitle(units.str().c_str()); 00186 units.str(""); 00187 units<<"Hot Cells: Depth 1 -- HE > "<<HEenergyThreshold_<<" GeV"; 00188 AboveEnergyThresholdCellsByDepth[4]->setTitle(units.str().c_str()); 00189 units.str(""); 00190 units<<"Hot Cells: Depth 2 -- HE > "<<HEenergyThreshold_<<" GeV"; 00191 AboveEnergyThresholdCellsByDepth[5]->setTitle(units.str().c_str()); 00192 00193 m_dbe->setCurrentFolder(baseFolder_+"/hot_rechit_always_above_threshold"); 00194 setupDepthHists2D(AbovePersistentThresholdCellsByDepth, 00195 "Hot Cells Persistently Above Energy Threshold",""); 00196 setMinMaxHists2D(AbovePersistentThresholdCellsByDepth,0.,1.); 00197 00198 // set more descriptive titles for plots 00199 units.str(""); 00200 units<<"Hot Cells: Depth 1 -- HB > "<<HBpersistentThreshold_<<" GeV, HF > "<<HFpersistentThreshold_<<" GeV for "<< hotmon_checkNevents_persistent_<<" consec. events"; 00201 AbovePersistentThresholdCellsByDepth[0]->setTitle(units.str().c_str()); 00202 units.str(""); 00203 units<<"Hot Cells: Depth 2 -- HB > "<<HBpersistentThreshold_<<" GeV, HF > "<<HFpersistentThreshold_<<" GeV for "<<hotmon_checkNevents_persistent_<<" consec. events"; 00204 AbovePersistentThresholdCellsByDepth[1]->setTitle(units.str().c_str()); 00205 units.str(""); 00206 units<<"Hot Cells: Depth 3 -- HE > "<<HEpersistentThreshold_<<" GeV for "<<hotmon_checkNevents_persistent_<<" consec. events"; 00207 AbovePersistentThresholdCellsByDepth[2]->setTitle(units.str().c_str()); 00208 units.str(""); 00209 units<<"Hot Cells: HO > "<<HOpersistentThreshold_<<" GeV, ZDC TBD for "<<hotmon_checkNevents_persistent_<<" consec. events"; 00210 AbovePersistentThresholdCellsByDepth[3]->setTitle(units.str().c_str()); 00211 units.str(""); 00212 units<<"Hot Cells: Depth 1 -- HE > "<<HEpersistentThreshold_<<" GeV for "<<hotmon_checkNevents_persistent_<<" consec. events"; 00213 AbovePersistentThresholdCellsByDepth[4]->setTitle(units.str().c_str()); 00214 units.str(""); 00215 units<<"Hot Cells: Depth 2 -- HE > "<<HEpersistentThreshold_<<" GeV for "<<hotmon_checkNevents_persistent_<<" consec. events"; 00216 AbovePersistentThresholdCellsByDepth[5]->setTitle(units.str().c_str()); 00217 00218 00219 m_dbe->setCurrentFolder(baseFolder_+"/hot_pedestaltest"); 00220 setupDepthHists2D(AbovePedestalHotCellsByDepth,"Hot Cells Above Pedestal",""); 00221 setMinMaxHists2D(AbovePedestalHotCellsByDepth,0.,1.); 00222 00223 // set more descriptive titles for pedestal plots 00224 units.str(""); 00225 units<<"Hot Cells Above Pedestal Depth 1 -- HB > ped + "<<HBnsigma_<<" #sigma, HF > ped + "<<HFnsigma_<<" #sigma"; 00226 AbovePedestalHotCellsByDepth[0]->setTitle(units.str().c_str()); 00227 units.str(""); 00228 units<<"Hot Cells Above Pedestal Depth 2 -- HB > ped + "<<HBnsigma_<<" #sigma, HF > ped + "<<HFnsigma_<<" #sigma"; 00229 AbovePedestalHotCellsByDepth[1]->setTitle(units.str().c_str()); 00230 units.str(""); 00231 units<<"Hot Cells Above Pedestal Depth 3 -- HE > ped + "<<HEnsigma_<<" #sigma"; 00232 AbovePedestalHotCellsByDepth[2]->setTitle(units.str().c_str()); 00233 units.str(""); 00234 units<<"Hot Cells Above Pedestal Depth 4 -- HO > ped + "<<HOnsigma_<<" #sigma, ZDC TBD"; 00235 AbovePedestalHotCellsByDepth[3]->setTitle(units.str().c_str()); 00236 units.str(""); 00237 units<<"Hot Cells Above Pedestal Depth 1 -- HE > ped + "<<HEnsigma_<<" #sigma"; 00238 AbovePedestalHotCellsByDepth[4]->setTitle(units.str().c_str()); 00239 units.str(""); 00240 units<<"Hot Cells Above Pedestal Depth 2 -- HE > ped + "<<HEnsigma_<<" #sigma"; 00241 AbovePedestalHotCellsByDepth[5]->setTitle(units.str().c_str()); 00242 units.str(""); 00243 00244 m_dbe->setCurrentFolder(baseFolder_+"/hot_neighbortest"); 00245 setupDepthHists2D(AboveNeighborsHotCellsByDepth,"Hot Cells Failing Neighbor Test",""); 00246 setMinMaxHists2D(AboveNeighborsHotCellsByDepth,0.,1.); 00247 00248 if (hotmon_test_pedestal_) 00249 { 00250 m_dbe->setCurrentFolder(baseFolder_+"/diagnostics/pedestal"); 00251 d_HBnormped=m_dbe->book1D("HB_normped","HB Hot Cell pedestal diagnostic ",300,-10,20); 00252 d_HEnormped=m_dbe->book1D("HE_normped","HE Hot Cell pedestal diagnostic",300,-10,20); 00253 d_HOnormped=m_dbe->book1D("HO_normped","HO Hot Cell pedestal diagnostic",300,-10,20); 00254 d_HFnormped=m_dbe->book1D("HF_normped","HF Hot Cell pedestal diagnostic",300,-10,20); 00255 d_HBnormped->setAxisTitle("(avg ADC-pedestal)/#sigma",1); 00256 d_HEnormped->setAxisTitle("(avg ADC-pedestal)/#sigma",1); 00257 d_HOnormped->setAxisTitle("(avg ADC-pedestal)/#sigma",1); 00258 d_HFnormped->setAxisTitle("(avg ADC-pedestal)/#sigma",1); 00259 } 00260 // TODO: Clean these up so that they're always made (filling every N events), regardless 00261 // of makeDiagnostics flag 00262 if (hotmon_makeDiagnostics_) 00263 { 00264 if (hotmon_test_energy_ || hotmon_test_persistent_) 00265 { 00266 m_dbe->setCurrentFolder(baseFolder_+"/diagnostics/rechitenergy"); 00267 d_HBrechitenergy=m_dbe->book1D("HB_rechitenergy","HB rechit energy",1500,-10,140); 00268 d_HErechitenergy=m_dbe->book1D("HE_rechitenergy","HE rechit energy",1500,-10,140); 00269 d_HOrechitenergy=m_dbe->book1D("HO_rechitenergy","HO rechit energy",1500,-10,140); 00270 d_HFrechitenergy=m_dbe->book1D("HF_rechitenergy","HF rechit energy",1500,-10,140); 00271 setupDepthHists2D(d_avgrechitenergymap, 00272 "Average rec hit energy per cell",""); 00273 } 00274 if (hotmon_test_neighbor_) 00275 { 00276 m_dbe->setCurrentFolder(baseFolder_+"/diagnostics/neighborcells"); 00277 d_HBenergyVsNeighbor=m_dbe->book2D("HB_energyVsNeighbor","HB #Sigma Neighbors vs. rec hit energy",100,-5,15,100,0,25); 00278 d_HEenergyVsNeighbor=m_dbe->book2D("HE_energyVsNeighbor","HE #Sigma Neighbors vs. rec hit energy",100,-5,15,100,0,25); 00279 d_HOenergyVsNeighbor=m_dbe->book2D("HO_energyVsNeighbor","HO #Sigma Neighbors vs. rec hit energy",100,-5,15,100,0,25); 00280 d_HFenergyVsNeighbor=m_dbe->book2D("HF_energyVsNeighbor","HF #Sigma Neighbors vs. rec hit energy",100,-5,15,100,0,25); 00281 } 00282 } // if (hotmon_makeDiagnostics_) 00283 } // if (m_dbe) 00284 00285 return; 00286 } //void HcalHotCellMonitor::setup(...)
void HcalHotCellMonitor::setupNeighborParams | ( | const edm::ParameterSet & | ps, | |
hotNeighborParams & | N, | |||
char * | type | |||
) |
Definition at line 289 of file HcalHotCellMonitor.cc.
References defaultNeighborParams_, hotNeighborParams::DeltaDepth, hotNeighborParams::DeltaIeta, hotNeighborParams::DeltaIphi, edm::ParameterSet::getUntrackedParameter(), hotNeighborParams::HotEnergyFrac, hotNeighborParams::maxEnergy, hotNeighborParams::minCellEnergy, and hotNeighborParams::minNeighborEnergy.
Referenced by setup().
00292 { 00293 // sets up parameters for neighboring-cell algorithm for each subdetector 00294 ostringstream myname; 00295 myname<<"HotCellMonitor_"<<type<<"_neighbor_deltaIphi"; 00296 N.DeltaIphi = ps.getUntrackedParameter<int>(myname.str().c_str(), 00297 defaultNeighborParams_.DeltaIphi); 00298 myname.str(""); 00299 myname<<"HotCellMonitor_"<<type<<"_neighbor_deltaIeta"; 00300 N.DeltaIeta = ps.getUntrackedParameter<int>(myname.str().c_str(), 00301 defaultNeighborParams_.DeltaIeta); 00302 myname.str(""); 00303 myname<<"HotCellMonitor_"<<type<<"_neighbor_deltaDepth"; 00304 N.DeltaDepth = ps.getUntrackedParameter<int>(myname.str().c_str(), 00305 defaultNeighborParams_.DeltaDepth); 00306 myname.str(""); 00307 myname<<"HotCellMonitor_"<<type<<"_neighbor_minCellEnergy"; 00308 N.minCellEnergy = ps.getUntrackedParameter<double>(myname.str().c_str(), 00309 defaultNeighborParams_.minCellEnergy); 00310 myname.str(""); 00311 myname<<"HotCellMonitor_"<<type<<"_neighbor_minNeighborEnergy"; 00312 N.minNeighborEnergy = ps.getUntrackedParameter<double>(myname.str().c_str(), 00313 defaultNeighborParams_.minNeighborEnergy); 00314 myname.str(""); 00315 myname<<"HotCellMonitor_"<<type<<"_neighbor_maxEnergy"; 00316 N.maxEnergy = ps.getUntrackedParameter<double>(myname.str().c_str(), 00317 defaultNeighborParams_.maxEnergy); 00318 myname.str(""); 00319 myname<<"HotCellMonitor_"<<type<<"_HotEnergyFrac"; 00320 N.HotEnergyFrac = ps.getUntrackedParameter<double>(myname.str().c_str(), 00321 defaultNeighborParams_.HotEnergyFrac); 00322 return; 00323 } // void HcalHotCellMonitor::setupNeighborParams
unsigned int HcalHotCellMonitor::aboveenergy[ETABINS][PHIBINS][4] [private] |
Definition at line 126 of file HcalHotCellMonitor.h.
Referenced by fillNevents_energy(), processEvent_rechitenergy(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::AboveEnergyThresholdCellsByDepth [private] |
Definition at line 113 of file HcalHotCellMonitor.h.
Referenced by fillNevents_energy(), fillNevents_problemCells(), and setup().
unsigned int HcalHotCellMonitor::aboveneighbors[ETABINS][PHIBINS][4] [private] |
Definition at line 125 of file HcalHotCellMonitor.h.
Referenced by fillNevents_neighbor(), processEvent_rechitneighbors(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::AboveNeighborsHotCellsByDepth [private] |
Definition at line 112 of file HcalHotCellMonitor.h.
Referenced by fillNevents_neighbor(), fillNevents_problemCells(), and setup().
unsigned int HcalHotCellMonitor::abovepedestal[ETABINS][PHIBINS][4] [private] |
Definition at line 124 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), processEvent_pedestal(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::AbovePedestalHotCellsByDepth [private] |
Definition at line 115 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), fillNevents_problemCells(), and setup().
unsigned int HcalHotCellMonitor::abovepersistent[ETABINS][PHIBINS][4] [private] |
Definition at line 127 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), processEvent_rechitenergy(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::AbovePersistentThresholdCellsByDepth [private] |
Definition at line 114 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), fillNevents_problemCells(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::d_avgrechitenergymap [private] |
Definition at line 158 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), and setup().
Definition at line 152 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
MonitorElement* HcalHotCellMonitor::d_HBnormped [private] |
Definition at line 140 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), and setup().
Definition at line 146 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 153 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
MonitorElement* HcalHotCellMonitor::d_HEnormped [private] |
Definition at line 141 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), and setup().
Definition at line 147 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 155 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
MonitorElement* HcalHotCellMonitor::d_HFnormped [private] |
Definition at line 143 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), and setup().
Definition at line 149 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 154 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
MonitorElement* HcalHotCellMonitor::d_HOnormped [private] |
Definition at line 142 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), and setup().
Definition at line 148 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 156 of file HcalHotCellMonitor.h.
MonitorElement* HcalHotCellMonitor::d_ZDCnormped [private] |
Definition at line 144 of file HcalHotCellMonitor.h.
Definition at line 150 of file HcalHotCellMonitor.h.
Definition at line 160 of file HcalHotCellMonitor.h.
Referenced by setup(), and setupNeighborParams().
int HcalHotCellMonitor::diagADC_HB[300] [private] |
Definition at line 132 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), processEvent_pedestal(), and setup().
int HcalHotCellMonitor::diagADC_HE[300] [private] |
Definition at line 133 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), processEvent_pedestal(), and setup().
int HcalHotCellMonitor::diagADC_HF[300] [private] |
Definition at line 135 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), processEvent_pedestal(), and setup().
int HcalHotCellMonitor::diagADC_HO[300] [private] |
Definition at line 134 of file HcalHotCellMonitor.h.
Referenced by fillNevents_pedestal(), processEvent_pedestal(), and setup().
int HcalHotCellMonitor::diagADC_ZDC[300] [private] |
bool HcalHotCellMonitor::doFCpeds_ [private] |
Definition at line 82 of file HcalHotCellMonitor.h.
Referenced by createMaps(), processEvent_pedestal(), and setup().
double HcalHotCellMonitor::energyThreshold_ [private] |
double HcalHotCellMonitor::HBenergyThreshold_ [private] |
Definition at line 98 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 160 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
double HcalHotCellMonitor::HBnsigma_ [private] |
double HcalHotCellMonitor::HBpersistentThreshold_ [private] |
Definition at line 99 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
double HcalHotCellMonitor::HEenergyThreshold_ [private] |
Definition at line 98 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 160 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
double HcalHotCellMonitor::HEnsigma_ [private] |
double HcalHotCellMonitor::HEpersistentThreshold_ [private] |
Definition at line 99 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
double HcalHotCellMonitor::HFenergyThreshold_ [private] |
Definition at line 98 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 160 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
double HcalHotCellMonitor::HFnsigma_ [private] |
double HcalHotCellMonitor::HFpersistentThreshold_ [private] |
double HcalHotCellMonitor::HOenergyThreshold_ [private] |
Definition at line 98 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
Definition at line 160 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitneighbors(), and setup().
double HcalHotCellMonitor::HOnsigma_ [private] |
double HcalHotCellMonitor::HOpersistentThreshold_ [private] |
Definition at line 99 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and setup().
int HcalHotCellMonitor::hotmon_checkNevents_ [private] |
Definition at line 95 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), processEvent(), processEvent_rechitenergy(), and setup().
Definition at line 94 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_neighbor(), processEvent(), processEvent_rechitneighbors(), and setup().
Definition at line 93 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_energy(), fillNevents_pedestal(), processEvent(), processEvent_pedestal(), and setup().
Definition at line 96 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_persistentenergy(), processEvent(), processEvent_rechitenergy(), and setup().
Definition at line 83 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), HcalHotCellMonitor(), processEvent_pedestal(), processEvent_rechitenergy(), processEvent_rechitneighbors(), and setup().
double HcalHotCellMonitor::hotmon_minErrorFlag_ [private] |
bool HcalHotCellMonitor::hotmon_test_energy_ [private] |
Definition at line 88 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_problemCells(), HcalHotCellMonitor(), processEvent(), processEvent_rechitneighbors(), and setup().
Definition at line 87 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_problemCells(), HcalHotCellMonitor(), processEvent(), processEvent_rechitenergy(), and setup().
Definition at line 86 of file HcalHotCellMonitor.h.
Referenced by createMaps(), fillHotHistosAtEndRun(), fillNevents_problemCells(), HcalHotCellMonitor(), processEvent(), processEvent_pedestal(), and setup().
Definition at line 89 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_problemCells(), HcalHotCellMonitor(), processEvent(), processEvent_rechitneighbors(), and setup().
int HcalHotCellMonitor::ievt_ [private] |
Definition at line 102 of file HcalHotCellMonitor.h.
Referenced by fillHotHistosAtEndRun(), fillNevents_energy(), fillNevents_neighbor(), fillNevents_pedestal(), fillNevents_persistentenergy(), HcalHotCellMonitor(), processEvent(), processEvent_pedestal(), processEvent_rechitenergy(), processEvent_rechitneighbors(), and setup().
MonitorElement* HcalHotCellMonitor::meEVT_ [private] |
double HcalHotCellMonitor::nsigma_ [private] |
std::map<HcalDetId, float> HcalHotCellMonitor::pedestal_thresholds_ [private] |
Definition at line 120 of file HcalHotCellMonitor.h.
Referenced by createMaps(), and processEvent_pedestal().
std::map<HcalDetId, float> HcalHotCellMonitor::pedestals_ [private] |
Definition at line 118 of file HcalHotCellMonitor.h.
Referenced by createMaps(), and processEvent_pedestal().
double HcalHotCellMonitor::persistentThreshold_ [private] |
Definition at line 107 of file HcalHotCellMonitor.h.
Referenced by fillNevents_problemCells(), and setup().
std::vector<MonitorElement*> HcalHotCellMonitor::ProblemHotCellsByDepth [private] |
Definition at line 108 of file HcalHotCellMonitor.h.
Referenced by done(), fillNevents_problemCells(), and setup().
float HcalHotCellMonitor::rechit_energy_sum[ETABINS][PHIBINS][4] [private] |
Definition at line 129 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), processEvent_rechitenergy(), and setup().
unsigned int HcalHotCellMonitor::rechit_occupancy_sum[ETABINS][PHIBINS][4] [private] |
Definition at line 128 of file HcalHotCellMonitor.h.
Referenced by fillNevents_persistentenergy(), processEvent_rechitenergy(), and setup().
std::map<HcalDetId, double> HcalHotCellMonitor::rechitEnergies_ [private] |
Definition at line 121 of file HcalHotCellMonitor.h.
Referenced by processEvent_rechitenergy(), and processEvent_rechitneighbors().
std::map<HcalDetId, float> HcalHotCellMonitor::widths_ [private] |
Definition at line 119 of file HcalHotCellMonitor.h.
Referenced by createMaps(), and processEvent_pedestal().
double HcalHotCellMonitor::ZDCenergyThreshold_ [private] |
double HcalHotCellMonitor::ZDCnsigma_ [private] |
double HcalHotCellMonitor::ZDCpersistentThreshold_ [private] |