CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DTnoiseDBValidation Class Reference

#include <DTnoiseDBValidation.h>

Inheritance diagram for DTnoiseDBValidation:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &setup) override
 Operations. More...
 
 DTnoiseDBValidation (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 ~DTnoiseDBValidation () override
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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)
 

Private Member Functions

void bookHisto (const DTChamberId &)
 

Private Attributes

DQMStoredbe_
 
MonitorElementdiffHisto_
 
std::string diffTestName_
 
const DTGeometrydtGeom
 
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcdlabelDB_
 
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcdlabelDBRef_
 
MonitorElementlayerHisto_
 
std::string layerTestName_
 
edm::ESGetToken< DTGeometry, MuonGeometryRecordmuonGeomToken_
 
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
 
const DTStatusFlagnoiseMap
 
const DTStatusFlagnoiseMap_
 
const DTStatusFlagnoiseRefMap
 
const DTStatusFlagnoiseRefMap_
 
int noisyCellsRef_
 
int noisyCellsValid_
 
std::string outputFileName_
 
bool outputMEsInRootFile_
 
MonitorElementsectorHisto_
 
std::string sectorTestName_
 
MonitorElementstationHisto_
 
std::string stationTestName_
 
MonitorElementwheelHisto_
 
std::string wheelTestName_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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)
 

Detailed Description

Plot the noise from the DB comparaison

Author
G. Mila - INFN Torino

Definition at line 30 of file DTnoiseDBValidation.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 33 of file DTnoiseDBValidation.h.

◆ MonitorElement

Definition at line 32 of file DTnoiseDBValidation.h.

Constructor & Destructor Documentation

◆ DTnoiseDBValidation()

DTnoiseDBValidation::DTnoiseDBValidation ( const edm::ParameterSet pset)

Constructor.

Definition at line 37 of file DTnoiseDBValidation.cc.

References dbe_, diffTestName_, layerTestName_, Utilities::operator, outputFileName_, outputMEsInRootFile_, muonDTDigis_cfi::pset, sectorTestName_, dqm::implementation::DQMStore::setCurrentFolder(), stationTestName_, AlCaHLTBitMon_QueryRunRegistry::string, and wheelTestName_.

38  : labelDBRef_(esConsumes(edm::ESInputTag("", pset.getParameter<string>("labelDBRef")))),
39  labelDB_(esConsumes(edm::ESInputTag("", pset.getParameter<string>("labelDB")))),
40  muonGeomToken_(esConsumes<edm::Transition::BeginRun>()) {
41  LogVerbatim("NoiseDBValidation") << "[DTnoiseDBValidation] Constructor called!";
42 
43  // Get the DQM needed services
45  dbe_->setCurrentFolder("DT/DtCalib/NoiseDBValidation");
46 
47  diffTestName_ = "noiseDifferenceInRange";
48  if (pset.exists("diffTestName"))
49  diffTestName_ = pset.getParameter<string>("diffTestName");
50 
51  wheelTestName_ = "noiseWheelOccInRange";
52  if (pset.exists("wheelTestName"))
53  wheelTestName_ = pset.getParameter<string>("wheelTestName");
54 
55  stationTestName_ = "noiseStationOccInRange";
56  if (pset.exists("stationTestName"))
57  stationTestName_ = pset.getParameter<string>("stationTestName");
58 
59  sectorTestName_ = "noiseSectorOccInRange";
60  if (pset.exists("sectorTestName"))
61  sectorTestName_ = pset.getParameter<string>("sectorTestName");
62 
63  layerTestName_ = "noiseLayerOccInRange";
64  if (pset.exists("layerTestName"))
65  layerTestName_ = pset.getParameter<string>("layerTestName");
66 
67  outputMEsInRootFile_ = false;
68  if (pset.exists("OutputFileName")) {
69  outputMEsInRootFile_ = true;
70  outputFileName_ = pset.getParameter<std::string>("OutputFileName");
71  }
72 }
Log< level::Info, true > LogVerbatim
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ ~DTnoiseDBValidation()

DTnoiseDBValidation::~DTnoiseDBValidation ( )
override

Destructor.

Definition at line 74 of file DTnoiseDBValidation.cc.

74 {}

Member Function Documentation

◆ analyze()

void DTnoiseDBValidation::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
inlineoverridevirtual

Implements edm::EDAnalyzer.

Definition at line 44 of file DTnoiseDBValidation.h.

44 {}

◆ beginRun()

void DTnoiseDBValidation::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overridevirtual

Operations.

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file DTnoiseDBValidation.cc.

References funct::abs(), DTStatusFlag::begin(), plotT0FromHistos::binNumber(), dqm::implementation::IBooker::book1D(), bookHisto(), DTSuperLayerId::chamberId(), dbe_, diffHisto_, dtGeom, DTStatusFlag::end(), dqm::impl::MonitorElement::Fill(), labelDB_, labelDBRef_, DTTopology::lastChannel(), DTLayerId::layer(), DTGeometry::layer(), phase1PixelTopology::layer, layerHisto_, DTWireId::layerId(), muonGeomToken_, hgchebackDigitizer_cfi::noise, noiseHistoMap_, noiseMap_, noiseRefMap_, noisyCellsRef_, noisyCellsValid_, L1EGammaClusterEmuProducer_cfi::scale, sectorHisto_, dqm::impl::MonitorElement::setBinLabel(), singleTopDQM_cfi::setup, relativeConstraints::station, stationHisto_, DTSuperLayerId::superLayer(), DTLayerId::superlayerId(), makeMuonMisalignmentScenario::wheel, wheelHisto_, and DTWireId::wire().

76  {
77  noiseRefMap_ = &setup.getData(labelDBRef_);
78 
79  noiseMap_ = &setup.getData(labelDB_);
80  ;
81 
82  // Get the geometry
83  dtGeom = &setup.getData(muonGeomToken_);
84 
85  LogVerbatim("NoiseDBValidation") << "[DTnoiseDBValidation] Parameters initialization";
86 
87  noisyCellsRef_ = 0;
88  noisyCellsValid_ = 0;
89 
90  // Histo booking
91  diffHisto_ =
92  dbe_->book1D("noisyCellDiff", "percentual (wrt the previous db) total number of noisy cells", 1, 0.5, 1.5);
93  diffHisto_->setBinLabel(1, "Diff");
94  wheelHisto_ = dbe_->book1D("wheelOccupancy", "percentual noisy cells occupancy per wheel", 5, -2.5, 2.5);
95  wheelHisto_->setBinLabel(1, "Wh-2");
96  wheelHisto_->setBinLabel(2, "Wh-1");
97  wheelHisto_->setBinLabel(3, "Wh0");
98  wheelHisto_->setBinLabel(4, "Wh1");
99  wheelHisto_->setBinLabel(5, "Wh2");
100  stationHisto_ = dbe_->book1D("stationOccupancy", "percentual noisy cells occupancy per station", 4, 0.5, 4.5);
101  stationHisto_->setBinLabel(1, "St1");
102  stationHisto_->setBinLabel(2, "St2");
103  stationHisto_->setBinLabel(3, "St3");
104  stationHisto_->setBinLabel(4, "St4");
105  sectorHisto_ = dbe_->book1D("sectorOccupancy", "percentual noisy cells occupancy per sector", 12, 0.5, 12.5);
106  sectorHisto_->setBinLabel(1, "Sect1");
107  sectorHisto_->setBinLabel(2, "Sect2");
108  sectorHisto_->setBinLabel(3, "Sect3");
109  sectorHisto_->setBinLabel(4, "Sect4");
110  sectorHisto_->setBinLabel(5, "Sect5");
111  sectorHisto_->setBinLabel(6, "Sect6");
112  sectorHisto_->setBinLabel(7, "Sect7");
113  sectorHisto_->setBinLabel(8, "Sect8");
114  sectorHisto_->setBinLabel(9, "Sect9");
115  sectorHisto_->setBinLabel(10, "Sect10");
116  sectorHisto_->setBinLabel(11, "Sect11");
117  sectorHisto_->setBinLabel(12, "Sect12");
118  layerHisto_ = dbe_->book1D("layerOccupancy", "percentual noisy cells occupancy per layer", 3, 0.5, 3.5);
119  layerHisto_->setBinLabel(1, "First 10 bins");
120  layerHisto_->setBinLabel(2, "Middle bins");
121  layerHisto_->setBinLabel(3, "Last 10 bins");
122 
123  // map initialization
124  map<int, int> whMap;
125  whMap.clear();
126  map<int, int> stMap;
127  stMap.clear();
128  map<int, int> sectMap;
129  sectMap.clear();
130  map<int, int> layerMap;
131  layerMap.clear();
132 
133  // Loop over reference DB entries
135  DTWireId wireId((*noise).first.wheelId,
136  (*noise).first.stationId,
137  (*noise).first.sectorId,
138  (*noise).first.slId,
139  (*noise).first.layerId,
140  (*noise).first.cellId);
141  LogVerbatim("NoiseDBValidation") << "Ref. noisy wire: " << wireId;
142  ++noisyCellsRef_;
143  }
144 
145  // Loop over validation DB entries
147  DTWireId wireId((*noise).first.wheelId,
148  (*noise).first.stationId,
149  (*noise).first.sectorId,
150  (*noise).first.slId,
151  (*noise).first.layerId,
152  (*noise).first.cellId);
153  LogVerbatim("NoiseDBValidation") << "Valid. noisy wire: " << wireId;
155 
156  whMap[(*noise).first.wheelId]++;
157  stMap[(*noise).first.stationId]++;
158  sectMap[(*noise).first.sectorId]++;
159 
160  const DTTopology &dtTopo = dtGeom->layer(wireId.layerId())->specificTopology();
161  const int lastWire = dtTopo.lastChannel();
162  if ((*noise).first.cellId <= 10)
163  layerMap[1]++;
164  if ((*noise).first.cellId > 10 && (*noise).first.cellId < (lastWire - 10))
165  layerMap[2]++;
166  if ((*noise).first.cellId >= (lastWire - 10))
167  layerMap[3]++;
168 
169  const DTChamberId chId = wireId.layerId().superlayerId().chamberId();
170  if (noiseHistoMap_.find(chId) == noiseHistoMap_.end())
171  bookHisto(chId);
172  int binNumber = 4 * (wireId.superLayer() - 1) + wireId.layer();
173  noiseHistoMap_[chId]->Fill(wireId.wire(), binNumber);
174  }
175 
176  // histo filling
177  double scale = 1 / double(noisyCellsRef_);
179 
180  scale = 1 / double(noisyCellsValid_);
181  for (map<int, int>::const_iterator wheel = whMap.begin(); wheel != whMap.end(); wheel++) {
182  wheelHisto_->Fill((*wheel).first, ((*wheel).second) * scale);
183  }
184  for (map<int, int>::const_iterator station = stMap.begin(); station != stMap.end(); station++) {
185  stationHisto_->Fill((*station).first, ((*station).second) * scale);
186  }
187  for (map<int, int>::const_iterator sector = sectMap.begin(); sector != sectMap.end(); sector++) {
188  sectorHisto_->Fill((*sector).first, ((*sector).second) * scale);
189  }
190  for (map<int, int>::const_iterator layer = layerMap.begin(); layer != layerMap.end(); layer++) {
191  layerHisto_->Fill((*layer).first, ((*layer).second) * scale);
192  }
193 }
Log< level::Info, true > LogVerbatim
MonitorElement * wheelHisto_
const_iterator begin() const
const DTGeometry * dtGeom
void bookHisto(const DTChamberId &)
const DTStatusFlag * noiseRefMap_
const DTStatusFlag * noiseMap_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
constexpr std::array< uint8_t, layerIndexSize > layer
void Fill(long long x)
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
def binNumber(station, sl)
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * diffHisto_
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
Definition: DTStatusFlag.h:194
MonitorElement * stationHisto_
const_iterator end() const
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * layerHisto_
MonitorElement * sectorHisto_
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96

◆ bookHisto()

void DTnoiseDBValidation::bookHisto ( const DTChamberId chId)
private

Definition at line 269 of file DTnoiseDBValidation.cc.

References plotT0FromHistos::binNumber(), dqm::implementation::IBooker::book2D(), DTGeometry::chamber(), dbe_, dtGeom, HltBtagPostValidation_cff::histoName, label, hgcalTopologyTester_cfi::layers, noiseHistoMap_, DTChamberId::sector(), DTChamberId::station(), DTChamber::superLayers(), and DTChamberId::wheel().

Referenced by beginRun().

269  {
270  stringstream histoName;
271  histoName << "NoiseOccupancy"
272  << "_W" << chId.wheel() << "_St" << chId.station() << "_Sec" << chId.sector();
273 
274  if (noiseHistoMap_.find(chId) == noiseHistoMap_.end()) { // Redundant check
275  // Get the chamber from the geometry
276  int nWiresMax = 0;
277  const DTChamber *dtchamber = dtGeom->chamber(chId);
278  const vector<const DTSuperLayer *> &superlayers = dtchamber->superLayers();
279 
280  // Loop over layers and find the max # of wires
281  for (vector<const DTSuperLayer *>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
282  ++sl) { // loop over SLs
283  vector<const DTLayer *> layers = (*sl)->layers();
284  for (vector<const DTLayer *>::const_iterator lay = layers.begin(); lay != layers.end();
285  ++lay) { // loop over layers
286  int nWires = (*lay)->specificTopology().channels();
287  if (nWires > nWiresMax)
288  nWiresMax = nWires;
289  }
290  }
291 
292  noiseHistoMap_[chId] = dbe_->book2D(histoName.str(), "Noise occupancy", nWiresMax, 1, (nWiresMax + 1), 12, 1, 13);
293  for (int i_sl = 1; i_sl <= 3; ++i_sl) {
294  for (int i_lay = 1; i_lay <= 4; ++i_lay) {
295  int binNumber = 4 * (i_sl - 1) + i_lay;
296  stringstream label;
297  label << "SL" << i_sl << ": L" << i_lay;
298  noiseHistoMap_[chId]->setBinLabel(binNumber, label.str(), 2);
299  }
300  }
301  }
302 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
const DTGeometry * dtGeom
char const * label
def binNumber(station, sl)
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
Definition: DTChamber.cc:51
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90

◆ endJob()

void DTnoiseDBValidation::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 263 of file DTnoiseDBValidation.cc.

References dbe_, outputFileName_, outputMEsInRootFile_, and dqm::implementation::DQMStore::save().

263  {
264  // Write the histos in a ROOT file
267 }
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784

◆ endRun()

void DTnoiseDBValidation::endRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 195 of file DTnoiseDBValidation.cc.

References diffHisto_, diffTestName_, MonitorElementData::QReport::getBadChannels(), dqm::impl::MonitorElement::getQReport(), layerHisto_, layerTestName_, sectorHisto_, sectorTestName_, stationHisto_, stationTestName_, makeMuonMisalignmentScenario::wheel, wheelHisto_, and wheelTestName_.

195  {
196  // test on difference histo
197  // string testCriterionName;
198  // testCriterionName =
199  // parameters.getUntrackedParameter<string>("diffTestName","noiseDifferenceInRange");
200  const QReport *theDiffQReport = diffHisto_->getQReport(diffTestName_);
201  if (theDiffQReport) {
202  vector<dqm::me_util::Channel> badChannels = theDiffQReport->getBadChannels();
203  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
204  channel++) {
205  LogWarning("NoiseDBValidation") << " Bad partial difference of noisy channels! Contents : "
206  << (*channel).getContents();
207  }
208  }
209  // testCriterionName =
210  // parameters.getUntrackedParameter<string>("wheelTestName","noiseWheelOccInRange");
211  const QReport *theDiffQReport2 = wheelHisto_->getQReport(wheelTestName_);
212  if (theDiffQReport2) {
213  vector<dqm::me_util::Channel> badChannels = theDiffQReport2->getBadChannels();
214  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
215  channel++) {
216  int wheel = (*channel).getBin() - 3;
217  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for wheel : " << wheel
218  << " Contents : " << (*channel).getContents();
219  }
220  }
221  // testCriterionName =
222  // parameters.getUntrackedParameter<string>("stationTestName","noiseStationOccInRange");
223  const QReport *theDiffQReport3 = stationHisto_->getQReport(stationTestName_);
224  if (theDiffQReport3) {
225  vector<dqm::me_util::Channel> badChannels = theDiffQReport3->getBadChannels();
226  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
227  channel++) {
228  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for station : " << (*channel).getBin()
229  << " Contents : " << (*channel).getContents();
230  }
231  }
232  // testCriterionName =
233  // parameters.getUntrackedParameter<string>("sectorTestName","noiseSectorOccInRange");
234  const QReport *theDiffQReport4 = sectorHisto_->getQReport(sectorTestName_);
235  if (theDiffQReport4) {
236  vector<dqm::me_util::Channel> badChannels = theDiffQReport4->getBadChannels();
237  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
238  channel++) {
239  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for sector : " << (*channel).getBin()
240  << " Contents : " << (*channel).getContents();
241  }
242  }
243  // testCriterionName =
244  // parameters.getUntrackedParameter<string>("layerTestName","noiseLayerOccInRange");
245  const QReport *theDiffQReport5 = layerHisto_->getQReport(layerTestName_);
246  if (theDiffQReport5) {
247  vector<dqm::me_util::Channel> badChannels = theDiffQReport5->getBadChannels();
248  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
249  channel++) {
250  if ((*channel).getBin() == 1)
251  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for the first 10 wires! Contents : "
252  << (*channel).getContents();
253  if ((*channel).getBin() == 2)
254  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for the middle wires! Contents : "
255  << (*channel).getContents();
256  if ((*channel).getBin() == 3)
257  LogWarning("NoiseDBValidation") << " Bad percentual occupancy for the last 10 wires! Contents : "
258  << (*channel).getContents();
259  }
260  }
261 }
MonitorElement * wheelHisto_
const std::vector< DQMChannel > & getBadChannels() const
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
MonitorElement * diffHisto_
MonitorElement * stationHisto_
Log< level::Warning, false > LogWarning
MonitorElement * layerHisto_
MonitorElement * sectorHisto_

Member Data Documentation

◆ dbe_

DQMStore* DTnoiseDBValidation::dbe_
private

Definition at line 50 of file DTnoiseDBValidation.h.

Referenced by beginRun(), bookHisto(), DTnoiseDBValidation(), and endJob().

◆ diffHisto_

MonitorElement* DTnoiseDBValidation::diffHisto_
private

Definition at line 73 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and endRun().

◆ diffTestName_

std::string DTnoiseDBValidation::diffTestName_
private

Definition at line 56 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endRun().

◆ dtGeom

const DTGeometry* DTnoiseDBValidation::dtGeom
private

Definition at line 63 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and bookHisto().

◆ labelDB_

edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> DTnoiseDBValidation::labelDB_
private

Definition at line 53 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ labelDBRef_

edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> DTnoiseDBValidation::labelDBRef_
private

Definition at line 52 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ layerHisto_

MonitorElement* DTnoiseDBValidation::layerHisto_
private

Definition at line 77 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and endRun().

◆ layerTestName_

std::string DTnoiseDBValidation::layerTestName_
private

Definition at line 56 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endRun().

◆ muonGeomToken_

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

Definition at line 62 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ noiseHistoMap_

std::map<DTChamberId, MonitorElement *> DTnoiseDBValidation::noiseHistoMap_
private

Definition at line 78 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and bookHisto().

◆ noiseMap

const DTStatusFlag* DTnoiseDBValidation::noiseMap
private

Definition at line 55 of file DTnoiseDBValidation.h.

◆ noiseMap_

const DTStatusFlag* DTnoiseDBValidation::noiseMap_
private

Definition at line 66 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ noiseRefMap

const DTStatusFlag* DTnoiseDBValidation::noiseRefMap
private

Definition at line 54 of file DTnoiseDBValidation.h.

◆ noiseRefMap_

const DTStatusFlag* DTnoiseDBValidation::noiseRefMap_
private

Definition at line 67 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ noisyCellsRef_

int DTnoiseDBValidation::noisyCellsRef_
private

Definition at line 70 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ noisyCellsValid_

int DTnoiseDBValidation::noisyCellsValid_
private

Definition at line 71 of file DTnoiseDBValidation.h.

Referenced by beginRun().

◆ outputFileName_

std::string DTnoiseDBValidation::outputFileName_
private

Definition at line 59 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endJob().

◆ outputMEsInRootFile_

bool DTnoiseDBValidation::outputMEsInRootFile_
private

Definition at line 58 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endJob().

◆ sectorHisto_

MonitorElement* DTnoiseDBValidation::sectorHisto_
private

Definition at line 76 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and endRun().

◆ sectorTestName_

std::string DTnoiseDBValidation::sectorTestName_
private

Definition at line 56 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endRun().

◆ stationHisto_

MonitorElement* DTnoiseDBValidation::stationHisto_
private

Definition at line 75 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and endRun().

◆ stationTestName_

std::string DTnoiseDBValidation::stationTestName_
private

Definition at line 56 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endRun().

◆ wheelHisto_

MonitorElement* DTnoiseDBValidation::wheelHisto_
private

Definition at line 74 of file DTnoiseDBValidation.h.

Referenced by beginRun(), and endRun().

◆ wheelTestName_

std::string DTnoiseDBValidation::wheelTestName_
private

Definition at line 56 of file DTnoiseDBValidation.h.

Referenced by DTnoiseDBValidation(), and endRun().