Analyze.
476 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
477 <<
" #Event: " <<
event.id().event() << endl;
500 if(dtdigis->begin() == dtdigis->end()) {
501 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
507 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
508 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
512 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
518 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
519 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
523 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
527 int wh = chId.
wheel();
529 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
530 <<
" with # digis: " << hitMapIt->second << endl;
532 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
550 map<int,int>::const_iterator chMapIt = chMap.begin();
551 map<int,int>::const_iterator chMapEnd = chMap.end();
552 for (; chMapIt != chMapEnd; ++chMapIt) {
553 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
560 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
561 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
568 time_t eventTime = time_t(
event.time().value()>>32);
570 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
571 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
572 <<
" Lumi : " <<
event.id().luminosityBlock()
573 <<
" Event : " <<
event.id().event()
574 <<
" at time : " << ctime(&eventTime) << endl;
579 stringstream synchNoisyCh;
580 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
581 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
582 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
589 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
594 bool isSyncNoisy =
false;
597 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
601 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
608 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
610 bool isNoisy =
false;
611 bool isFEMasked =
false;
612 bool isTDCMasked =
false;
613 bool isTrigMask =
false;
617 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
618 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
624 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
625 uint32_t indexSL = dtSLId.
rawId();
627 uint32_t indexCh = dtChId.
rawId();
628 int layer_number=((*dtLayerId_It).first).layer();
634 tTrigMap->get( ((*dtLayerId_It).first).superlayerId(),
641 float t0;
float t0RMS;
642 int tdcTime = (*digiIt).countsTDC();
645 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
648 tdcTime += int(round(t0));
655 if (( !isNoisy ) && (!isSyncNoisy)) {
659 bookHistos( dtSLId,
string(
"TimeBoxes"), histoTag );
660 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
683 histoTag =
"OccupancyAllHits_perCh";
684 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
687 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
688 mappedHisto =
digiHistos[histoTag].find(indexCh);
690 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
694 histoTag =
"OccupancyAllHits";
695 map<int, MonitorElement*>::const_iterator histoPerWheel =
701 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
707 if (tdcTime < inTimeHitsLowerBoundCorr ) {
712 histoTag =
"OccupancyNoise_perCh";
713 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
716 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
717 mappedHisto =
digiHistos[histoTag].find(indexCh);
719 mappedHisto->second->Fill((*digiIt).wire(),
720 (layer_number+(superlayer_number-1)*4)-1);
723 histoTag =
"OccupancyNoise";
724 map<int, MonitorElement*>::const_iterator histoPerWheel =
730 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
736 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
740 histoTag =
"OccupancyInTimeHits_perCh";
741 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
744 bookHistos(dtChId,
string(
"Occupancies"), histoTag);
745 mappedHisto =
digiHistos[histoTag].find(indexCh);
747 mappedHisto->second->Fill((*digiIt).wire(),
748 (layer_number+(superlayer_number-1)*4)-1);
751 histoTag =
"OccupancyInTimeHits";
752 map<int, MonitorElement*>::const_iterator histoPerWheel =
758 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