Analyze.
481 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
482 <<
" #Event: " <<
event.id().event() << endl;
505 if(dtdigis->begin() == dtdigis->end()) {
506 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
512 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
513 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
517 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
523 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
524 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
528 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
532 int wh = chId.
wheel();
534 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
535 <<
" with # digis: " << hitMapIt->second << endl;
537 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
555 map<int,int>::const_iterator chMapIt = chMap.begin();
556 map<int,int>::const_iterator chMapEnd = chMap.end();
557 for (; chMapIt != chMapEnd; ++chMapIt) {
558 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
565 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
566 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
573 time_t eventTime = time_t(
event.time().value()>>32);
575 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
576 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
577 <<
" Lumi : " <<
event.id().luminosityBlock()
578 <<
" Event : " <<
event.id().event()
579 <<
" at time : " << ctime(&eventTime) << endl;
584 stringstream synchNoisyCh;
585 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
586 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
587 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
594 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
599 bool isSyncNoisy =
false;
602 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
606 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
613 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
615 bool isNoisy =
false;
616 bool isFEMasked =
false;
617 bool isTDCMasked =
false;
618 bool isTrigMask =
false;
622 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
623 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
629 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
630 uint32_t indexSL = dtSLId.
rawId();
632 uint32_t indexCh = dtChId.
rawId();
633 int layer_number=((*dtLayerId_It).first).layer();
639 tTrigMap->get( ((*dtLayerId_It).first).superlayerId(),
646 float t0;
float t0RMS;
647 int tdcTime = (*digiIt).countsTDC();
650 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
653 tdcTime += int(round(t0));
660 if (( !isNoisy ) && (!isSyncNoisy)) {
664 bookHistos( dtSLId,
string(
"TimeBoxes"), histoTag );
665 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
688 histoTag =
"OccupancyAllHits_perCh";
689 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
692 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
693 mappedHisto =
digiHistos[histoTag].find(indexCh);
695 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
699 histoTag =
"OccupancyAllHits";
700 map<int, MonitorElement*>::const_iterator histoPerWheel =
706 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
712 if (tdcTime < inTimeHitsLowerBoundCorr ) {
717 histoTag =
"OccupancyNoise_perCh";
718 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
721 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
722 mappedHisto =
digiHistos[histoTag].find(indexCh);
724 mappedHisto->second->Fill((*digiIt).wire(),
725 (layer_number+(superlayer_number-1)*4)-1);
728 histoTag =
"OccupancyNoise";
729 map<int, MonitorElement*>::const_iterator histoPerWheel =
735 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
741 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
745 histoTag =
"OccupancyInTimeHits_perCh";
746 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
749 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
750 mappedHisto =
digiHistos[histoTag].find(indexCh);
752 mappedHisto->second->Fill((*digiIt).wire(),
753 (layer_number+(superlayer_number-1)*4)-1);
756 histoTag =
"OccupancyInTimeHits";
757 map<int, MonitorElement*>::const_iterator histoPerWheel =
763 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
DTChamberId chamberId() const
Return the corresponding ChamberId.
edm::InputTag ltcDigiCollectionTag
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