Analyze.
453 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
454 <<
" #Event: " <<
event.id().event() << endl;
476 if(dtdigis->begin() == dtdigis->end()) {
477 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
483 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
484 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
488 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
494 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
495 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
499 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
503 int wh = chId.
wheel();
505 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
506 <<
" with # digis: " << hitMapIt->second << endl;
508 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
519 map<int,int>::const_iterator chMapIt = chMap.begin();
520 map<int,int>::const_iterator chMapEnd = chMap.end();
521 for (; chMapIt != chMapEnd; ++chMapIt) {
522 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
529 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
530 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
537 time_t eventTime = time_t(
event.time().value()>>32);
539 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
540 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
541 <<
" Lumi : " <<
event.id().luminosityBlock()
542 <<
" Event : " <<
event.id().event()
543 <<
" at time : " << ctime(&eventTime) << endl;
548 stringstream synchNoisyCh;
549 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
550 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
551 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
556 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
561 bool isSyncNoisy =
false;
564 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
568 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
575 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
577 bool isNoisy =
false;
578 bool isFEMasked =
false;
579 bool isTDCMasked =
false;
580 bool isTrigMask =
false;
584 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
585 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
589 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
590 uint32_t indexSL = dtSLId.
rawId();
592 uint32_t indexCh = dtChId.
rawId();
593 int layer_number=((*dtLayerId_It).first).layer();
599 tTrigMap->
get( ((*dtLayerId_It).first).superlayerId(),
606 float t0;
float t0RMS;
607 int tdcTime = (*digiIt).countsTDC();
610 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
613 tdcTime +=
int(round(t0));
620 if (( !isNoisy ) && (!isSyncNoisy)) {
624 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
634 histoTag =
"OccupancyAllHits_perCh";
635 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
645 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
649 histoTag =
"OccupancyAllHits";
650 map<int, MonitorElement*>::const_iterator histoPerWheel =
653 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
657 if (tdcTime < inTimeHitsLowerBoundCorr ) {
662 histoTag =
"OccupancyNoise_perCh";
663 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
666 mappedHisto->second->Fill((*digiIt).wire(),
667 (layer_number+(superlayer_number-1)*4)-1);
671 histoTag =
"OccupancyNoise";
672 map<int, MonitorElement*>::const_iterator histoPerWheel =
675 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
680 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
684 histoTag =
"OccupancyInTimeHits_perCh";
685 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
688 mappedHisto->second->Fill((*digiIt).wire(),
689 (layer_number+(superlayer_number-1)*4)-1);
692 histoTag =
"OccupancyInTimeHits";
693 map<int, MonitorElement*>::const_iterator histoPerWheel =
696 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)
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
edm::ESHandle< DTTtrig > tTrigMap
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
edm::ESHandle< DTT0 > t0Map
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
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
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
std::vector< DTDigi >::const_iterator const_iterator
int cellStatus(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, bool &noiseFlag, bool &feMask, bool &tdcMask, bool &trigMask, bool &deadFlag, bool &nohvFlag) const
get content
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_