38 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"[DTSegmentAnalysisTest]: Constructor";
56 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"DTSegmentAnalysisTest: analyzed " <<
nLSs <<
" LS";
60 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest") <<
"[DTSegmentAnalysisTest]: BeginRun";
66 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
84 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
85 <<
"[DTSegmentAnalysisTest]: End of LS " <<
nLumiSegs 86 <<
". Client called in online mode , perform DQM client operation";
94 LogTrace(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
95 <<
"[DTSegmentAnalysisTest]: endJob. Client called in offline mode , perform DQM client operation";
104 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
105 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
107 for (; ch_it != ch_end; ++ch_it) {
113 if (hNHits && hSegmOcc) {
114 TH1F* hNHits_root = hNHits->
getTH1F();
115 TH2F* hSegmOcc_root = hSegmOcc->
getTH2F();
127 if (summary_histo_root->GetBinContent(
sector, chID.
wheel() + 3) < 1)
135 abs(12 - hNHits_root->GetMaximumBin()));
138 abs(8 - hNHits_root->GetMaximumBin()));
143 if (hSegmOcc_root->GetBinContent(
sector, chID.
station()) == 0) {
145 if (summary2_histo_root->GetBinContent(
sector, chID.
wheel() + 3) < 2)
155 LogVerbatim(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
156 <<
"[DTSegmentAnalysisTest]: histos not found!!";
165 TH1F* chi2_histo_root = chi2_histo->
getTH1F();
167 double maximum = chi2_histo_root->GetXaxis()->GetXmax();
168 double minimum = chi2_histo_root->GetXaxis()->GetXmin();
169 int nbins = chi2_histo_root->GetXaxis()->GetNbins();
172 double badSegments = 0;
174 badSegments += chi2_histo_root->GetBinContent(
bin);
177 if (chi2_histo_root->GetEntries() != 0) {
178 double badSegmentsPercentual = badSegments / double(chi2_histo_root->GetEntries());
182 LogVerbatim(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
183 <<
"[DTSegmentAnalysisTest]: Histo: " <<
getMEName(chID,
"h4DChi2") <<
" not found!" << endl;
189 string nEvtsName =
"DT/EventInfo/Counters/nProcessedEventsSegment";
198 LogVerbatim(
"DTDQM|DTMonitorClient|DTOccupancyTest")
199 <<
"[DTOccupancyTest] ME: " << nEvtsName <<
" not found!" << endl;
206 const QReport* theChi2QReport = (*histo).second->getQReport(chi2CriterionName);
207 if (theChi2QReport) {
208 vector<dqm::me_util::Channel> badChannels = theChi2QReport->
getBadChannels();
209 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
211 LogError(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
212 <<
"Wheel: " << (*histo).first.first <<
" Sector: " << (*histo).first.second
213 <<
" Bad stations: " << (*channel).getBin() <<
" Contents : " << (*channel).getContents();
218 string segmRecHitCriterionName =
223 const QReport* theSegmRecHitQReport = (*histo).second->getQReport(segmRecHitCriterionName);
224 if (theSegmRecHitQReport) {
225 vector<dqm::me_util::Channel> badChannels = theSegmRecHitQReport->
getBadChannels();
226 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
228 LogError(
"DTDQM|DTMonitorClient|DTSegmentAnalysisTest")
229 <<
"Wheel: " << (*histo).first.first <<
" Sector: " << (*histo).first.second
230 <<
" Bad stations on recHit number: " << (*channel).getBin()
231 <<
" Contents : " << (*channel).getContents();
259 for (
int wh = -2; wh <= 2; wh++) {
274 for (
int sect = 1; sect <= 14; sect++) {
277 string chi2HistoName =
"chi2BadSegmPercentual_W" +
wheel.str() +
"_Sec" +
sector.str();
279 chi2Histos[make_pair(wh, sect)] = ibooker.
book1D(chi2HistoName.c_str(), chi2HistoName.c_str(), 4, 1, 5);
280 chi2Histos[make_pair(wh, sect)]->setBinLabel(1,
"MB1");
281 chi2Histos[make_pair(wh, sect)]->setBinLabel(2,
"MB2");
282 chi2Histos[make_pair(wh, sect)]->setBinLabel(3,
"MB3");
283 chi2Histos[make_pair(wh, sect)]->setBinLabel(4,
"MB4");
285 string segmHistoName =
"residualsOnSegmRecHitNumber_W" +
wheel.str() +
"_Sec" +
sector.str();
286 segmRecHitHistos[make_pair(wh, sect)] = ibooker.
book1D(segmHistoName.c_str(), segmHistoName.c_str(), 4, 1, 5);
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
LuminosityBlockNumber_t luminosityBlock() const
edm::ParameterSet parameters
~DTSegmentAnalysisTest() override
Destructor.
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::map< std::pair< int, int >, MonitorElement * > chi2Histos
virtual void setCurrentFolder(std::string const &fullpath)
const std::vector< DQMChannel > & getBadChannels() const
std::map< int, MonitorElement * > summaryHistos
Log< level::Error, false > LogError
std::string topHistoFolder
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
void dqmBeginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual double getFloatValue() const
Abs< T >::type abs(const T &t)
const DTGeometry * muonGeom
void bookHistos(DQMStore::IBooker &)
DTSegmentAnalysisTest(const edm::ParameterSet &ps)
Constructor.
std::string getMEName(const DTChamberId &chID, std::string histoTag)
Get the ME name.
std::map< std::pair< int, int >, MonitorElement * > segmRecHitHistos
LuminosityBlockID id() const
virtual TH1F * getTH1F() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual MonitorElement * get(std::string const &fullpath) const
int wheel() const
Return the wheel number.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
void performClientDiagnostic(DQMStore::IGetter &)
Perform client diagnostic operations.