Analyze.
479 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
480 <<
" #Event: " <<
event.id().event() << endl;
503 if(dtdigis->begin() == dtdigis->end()) {
504 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
510 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
511 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
515 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
521 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
522 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
526 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
530 int wh = chId.
wheel();
532 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
533 <<
" with # digis: " << hitMapIt->second << endl;
535 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
553 map<int,int>::const_iterator chMapIt = chMap.begin();
554 map<int,int>::const_iterator chMapEnd = chMap.end();
555 for (; chMapIt != chMapEnd; ++chMapIt) {
556 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
563 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
564 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
571 time_t eventTime = time_t(
event.time().value()>>32);
573 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
574 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
575 <<
" Lumi : " <<
event.id().luminosityBlock()
576 <<
" Event : " <<
event.id().event()
577 <<
" at time : " << ctime(&eventTime) << endl;
582 stringstream synchNoisyCh;
583 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
584 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
585 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
592 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
597 bool isSyncNoisy =
false;
600 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
604 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
611 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
613 bool isNoisy =
false;
614 bool isFEMasked =
false;
615 bool isTDCMasked =
false;
616 bool isTrigMask =
false;
620 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
621 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
627 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
628 uint32_t indexSL = dtSLId.
rawId();
630 uint32_t indexCh = dtChId.
rawId();
631 int layer_number=((*dtLayerId_It).first).layer();
637 tTrigMap->get( ((*dtLayerId_It).first).superlayerId(),
644 float t0;
float t0RMS;
645 int tdcTime = (*digiIt).countsTDC();
648 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
651 tdcTime += int(round(t0));
658 if (( !isNoisy ) && (!isSyncNoisy)) {
662 bookHistos( dtSLId,
string(
"TimeBoxes"), histoTag );
663 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
686 histoTag =
"OccupancyAllHits_perCh";
687 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
690 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
691 mappedHisto =
digiHistos[histoTag].find(indexCh);
693 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
697 histoTag =
"OccupancyAllHits";
698 map<int, MonitorElement*>::const_iterator histoPerWheel =
704 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
710 if (tdcTime < inTimeHitsLowerBoundCorr ) {
715 histoTag =
"OccupancyNoise_perCh";
716 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
719 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
720 mappedHisto =
digiHistos[histoTag].find(indexCh);
722 mappedHisto->second->Fill((*digiIt).wire(),
723 (layer_number+(superlayer_number-1)*4)-1);
726 histoTag =
"OccupancyNoise";
727 map<int, MonitorElement*>::const_iterator histoPerWheel =
733 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
739 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
743 histoTag =
"OccupancyInTimeHits_perCh";
744 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
747 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
748 mappedHisto =
digiHistos[histoTag].find(indexCh);
750 mappedHisto->second->Fill((*digiIt).wire(),
751 (layer_number+(superlayer_number-1)*4)-1);
754 histoTag =
"OccupancyInTimeHits";
755 map<int, MonitorElement*>::const_iterator histoPerWheel =
761 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)
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
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< DTDigi >::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
int wheel() const
Return the wheel number.
std::string triggerSource()
get the L1A source
edm::Handle< LTCDigiCollection > ltcdigis
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_