Analyze.
457 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
458 <<
" #Event: " <<
event.id().event() << endl;
481 if(dtdigis->begin() == dtdigis->end()) {
482 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
488 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
489 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
493 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
499 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
500 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
504 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
508 int wh = chId.
wheel();
510 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
511 <<
" with # digis: " << hitMapIt->second << endl;
513 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
531 map<int,int>::const_iterator chMapIt = chMap.begin();
532 map<int,int>::const_iterator chMapEnd = chMap.end();
533 for (; chMapIt != chMapEnd; ++chMapIt) {
534 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
541 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
542 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
549 time_t eventTime = time_t(
event.time().value()>>32);
551 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
552 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
553 <<
" Lumi : " <<
event.id().luminosityBlock()
554 <<
" Event : " <<
event.id().event()
555 <<
" at time : " << ctime(&eventTime) << endl;
560 stringstream synchNoisyCh;
561 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
562 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
563 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
570 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
575 bool isSyncNoisy =
false;
578 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
582 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
589 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
591 bool isNoisy =
false;
592 bool isFEMasked =
false;
593 bool isTDCMasked =
false;
594 bool isTrigMask =
false;
598 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
599 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
605 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
606 uint32_t indexSL = dtSLId.
rawId();
608 uint32_t indexCh = dtChId.
rawId();
609 int layer_number=((*dtLayerId_It).first).layer();
611 const DTLayerId dtLId = (*dtLayerId_It).first;
616 tTrigMap->get( ((*dtLayerId_It).first).superlayerId(),
623 float t0;
float t0RMS;
624 int tdcTime = (*digiIt).countsTDC();
627 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
630 tdcTime += int(round(t0));
637 if (( !isNoisy ) && (!isSyncNoisy)) {
641 bookHistos( dtSLId,
string(
"TimeBoxes"), histoTag );
642 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
665 histoTag =
"OccupancyAllHits_perCh";
666 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
669 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
670 mappedHisto =
digiHistos[histoTag].find(indexCh);
672 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
676 histoTag =
"OccupancyAllHits";
677 map<int, MonitorElement*>::const_iterator histoPerWheel =
683 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
689 if (tdcTime < inTimeHitsLowerBoundCorr ) {
694 histoTag =
"OccupancyNoise_perCh";
695 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
698 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
699 mappedHisto =
digiHistos[histoTag].find(indexCh);
701 mappedHisto->second->Fill((*digiIt).wire(),
702 (layer_number+(superlayer_number-1)*4)-1);
705 histoTag =
"OccupancyNoise";
706 map<int, MonitorElement*>::const_iterator histoPerWheel =
712 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
718 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
722 histoTag =
"OccupancyInTimeHits_perCh";
723 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
726 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
727 mappedHisto =
digiHistos[histoTag].find(indexCh);
729 mappedHisto->second->Fill((*digiIt).wire(),
730 (layer_number+(superlayer_number-1)*4)-1);
733 histoTag =
"OccupancyInTimeHits";
734 map<int, MonitorElement*>::const_iterator histoPerWheel =
740 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
DTChamberId chamberId() const
Return the corresponding ChamberId.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::ESHandle< DTTtrig > tTrigMap
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
void bookHistos(const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
Book the ME.
edm::ESHandle< DTT0 > t0Map
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
float tTrig
tTrig from the DB
int tMax
no needs to be precise. Value from PSets will always be used
int superlayer() const
Return the superlayer number (deprecated method name)
bool doAllHitsOccupancies
std::vector< DigiType >::const_iterator const_iterator
std::set< DTChamberId > syncNoisyChambers
MonitorElement * nEventMonitor
std::map< DTChamberId, int > hitMap
int station() const
Return the station number.
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
edm::InputTag dtDigiLabel
int wheel() const
Return the wheel number.
std::string triggerSource()
get the L1A source
edm::Handle< LTCDigiCollection > ltcdigis