66 edm::LogVerbatim (
"deadChannel") <<
"[DTDeadChannelTest]: Begin of LS transition";
85 edm::LogVerbatim (
"deadChannel") <<
"[DTDeadChannelTest]: End of LS transition, performing the DQM client operation";
93 edm::LogVerbatim (
"deadChannel") <<
"[DTDeadChannelTest]: "<<nLumiSegs<<
" updates";
96 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
97 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
99 edm::LogVerbatim (
"deadChannel") <<
"[DTDeadChannelTest]: Occupancy tests results";
102 for (; ch_it != ch_end; ++ch_it) {
104 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
105 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
107 stringstream wheel; wheel << chID.
wheel();
109 stringstream sector; sector << chID.
sector();
113 string HistoName =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str();
116 MonitorElement * noise_histo = igetter.
get(getMEName(
"OccupancyNoise_perCh", chID));
117 MonitorElement * hitInTime_histo = igetter.
get(getMEName(
"OccupancyInTimeHits_perCh", chID));
120 if(noise_histo && hitInTime_histo) {
121 TH2F * noise_histo_root = noise_histo->
getTH2F();
122 TH2F * hitInTime_histo_root = hitInTime_histo->
getTH2F();
125 for(; sl_it != sl_end; ++sl_it) {
127 vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
128 vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
131 float tTrig, tTrigRMS, kFactor;
135 for(; l_it != l_end; ++l_it) {
139 stringstream superLayer; superLayer << slID.
superlayer();
140 stringstream layer; layer << lID.
layer();
141 string HistoNameTest =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str()
142 +
"_L" + layer.str();
144 const int firstWire = muonGeom->layer(lID)->specificTopology().firstChannel();
145 const int lastWire = muonGeom->layer(lID)->specificTopology().lastChannel();
151 int YBinNumber = entry+lID.
layer();
155 for(
int bin=firstWire;
bin <= lastWire;
bin++) {
156 if (OccupancyDiffHistos.find(HistoNameTest) == OccupancyDiffHistos.end())
bookHistos(ibooker,lID, firstWire, lastWire);
160 float difference = (hitInTime_histo_root->GetBinContent(
bin, YBinNumber) / tMax)
161 - (noise_histo_root->GetBinContent(
bin, YBinNumber) / tTrig);
162 OccupancyDiffHistos.find(HistoNameTest)->second->setBinContent(
bin, difference);
170 string OccupancyDiffCriterionName =
parameters.getUntrackedParameter<
string>(
"OccupancyDiffTestName",
"OccupancyDiffInRange");
171 for(map<string, MonitorElement*>::const_iterator hOccDiff = OccupancyDiffHistos.begin();
172 hOccDiff != OccupancyDiffHistos.end();
174 const QReport * theOccupancyDiffQReport = (*hOccDiff).second->getQReport(OccupancyDiffCriterionName);
175 if(theOccupancyDiffQReport) {
176 vector<dqm::me_util::Channel> badChannels = theOccupancyDiffQReport->
getBadChannels();
177 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
178 channel != badChannels.end(); channel++) {
179 edm::LogError (
"deadChannel") <<
"Layer : "<<(*hOccDiff).first<<
" Bad occupancy difference channels: "<<(*channel).getBin()<<
" Contents : "<<(*channel).getContents();
188 stringstream wheel; wheel << chId.
wheel();
190 stringstream sector; sector << chId.
sector();
192 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
194 folderRoot +
"DT/DTDigiTask/Wheel" + wheel.str() +
195 "/Station" + station.str() +
196 "/Sector" + sector.str() +
197 "/Occupancies" +
"/";
199 string histoname = folderName + histoTag
201 +
"_St" + station.str()
202 +
"_Sec" + sector.str();
215 stringstream layer; layer << lId.
layer();
217 string HistoName =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str() +
"_L" + layer.str();
218 string OccupancyDiffHistoName =
"OccupancyDiff_" +
HistoName;
221 "/Station" + station.str() +
222 "/Sector" + sector.str());
224 OccupancyDiffHistos[
HistoName] = ibooker.
book1D(OccupancyDiffHistoName.c_str(),OccupancyDiffHistoName.c_str(),lastWire-firstWire+1, firstWire-0.5, lastWire+0.5);
LuminosityBlockID id() const
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
void bookHistos(DQMStore::IBooker &, const DTLayerId &ch, int firstWire, int lastWire)
book the new ME
MonitorElement * get(const std::string &path)
int layer() const
Return the layer number.
DTDeadChannelTest(const edm::ParameterSet &ps)
Constructor.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * book1D(Args &&...args)
const std::vector< DQMChannel > & getBadChannels(void) const
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
int superlayer() const
Return the superlayer number (deprecated method name)
void setCurrentFolder(const std::string &fullpath)
LuminosityBlockNumber_t luminosityBlock() const
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
DQM Client Diagnostic.
int station() const
Return the station number.
TH2F * getTH2F(void) const
int wheel() const
Return the wheel number.
virtual ~DTDeadChannelTest()
Destructor.
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.