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
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.getParameter<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) {
58  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(ps.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
59  }
60 
61  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
62  resetCycle = ps.getUntrackedParameter<int>("ResetCycle", 3);
63  // Check the DB of noisy channels
64  checkNoisyChannels = ps.getUntrackedParameter<bool>("checkNoisyChannels", false);
65  // Default TTrig to be used when not reading the TTrig DB
66  defaultTTrig = ps.getParameter<int>("defaultTtrig");
67  inTimeHitsLowerBound = ps.getParameter<int>("inTimeHitsLowerBound");
68  inTimeHitsUpperBound = ps.getParameter<int>("inTimeHitsUpperBound");
69  timeBoxGranularity = ps.getUntrackedParameter<int>("timeBoxGranularity", 4);
70  maxTTMounts = ps.getUntrackedParameter<int>("maxTTMounts", 6400);
71 
72  doAllHitsOccupancies = ps.getUntrackedParameter<bool>("doAllHitsOccupancies", true);
73  doNoiseOccupancies = ps.getUntrackedParameter<bool>("doNoiseOccupancies", false);
74  doInTimeOccupancies = ps.getUntrackedParameter<bool>("doInTimeOccupancies", false);
75 
76  // switch on the mode for running on test pulses (different top folder)
77  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
78  // switch on/off the filtering of synchronous noise events (cutting on the # of digis)
79  // time-boxes and occupancy plots are not filled and summary plots are created to report the problem
80  filterSyncNoise = ps.getUntrackedParameter<bool>("filterSyncNoise", false);
81  // look for synch noisy events, produce histograms but do not filter them
82  lookForSyncNoise = ps.getUntrackedParameter<bool>("lookForSyncNoise", false);
83 
84  // switch on the mode for running on slice test (different top folder and other customizations)
85  sliceTestMode = ps.getUntrackedParameter<bool>("sliceTestMode", false);
86  // time pedestal used to set the minimum in the time box plot
87  tdcPedestal = ps.getUntrackedParameter<int>("tdcPedestal", 0);
88 
89  // switch on production of time-boxes with layer granularity
90  doLayerTimeBoxes = ps.getUntrackedParameter<bool>("doLayerTimeBoxes", false);
91 
92  syncNumTot = 0;
93  syncNum = 0;
94 }
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 97 of file DTDigiTask.cc.

References LogTrace, and nevents.

97  {
98  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "DTDigiTask: analyzed " << nevents << " events" << endl;
99 }
#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 441 of file DTDigiTask.cc.

References 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, phase1PixelTopology::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.

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

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

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

123  {
124  if (doStaticBooking) { // Static histo booking
125  // book the event counter
126  ibooker.setCurrentFolder("DT/EventInfo/Counters");
127  nEventMonitor = ibooker.bookFloat(tpMode ? "nProcessedEventsDigiTP" : "nProcessedEventsDigi");
128  ibooker.setCurrentFolder(topFolder());
129  for (int wh = -2; wh <= 2; ++wh) { // loop over wheels
130  if (sliceTestMode && wh != 2)
131  continue;
132 
134  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyAllHits");
135 
136  if (doNoiseOccupancies)
137  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyNoise");
139  bookHistos(ibooker, wh, string("Occupancies"), "OccupancyInTimeHits");
140 
142  bookHistos(ibooker, wh, string("SynchNoise"), "SyncNoiseEvents");
143  bookHistos(ibooker, wh, string("SynchNoise"), "SyncNoiseChambs");
144  }
145 
146  for (int st = 1; st <= 4; ++st) { // loop over stations
147  for (int sect = 1; sect <= 14; ++sect) { // loop over sectors
148  if ((sect == 13 || sect == 14) && st != 4)
149  continue;
150 
151  if (sliceTestMode && (sect != 12 || wh != 2))
152  continue;
153 
154  // Get the chamber ID
155  const DTChamberId dtChId(wh, st, sect);
156 
157  // Occupancies
158  if (doAllHitsOccupancies) {
159  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyAllHits_perCh");
160  // set channel mapping
161  channelsMap(dtChId, "OccupancyAllHits_perCh");
162  }
163  if (doNoiseOccupancies)
164  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyNoise_perCh");
166  bookHistos(ibooker, dtChId, string("Occupancies"), "OccupancyInTimeHits_perCh");
167 
168  for (int sl = 1; sl <= 3; ++sl) { // Loop over SLs
169  if (st == 4 && sl == 2)
170  continue;
171  const DTSuperLayerId dtSLId(wh, st, sect, sl);
172  if (isLocalRun) {
173  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBox");
174  } else {
175  // TimeBoxes for different triggers
176  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxDTonly");
177  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxNoDT");
178  bookHistos(ibooker, dtSLId, string("TimeBoxes"), "TimeBoxDTalso");
179  }
180  }
181  }
182  }
183  }
184  }
185 }
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:725
bool tpMode
Definition: DTDigiTask.h:156
bool filterSyncNoise
Definition: DTDigiTask.h:158
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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:717
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 725 of file DTDigiTask.cc.

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

Referenced by beginLuminosityBlock(), and bookHistograms().

725  {
726  // n max channels
727  int nWires_max = (digiHistos[histoTag])[dtCh.rawId()]->getNbinsX();
728 
729  // set bin content = -1 for each not real channel. For visualization purposes
730  for (int sl = 1; sl <= 3; sl++) {
731  for (int ly = 1; ly <= 4; ly++) {
732  for (int ch = 1; ch <= nWires_max; ch++) {
733  int dduId = -1, rosId = -1, robId = -1, tdcId = -1, channelId = -1;
734  int realCh = mapping->geometryToReadOut(
735  dtCh.wheel(), dtCh.station(), dtCh.sector(), sl, ly, ch, dduId, rosId, robId, tdcId, channelId);
736 
737  // realCh = 0 if the channel exists, while realCh = 1 if it does not exist
738  if (realCh) {
739  int lybin = (4 * sl - 4) + ly;
740  (digiHistos[histoTag])[dtCh.rawId()]->setBinContent(ch, lybin, -1.);
741  }
742  }
743  }
744  }
745 }
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
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 101 of file DTDigiTask.cc.

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

101  {
102  LogTrace("DTDQM|DTMonitorModule|DTDigiTask") << "[DTDigiTask]: begin run" << endl;
103  nevents = 0;
104 
105  // Get the geometry
106  muonGeom = &context.getData(muonGeomToken_);
107 
108  // map of the channels
109  mapping = &context.getData(readOutMapToken_);
110 
111  // tTrig
112  if (readTTrigDB)
113  tTrigMap = &context.getData(TtrigToken_);
114  // t0s
115  if (subtractT0)
116  t0Map = &context.getData(T0Token_);
117  // FIXME: tMax (not yet from the DB)
118  tMax = defaultTmax;
119 
120  // ----------------------------------------------------------------------
121 }
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 717 of file DTDigiTask.cc.

References sliceTestMode, AlCaHLTBitMon_QueryRunRegistry::string, and tpMode.

Referenced by bookHistograms().

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

◆ triggerSource()

string DTDigiTask::triggerSource ( )
protected

get the L1A source

Definition at line 696 of file DTDigiTask.cc.

References mps_fire::i, isLocalRun, and ltcdigis.

Referenced by analyze().

696  {
697  string l1ASource;
698  if (isLocalRun)
699  return l1ASource;
700 
701  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++) {
702  size_t otherTriggerSum = 0;
703  for (size_t i = 1; i < 6; i++)
704  otherTriggerSum += size_t((*ltc_it).HasTriggered(i));
705 
706  if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
707  l1ASource = "DTonly";
708  else if (!(*ltc_it).HasTriggered(0))
709  l1ASource = "NoDT";
710  else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
711  l1ASource = "DTalso";
712  }
713 
714  return l1ASource;
715 }
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().