41 LogVerbatim(
"NoiseDBValidation") <<
"[DTnoiseDBValidation] Constructor called!";
48 if (pset.
exists(
"diffTestName"))
52 if (pset.
exists(
"wheelTestName"))
56 if (pset.
exists(
"stationTestName"))
60 if (pset.
exists(
"sectorTestName"))
64 if (pset.
exists(
"layerTestName"))
68 if (pset.
exists(
"OutputFileName")) {
85 LogVerbatim(
"NoiseDBValidation") <<
"[DTnoiseDBValidation] Parameters initialization";
92 dbe_->
book1D(
"noisyCellDiff",
"percentual (wrt the previous db) total number of noisy cells", 1, 0.5, 1.5);
94 wheelHisto_ =
dbe_->
book1D(
"wheelOccupancy",
"percentual noisy cells occupancy per wheel", 5, -2.5, 2.5);
105 sectorHisto_ =
dbe_->
book1D(
"sectorOccupancy",
"percentual noisy cells occupancy per sector", 12, 0.5, 12.5);
118 layerHisto_ =
dbe_->
book1D(
"layerOccupancy",
"percentual noisy cells occupancy per layer", 3, 0.5, 3.5);
128 map<int, int> sectMap;
130 map<int, int> layerMap;
135 DTWireId wireId((*noise).first.wheelId,
136 (*noise).first.stationId,
137 (*noise).first.sectorId,
139 (*noise).first.layerId,
140 (*noise).first.cellId);
141 LogVerbatim(
"NoiseDBValidation") <<
"Ref. noisy wire: " << wireId;
147 DTWireId wireId((*noise).first.wheelId,
148 (*noise).first.stationId,
149 (*noise).first.sectorId,
151 (*noise).first.layerId,
152 (*noise).first.cellId);
153 LogVerbatim(
"NoiseDBValidation") <<
"Valid. noisy wire: " << wireId;
156 whMap[(*noise).first.wheelId]++;
157 stMap[(*noise).first.stationId]++;
158 sectMap[(*noise).first.sectorId]++;
162 if ((*noise).first.cellId <= 10)
164 if ((*noise).first.cellId > 10 && (*noise).first.cellId < (lastWire - 10))
166 if ((*noise).first.cellId >= (lastWire - 10))
181 for (map<int, int>::const_iterator wheel = whMap.begin(); wheel != whMap.end(); wheel++) {
187 for (map<int, int>::const_iterator sector = sectMap.begin(); sector != sectMap.end(); sector++) {
190 for (map<int, int>::const_iterator
layer = layerMap.begin();
layer != layerMap.end();
layer++) {
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();
205 LogWarning(
"NoiseDBValidation") <<
" Bad partial difference of noisy channels! Contents : "
206 << (*channel).getContents();
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();
216 int wheel = (*channel).getBin() - 3;
217 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for wheel : " << wheel
218 <<
" Contents : " << (*channel).getContents();
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();
228 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for station : " << (*channel).getBin()
229 <<
" Contents : " << (*channel).getContents();
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();
239 LogWarning(
"NoiseDBValidation") <<
" Bad percentual occupancy for sector : " << (*channel).getBin()
240 <<
" Contents : " << (*channel).getContents();
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();
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();
270 stringstream histoName;
271 histoName <<
"NoiseOccupancy"
278 const vector<const DTSuperLayer *> &superlayers = dtchamber->
superLayers();
281 for (vector<const DTSuperLayer *>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
283 vector<const DTLayer *>
layers = (*sl)->layers();
284 for (vector<const DTLayer *>::const_iterator lay = layers.begin(); lay != layers.end();
286 int nWires = (*lay)->specificTopology().channels();
287 if (nWires > nWiresMax)
293 for (
int i_sl = 1; i_sl <= 3; ++i_sl) {
294 for (
int i_lay = 1; i_lay <= 4; ++i_lay) {
297 label <<
"SL" << i_sl <<
": L" << i_lay;
Log< level::Info, true > LogVerbatim
MonitorElement * wheelHisto_
const_iterator end() const
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
bool outputMEsInRootFile_
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
const DTGeometry * dtGeom
DTChamberId chamberId() const
Return the corresponding ChamberId.
std::string stationTestName_
void setCurrentFolder(std::string const &fullpath) override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::string outputFileName_
void bookHisto(const DTChamberId &)
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
Operations.
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
int layer() const
Return the layer number.
const DTStatusFlag * noiseRefMap_
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
const DTStatusFlag * noiseMap_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
constexpr std::array< uint8_t, layerIndexSize > layer
std::string diffTestName_
std::string sectorTestName_
bool getData(T &iHolder) const
int lastChannel() const
Returns the wire number of the last wire.
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
DTnoiseDBValidation(const edm::ParameterSet &pset)
Constructor.
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Abs< T >::type abs(const T &t)
int superLayer() const
Return the superlayer number.
void endRun(edm::Run const &, edm::EventSetup const &) override
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)
int wire() const
Return the wire number.
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())
T getParameter(std::string const &) const
const std::vector< DQMChannel > & getBadChannels() const
DTLayerId layerId() const
Return the corresponding LayerId.
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
MonitorElement * stationHisto_
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Log< level::Warning, false > LogWarning
int station() const
Return the station number.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int wheel() const
Return the wheel number.
std::string layerTestName_
MonitorElement * layerHisto_
~DTnoiseDBValidation() override
Destructor.
const_iterator begin() const
MonitorElement * sectorHisto_