DQM Client Diagnostic.
70 edm::LogVerbatim (
"noise") <<
"[DTNoiseTest]: End of LS transition, performing the DQM client operation";
73 nLumiSegs = lumiSeg.id().luminosityBlock();
84 float tTrig, tTrigRMS, kFactor;
88 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->chambers().begin();
89 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->chambers().end();
91 for (; ch_it != ch_end; ++ch_it) {
93 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
94 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
98 TH2F * noiseHisto = noiseME->
getTH2F();
101 double nevents = (int) noiseHisto->GetEntries();
103 double normalization =0;
107 float noiseStatistics=0;
108 int newNoiseChannels=0;
110 for(; sl_it != sl_end; ++sl_it) {
115 if (tTrig==0) tTrig=1;
116 const double ns_s = 1e9*(32/25);
117 normalization = ns_s/float(tTrig*nevents);
119 noiseHisto->Scale(normalization);
132 for (
int binX=1; binX <= noiseHisto->GetNbinsX(); binX++) {
139 average += noiseHisto->GetBinContent(binX,binY);
145 if (nOfChannels) noiseStatistics = average/nOfChannels;
146 histoTag =
"NoiseAverage";
154 bool isNoisy =
false;
155 bool isFEMasked =
false;
156 bool isTDCMasked =
false;
157 bool isTrigMask =
false;
160 statusMap->cellStatus((*nb_it), isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
162 if (!isNoisy) newNoiseChannels++;
165 histoTag =
"NewNoisyChannels";
169 histos[histoTag].find((*ch_it)->id().rawId())->
second->setBinContent(slID.
superLayer(), newNoiseChannels);
173 vector<const DTSuperLayer*>::const_iterator sl2_it = (*ch_it)->superLayers().begin();
174 vector<const DTSuperLayer*>::const_iterator sl2_end = (*ch_it)->superLayers().end();
175 for(; sl2_it != sl2_end; ++sl2_it) {
176 vector<const DTLayer*>::const_iterator l_it = (*sl2_it)->layers().begin();
177 vector<const DTLayer*>::const_iterator l_end = (*sl2_it)->layers().end();
178 for(; l_it != l_end; ++l_it) {
183 if (noisePerEventME) {
184 TH2F * noiseHistoPerEvent = noisePerEventME->
getTH2F();
185 int nWires =
muonGeom->layer(lID)->specificTopology().channels();
186 double MeanNumerator=0, MeanDenominator=0;
187 histoTag =
"MeanDigiPerEvent";
188 for (
int w=1;
w<=nWires;
w++){
189 for(
int numDigi=1; numDigi<=10; numDigi++){
190 MeanNumerator+=(noiseHistoPerEvent->GetBinContent(
w,numDigi)*(numDigi-1));
191 MeanDenominator+=noiseHistoPerEvent->GetBinContent(
w,numDigi);
193 double Mean=MeanNumerator/MeanDenominator;
195 histos[histoTag].find((*l_it)->id().rawId())->
second->setBinContent(
w, Mean);
203 histoTag =
"MeanDigiPerEvent";
205 for(map<uint32_t, MonitorElement*>::const_iterator hMean =
histos[histoTag].
begin();
206 hMean !=
histos[histoTag].end();
208 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
210 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
211 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
212 channel != badChannels.end(); channel++) {
213 LogVerbatim (
"tTrigCalibration")<<
"LayerId : "<<(*hMean).first<<
" Bad mean channels: "
214 <<(*channel).getBin()<<
" Contents : "<<(*channel).getContents();
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch, std::string folder, std::string histoTag)
book the new ME
T getUntrackedParameter(std::string const &, T const &) const
edm::ESHandle< DTGeometry > muonGeom
std::vector< DTWireId > theNoisyChannels
MonitorElement * get(const std::string &path)
edm::ESHandle< DTTtrig > tTrigMap
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
U second(std::pair< T, U > const &p)
int superLayer() const
Return the superlayer number.
const std::vector< DQMChannel > & getBadChannels(void) const
edm::ParameterSet parameters
void setCurrentFolder(const std::string &fullpath)
std::string getMEName(const DTChamberId &ch)
Get the ME name.
std::map< std::string, std::map< uint32_t, MonitorElement * > > histos
TH2F * getTH2F(void) const