41 LogVerbatim(
"NoiseDBValidation") <<
"[DTnoiseDBValidation] Constructor called!";
44 usesResource(
"DQMStore");
49 if (
pset.exists(
"diffTestName"))
53 if (
pset.exists(
"wheelTestName"))
57 if (
pset.exists(
"stationTestName"))
61 if (
pset.exists(
"sectorTestName"))
65 if (
pset.exists(
"layerTestName"))
69 if (
pset.exists(
"OutputFileName")) {
86 LogVerbatim(
"NoiseDBValidation") <<
"[DTnoiseDBValidation] Parameters initialization";
93 dbe_->
book1D(
"noisyCellDiff",
"percentual (wrt the previous db) total number of noisy cells", 1, 0.5, 1.5);
95 wheelHisto_ =
dbe_->
book1D(
"wheelOccupancy",
"percentual noisy cells occupancy per wheel", 5, -2.5, 2.5);
106 sectorHisto_ =
dbe_->
book1D(
"sectorOccupancy",
"percentual noisy cells occupancy per sector", 12, 0.5, 12.5);
119 layerHisto_ =
dbe_->
book1D(
"layerOccupancy",
"percentual noisy cells occupancy per layer", 3, 0.5, 3.5);
129 map<int, int> sectMap;
131 map<int, int> layerMap;
136 DTWireId wireId((*noise).first.wheelId,
137 (*noise).first.stationId,
138 (*noise).first.sectorId,
140 (*noise).first.layerId,
141 (*noise).first.cellId);
142 LogVerbatim(
"NoiseDBValidation") <<
"Ref. noisy wire: " << wireId;
148 DTWireId wireId((*noise).first.wheelId,
149 (*noise).first.stationId,
150 (*noise).first.sectorId,
152 (*noise).first.layerId,
153 (*noise).first.cellId);
154 LogVerbatim(
"NoiseDBValidation") <<
"Valid. noisy wire: " << wireId;
157 whMap[(*noise).first.wheelId]++;
158 stMap[(*noise).first.stationId]++;
159 sectMap[(*noise).first.sectorId]++;
163 if ((*noise).first.cellId <= 10)
165 if ((*noise).first.cellId > 10 && (*noise).first.cellId < (lastWire - 10))
167 if ((*noise).first.cellId >= (lastWire - 10))
182 for (map<int, int>::const_iterator
wheel = whMap.begin();
wheel != whMap.end();
wheel++) {
188 for (map<int, int>::const_iterator sector = sectMap.begin(); sector != sectMap.end(); sector++) {
191 for (map<int, int>::const_iterator
layer = layerMap.begin();
layer != layerMap.end();
layer++) {
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();
206 LogWarning(
"NoiseDBValidation") <<
" Bad partial difference of noisy channels! Contents : " 207 << (*channel).getContents();
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();
217 int wheel = (*channel).getBin() - 3;
218 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for wheel : " <<
wheel 219 <<
" Contents : " << (*channel).getContents();
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();
229 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for station : " << (*channel).getBin()
230 <<
" Contents : " << (*channel).getContents();
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();
240 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for sector : " << (*channel).getBin()
241 <<
" Contents : " << (*channel).getContents();
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();
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();
279 const vector<const DTSuperLayer *> &superlayers = dtchamber->
superLayers();
282 for (vector<const DTSuperLayer *>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
284 vector<const DTLayer *>
layers = (*sl)->layers();
285 for (vector<const DTLayer *>::const_iterator lay =
layers.begin(); lay !=
layers.end();
287 int nWires = (*lay)->specificTopology().channels();
288 if (nWires > nWiresMax)
294 for (
int i_sl = 1; i_sl <= 3; ++i_sl) {
295 for (
int i_lay = 1; i_lay <= 4; ++i_lay) {
298 label <<
"SL" << i_sl <<
": L" << i_lay;
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
MonitorElement * wheelHisto_
int superLayer() const
Return the superlayer number.
bool outputMEsInRootFile_
const_iterator begin() const
int wire() const
Return the wire number.
const DTGeometry * dtGeom
const std::vector< DQMChannel > & getBadChannels() const
std::string stationTestName_
void setCurrentFolder(std::string const &fullpath) override
std::string outputFileName_
void bookHisto(const DTChamberId &)
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
Operations.
const DTStatusFlag * noiseRefMap_
const DTStatusFlag * noiseMap_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
constexpr std::array< uint8_t, layerIndexSize > layer
std::string diffTestName_
std::string sectorTestName_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
DTnoiseDBValidation(const edm::ParameterSet &pset)
Constructor.
DTChamberId chamberId() const
Return the corresponding ChamberId.
def binNumber(station, sl)
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Abs< T >::type abs(const T &t)
void endRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * diffHisto_
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
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.
std::string wheelTestName_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
int layer() const
Return the layer number.
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
int wheel() const
Return the wheel number.
MonitorElement * stationHisto_
const_iterator end() const
int lastChannel() const
Returns the wire number of the last wire.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
DTLayerId layerId() const
Return the corresponding LayerId.
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
std::string layerTestName_
MonitorElement * layerHisto_
~DTnoiseDBValidation() override
Destructor.
MonitorElement * sectorHisto_
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.