CMS 3D CMS Logo

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

#include <DTBlockedROChannelsTest.h>

Inheritance diagram for DTBlockedROChannelsTest:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

class  DTLinkBinsMap
 
class  DTRobBinsMap
 

Public Member Functions

 DTBlockedROChannelsTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTBlockedROChannelsTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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 beginRun (const edm::Run &, const edm::EventSetup &) override
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic in online mode. More...
 
void fillChamberMap (DQMStore::IGetter &igetter, const edm::EventSetup &c)
 
void performClientDiagnostic (DQMStore::IGetter &igetter)
 DQM Client operations. More...
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Member Functions

int readOutToGeometry (int dduId, int rosNumber, int robNumber, int &wheel, int &station, int &sector)
 
int theDDU (int crate, int slot, int link, bool tenDDU)
 
int theROB (int slot, int link)
 
int theROS (int slot, int link)
 

Private Attributes

std::map< DTChamberId, DTRobBinsMapchamberMap
 
std::map< DTChamberId, DTLinkBinsMapchamberMapUros
 
bool checkUros
 
DTTimeEvolutionHistohSystFractionVsLS
 
edm::ESHandle< DTReadOutMappingmapping
 
int nevents
 
int neventsPrev
 
unsigned int nLumiSegs
 
int nupdates
 
bool offlineMode
 
int prescaleFactor
 
unsigned int prevNLumiSegs
 
double prevTotalPerc
 
std::map< int, double > resultsPerLumi
 
int run
 
MonitorElementsummaryHisto
 
std::map< int, MonitorElement * > wheelHistos
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::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 DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 24 of file DTBlockedROChannelsTest.h.

Constructor & Destructor Documentation

◆ DTBlockedROChannelsTest()

DTBlockedROChannelsTest::DTBlockedROChannelsTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 24 of file DTBlockedROChannelsTest.cc.

26  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") << "[DTBlockedROChannelsTest]: Constructor";
27 
28  // prescale on the # of LS to update the test
29  prescaleFactor = ps.getUntrackedParameter<int>("diagnosticPrescale", 1);
30 
31  offlineMode = ps.getUntrackedParameter<bool>("offlineMode", true);
32 
33  checkUros = ps.getUntrackedParameter<bool>("checkUros", true);
34 }

References checkUros, edm::ParameterSet::getUntrackedParameter(), LogTrace, offlineMode, and prescaleFactor.

◆ ~DTBlockedROChannelsTest()

DTBlockedROChannelsTest::~DTBlockedROChannelsTest ( )
override

Destructor.

Definition at line 36 of file DTBlockedROChannelsTest.cc.

36  {
37  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
38  << "DataIntegrityTest: analyzed " << nupdates << " updates";
39 }

References LogTrace, and nupdates.

Member Function Documentation

◆ beginRun()

void DTBlockedROChannelsTest::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overrideprotected

BeginRun.

Definition at line 41 of file DTBlockedROChannelsTest.cc.

41  {
42  nupdates = 0;
43  return;
44 }

References nupdates.

◆ dqmEndJob()

void DTBlockedROChannelsTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 188 of file DTBlockedROChannelsTest.cc.

188  {
189  if (offlineMode) {
190  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
191  << "[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
192  performClientDiagnostic(igetter);
193  }
194 }

References LogTrace, offlineMode, and performClientDiagnostic().

◆ dqmEndLuminosityBlock()

void DTBlockedROChannelsTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

DQM Client Diagnostic in online mode.

Reimplemented from DQMEDHarvester.

Definition at line 124 of file DTBlockedROChannelsTest.cc.

127  {
128  //FR moved the following from beginJob!
129 
130  // book the summary histogram
131 
132  if (wheelHistos.empty()) { // this is an attempt to make these bookings only once!
133 
134  ibooker.setCurrentFolder("DT/00-ROChannels");
135  summaryHisto = ibooker.book2D("ROChannelSummary", "Summary Blocked RO Channels", 12, 1, 13, 5, -2, 3);
136  summaryHisto->setAxisTitle("Sector", 1);
137  summaryHisto->setAxisTitle("Wheel", 2);
138 
139  for (int wheel = -2; wheel != 3; ++wheel) {
140  stringstream namestream;
141  namestream << "ROChannelSummary_W" << wheel;
142  stringstream titlestream;
143  titlestream << "Blocked RO Channels (Wh " << wheel << ")";
144  wheelHistos[wheel] = ibooker.book2D(namestream.str().c_str(), titlestream.str().c_str(), 12, 1, 13, 4, 1, 5);
145  wheelHistos[wheel]->setAxisTitle("Sector", 1);
146  wheelHistos[wheel]->setBinLabel(1, "MB1", 2);
147  wheelHistos[wheel]->setBinLabel(2, "MB2", 2);
148  wheelHistos[wheel]->setBinLabel(3, "MB3", 2);
149  wheelHistos[wheel]->setBinLabel(4, "MB4", 2);
150  }
151 
152  if (!offlineMode) {
153  hSystFractionVsLS = new DTTimeEvolutionHisto(ibooker, "EnabledROChannelsVsLS", "% RO channels", 500, 5, true, 3);
154  }
155  } // end attempt to make these bookings only once!
156 
157  //FR moved here from beginRun
158 
159  if (checkUros) {
160  if (chamberMapUros.empty())
161  fillChamberMap(igetter, context);
162  } else {
163  if (chamberMap.empty())
164  fillChamberMap(igetter, context);
165  }
166 
167  //FR moved here from beginLuminosityBlock
168  run = lumiSeg.run();
169 
170  //FR moved here from endLuminosityBlock
171  // counts number of lumiSegs
172  nLumiSegs = lumiSeg.id().luminosityBlock();
173 
174  // prescale factor
175  if (nLumiSegs % prescaleFactor != 0 || offlineMode)
176  return;
177 
178  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
179  << "[DTBlockedROChannelsTest]: End of LS " << nLumiSegs
180  << ". Client called in online mode, performing client operations";
181 
182  performClientDiagnostic(igetter);
183 
184  // counts number of updats
185  nupdates++;
186 }

References dqm::implementation::IBooker::book2D(), chamberMap, chamberMapUros, checkUros, fillChamberMap(), hSystFractionVsLS, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), nLumiSegs, nupdates, offlineMode, performClientDiagnostic(), prescaleFactor, edm::LuminosityBlockBase::run(), run, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), summaryHisto, makeMuonMisalignmentScenario::wheel, and wheelHistos.

◆ fillChamberMap()

void DTBlockedROChannelsTest::fillChamberMap ( DQMStore::IGetter igetter,
const edm::EventSetup c 
)
protected

Definition at line 46 of file DTBlockedROChannelsTest.cc.

46  {
47  // get the RO mapping
48  context.get<DTReadOutMappingRcd>().get(mapping);
49  int dummy = 0;
50  bool tenDDU = !mapping->readOutToGeometry(779, 7, 1, 1, 1, dummy, dummy, dummy, dummy, dummy, dummy);
51 
52  if (checkUros) {
53  for (int crate = FEDNumbering::MINDTUROSFEDID; crate <= FEDNumbering::MAXDTUROSFEDID; ++crate) { //loop over FEDs
54  for (int mapSlot = 1; mapSlot != 13; ++mapSlot) { //loop over mapSlot
55  for (int link = 0; link != 72; ++link) { //loop over links
56  //skip non existing links
57  if (mapSlot == 6)
58  continue;
59  if (crate == 1370 && mapSlot > 5)
60  continue;
61  if ((mapSlot == 5 || mapSlot == 11) && link > 11)
62  continue;
63 
64  int wheel = 0;
65  int station = 0;
66  int sector = 0;
67 
68  int dduId = theDDU(crate, mapSlot, link, tenDDU);
69  int ros = theROS(mapSlot, link);
70  int rob = theROB(mapSlot, link);
71 
72  // mapping->readOutToGeometry(dduId,ros,rob,2,2,wheel,station,sector,dummy,dummy,dummy);
73  readOutToGeometry(dduId, ros, rob, wheel, station, sector);
74  if (station > 0) {
75  //std::cout<<" FED "<<crate<<" mapSlot "<< mapSlot<<" Link "<<link<<" Wh "<<wheel<<" station "<<station<<" sector "<<sector <<endl;
76  DTChamberId chId(wheel, station, sector);
77  if (chamberMapUros.find(chId) == chamberMapUros.end()) {
78  chamberMapUros[chId] = DTLinkBinsMap(igetter, dduId, ros);
79  chamberMapUros[chId].addLinkBin(link % 24);
80  }
81  chamberMapUros[chId].addLinkBin(link % 24);
82  } else {
83  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
84  << "[DTLinkBinsMap] FED: " << crate << "mapSlot: " << mapSlot << " Link: " << link
85  << " not in the mapping!" << endl;
86  }
87  } //loop on links
88  } //loop on mapSlots
89  } //loop on crates
90  } //checkUros
91  else {
92  // fill the map of the robs per chamber
93  // //FIXME: monitoring only real used FEDs
94  for (int dduId = FEDNumbering::MINDTFEDID; dduId <= FEDNumbering::MAXDTFEDID; ++dduId) { //loop over DDUs
95  for (int ros = 1; ros != 13; ++ros) { // loop over ROSs
96  for (int rob = 1; rob != 26; ++rob) { // loop over ROBs
97  int wheel = 0;
98  int station = 0;
99  int sector = 0;
100  if (!mapping->readOutToGeometry(dduId, ros, rob - 1, 0, 2, wheel, station, sector, dummy, dummy, dummy) ||
101  !mapping->readOutToGeometry(dduId, ros, rob - 1, 0, 16, wheel, station, sector, dummy, dummy, dummy)) {
102  DTChamberId chId(wheel, station, sector);
103  if (chamberMap.find(chId) == chamberMap.end()) {
104  chamberMap[chId] = DTRobBinsMap(igetter, dduId, ros);
105  chamberMap[chId].addRobBin(rob);
106  }
107  chamberMap[chId].addRobBin(rob);
108  } else {
109  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
110  << "[DTRobBinsMap] FED: " << dduId << " ROS " << ros << " ROB: " << rob - 1 << " not in the mapping!"
111  << endl;
112  }
113  }
114  }
115  }
116  // loop over all chambers and remove the init flag
117  for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs = chamberMap.begin(); chAndRobs != chamberMap.end();
118  ++chAndRobs) {
119  chAndRobs->second.init(false);
120  }
121  } //Legacy
122 }

References chamberMap, chamberMapUros, checkUros, edm::EventSetup::get(), get, MainPageGenerator::link, LogTrace, mapping, FEDNumbering::MAXDTFEDID, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTFEDID, FEDNumbering::MINDTUROSFEDID, readOutToGeometry(), DTReadOutMapping::readOutToGeometry(), relativeConstraints::station, theDDU(), theROB(), theROS(), and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

◆ performClientDiagnostic()

void DTBlockedROChannelsTest::performClientDiagnostic ( DQMStore::IGetter igetter)
protected

DQM Client operations.

Definition at line 196 of file DTBlockedROChannelsTest.cc.

196  {
197  //FR: I've commented the if below. Either in online mode or in offline mode, when the diagnostic is called
198  // compute first the number of events. It will be: event/lumisection in the online case, it will be: total number
199  // of events (neventsPrev=0) in the offline case, when the diagnostic is called only once from the dqmEndJob
200 
201  //if(nevents == 0) { // hack to work also in offline DQM
202  MonitorElement* procEvt = igetter.get("DT/EventInfo/processedEvents");
203  if (procEvt != nullptr) {
204  int procEvents = procEvt->getIntValue();
205  nevents = procEvents - neventsPrev;
206  neventsPrev = procEvents;
207  }
208  //}
209 
210  double totalPerc = prevTotalPerc;
211  // check again!
212  if (nevents != 0) { // skip the computation if no events in the last LS
213 
214  // reset the histos
215  summaryHisto->Reset();
216  for (int wheel = -2; wheel != 3; ++wheel) {
217  wheelHistos[wheel]->Reset();
218  }
219 
220  totalPerc = 0.;
221 
222  if (checkUros) {
223  // loop over all chambers and fill the wheel plots
224  for (map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks = chamberMapUros.begin();
225  chAndLinks != chamberMapUros.end();
226  ++chAndLinks) {
227  DTChamberId chId = (*chAndLinks).first;
228  double scale = 1.;
229  int sectorForPlot = chId.sector();
230  if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.station() == 4)) {
231  sectorForPlot = 4;
232  scale = 0.5;
233  } else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.station() == 4)) {
234  sectorForPlot = 10;
235  scale = 0.5;
236  }
237 
238  // NOTE: can be called only ONCE per event per each chamber
239  double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
240  wheelHistos[chId.wheel()]->Fill(sectorForPlot, chId.station(), scale * chPercent);
241  totalPerc += chPercent * scale * 1. /
242  240.; // CB has to be 240 as double stations are taken into account by scale factor
243 
244  // Fill the summary
245  summaryHisto->Fill(sectorForPlot, chId.wheel(), 0.25 * scale * chPercent);
246  }
247  } //Uros case
248  else { //Legacy case
249  // loop over all chambers and fill the wheel plots
250  for (map<DTChamberId, DTRobBinsMap>::iterator chAndRobs = chamberMap.begin(); chAndRobs != chamberMap.end();
251  ++chAndRobs) {
252  DTChamberId chId = (*chAndRobs).first;
253  double scale = 1.;
254  int sectorForPlot = chId.sector();
255  if (sectorForPlot == 13 || (sectorForPlot == 4 && chId.station() == 4)) {
256  sectorForPlot = 4;
257  scale = 0.5;
258  } else if (sectorForPlot == 14 || (sectorForPlot == 10 && chId.station() == 4)) {
259  sectorForPlot = 10;
260  scale = 0.5;
261  }
262 
263  // NOTE: can be called only ONCE per event per each chamber
264  double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
265  wheelHistos[chId.wheel()]->Fill(sectorForPlot, chId.station(), scale * chPercent);
266  totalPerc += chPercent * scale * 1. /
267  240.; // CB has to be 240 as double stations are taken into account by scale factor
268 
269  // Fill the summary
270  summaryHisto->Fill(sectorForPlot, chId.wheel(), 0.25 * scale * chPercent);
271  }
272  } //Legacy case
273  } //nevents != 0
274 
275  if (!offlineMode) { // fill trend histo only in online
278  prevTotalPerc = totalPerc;
279  }
280 }

References DTTimeEvolutionHisto::accumulateValueTimeSlot(), chamberMap, chamberMapUros, checkUros, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getIntValue(), hSystFractionVsLS, nevents, neventsPrev, nLumiSegs, offlineMode, prevTotalPerc, dqm::impl::MonitorElement::Reset(), Scenarios_cff::scale, DTChamberId::sector(), DTChamberId::station(), summaryHisto, DTTimeEvolutionHisto::updateTimeSlot(), DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, and wheelHistos.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

◆ readOutToGeometry()

int DTBlockedROChannelsTest::readOutToGeometry ( int  dduId,
int  rosNumber,
int  robNumber,
int &  wheel,
int &  station,
int &  sector 
)
private

Definition at line 282 of file DTBlockedROChannelsTest.cc.

282  {
283  int dummy = 0;
284  return mapping->readOutToGeometry(dduId, ros, rob, 2, 2, wheel, station, sector, dummy, dummy, dummy);
285 }

References mapping, DTReadOutMapping::readOutToGeometry(), relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

Referenced by fillChamberMap().

◆ theDDU()

int DTBlockedROChannelsTest::theDDU ( int  crate,
int  slot,
int  link,
bool  tenDDU 
)
private

Definition at line 444 of file DTBlockedROChannelsTest.cc.

444  {
445  int ros = theROS(slot, link);
446 
447  int ddu = 772;
448  //if (crate == 1368) { ddu = 775; }
449  //Needed just in case this FED should be used due to fibers lenght
450 
451  if (crate == FEDNumbering::MINDTUROSFEDID) {
452  if (slot < 7)
453  ddu = 770;
454  else
455  ddu = 771;
456  }
457 
458  if (crate == (FEDNumbering::MINDTUROSFEDID + 1)) {
459  ddu = 772;
460  }
461 
462  if (crate == FEDNumbering::MAXDTUROSFEDID) {
463  if (slot < 7)
464  ddu = 773;
465  else
466  ddu = 774;
467  }
468 
469  if (ros > 6 && tenDDU && ddu < 775)
470  ddu += 5;
471 
472  return ddu;
473 }

References MainPageGenerator::link, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTUROSFEDID, and theROS().

Referenced by fillChamberMap().

◆ theROB()

int DTBlockedROChannelsTest::theROB ( int  slot,
int  link 
)
private

Definition at line 483 of file DTBlockedROChannelsTest.cc.

483  {
484  if (slot % 6 == 5)
485  return 23;
486 
487  int rob = link % 24;
488  if (rob < 15)
489  return rob;
490  if (rob == 15)
491  return 24;
492  return rob - 1;
493 }

References MainPageGenerator::link.

Referenced by fillChamberMap().

◆ theROS()

int DTBlockedROChannelsTest::theROS ( int  slot,
int  link 
)
private

Definition at line 475 of file DTBlockedROChannelsTest.cc.

475  {
476  if (slot % 6 == 5)
477  return link + 1;
478 
479  int ros = (link / 24) + 3 * (slot % 6) - 2;
480  return ros;
481 }

References MainPageGenerator::link.

Referenced by fillChamberMap(), and theDDU().

Member Data Documentation

◆ chamberMap

std::map<DTChamberId, DTRobBinsMap> DTBlockedROChannelsTest::chamberMap
private

◆ chamberMapUros

std::map<DTChamberId, DTLinkBinsMap> DTBlockedROChannelsTest::chamberMapUros
private

◆ checkUros

bool DTBlockedROChannelsTest::checkUros
private

◆ hSystFractionVsLS

DTTimeEvolutionHisto* DTBlockedROChannelsTest::hSystFractionVsLS
private

Definition at line 77 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

◆ mapping

edm::ESHandle<DTReadOutMapping> DTBlockedROChannelsTest::mapping
private

◆ nevents

int DTBlockedROChannelsTest::nevents
private

Definition at line 62 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

◆ neventsPrev

int DTBlockedROChannelsTest::neventsPrev
private

Definition at line 63 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

◆ nLumiSegs

unsigned int DTBlockedROChannelsTest::nLumiSegs
private

Definition at line 64 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

◆ nupdates

int DTBlockedROChannelsTest::nupdates
private

◆ offlineMode

bool DTBlockedROChannelsTest::offlineMode
private

◆ prescaleFactor

int DTBlockedROChannelsTest::prescaleFactor
private

Definition at line 59 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and DTBlockedROChannelsTest().

◆ prevNLumiSegs

unsigned int DTBlockedROChannelsTest::prevNLumiSegs
private

Definition at line 65 of file DTBlockedROChannelsTest.h.

◆ prevTotalPerc

double DTBlockedROChannelsTest::prevTotalPerc
private

Definition at line 66 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

◆ resultsPerLumi

std::map<int, double> DTBlockedROChannelsTest::resultsPerLumi
private

Definition at line 76 of file DTBlockedROChannelsTest.h.

◆ run

int DTBlockedROChannelsTest::run
private

◆ summaryHisto

MonitorElement* DTBlockedROChannelsTest::summaryHisto
private

Definition at line 74 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

◆ wheelHistos

std::map<int, MonitorElement*> DTBlockedROChannelsTest::wheelHistos
private

Definition at line 73 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

DTBlockedROChannelsTest::theROB
int theROB(int slot, int link)
Definition: DTBlockedROChannelsTest.cc:483
DTBlockedROChannelsTest::nLumiSegs
unsigned int nLumiSegs
Definition: DTBlockedROChannelsTest.h:64
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
DTBlockedROChannelsTest::summaryHisto
MonitorElement * summaryHisto
Definition: DTBlockedROChannelsTest.h:74
DTBlockedROChannelsTest::prevNLumiSegs
unsigned int prevNLumiSegs
Definition: DTBlockedROChannelsTest.h:65
DTBlockedROChannelsTest::hSystFractionVsLS
DTTimeEvolutionHisto * hSystFractionVsLS
Definition: DTBlockedROChannelsTest.h:77
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTReadOutMappingRcd
Definition: DTReadOutMappingRcd.h:5
DTBlockedROChannelsTest::chamberMapUros
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
Definition: DTBlockedROChannelsTest.h:147
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
FEDNumbering::MINDTUROSFEDID
Definition: FEDNumbering.h:111
DTBlockedROChannelsTest::performClientDiagnostic
void performClientDiagnostic(DQMStore::IGetter &igetter)
DQM Client operations.
Definition: DTBlockedROChannelsTest.cc:196
DTBlockedROChannelsTest::chamberMap
std::map< DTChamberId, DTRobBinsMap > chamberMap
Definition: DTBlockedROChannelsTest.h:114
DTTimeEvolutionHisto::updateTimeSlot
void updateTimeSlot(int ls, int nEventsInLS)
Definition: DTTimeEvolutionHisto.cc:108
DTBlockedROChannelsTest::theROS
int theROS(int slot, int link)
Definition: DTBlockedROChannelsTest.cc:475
DTBlockedROChannelsTest::prescaleFactor
int prescaleFactor
Definition: DTBlockedROChannelsTest.h:59
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTTimeEvolutionHisto::accumulateValueTimeSlot
void accumulateValueTimeSlot(float value)
Definition: DTTimeEvolutionHisto.cc:106
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
DTBlockedROChannelsTest::mapping
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTBlockedROChannelsTest.h:70
DTBlockedROChannelsTest::fillChamberMap
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
Definition: DTBlockedROChannelsTest.cc:46
FEDNumbering::MAXDTFEDID
Definition: FEDNumbering.h:56
DTBlockedROChannelsTest::checkUros
bool checkUros
Definition: DTBlockedROChannelsTest.h:61
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
DTBlockedROChannelsTest::run
int run
Definition: DTBlockedROChannelsTest.h:68
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTReadOutMapping::readOutToGeometry
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
Definition: DTReadOutMapping.cc:69
DTBlockedROChannelsTest::nevents
int nevents
Definition: DTBlockedROChannelsTest.h:62
FEDNumbering::MINDTFEDID
Definition: FEDNumbering.h:55
DTBlockedROChannelsTest::theDDU
int theDDU(int crate, int slot, int link, bool tenDDU)
Definition: DTBlockedROChannelsTest.cc:444
get
#define get
DTBlockedROChannelsTest::neventsPrev
int neventsPrev
Definition: DTBlockedROChannelsTest.h:63
DTBlockedROChannelsTest::nupdates
int nupdates
Definition: DTBlockedROChannelsTest.h:56
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DTBlockedROChannelsTest::readOutToGeometry
int readOutToGeometry(int dduId, int rosNumber, int robNumber, int &wheel, int &station, int &sector)
Definition: DTBlockedROChannelsTest.cc:282
DTTimeEvolutionHisto
Definition: DTTimeEvolutionHisto.h:15
DTBlockedROChannelsTest::offlineMode
bool offlineMode
Definition: DTBlockedROChannelsTest.h:60
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
dummy
Definition: DummySelector.h:38
FEDNumbering::MAXDTUROSFEDID
Definition: FEDNumbering.h:112
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
dqm::impl::MonitorElement::getIntValue
virtual int64_t getIntValue() const
Definition: MonitorElement.cc:912
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
DTBlockedROChannelsTest::prevTotalPerc
double prevTotalPerc
Definition: DTBlockedROChannelsTest.h:66
DTBlockedROChannelsTest::wheelHistos
std::map< int, MonitorElement * > wheelHistos
Definition: DTBlockedROChannelsTest.h:73