34 LogTrace(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest") <<
"[DTNoiseAnalysisTest]: Constructor";
51 LogTrace(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest") <<
"DTNoiseAnalysisTest: analyzed " <<
nevents <<
" events";
71 LogVerbatim(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
72 <<
"[DTNoiseAnalysisTest]: End of LS transition, performing the DQM client operation";
75 for (map<int, MonitorElement*>::iterator
plot = noiseHistos.begin();
plot != noiseHistos.end(); ++
plot) {
76 (*plot).second->Reset();
79 for (map<int, MonitorElement*>::iterator
plot = noisyCellHistos.begin();
plot != noisyCellHistos.end(); ++
plot) {
80 (*plot).second->Reset();
83 summaryNoiseHisto->Reset();
85 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
86 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
88 LogTrace(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest") <<
"[DTNoiseAnalysisTest]: Fill the summary histos";
90 for (; ch_it != ch_end; ++ch_it) {
97 TH2F* histo_root = histo->
getTH2F();
99 for (
int sl = 1; sl != 4; ++sl) {
101 if (chID.
station() == 4 && sl == 2)
104 int binYlow = ((sl - 1) * 4) + 1;
106 for (
int layer = 1; layer <= 4; ++layer) {
111 int nWires = muonGeom->layer(layID)->specificTopology().channels();
112 int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
114 int binY = binYlow + (layer - 1);
116 for (
int wire = firstWire; wire != (nWires + firstWire); wire++) {
118 double noise = histo_root->GetBinContent(wire, binY);
120 noiseHistos[chID.
wheel()]->Fill(noise);
121 noiseHistos[3]->Fill(noise);
122 int sector = chID.
sector();
126 }
else if (sector == 14) {
129 noisyCellHistos[chID.
wheel()]->Fill(sector, chID.
station());
130 summaryNoiseHisto->Fill(sector, chID.
wheel());
139 threshChannelsHisto->Reset();
140 TH1F*
histo = noiseHistos[3]->getTH1F();
142 int threshBin =
step + 1;
143 int minBin = 26 +
step * 5;
144 int nNoisyCh = histo->Integral(minBin, 101);
145 threshChannelsHisto->setBinContent(threshBin, nNoisyCh);
152 LogTrace(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
153 <<
"[DTNoiseAnalysisTest]: fill summaries for synch noise" << endl;
154 summarySynchNoiseHisto->Reset();
155 glbSummarySynchNoiseHisto->Reset();
160 if (histoNoiseSynch !=
nullptr) {
161 for (
int sect = 1; sect != 13; ++sect) {
163 float maxSectRate = 0;
164 for (
int sta = 1; sta != 5; ++sta) {
166 chRate = histo->GetBinContent(sect, sta) / (
float)
nevents;
170 LogTrace(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
171 <<
" Wheel: " <<
wheel <<
" sect: " << sect <<
" station: " << sta <<
" rate is: " << chRate << endl;
172 if (chRate > maxSectRate)
173 maxSectRate = chRate;
177 glbSummarySynchNoiseHisto->Fill(sect,
wheel, glbBinValue > 0 ? glbBinValue : 0);
180 LogWarning(
"DTDQM|DTMonitorClient|DTNoiseAnalysisTest")
181 <<
" Histo: " << getSynchNoiseMEName(
wheel) <<
" not found!" << endl;
186 string nEvtsName =
"DT/EventInfo/Counters/nProcessedEventsNoise";
192 glbSummarySynchNoiseHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
193 summarySynchNoiseHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
195 glbSummarySynchNoiseHisto->setEntries(nMinEvts + 1);
196 summarySynchNoiseHisto->setEntries(nMinEvts + 1);
197 LogVerbatim(
"DTDQM|DTMonitorClient|DTnoiseAnalysisTest")
198 <<
"[DTNoiseAnalysisTest] ME: " << nEvtsName <<
" not found!" << endl;
204 wheel << chID.
wheel();
210 string folderName =
"DT/05-Noise/Wheel" + wheel.str() +
"/Sector" + sector.str() +
"/";
213 folderName +
string(
"NoiseRate") +
"_W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str();
222 for (
int wh = -2; wh <= 2; wh++) {
225 histoName =
"NoiseRateSummary_W" + wheel.str();
227 noiseHistos[wh] = ibooker.
book1D(histoName.c_str(), histoName.c_str(), 100, 0, 2000);
229 noiseHistos[wh]->setAxisTitle(
"entries", 2);
231 histoName =
"NoiseRateSummary";
233 noiseHistos[3] = ibooker.
book1D(histoName.c_str(), histoName.c_str(), 100, 0, 2000);
235 noiseHistos[3]->setAxisTitle(
"entries", 2);
237 for (
int wh = -2; wh <= 2; wh++) {
240 histoName =
"NoiseSummary_W" + wheel.str();
242 noisyCellHistos[wh] = ibooker.
book2D(histoName.c_str(),
"# of noisy channels", 12, 1, 13, 4, 1, 5);
244 noisyCellHistos[wh]->setBinLabel(2,
"MB2", 2);
245 noisyCellHistos[wh]->setBinLabel(3,
"MB3", 2);
246 noisyCellHistos[wh]->setBinLabel(4,
"MB4", 2);
247 noisyCellHistos[wh]->setAxisTitle(
"Sector", 1);
250 histoName =
"NoiseSummary";
252 summaryNoiseHisto = ibooker.
book2D(histoName.c_str(),
"# of noisy channels", 12, 1, 13, 5, -2, 3);
254 summaryNoiseHisto->setAxisTitle(
"Wheel", 2);
257 histoName =
"NoisyChannels";
259 threshChannelsHisto = ibooker.
book1D(histoName.c_str(),
"# of noisy channels vs threshold", 15, 500, 2000);
261 threshChannelsHisto->setAxisTitle(
"# noisy channels", 2);
266 histoName =
"SynchNoiseSummary";
268 summarySynchNoiseHisto = ibooker.
book2D(histoName.c_str(),
"Summary Synch. Noise", 12, 1, 13, 5, -2, 3);
270 summarySynchNoiseHisto->setAxisTitle(
"Wheel", 2);
271 histoName =
"SynchNoiseGlbSummary";
273 glbSummarySynchNoiseHisto = ibooker.
book2D(histoName.c_str(),
"Summary Synch. Noise", 12, 1, 13, 5, -2, 3);
275 glbSummarySynchNoiseHisto->setAxisTitle(
"Wheel", 2);
282 string folderName =
"DT/05-Noise/SynchNoise/";
283 string histoname = folderName +
string(
"SyncNoiseEvents") +
"_W" + wheel.str();
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
void setCurrentFolder(std::string const &fullpath)
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void bookHistos(DQMStore::IBooker &)
book the summary histograms
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
std::string getMEName(const DTChamberId &chID)
Get the ME name.
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)
virtual double getFloatValue() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
std::string getSynchNoiseMEName(int wheelId) const
~DTNoiseAnalysisTest() override
Destructor.
int station() const
Return the station number.
MonitorElement * get(std::string const &path)
int wheel() const
Return the wheel number.
DTNoiseAnalysisTest(const edm::ParameterSet &ps)
Constructor.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)