Analyze.
459 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Analyze #Run: " <<
event.id().run()
460 <<
" #Event: " <<
event.id().event() << endl;
482 if(dtdigis->begin() == dtdigis->end()) {
483 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"Event " <<
nevents <<
" empty." << endl;
489 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); dtLayerId_It++) {
490 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
494 hitMap[chId] += (((*dtLayerId_It).second).
second - ((*dtLayerId_It).second).first);
500 map<DTChamberId,int>::const_iterator hitMapIt =
hitMap.begin();
501 map<DTChamberId,int>::const_iterator hitMapEnd =
hitMap.end();
505 for (; hitMapIt != hitMapEnd; ++hitMapIt) {
509 int wh = chId.
wheel();
511 LogTrace(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch noise in chamber: " << chId
512 <<
" with # digis: " << hitMapIt->second << endl;
514 if(chMap.find(wh) == chMap.end()) { chMap[wh] = 0; }
525 map<int,int>::const_iterator chMapIt = chMap.begin();
526 map<int,int>::const_iterator chMapEnd = chMap.end();
527 for (; chMapIt != chMapEnd; ++chMapIt) {
528 wheelHistos[
"SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
535 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"[DTDigiTask] Synch Noise in event: " <<
nevents;
536 if(
filterSyncNoise)
LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask") <<
"\tnoisy time-boxes and occupancy will not be filled!" << endl;
543 time_t eventTime = time_t(
event.time().value()>>32);
545 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
546 <<
"[DTDigiTask] At least 4 Synch Noisy chambers in Run : " <<
event.id().run()
547 <<
" Lumi : " <<
event.id().luminosityBlock()
548 <<
" Event : " <<
event.id().event()
549 <<
" at time : " << ctime(&eventTime) << endl;
554 stringstream synchNoisyCh;
555 for (;chIt!=chEnd;++chIt) { synchNoisyCh <<
" " << (*chIt); }
556 LogVerbatim(
"DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise") <<
557 "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
562 << (
syncNum*0.1) <<
"% sync noise events in the last 1000 events " << endl;
567 bool isSyncNoisy =
false;
570 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It) {
574 DTChamberId chId = ((*dtLayerId_It).first).chamberId();
581 digiIt!=((*dtLayerId_It).second).
second; ++digiIt) {
583 bool isNoisy =
false;
584 bool isFEMasked =
false;
585 bool isTDCMasked =
false;
586 bool isTrigMask =
false;
590 const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
591 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
595 const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
596 uint32_t indexSL = dtSLId.
rawId();
598 uint32_t indexCh = dtChId.
rawId();
599 int layer_number=((*dtLayerId_It).first).layer();
605 tTrigMap->
get( ((*dtLayerId_It).first).superlayerId(),
612 float t0;
float t0RMS;
613 int tdcTime = (*digiIt).countsTDC();
616 const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
619 tdcTime +=
int(round(t0));
631 if (( !isNoisy ) && (!isSyncNoisy)) {
635 (
digiHistos.find(histoTag)->second).
find(indexSL)->second->Fill(tdcTime);
645 histoTag =
"OccupancyAllHits_perCh";
646 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
656 mappedHisto->second->Fill((*digiIt).wire(),(layer_number+(superlayer_number-1)*4)-1);
660 histoTag =
"OccupancyAllHits";
661 map<int, MonitorElement*>::const_iterator histoPerWheel =
664 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
668 if (tdcTime < inTimeHitsLowerBoundCorr ) {
673 histoTag =
"OccupancyNoise_perCh";
674 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
677 mappedHisto->second->Fill((*digiIt).wire(),
678 (layer_number+(superlayer_number-1)*4)-1);
682 histoTag =
"OccupancyNoise";
683 map<int, MonitorElement*>::const_iterator histoPerWheel =
686 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
691 if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
695 histoTag =
"OccupancyInTimeHits_perCh";
696 map<uint32_t, MonitorElement*>::const_iterator mappedHisto =
699 mappedHisto->second->Fill((*digiIt).wire(),
700 (layer_number+(superlayer_number-1)*4)-1);
703 histoTag =
"OccupancyInTimeHits";
704 map<int, MonitorElement*>::const_iterator histoPerWheel =
707 histoPerWheel->second->Fill(dtChId.
sector(),dtChId.
station());
DTChamberId chamberId() const
Return the corresponding ChamberId.
constexpr uint32_t rawId() const
get the raw id
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
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< DigiType >::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_