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::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase 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::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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
44  usesResource("DQMStore");
46  dbe_->setCurrentFolder("DT/DtCalib/NoiseDBValidation");
47 
48  diffTestName_ = "noiseDifferenceInRange";
49  if (pset.exists("diffTestName"))
50  diffTestName_ = pset.getParameter<string>("diffTestName");
51 
52  wheelTestName_ = "noiseWheelOccInRange";
53  if (pset.exists("wheelTestName"))
54  wheelTestName_ = pset.getParameter<string>("wheelTestName");
55 
56  stationTestName_ = "noiseStationOccInRange";
57  if (pset.exists("stationTestName"))
58  stationTestName_ = pset.getParameter<string>("stationTestName");
59 
60  sectorTestName_ = "noiseSectorOccInRange";
61  if (pset.exists("sectorTestName"))
62  sectorTestName_ = pset.getParameter<string>("sectorTestName");
63 
64  layerTestName_ = "noiseLayerOccInRange";
65  if (pset.exists("layerTestName"))
66  layerTestName_ = pset.getParameter<string>("layerTestName");
67 
68  outputMEsInRootFile_ = false;
69  if (pset.exists("OutputFileName")) {
70  outputMEsInRootFile_ = true;
71  outputFileName_ = pset.getParameter<std::string>("OutputFileName");
72  }
73 }
Log< level::Info, true > LogVerbatim
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:647
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_

◆ ~DTnoiseDBValidation()

DTnoiseDBValidation::~DTnoiseDBValidation ( )
override

Destructor.

Definition at line 75 of file DTnoiseDBValidation.cc.

75 {}

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 44 of file DTnoiseDBValidation.h.

44 {}

◆ beginRun()

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

Operations.

Definition at line 77 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(), nano_mu_digi_cff::layer, DTLayerId::layer(), DTGeometry::layer(), layerHisto_, DTWireId::layerId(), muonGeomToken_, hgchebackDigitizer_cfi::noise, noiseHistoMap_, noiseMap_, noiseRefMap_, noisyCellsRef_, noisyCellsValid_, pfClustersFromCombinedCaloHF_cfi::scale, nano_mu_digi_cff::sector, sectorHisto_, dqm::impl::MonitorElement::setBinLabel(), singleTopDQM_cfi::setup, relativeConstraints::station, stationHisto_, DTSuperLayerId::superLayer(), DTLayerId::superlayerId(), makeMuonMisalignmentScenario::wheel, wheelHisto_, and DTWireId::wire().

77  {
78  noiseRefMap_ = &setup.getData(labelDBRef_);
79 
80  noiseMap_ = &setup.getData(labelDB_);
81  ;
82 
83  // Get the geometry
84  dtGeom = &setup.getData(muonGeomToken_);
85 
86  LogVerbatim("NoiseDBValidation") << "[DTnoiseDBValidation] Parameters initialization";
87 
88  noisyCellsRef_ = 0;
89  noisyCellsValid_ = 0;
90 
91  // Histo booking
92  diffHisto_ =
93  dbe_->book1D("noisyCellDiff", "percentual (wrt the previous db) total number of noisy cells", 1, 0.5, 1.5);
94  diffHisto_->setBinLabel(1, "Diff");
95  wheelHisto_ = dbe_->book1D("wheelOccupancy", "percentual noisy cells occupancy per wheel", 5, -2.5, 2.5);
96  wheelHisto_->setBinLabel(1, "Wh-2");
97  wheelHisto_->setBinLabel(2, "Wh-1");
98  wheelHisto_->setBinLabel(3, "Wh0");
99  wheelHisto_->setBinLabel(4, "Wh1");
100  wheelHisto_->setBinLabel(5, "Wh2");
101  stationHisto_ = dbe_->book1D("stationOccupancy", "percentual noisy cells occupancy per station", 4, 0.5, 4.5);
102  stationHisto_->setBinLabel(1, "St1");
103  stationHisto_->setBinLabel(2, "St2");
104  stationHisto_->setBinLabel(3, "St3");
105  stationHisto_->setBinLabel(4, "St4");
106  sectorHisto_ = dbe_->book1D("sectorOccupancy", "percentual noisy cells occupancy per sector", 12, 0.5, 12.5);
107  sectorHisto_->setBinLabel(1, "Sect1");
108  sectorHisto_->setBinLabel(2, "Sect2");
109  sectorHisto_->setBinLabel(3, "Sect3");
110  sectorHisto_->setBinLabel(4, "Sect4");
111  sectorHisto_->setBinLabel(5, "Sect5");
112  sectorHisto_->setBinLabel(6, "Sect6");
113  sectorHisto_->setBinLabel(7, "Sect7");
114  sectorHisto_->setBinLabel(8, "Sect8");
115  sectorHisto_->setBinLabel(9, "Sect9");
116  sectorHisto_->setBinLabel(10, "Sect10");
117  sectorHisto_->setBinLabel(11, "Sect11");
118  sectorHisto_->setBinLabel(12, "Sect12");
119  layerHisto_ = dbe_->book1D("layerOccupancy", "percentual noisy cells occupancy per layer", 3, 0.5, 3.5);
120  layerHisto_->setBinLabel(1, "First 10 bins");
121  layerHisto_->setBinLabel(2, "Middle bins");
122  layerHisto_->setBinLabel(3, "Last 10 bins");
123 
124  // map initialization
125  map<int, int> whMap;
126  whMap.clear();
127  map<int, int> stMap;
128  stMap.clear();
129  map<int, int> sectMap;
130  sectMap.clear();
131  map<int, int> layerMap;
132  layerMap.clear();
133 
134  // Loop over reference DB entries
136  DTWireId wireId((*noise).first.wheelId,
137  (*noise).first.stationId,
138  (*noise).first.sectorId,
139  (*noise).first.slId,
140  (*noise).first.layerId,
141  (*noise).first.cellId);
142  LogVerbatim("NoiseDBValidation") << "Ref. noisy wire: " << wireId;
143  ++noisyCellsRef_;
144  }
145 
146  // Loop over validation DB entries
148  DTWireId wireId((*noise).first.wheelId,
149  (*noise).first.stationId,
150  (*noise).first.sectorId,
151  (*noise).first.slId,
152  (*noise).first.layerId,
153  (*noise).first.cellId);
154  LogVerbatim("NoiseDBValidation") << "Valid. noisy wire: " << wireId;
156 
157  whMap[(*noise).first.wheelId]++;
158  stMap[(*noise).first.stationId]++;
159  sectMap[(*noise).first.sectorId]++;
160 
161  const DTTopology &dtTopo = dtGeom->layer(wireId.layerId())->specificTopology();
162  const int lastWire = dtTopo.lastChannel();
163  if ((*noise).first.cellId <= 10)
164  layerMap[1]++;
165  if ((*noise).first.cellId > 10 && (*noise).first.cellId < (lastWire - 10))
166  layerMap[2]++;
167  if ((*noise).first.cellId >= (lastWire - 10))
168  layerMap[3]++;
169 
170  const DTChamberId chId = wireId.layerId().superlayerId().chamberId();
171  if (noiseHistoMap_.find(chId) == noiseHistoMap_.end())
172  bookHisto(chId);
173  int binNumber = 4 * (wireId.superLayer() - 1) + wireId.layer();
174  noiseHistoMap_[chId]->Fill(wireId.wire(), binNumber);
175  }
176 
177  // histo filling
178  double scale = 1 / double(noisyCellsRef_);
180 
181  scale = 1 / double(noisyCellsValid_);
182  for (map<int, int>::const_iterator wheel = whMap.begin(); wheel != whMap.end(); wheel++) {
183  wheelHisto_->Fill((*wheel).first, ((*wheel).second) * scale);
184  }
185  for (map<int, int>::const_iterator station = stMap.begin(); station != stMap.end(); station++) {
186  stationHisto_->Fill((*station).first, ((*station).second) * scale);
187  }
188  for (map<int, int>::const_iterator sector = sectMap.begin(); sector != sectMap.end(); sector++) {
189  sectorHisto_->Fill((*sector).first, ((*sector).second) * scale);
190  }
191  for (map<int, int>::const_iterator layer = layerMap.begin(); layer != layerMap.end(); layer++) {
192  layerHisto_->Fill((*layer).first, ((*layer).second) * scale);
193  }
194 }
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_
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 270 of file DTnoiseDBValidation.cc.

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

Referenced by beginRun().

270  {
271  stringstream histoName;
272  histoName << "NoiseOccupancy"
273  << "_W" << chId.wheel() << "_St" << chId.station() << "_Sec" << chId.sector();
274 
275  if (noiseHistoMap_.find(chId) == noiseHistoMap_.end()) { // Redundant check
276  // Get the chamber from the geometry
277  int nWiresMax = 0;
278  const DTChamber *dtchamber = dtGeom->chamber(chId);
279  const vector<const DTSuperLayer *> &superlayers = dtchamber->superLayers();
280 
281  // Loop over layers and find the max # of wires
282  for (vector<const DTSuperLayer *>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
283  ++sl) { // loop over SLs
284  vector<const DTLayer *> layers = (*sl)->layers();
285  for (vector<const DTLayer *>::const_iterator lay = layers.begin(); lay != layers.end();
286  ++lay) { // loop over layers
287  int nWires = (*lay)->specificTopology().channels();
288  if (nWires > nWiresMax)
289  nWiresMax = nWires;
290  }
291  }
292 
293  noiseHistoMap_[chId] = dbe_->book2D(histoName.str(), "Noise occupancy", nWiresMax, 1, (nWiresMax + 1), 12, 1, 13);
294  for (int i_sl = 1; i_sl <= 3; ++i_sl) {
295  for (int i_lay = 1; i_lay <= 4; ++i_lay) {
296  int binNumber = 4 * (i_sl - 1) + i_lay;
297  stringstream label;
298  label << "SL" << i_sl << ": L" << i_lay;
299  noiseHistoMap_[chId]->setBinLabel(binNumber, label.str(), 2);
300  }
301  }
302  }
303 }
int station() const
Return the station number.
Definition: DTChamberId.h:45
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:42
int sector() const
Definition: DTChamberId.h:52
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::one::EDAnalyzerBase.

Definition at line 264 of file DTnoiseDBValidation.cc.

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

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

◆ endRun()

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

Definition at line 196 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_.

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