CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DTDigiTask Class Reference

#include <DTDigiTask.h>

Inheritance diagram for DTDigiTask:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTDigiTask (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTDigiTask () override
 Destructor. More...
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) override
 To reset the MEs. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookHistos (DQMStore::IBooker &ibooker, const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
 Book the ME. More...
 
void bookHistos (DQMStore::IBooker &ibooker, const DTChamberId &dtCh, std::string folder, std::string histoTag)
 
void bookHistos (DQMStore::IBooker &ibooker, const int wheelId, std::string folder, std::string histoTag)
 
void channelsMap (const DTChamberId &dtCh, std::string histoTag)
 To map real channels. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) final
 
std::string triggerSource ()
 get the L1A source More...
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

std::string topFolder () const
 

Private Attributes

bool checkNoisyChannels
 
int defaultTmax
 
int defaultTTrig
 
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
 
bool doAllHitsOccupancies
 
bool doInTimeOccupancies
 
bool doLayerTimeBoxes
 
bool doNoiseOccupancies
 
bool doStaticBooking
 
edm::EDGetTokenT< DTDigiCollectiondtDigiToken_
 
bool filterSyncNoise
 
std::map< DTChamberId, int > hitMap
 
int inTimeHitsLowerBound
 
int inTimeHitsUpperBound
 
bool isLocalRun
 
float kFactor
 
bool lookForSyncNoise
 
edm::EDGetTokenT< LTCDigiCollectionltcDigiCollectionToken_
 
edm::Handle< LTCDigiCollectionltcdigis
 
const DTReadOutMappingmapping
 
int maxTDCHits
 
int maxTTMounts
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
MonitorElementnEventMonitor
 
int nevents
 
std::map< DTChamberId, int > nSynchNoiseEvents
 
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcdreadOutMapToken_
 
bool readTTrigDB
 
int resetCycle
 
bool sliceTestMode
 
const DTStatusFlagstatusMap
 
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcdstatusMapToken_
 
bool subtractT0
 
std::set< DTChamberIdsyncNoisyChambers
 
int syncNum
 
int syncNumTot
 
const DTT0t0Map
 
edm::ESGetToken< DTT0, DTT0RcdT0Token_
 
int tdcPedestal
 
int timeBoxGranularity
 
int tMax
 no needs to be precise. Value from PSets will always be used More...
 
bool tpMode
 
float tTrig
 tTrig from the DB More...
 
const DTTtrigtTrigMap
 
float tTrigRMS
 
edm::ESGetToken< DTTtrig, DTTtrigRcdTtrigToken_
 
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 51 of file DTDigiTask.h.

Constructor & Destructor Documentation

◆ DTDigiTask()

DTDigiTask::DTDigiTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file DTDigiTask.cc.

References checkNoisyChannels, defaultTmax, defaultTTrig, doAllHitsOccupancies, doInTimeOccupancies, doLayerTimeBoxes, doNoiseOccupancies, doStaticBooking, dtDigiToken_, filterSyncNoise, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inTimeHitsLowerBound, inTimeHitsUpperBound, isLocalRun, LogTrace, lookForSyncNoise, ltcDigiCollectionToken_, maxTDCHits, maxTTMounts, readTTrigDB, resetCycle, sliceTestMode, subtractT0, syncNum, syncNumTot, tdcPedestal, timeBoxGranularity, and tpMode.

34  : muonGeomToken_(esConsumes<edm::Transition::BeginRun>()),
35  readOutMapToken_(esConsumes<edm::Transition::BeginRun>()),
36  TtrigToken_(esConsumes<edm::Transition::BeginRun>()),
37  T0Token_(esConsumes<edm::Transition::BeginRun>()),
39  // switch for the verbosity
40  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "[DTDigiTask]: Constructor" << endl;
41 
42  // The label to retrieve the digis
43  dtDigiToken_ = consumes<DTDigiCollection>(ps.getUntrackedParameter<InputTag>("dtDigiLabel"));
44  // Read the configuration parameters
45  maxTDCHits = ps.getUntrackedParameter<int>("maxTDCHitsPerChamber", 30000);
46  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
47  readTTrigDB = ps.getUntrackedParameter<bool>("readDB", false);
48  // Set to true to subtract t0 from test pulses
49  subtractT0 = ps.getParameter<bool>("performPerWireT0Calibration");
50  // Tmax value (TDC counts)
51  defaultTmax = ps.getParameter<int>("defaultTmax");
52  // Switch from static to dinamic histo booking
53  doStaticBooking = ps.getUntrackedParameter<bool>("staticBooking", true);
54 
55  // Switch for local/global runs
56  isLocalRun = ps.getUntrackedParameter<bool>("localrun", true);
57  if (!isLocalRun) {
59  consumes<LTCDigiCollection>(ps.getUntrackedParameter<edm::InputTag>("ltcDigiCollectionTag"));
60  }
61 
62  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
63  resetCycle = ps.getUntrackedParameter<int>("ResetCycle", 3);
64  // Check the DB of noisy channels
65  checkNoisyChannels = ps.getUntrackedParameter<bool>("checkNoisyChannels", false);
66  // Default TTrig to be used when not reading the TTrig DB
67  defaultTTrig = ps.getParameter<int>("defaultTtrig");
68  inTimeHitsLowerBound = ps.getParameter<int>("inTimeHitsLowerBound");
69  inTimeHitsUpperBound = ps.getParameter<int>("inTimeHitsUpperBound");
70  timeBoxGranularity = ps.getUntrackedParameter<int>("timeBoxGranularity", 4);
71  maxTTMounts = ps.getUntrackedParameter<int>("maxTTMounts", 6400);
72 
73  doAllHitsOccupancies = ps.getUntrackedParameter<bool>("doAllHitsOccupancies", true);
74  doNoiseOccupancies = ps.getUntrackedParameter<bool>("doNoiseOccupancies", false);
75  doInTimeOccupancies = ps.getUntrackedParameter<bool>("doInTimeOccupancies", false);
76 
77  // switch on the mode for running on test pulses (different top folder)
78  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
79  // switch on/off the filtering of synchronous noise events (cutting on the # of digis)
80  // time-boxes and occupancy plots are not filled and summary plots are created to report the problem
81  filterSyncNoise = ps.getUntrackedParameter<bool>("filterSyncNoise", false);
82  // look for synch noisy events, produce histograms but do not filter them
83  lookForSyncNoise = ps.getUntrackedParameter<bool>("lookForSyncNoise", false);
84 
85  // switch on the mode for running on slice test (different top folder and other customizations)
86  sliceTestMode = ps.getUntrackedParameter<bool>("sliceTestMode", false);
87  // time pedestal used to set the minimum in the time box plot
88  tdcPedestal = ps.getUntrackedParameter<int>("tdcPedestal", 0);
89 
90  // switch on production of time-boxes with layer granularity
91  doLayerTimeBoxes = ps.getUntrackedParameter<bool>("doLayerTimeBoxes", false);
92 
93  syncNumTot = 0;
94  syncNum = 0;
95 }
int defaultTmax
Definition: DTDigiTask.h:135
bool doStaticBooking
Definition: DTDigiTask.h:138
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool tpMode
Definition: DTDigiTask.h:156
bool doLayerTimeBoxes
Definition: DTDigiTask.h:163
bool filterSyncNoise
Definition: DTDigiTask.h:158
int maxTTMounts
Definition: DTDigiTask.h:151
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > statusMapToken_
Definition: DTDigiTask.h:117
bool readTTrigDB
Definition: DTDigiTask.h:131
bool lookForSyncNoise
Definition: DTDigiTask.h:157
#define LogTrace(id)
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > readOutMapToken_
Definition: DTDigiTask.h:108
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:126
bool checkNoisyChannels
Definition: DTDigiTask.h:144
bool isLocalRun
Definition: DTDigiTask.h:140
edm::ESGetToken< DTT0, DTT0Rcd > T0Token_
Definition: DTDigiTask.h:113
bool doInTimeOccupancies
Definition: DTDigiTask.h:154
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTDigiTask.h:106
bool doNoiseOccupancies
Definition: DTDigiTask.h:153
int resetCycle
Definition: DTDigiTask.h:142
int inTimeHitsUpperBound
Definition: DTDigiTask.h:149
int defaultTTrig
Definition: DTDigiTask.h:146
int tdcPedestal
Definition: DTDigiTask.h:161
bool doAllHitsOccupancies
Definition: DTDigiTask.h:152
int maxTDCHits
Definition: DTDigiTask.h:90
bool subtractT0
Definition: DTDigiTask.h:133
int timeBoxGranularity
Definition: DTDigiTask.h:150
int syncNumTot
Definition: DTDigiTask.h:101
int inTimeHitsLowerBound
Definition: DTDigiTask.h:148
edm::ESGetToken< DTTtrig, DTTtrigRcd > TtrigToken_
Definition: DTDigiTask.h:111
bool sliceTestMode
Definition: DTDigiTask.h:160
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:128

◆ ~DTDigiTask()

DTDigiTask::~DTDigiTask ( )
override

Destructor.

Definition at line 98 of file DTDigiTask.cc.

References LogTrace, and nevents.

98  {
99  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "DTDigiTask: analyzed " << nevents << " events" << endl;
100 }
#define LogTrace(id)
int nevents
Definition: DTDigiTask.h:86

Member Function Documentation

◆ analyze()

void DTDigiTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 442 of file DTDigiTask.cc.

References HltBtagPostValidation_cff::c, DTStatusFlag::cellStatus(), DTSuperLayerId::chamberId(), checkNoisyChannels, DTTimeUnits::counts, defaultTTrig, digiHistos, doAllHitsOccupancies, doInTimeOccupancies, doLayerTimeBoxes, doNoiseOccupancies, dtDigiToken_, dqm::impl::MonitorElement::Fill(), filterSyncNoise, spr::find(), DTT0::get(), DTTtrig::get(), dtResolutionTest_cfi::histoTag, hitMap, createfilelist::int, inTimeHitsLowerBound, inTimeHitsUpperBound, isLocalRun, kFactor, pixelTopology::layer, LogTrace, lookForSyncNoise, ltcDigiCollectionToken_, ltcdigis, SiStripPI::max, maxTDCHits, maxTTMounts, SiStripPI::min, nEventMonitor, nevents, DetId::rawId(), readTTrigDB, edm::second(), DTChamberId::sector(), sliceTestMode, DTChamberId::station(), statusMap, statusMapToken_, subtractT0, DTSuperLayerId::superlayer(), syncNoisyChambers, syncNum, syncNumTot, FrontierCondition_GT_autoExpress_cfi::t0, t0Map, tdcPedestal, tMax, triggerSource(), tTrig, tTrigMap, tTrigRMS, DTChamberId::wheel(), and wheelHistos.

442  {
443  nevents++;
445  if (nevents % 1000 == 0) {
446  LogTrace("DTDQM|DTMonitorModule|DTDigiTask")
447  << "[DTDigiTask] Analyze #Run: " << event.id().run() << " #Event: " << event.id().event() << endl;
448  }
449 
450  // Get the ingredients from the event
451 
452  // Digi collection
454  event.getByToken(dtDigiToken_, dtdigis);
455 
456  // LTC digis
457  if (!isLocalRun)
458  event.getByToken(ltcDigiCollectionToken_, ltcdigis);
459 
460  // Status map (for noisy channels)
461  if (checkNoisyChannels) {
462  // Get the map of noisy channels
463  statusMap = &c.getData(statusMapToken_);
464  }
465 
466  string histoTag;
467 
468  // Check if the digi container is empty
469  if (dtdigis->begin() == dtdigis->end()) {
470  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "Event " << nevents << " empty." << endl;
471  }
472 
473  if (lookForSyncNoise || filterSyncNoise) { // dosync
474  // Count the # of digis per chamber
476  for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); dtLayerId_It++) {
477  DTChamberId chId = ((*dtLayerId_It).first).chamberId();
478  if (hitMap.find(chId) == hitMap.end()) { // new chamber
479  hitMap[chId] = 0;
480  }
481  hitMap[chId] += (((*dtLayerId_It).second).second - ((*dtLayerId_It).second).first);
482  }
483 
484  // check chamber with # of digis above threshold and flag them as noisy
485  map<DTChamberId, int>::const_iterator hitMapIt = hitMap.begin();
486  map<DTChamberId, int>::const_iterator hitMapEnd = hitMap.end();
487 
488  map<int, int> chMap;
489 
490  for (; hitMapIt != hitMapEnd; ++hitMapIt) {
491  if ((hitMapIt->second) > maxTDCHits) {
492  DTChamberId chId = hitMapIt->first;
493  int wh = chId.wheel();
494 
495  LogTrace("DTDQM|DTMonitorModule|DTDigiTask")
496  << "[DTDigiTask] Synch noise in chamber: " << chId << " with # digis: " << hitMapIt->second << endl;
497 
498  if (chMap.find(wh) == chMap.end()) {
499  chMap[wh] = 0;
500  }
501  chMap[wh]++;
502 
503  syncNoisyChambers.insert(chId);
504 
505  wheelHistos["SyncNoiseEvents"][wh]->Fill(chId.sector(), chId.station());
506  }
507  }
508 
509  // fill # of noisy ch per wheel plot
510  map<int, int>::const_iterator chMapIt = chMap.begin();
511  map<int, int>::const_iterator chMapEnd = chMap.end();
512  for (; chMapIt != chMapEnd; ++chMapIt) {
513  wheelHistos["SyncNoiseChambs"][(*chMapIt).first]->Fill((*chMapIt).second);
514  }
515 
516  // clear the map of # of digis per chamber: not needed anymore
517  hitMap.clear();
518 
519  if (!syncNoisyChambers.empty()) {
520  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask") << "[DTDigiTask] Synch Noise in event: " << nevents;
521  if (filterSyncNoise)
522  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask")
523  << "\tnoisy time-boxes and occupancy will not be filled!" << endl;
524  syncNumTot++;
525  syncNum++;
526  }
527 
528  // Logging of "large" synch Noisy events in private DQM
529  if (syncNoisyChambers.size() > 3) {
530  time_t eventTime = time_t(event.time().value() >> 32);
531 
532  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
533  << "[DTDigiTask] At least 4 Synch Noisy chambers in Run : " << event.id().run()
534  << " Lumi : " << event.id().luminosityBlock() << " Event : " << event.id().event()
535  << " at time : " << ctime(&eventTime) << endl;
536 
537  set<DTChamberId>::const_iterator chIt = syncNoisyChambers.begin();
538  set<DTChamberId>::const_iterator chEnd = syncNoisyChambers.end();
539 
540  stringstream synchNoisyCh;
541  for (; chIt != chEnd; ++chIt) {
542  synchNoisyCh << " " << (*chIt);
543  }
544  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask|DTSynchNoise")
545  << "[DTDigiTask] Chamber List :" << synchNoisyCh.str() << endl;
546  }
547 
548  if (nevents % 1000 == 0) {
549  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask")
550  << (syncNumTot * 100. / nevents) << "% sync noise events since the beginning \n"
551  << (syncNum * 0.1) << "% sync noise events in the last 1000 events " << endl;
552  syncNum = 0;
553  }
554  }
555 
556  bool isSyncNoisy = false;
557 
559  for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); ++dtLayerId_It) { // Loop over layers
560  isSyncNoisy = false;
561  // check if chamber labeled as synch noisy
562  if (filterSyncNoise) {
563  DTChamberId chId = ((*dtLayerId_It).first).chamberId();
564  if (syncNoisyChambers.find(chId) != syncNoisyChambers.end()) {
565  isSyncNoisy = true;
566  }
567  }
568 
569  for (DTDigiCollection::const_iterator digiIt = ((*dtLayerId_It).second).first;
570  digiIt != ((*dtLayerId_It).second).second;
571  ++digiIt) { // Loop over all digis
572 
573  bool isNoisy = false;
574  bool isFEMasked = false;
575  bool isTDCMasked = false;
576  bool isTrigMask = false;
577  bool isDead = false;
578  bool isNohv = false;
579  if (checkNoisyChannels) {
580  const DTWireId wireId(((*dtLayerId_It).first), (*digiIt).wire());
581  statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
582  }
583 
584  // Get the useful IDs
585  const DTSuperLayerId dtSLId = ((*dtLayerId_It).first).superlayerId();
586  uint32_t indexSL = dtSLId.rawId();
587  const DTChamberId dtChId = dtSLId.chamberId();
588  uint32_t indexCh = dtChId.rawId();
589  int layer_number = ((*dtLayerId_It).first).layer();
590  int superlayer_number = dtSLId.superlayer();
591 
592  // Read the ttrig DB or set a rough value from config
593  // ttrig and rms are TDC counts
594  if (readTTrigDB)
595  tTrigMap->get(((*dtLayerId_It).first).superlayerId(), tTrig, tTrigRMS, kFactor, DTTimeUnits::counts);
596  else
598 
599  int inTimeHitsLowerBoundCorr = int(round(tTrig)) - inTimeHitsLowerBound;
600  int inTimeHitsUpperBoundCorr = int(round(tTrig)) + tMax + inTimeHitsUpperBound;
601 
602  float t0;
603  float t0RMS;
604  int tdcTime = (*digiIt).countsTDC();
605 
606  if (subtractT0) {
607  const DTWireId dtWireId(((*dtLayerId_It).first), (*digiIt).wire());
608  // t0s and rms are TDC counts
609  t0Map->get(dtWireId, t0, t0RMS, DTTimeUnits::counts);
610  tdcTime += int(round(t0));
611  }
612 
613  if (sliceTestMode) {
614  tdcTime = std::max(tdcPedestal + 1, std::min(tdcPedestal + maxTTMounts - 1, tdcTime));
615  // std::cout << tdcTime << std::endl;
616  }
617 
618  // Fill Time-Boxes
619  // NOTE: avoid to fill TB and PhotoPeak with noise. Occupancy are filled anyway
620  if ((!isNoisy) && (!isSyncNoisy)) { // Discard noisy channels
621  // TimeBoxes per SL
622  histoTag = "TimeBox" + triggerSource();
623 
624  (digiHistos.find(histoTag)->second).find(indexSL)->second->Fill(tdcTime);
625  if (doLayerTimeBoxes)
626  (digiHistos.find(histoTag)->second).find((*dtLayerId_It).first.rawId())->second->Fill(tdcTime);
627  }
628 
629  // Fill Occupancies
630  if (!isSyncNoisy) { // Discard synch noisy channels
631 
632  if (doAllHitsOccupancies) { // fill occupancies for all hits
633  //Occupancies per chamber & layer
634  histoTag = "OccupancyAllHits_perCh";
635  map<uint32_t, MonitorElement*>::const_iterator mappedHisto = digiHistos[histoTag].find(indexCh);
636 
637  //FR comment the following cannot pass ibooker to analyze method!
638  /*
639  if (mappedHisto == digiHistos[histoTag].end()) { // dynamic booking
640  bookHistos(ibooker, dtChId, string("Occupancies"), histoTag);
641  mappedHisto = digiHistos[histoTag].find(indexCh);
642  }
643  */
644  mappedHisto->second->Fill((*digiIt).wire(), (layer_number + (superlayer_number - 1) * 4) - 1);
645 
646  // Fill the chamber occupancy
647  histoTag = "OccupancyAllHits";
648  map<int, MonitorElement*>::const_iterator histoPerWheel = wheelHistos[histoTag].find(dtChId.wheel());
649 
650  histoPerWheel->second->Fill(dtChId.sector(), dtChId.station()); // FIXME: normalize to # of layers
651  }
652 
653  if (doNoiseOccupancies) { // fill occupancies for hits before the ttrig
654  if (tdcTime < inTimeHitsLowerBoundCorr) {
655  // FIXME: what about tdcTime > inTimeHitsUpperBoundCorr ???
656 
657  // Noise: Before tTrig
658  //Occupancies Noise per chamber & layer
659  histoTag = "OccupancyNoise_perCh";
660  map<uint32_t, MonitorElement*>::const_iterator mappedHisto = digiHistos[histoTag].find(indexCh);
661 
662  mappedHisto->second->Fill((*digiIt).wire(), (layer_number + (superlayer_number - 1) * 4) - 1);
663 
664  // Fill the chamber occupancy
665 
666  histoTag = "OccupancyNoise";
667  map<int, MonitorElement*>::const_iterator histoPerWheel = wheelHistos[histoTag].find(dtChId.wheel());
668 
669  histoPerWheel->second->Fill(dtChId.sector(), dtChId.station()); // FIXME: normalize to # of layers
670  }
671  }
672 
673  if (doInTimeOccupancies) { // fill occpunacies for in-time hits only
674  if (tdcTime > inTimeHitsLowerBoundCorr && tdcTime < inTimeHitsUpperBoundCorr) {
675  // Physical hits: within the time window
676 
677  //Occupancies Signal per chamber & layer
678  histoTag = "OccupancyInTimeHits_perCh";
679  map<uint32_t, MonitorElement*>::const_iterator mappedHisto = digiHistos[histoTag].find(indexCh);
680 
681  mappedHisto->second->Fill((*digiIt).wire(), (layer_number + (superlayer_number - 1) * 4) - 1);
682 
683  // Fill the chamber occupancy
684  histoTag = "OccupancyInTimeHits";
685  map<int, MonitorElement*>::const_iterator histoPerWheel = wheelHistos[histoTag].find(dtChId.wheel());
686 
687  histoPerWheel->second->Fill(dtChId.sector(), dtChId.station()); // FIXME: normalize to # of layers
688  }
689  }
690  }
691  }
692  }
693 
694  syncNoisyChambers.clear();
695 }
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
Definition: DTChamberId.h:42
bool doLayerTimeBoxes
Definition: DTDigiTask.h:163
bool filterSyncNoise
Definition: DTDigiTask.h:158
int maxTTMounts
Definition: DTDigiTask.h:151
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > statusMapToken_
Definition: DTDigiTask.h:117
bool readTTrigDB
Definition: DTDigiTask.h:131
bool lookForSyncNoise
Definition: DTDigiTask.h:157
float kFactor
Definition: DTDigiTask.h:95
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:99
#define LogTrace(id)
const DTStatusFlag * statusMap
Definition: DTDigiTask.h:118
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
void Fill(long long x)
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:126
bool checkNoisyChannels
Definition: DTDigiTask.h:144
DTChamberId chamberId() const
Return the corresponding ChamberId.
bool isLocalRun
Definition: DTDigiTask.h:140
bool doInTimeOccupancies
Definition: DTDigiTask.h:154
bool doNoiseOccupancies
Definition: DTDigiTask.h:153
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:121
int nevents
Definition: DTDigiTask.h:86
const DTTtrig * tTrigMap
Definition: DTDigiTask.h:112
int inTimeHitsUpperBound
Definition: DTDigiTask.h:149
int defaultTTrig
Definition: DTDigiTask.h:146
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:93
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:89
int tdcPedestal
Definition: DTDigiTask.h:161
bool doAllHitsOccupancies
Definition: DTDigiTask.h:152
int maxTDCHits
Definition: DTDigiTask.h:90
int superlayer() const
Return the superlayer number (deprecated method name)
bool subtractT0
Definition: DTDigiTask.h:133
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
Definition: DTT0.cc:48
std::vector< DigiType >::const_iterator const_iterator
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:100
int syncNumTot
Definition: DTDigiTask.h:101
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
Definition: DTTtrig.cc:59
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:166
int inTimeHitsLowerBound
Definition: DTDigiTask.h:148
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
float tTrigRMS
Definition: DTDigiTask.h:94
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:120
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
Definition: DTStatusFlag.h:90
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:697
const DTT0 * t0Map
Definition: DTDigiTask.h:114
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:104
bool sliceTestMode
Definition: DTDigiTask.h:160
Definition: event.py:1
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:128

◆ beginLuminosityBlock()

void DTDigiTask::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotected

To reset the MEs.

Definition at line 188 of file DTDigiTask.cc.

References channelsMap(), digiHistos, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), resetCycle, sliceTestMode, and wheelHistos.

188  {
189  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "[DTDigiTask]: Begin of LS transition" << endl;
190 
191  // Reset the MonitorElements every n (= ResetCycle) Lumi Blocks
192  int lumiBlock = lumiSeg.id().luminosityBlock();
193  if (lumiBlock % resetCycle == 0) {
194  LogVerbatim("DTDQM|DTMonitorModule|DTDigiTask")
195  << "[DTDigiTask]: Reset at the LS transition : " << lumiBlock << endl;
196  // Loop over all ME
197  map<string, map<uint32_t, MonitorElement*> >::const_iterator histosIt = digiHistos.begin();
198  map<string, map<uint32_t, MonitorElement*> >::const_iterator histosEnd = digiHistos.end();
199  for (; histosIt != histosEnd; ++histosIt) {
200  map<uint32_t, MonitorElement*>::const_iterator histoIt = (*histosIt).second.begin();
201  map<uint32_t, MonitorElement*>::const_iterator histoEnd = (*histosIt).second.end();
202  for (; histoIt != histoEnd; ++histoIt) {
203  (*histoIt).second->Reset();
204  }
205  }
206 
207  // re-set mapping for not real channels in the occupancyHits per chamber
208  for (int wh = -2; wh <= 2; wh++) {
209  for (int sect = 1; sect <= 14; sect++) {
210  for (int st = 1; st <= 4; st++) {
211  if (sliceTestMode && (sect != 12 || wh != 2)) {
212  continue;
213  }
214  if ((sect == 13 || sect == 14) && st != 4) {
215  continue;
216  }
217  const DTChamberId dtChId(wh, st, sect);
218  channelsMap(dtChId, "OccupancyAllHits_perCh");
219  }
220  }
221  }
222 
223  // loop over wheel summaries
224  map<string, map<int, MonitorElement*> >::const_iterator whHistosIt = wheelHistos.begin();
225  map<string, map<int, MonitorElement*> >::const_iterator whHistosEnd = wheelHistos.end();
226  for (; whHistosIt != whHistosEnd; ++whHistosIt) {
227  if ((*whHistosIt).first.find("Sync") == string::npos) { // FIXME skips synch noise plots
228  map<int, MonitorElement*>::const_iterator histoIt = (*whHistosIt).second.begin();
229  map<int, MonitorElement*>::const_iterator histoEnd = (*whHistosIt).second.end();
230  for (; histoIt != histoEnd; ++histoIt) {
231  (*histoIt).second->Reset();
232  }
233  }
234  }
235  }
236 }
Log< level::Info, true > LogVerbatim
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:726
#define LogTrace(id)
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:121
int resetCycle
Definition: DTDigiTask.h:142
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:120
bool sliceTestMode
Definition: DTDigiTask.h:160

◆ bookHistograms()

void DTDigiTask::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 124 of file DTDigiTask.cc.

References dqm::implementation::IBooker::bookFloat(), bookHistos(), channelsMap(), doAllHitsOccupancies, doInTimeOccupancies, doNoiseOccupancies, doStaticBooking, filterSyncNoise, isLocalRun, lookForSyncNoise, nEventMonitor, dqm::implementation::NavigatorBase::setCurrentFolder(), sliceTestMode, topFolder(), and tpMode.

124  {
125  if (doStaticBooking) { // Static histo booking
126  // book the event counter
127  ibooker.setCurrentFolder("DT/EventInfo/Counters");
128  nEventMonitor = ibooker.bookFloat(tpMode ? "nProcessedEventsDigiTP" : "nProcessedEventsDigi");
129  ibooker.setCurrentFolder(topFolder());
130  for (int wh = -2; wh <= 2; ++wh) { // loop over wheels
131  if (sliceTestMode && wh != 2)
132  continue;
133 
135  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyAllHits");
136 
137  if (doNoiseOccupancies)
138  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyNoise");
140  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyInTimeHits");
141 
143  bookHistos(ibooker, wh, string("SynchNoise"), "SyncNoiseEvents");
144  bookHistos(ibooker, wh, string("SynchNoise"), "SyncNoiseChambs");
145  }
146 
147  for (int st = 1; st <= 4; ++st) { // loop over stations
148  for (int sect = 1; sect <= 14; ++sect) { // loop over sectors
149  if ((sect == 13 || sect == 14) && st != 4)
150  continue;
151 
152  if (sliceTestMode && (sect != 12 || wh != 2))
153  continue;
154 
155  // Get the chamber ID
156  const DTChamberId dtChId(wh, st, sect);
157 
158  // Occupancies
159  if (doAllHitsOccupancies) {
160  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyAllHits_perCh");
161  // set channel mapping
162  channelsMap(dtChId, "OccupancyAllHits_perCh");
163  }
164  if (doNoiseOccupancies)
165  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyNoise_perCh");
167  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyInTimeHits_perCh");
168 
169  for (int sl = 1; sl <= 3; ++sl) { // Loop over SLs
170  if (st == 4 && sl == 2)
171  continue;
172  const DTSuperLayerId dtSLId(wh, st, sect, sl);
173  if (isLocalRun) {
174  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBox");
175  } else {
176  // TimeBoxes for different triggers
177  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxDTonly");
178  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxNoDT");
179  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxDTalso");
180  }
181  }
182  }
183  }
184  }
185  }
186 }
bool doStaticBooking
Definition: DTDigiTask.h:138
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:726
bool tpMode
Definition: DTDigiTask.h:156
bool filterSyncNoise
Definition: DTDigiTask.h:158
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
bool lookForSyncNoise
Definition: DTDigiTask.h:157
bool isLocalRun
Definition: DTDigiTask.h:140
bool doInTimeOccupancies
Definition: DTDigiTask.h:154
bool doNoiseOccupancies
Definition: DTDigiTask.h:153
bool doAllHitsOccupancies
Definition: DTDigiTask.h:152
void bookHistos(DQMStore::IBooker &ibooker, const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
Book the ME.
std::string topFolder() const
Definition: DTDigiTask.cc:718
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:166
bool sliceTestMode
Definition: DTDigiTask.h:160

◆ bookHistos() [1/3]

void DTDigiTask::bookHistos ( DQMStore::IBooker ibooker,
const DTSuperLayerId dtSL,
std::string  folder,
std::string  histoTag 
)
protected

Book the ME.

Referenced by bookHistograms().

◆ bookHistos() [2/3]

void DTDigiTask::bookHistos ( DQMStore::IBooker ibooker,
const DTChamberId dtCh,
std::string  folder,
std::string  histoTag 
)
protected

◆ bookHistos() [3/3]

void DTDigiTask::bookHistos ( DQMStore::IBooker ibooker,
const int  wheelId,
std::string  folder,
std::string  histoTag 
)
protected

◆ channelsMap()

void DTDigiTask::channelsMap ( const DTChamberId dtCh,
std::string  histoTag 
)
protected

To map real channels.

Definition at line 726 of file DTDigiTask.cc.

References totem::nt2::vfat::channelId(), digiHistos, DTReadOutMapping::geometryToReadOut(), dtResolutionTest_cfi::histoTag, mapping, DetId::rawId(), DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by beginLuminosityBlock(), and bookHistograms().

726  {
727  // n max channels
728  int nWires_max = (digiHistos[histoTag])[dtCh.rawId()]->getNbinsX();
729 
730  // set bin content = -1 for each not real channel. For visualization purposes
731  for (int sl = 1; sl <= 3; sl++) {
732  for (int ly = 1; ly <= 4; ly++) {
733  for (int ch = 1; ch <= nWires_max; ch++) {
734  int dduId = -1, rosId = -1, robId = -1, tdcId = -1, channelId = -1;
735  int realCh = mapping->geometryToReadOut(
736  dtCh.wheel(), dtCh.station(), dtCh.sector(), sl, ly, ch, dduId, rosId, robId, tdcId, channelId);
737 
738  // realCh = 0 if the channel exists, while realCh = 1 if it does not exist
739  if (realCh) {
740  int lybin = (4 * sl - 4) + ly;
741  (digiHistos[histoTag])[dtCh.rawId()]->setBinContent(ch, lybin, -1.);
742  }
743  }
744  }
745  }
746 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
const DTReadOutMapping * mapping
Definition: DTDigiTask.h:109
int geometryToReadOut(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, int &dduId, int &rosId, int &robId, int &tdcId, int &channelId) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint8_t channelId(const VFATFrame &frame)
retrieve this channel identifier
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:120

◆ dqmBeginRun()

void DTDigiTask::dqmBeginRun ( const edm::Run run,
const edm::EventSetup context 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 102 of file DTDigiTask.cc.

References visDQMUpload::context, defaultTmax, LogTrace, mapping, muonGeom, muonGeomToken_, nevents, readOutMapToken_, readTTrigDB, subtractT0, t0Map, T0Token_, tMax, tTrigMap, and TtrigToken_.

102  {
103  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "[DTDigiTask]: begin run" << endl;
104  nevents = 0;
105 
106  // Get the geometry
107  muonGeom = &context.getData(muonGeomToken_);
108 
109  // map of the channels
110  mapping = &context.getData(readOutMapToken_);
111 
112  // tTrig
113  if (readTTrigDB)
114  tTrigMap = &context.getData(TtrigToken_);
115  // t0s
116  if (subtractT0)
117  t0Map = &context.getData(T0Token_);
118  // FIXME: tMax (not yet from the DB)
119  tMax = defaultTmax;
120 
121  // ----------------------------------------------------------------------
122 }
int defaultTmax
Definition: DTDigiTask.h:135
const DTReadOutMapping * mapping
Definition: DTDigiTask.h:109
bool readTTrigDB
Definition: DTDigiTask.h:131
#define LogTrace(id)
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > readOutMapToken_
Definition: DTDigiTask.h:108
edm::ESGetToken< DTT0, DTT0Rcd > T0Token_
Definition: DTDigiTask.h:113
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTDigiTask.h:106
int nevents
Definition: DTDigiTask.h:86
const DTTtrig * tTrigMap
Definition: DTDigiTask.h:112
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:89
const DTGeometry * muonGeom
Definition: DTDigiTask.h:107
bool subtractT0
Definition: DTDigiTask.h:133
edm::ESGetToken< DTTtrig, DTTtrigRcd > TtrigToken_
Definition: DTDigiTask.h:111
const DTT0 * t0Map
Definition: DTDigiTask.h:114

◆ endLuminosityBlock()

void DTDigiTask::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
inlinefinalprotected

Definition at line 72 of file DTDigiTask.h.

72 {}

◆ topFolder()

string DTDigiTask::topFolder ( ) const
private

Definition at line 718 of file DTDigiTask.cc.

References sliceTestMode, AlCaHLTBitMon_QueryRunRegistry::string, and tpMode.

Referenced by bookHistograms().

718  {
719  if (tpMode)
720  return string("DT/10-TestPulses/");
721  else if (sliceTestMode)
722  return string("DT/01-SliceTestDigi/");
723  return string("DT/01-Digi/");
724 }
bool tpMode
Definition: DTDigiTask.h:156
bool sliceTestMode
Definition: DTDigiTask.h:160

◆ triggerSource()

string DTDigiTask::triggerSource ( )
protected

get the L1A source

Definition at line 697 of file DTDigiTask.cc.

References mps_fire::i, isLocalRun, and ltcdigis.

Referenced by analyze().

697  {
698  string l1ASource;
699  if (isLocalRun)
700  return l1ASource;
701 
702  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++) {
703  size_t otherTriggerSum = 0;
704  for (size_t i = 1; i < 6; i++)
705  otherTriggerSum += size_t((*ltc_it).HasTriggered(i));
706 
707  if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
708  l1ASource = "DTonly";
709  else if (!(*ltc_it).HasTriggered(0))
710  l1ASource = "NoDT";
711  else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
712  l1ASource = "DTalso";
713  }
714 
715  return l1ASource;
716 }
bool isLocalRun
Definition: DTDigiTask.h:140
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:104

Member Data Documentation

◆ checkNoisyChannels

bool DTDigiTask::checkNoisyChannels
private

Definition at line 144 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ defaultTmax

int DTDigiTask::defaultTmax
private

Definition at line 135 of file DTDigiTask.h.

Referenced by dqmBeginRun(), and DTDigiTask().

◆ defaultTTrig

int DTDigiTask::defaultTTrig
private

Definition at line 146 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ digiHistos

std::map<std::string, std::map<uint32_t, MonitorElement*> > DTDigiTask::digiHistos
private

Definition at line 120 of file DTDigiTask.h.

Referenced by analyze(), beginLuminosityBlock(), and channelsMap().

◆ doAllHitsOccupancies

bool DTDigiTask::doAllHitsOccupancies
private

Definition at line 152 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), and DTDigiTask().

◆ doInTimeOccupancies

bool DTDigiTask::doInTimeOccupancies
private

Definition at line 154 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), and DTDigiTask().

◆ doLayerTimeBoxes

bool DTDigiTask::doLayerTimeBoxes
private

Definition at line 163 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ doNoiseOccupancies

bool DTDigiTask::doNoiseOccupancies
private

Definition at line 153 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), and DTDigiTask().

◆ doStaticBooking

bool DTDigiTask::doStaticBooking
private

Definition at line 138 of file DTDigiTask.h.

Referenced by bookHistograms(), and DTDigiTask().

◆ dtDigiToken_

edm::EDGetTokenT<DTDigiCollection> DTDigiTask::dtDigiToken_
private

Definition at line 126 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ filterSyncNoise

bool DTDigiTask::filterSyncNoise
private

Definition at line 158 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), and DTDigiTask().

◆ hitMap

std::map<DTChamberId, int> DTDigiTask::hitMap
private

Definition at line 99 of file DTDigiTask.h.

Referenced by analyze().

◆ inTimeHitsLowerBound

int DTDigiTask::inTimeHitsLowerBound
private

Definition at line 148 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ inTimeHitsUpperBound

int DTDigiTask::inTimeHitsUpperBound
private

Definition at line 149 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ isLocalRun

bool DTDigiTask::isLocalRun
private

Definition at line 140 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), DTDigiTask(), and triggerSource().

◆ kFactor

float DTDigiTask::kFactor
private

Definition at line 95 of file DTDigiTask.h.

Referenced by analyze().

◆ lookForSyncNoise

bool DTDigiTask::lookForSyncNoise
private

Definition at line 157 of file DTDigiTask.h.

Referenced by analyze(), bookHistograms(), and DTDigiTask().

◆ ltcDigiCollectionToken_

edm::EDGetTokenT<LTCDigiCollection> DTDigiTask::ltcDigiCollectionToken_
private

Definition at line 128 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ ltcdigis

edm::Handle<LTCDigiCollection> DTDigiTask::ltcdigis
private

Definition at line 104 of file DTDigiTask.h.

Referenced by analyze(), and triggerSource().

◆ mapping

const DTReadOutMapping* DTDigiTask::mapping
private

Definition at line 109 of file DTDigiTask.h.

Referenced by channelsMap(), dqmBeginRun(), and progressbar.FormatLabel::update().

◆ maxTDCHits

int DTDigiTask::maxTDCHits
private

Definition at line 90 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ maxTTMounts

int DTDigiTask::maxTTMounts
private

Definition at line 151 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ muonGeom

const DTGeometry* DTDigiTask::muonGeom
private

Definition at line 107 of file DTDigiTask.h.

Referenced by dqmBeginRun().

◆ muonGeomToken_

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTDigiTask::muonGeomToken_
private

Definition at line 106 of file DTDigiTask.h.

Referenced by dqmBeginRun().

◆ nEventMonitor

MonitorElement* DTDigiTask::nEventMonitor
private

Definition at line 166 of file DTDigiTask.h.

Referenced by analyze(), and bookHistograms().

◆ nevents

int DTDigiTask::nevents
private

Definition at line 86 of file DTDigiTask.h.

Referenced by analyze(), dqmBeginRun(), and ~DTDigiTask().

◆ nSynchNoiseEvents

std::map<DTChamberId, int> DTDigiTask::nSynchNoiseEvents
private

Definition at line 165 of file DTDigiTask.h.

◆ readOutMapToken_

edm::ESGetToken<DTReadOutMapping, DTReadOutMappingRcd> DTDigiTask::readOutMapToken_
private

Definition at line 108 of file DTDigiTask.h.

Referenced by dqmBeginRun().

◆ readTTrigDB

bool DTDigiTask::readTTrigDB
private

Definition at line 131 of file DTDigiTask.h.

Referenced by analyze(), dqmBeginRun(), and DTDigiTask().

◆ resetCycle

int DTDigiTask::resetCycle
private

Definition at line 142 of file DTDigiTask.h.

Referenced by beginLuminosityBlock(), and DTDigiTask().

◆ sliceTestMode

bool DTDigiTask::sliceTestMode
private

Definition at line 160 of file DTDigiTask.h.

Referenced by analyze(), beginLuminosityBlock(), bookHistograms(), DTDigiTask(), and topFolder().

◆ statusMap

const DTStatusFlag* DTDigiTask::statusMap
private

Definition at line 118 of file DTDigiTask.h.

Referenced by analyze().

◆ statusMapToken_

edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> DTDigiTask::statusMapToken_
private

Definition at line 117 of file DTDigiTask.h.

Referenced by analyze().

◆ subtractT0

bool DTDigiTask::subtractT0
private

Definition at line 133 of file DTDigiTask.h.

Referenced by analyze(), dqmBeginRun(), and DTDigiTask().

◆ syncNoisyChambers

std::set<DTChamberId> DTDigiTask::syncNoisyChambers
private

Definition at line 100 of file DTDigiTask.h.

Referenced by analyze().

◆ syncNum

int DTDigiTask::syncNum
private

Definition at line 102 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ syncNumTot

int DTDigiTask::syncNumTot
private

Definition at line 101 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ t0Map

const DTT0* DTDigiTask::t0Map
private

Definition at line 114 of file DTDigiTask.h.

Referenced by analyze(), and dqmBeginRun().

◆ T0Token_

edm::ESGetToken<DTT0, DTT0Rcd> DTDigiTask::T0Token_
private

Definition at line 113 of file DTDigiTask.h.

Referenced by dqmBeginRun().

◆ tdcPedestal

int DTDigiTask::tdcPedestal
private

Definition at line 161 of file DTDigiTask.h.

Referenced by analyze(), and DTDigiTask().

◆ timeBoxGranularity

int DTDigiTask::timeBoxGranularity
private

Definition at line 150 of file DTDigiTask.h.

Referenced by DTDigiTask().

◆ tMax

int DTDigiTask::tMax
private

no needs to be precise. Value from PSets will always be used

Definition at line 89 of file DTDigiTask.h.

Referenced by analyze(), and dqmBeginRun().

◆ tpMode

bool DTDigiTask::tpMode
private

Definition at line 156 of file DTDigiTask.h.

Referenced by bookHistograms(), DTDigiTask(), and topFolder().

◆ tTrig

float DTDigiTask::tTrig
private

tTrig from the DB

Definition at line 93 of file DTDigiTask.h.

Referenced by analyze().

◆ tTrigMap

const DTTtrig* DTDigiTask::tTrigMap
private

Definition at line 112 of file DTDigiTask.h.

Referenced by analyze(), and dqmBeginRun().

◆ tTrigRMS

float DTDigiTask::tTrigRMS
private

Definition at line 94 of file DTDigiTask.h.

Referenced by analyze().

◆ TtrigToken_

edm::ESGetToken<DTTtrig, DTTtrigRcd> DTDigiTask::TtrigToken_
private

Definition at line 111 of file DTDigiTask.h.

Referenced by dqmBeginRun().

◆ wheelHistos

std::map<std::string, std::map<int, MonitorElement*> > DTDigiTask::wheelHistos
private

Definition at line 121 of file DTDigiTask.h.

Referenced by analyze(), and beginLuminosityBlock().