30 edm::LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest]: Constructor";
43 <<
"DTChamberEfficiencyTest: analyzed " <<
nevents <<
" events";
55 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
56 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
57 for (; ch_it != ch_end; ++ch_it) {
69 <<
"[DTChamberEfficiencyTest]: End of LS transition, performing the DQM client operation";
79 <<
"[DTChamberEfficiencyTest]: " <<
nLumiSegs <<
" updates";
81 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
82 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
85 <<
"[DTChamberEfficiencyTest]: ChamberEfficiency tests results";
88 for (; ch_it != ch_end; ++ch_it) {
106 if (GoodSegDen_histo && GoodCloseSegNum_histo) {
107 TH2F* GoodSegDen_histo_root = GoodSegDen_histo->
getTH2F();
108 TH2F* GoodCloseSegNum_histo_root = GoodCloseSegNum_histo->
getTH2F();
110 int lastBinX = (*GoodSegDen_histo_root).GetNbinsX();
111 TH1D* proxN = GoodCloseSegNum_histo_root->ProjectionX();
112 TH1D* proxD = GoodSegDen_histo_root->ProjectionX();
114 int lastBinY = (*GoodSegDen_histo_root).GetNbinsY();
115 TH1D* proyN = GoodCloseSegNum_histo_root->ProjectionY();
116 TH1D* proyD = GoodSegDen_histo_root->ProjectionY();
119 if (proxD->GetBinContent(
xBin) != 0) {
120 float Xefficiency = proxN->GetBinContent(
xBin) / proxD->GetBinContent(
xBin);
125 if (GoodSegDen_histo_root->GetBinContent(
xBin,
yBin) != 0) {
126 float XvsYefficiency = GoodCloseSegNum_histo_root->GetBinContent(
xBin,
yBin) /
127 GoodSegDen_histo_root->GetBinContent(
xBin,
yBin);
134 if (proyD->GetBinContent(
yBin) != 0) {
135 float Yefficiency = proyN->GetBinContent(
yBin) / proyD->GetBinContent(
yBin);
143 string XEfficiencyCriterionName =
147 const QReport* theXEfficiencyQReport = (*hXEff).second->getQReport(XEfficiencyCriterionName);
148 if (theXEfficiencyQReport) {
149 vector<dqm::me_util::Channel> badChannels = theXEfficiencyQReport->
getBadChannels();
150 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
152 edm::LogError(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
153 <<
"Chamber : " << (*hXEff).first <<
" Bad XChamberEfficiency channels: " << (*channel).getBin()
154 <<
" Contents : " << (*channel).getContents();
160 string YEfficiencyCriterionName =
164 const QReport* theYEfficiencyQReport = (*hYEff).second->getQReport(YEfficiencyCriterionName);
165 if (theYEfficiencyQReport) {
166 vector<dqm::me_util::Channel> badChannels = theYEfficiencyQReport->
getBadChannels();
167 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
169 edm::LogError(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest")
170 <<
"Chamber : " << (*hYEff).first <<
" Bad YChamberEfficiency channels: " << (*channel).getBin()
171 <<
" Contents : " << (*channel).getContents();
177 for (
int wh = -2; wh <= 2; wh++) {
179 for (
int st = 1; st <= 4; st++) {
187 edm::LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest] endjob called!";
200 "/Station" +
station.str() +
"/";
216 string xEfficiencyHistoName =
"xEfficiency_" +
HistoName;
217 string yEfficiencyHistoName =
"yEfficiency_" +
HistoName;
218 string xVSyEffHistoName =
"xVSyEff_" +
HistoName;
220 ibooker.
setCurrentFolder(
"DT/01-DTChamberEfficiency/Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
224 ibooker.
book1D(xEfficiencyHistoName.c_str(), xEfficiencyHistoName.c_str(), 25, -250., 250.);
226 ibooker.
book1D(yEfficiencyHistoName.c_str(), yEfficiencyHistoName.c_str(), 25, -250., 250.);
228 ibooker.
book2D(xVSyEffHistoName.c_str(), xVSyEffHistoName.c_str(), 25, -250., 250., 25, -250., 250.);
232 for (
int wh = -2; wh <= 2; wh++) {
std::map< std::string, MonitorElement * > xEfficiencyHistos
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
LuminosityBlockNumber_t luminosityBlock() const
virtual void setCurrentFolder(std::string const &fullpath)
const std::vector< DQMChannel > & getBadChannels() const
Log< level::Error, false > LogError
std::map< std::string, MonitorElement * > xVSyEffHistos
edm::ParameterSet parameters
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
const DTGeometry * muonGeom
std::string getMEName(std::string histoTag, const DTChamberId &chID)
Get the ME name.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
std::map< std::string, MonitorElement * > yEfficiencyHistos
std::map< int, MonitorElement * > summaryHistos
~DTChamberEfficiencyTest() override
Destructor.
LuminosityBlockID id() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual MonitorElement * get(std::string const &fullpath) const
int wheel() const
Return the wheel number.
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())
DTChamberEfficiencyTest(const edm::ParameterSet &ps)
Constructor.