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) {
92 wheel << chID.
wheel();
98 string HistoName =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str();
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();
118 for (
int xBin = 1; xBin <= lastBinX; xBin++) {
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);
128 xVSyEffHistos.find(HistoName)->second->setBinContent(xBin,
yBin, XvsYefficiency);
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++) {
178 for (
int sec = 1; sec <= 12; sec++) {
179 for (
int st = 1; st <= 4; st++) {
187 edm::LogVerbatim(
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest] endjob called!";
192 wheel << chID.
wheel();
199 string folderName = folderRoot +
"DT/01-DTChamberEfficiency/Task/Wheel" + wheel.str() +
"/Sector" + sector.str() +
200 "/Station" + station.str() +
"/";
202 string histoname = folderName + histoTag +
"_W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str();
209 wheel << chId.
wheel();
215 string HistoName =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.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++) {
235 string histoName =
"chEfficiencySummary_W" + wheel.str();
238 summaryHistos[wh] = ibooker.
book2D(histoName.c_str(), histoName.c_str(), 12, 1, 13, 4, 1, 5);
std::map< std::string, MonitorElement * > xEfficiencyHistos
LuminosityBlockID id() const
Log< level::Info, true > LogVerbatim
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
virtual TH2F * getTH2F() const
virtual void setCurrentFolder(std::string const &fullpath)
Log< level::Error, false > LogError
std::map< std::string, MonitorElement * > xVSyEffHistos
edm::ParameterSet parameters
bool getData(T &iHolder) const
const DTGeometry * muonGeom
std::string getMEName(std::string histoTag, const DTChamberId &chID)
Get the ME name.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
virtual MonitorElement * get(std::string const &fullpath) const
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.
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
LuminosityBlockNumber_t luminosityBlock() const
const std::vector< DQMChannel > & getBadChannels() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int station() const
Return the station number.
int wheel() const
Return the wheel number.
DTChamberEfficiencyTest(const edm::ParameterSet &ps)
Constructor.