66 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
67 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
68 for (; ch_it != ch_end; ++ch_it) {
80 edm::LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest]: End of LS transition, performing the DQM client operation";
83 nLumiSegs = lumiSeg.id().luminosityBlock();
88 edm::LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest]: "<<
nLumiSegs<<
" updates";
91 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
92 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
94 edm::LogVerbatim (
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"[DTChamberEfficiencyTest]: ChamberEfficiency tests results";
97 for (; ch_it != ch_end; ++ch_it) {
102 stringstream sector; sector << chID.
sector();
104 string HistoName =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str();
112 if(GoodSegDen_histo && GoodCloseSegNum_histo) {
113 TH2F * GoodSegDen_histo_root = GoodSegDen_histo->
getTH2F();
114 TH2F * GoodCloseSegNum_histo_root = GoodCloseSegNum_histo->
getTH2F();
116 int lastBinX=(*GoodSegDen_histo_root).GetNbinsX();
117 TH1D* proxN=GoodCloseSegNum_histo_root->ProjectionX();
118 TH1D* proxD=GoodSegDen_histo_root->ProjectionX();
120 int lastBinY=(*GoodSegDen_histo_root).GetNbinsY();
121 TH1D* proyN=GoodCloseSegNum_histo_root->ProjectionY();
122 TH1D* proyD=GoodSegDen_histo_root->ProjectionY();
124 for(
int xBin=1; xBin<=lastBinX; xBin++) {
125 if(proxD->GetBinContent(xBin)!=0){
126 float Xefficiency = proxN->GetBinContent(xBin) / proxD->GetBinContent(xBin);
131 if(GoodSegDen_histo_root->GetBinContent(xBin,
yBin)!=0){
132 float XvsYefficiency = GoodCloseSegNum_histo_root->GetBinContent(xBin,
yBin) / GoodSegDen_histo_root->GetBinContent(xBin,
yBin);
133 xVSyEffHistos.find(HistoName)->second->setBinContent(xBin,
yBin, XvsYefficiency);
140 if(proyD->GetBinContent(
yBin)!=0){
141 float Yefficiency = proyN->GetBinContent(
yBin) / proyD->GetBinContent(
yBin);
150 string XEfficiencyCriterionName =
parameters.getUntrackedParameter<
string>(
"XEfficiencyTestName",
"ChEfficiencyInRangeX");
151 for(map<string, MonitorElement*>::const_iterator hXEff =
xEfficiencyHistos.begin();
154 const QReport * theXEfficiencyQReport = (*hXEff).second->getQReport(XEfficiencyCriterionName);
155 if(theXEfficiencyQReport) {
156 vector<dqm::me_util::Channel> badChannels = theXEfficiencyQReport->
getBadChannels();
157 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
158 channel != badChannels.end(); channel++) {
159 edm::LogError (
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"Chamber : " << (*hXEff).first <<
" Bad XChamberEfficiency channels: "<<(*channel).getBin()<<
" Contents : "<<(*channel).getContents();
166 string YEfficiencyCriterionName =
parameters.getUntrackedParameter<
string>(
"YEfficiencyTestName",
"ChEfficiencyInRangeY");
167 for(map<string, MonitorElement*>::const_iterator hYEff =
yEfficiencyHistos.begin();
170 const QReport * theYEfficiencyQReport = (*hYEff).second->getQReport(YEfficiencyCriterionName);
171 if(theYEfficiencyQReport) {
172 vector<dqm::me_util::Channel> badChannels = theYEfficiencyQReport->
getBadChannels();
173 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
174 channel != badChannels.end(); channel++) {
175 edm::LogError (
"DTDQM|DTMonitorClient|DTChamberEfficiencyTest") <<
"Chamber : " << (*hYEff).first <<
" Bad YChamberEfficiency channels: "<<(*channel).getBin()<<
" Contents : "<<(*channel).getContents();
181 for(
int wh=-2; wh<=2; wh++){
182 for(
int sec=1; sec<=12; sec++){
183 for(
int st=1; st<=4; st++){
std::map< std::string, MonitorElement * > yEfficiencyHistos
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
const std::vector< DQMChannel > & getBadChannels() const
std::map< std::string, MonitorElement * > xEfficiencyHistos
MonitorElement * get(const std::string &path)
std::map< int, MonitorElement * > summaryHistos
std::string getMEName(std::string histoTag, const DTChamberId &chID)
Get the ME name.
std::map< std::string, MonitorElement * > xVSyEffHistos
int station() const
Return the station number.
int wheel() const
Return the wheel number.
edm::ESHandle< DTGeometry > muonGeom