|
|
Go to the documentation of this file.
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();
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;
std::string sectorTestName_
int wire() const
Return the wire number.
DTnoiseDBValidation(const edm::ParameterSet &pset)
Constructor.
std::map< DTChamberId, MonitorElement * > noiseHistoMap_
void bookHisto(const DTChamberId &)
MonitorElement * diffHisto_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
const DTGeometry * dtGeom
void endRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * layerHisto_
int superLayer() const
Return the superlayer number.
Log< level::Warning, false > LogWarning
std::string diffTestName_
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
const_iterator begin() const
const DTStatusFlag * noiseRefMap_
MonitorElement * stationHisto_
const DTStatusFlag * noiseMap_
std::vector< std::pair< DTStatusFlagId, DTStatusFlagData > >::const_iterator const_iterator
Access methods to data.
~DTnoiseDBValidation() override
Destructor.
void setCurrentFolder(std::string const &fullpath) override
std::string outputFileName_
const std::vector< DQMChannel > & getBadChannels() const
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDB_
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
bool outputMEsInRootFile_
constexpr std::array< uint8_t, layerIndexSize > layer
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
DTChamberId chamberId() const
Return the corresponding ChamberId.
def binNumber(station, sl)
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)
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
std::string layerTestName_
MonitorElement * sectorHisto_
const_iterator end() const
std::string stationTestName_
int lastChannel() const
Returns the wire number of the last wire.
std::string wheelTestName_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > labelDBRef_
Log< level::Info, true > LogVerbatim
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
Operations.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
DTLayerId layerId() const
Return the corresponding LayerId.
Abs< T >::type abs(const T &t)
int layer() const
Return the layer number.
int wheel() const
Return the wheel number.
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())
MonitorElement * wheelHisto_