DQM Client Diagnostic.
110 edm::LogVerbatim (
"noise") <<
"[DTNoiseTest]: End of LS transition, performing the DQM client operation";
113 nLumiSegs = lumiSeg.id().luminosityBlock();
124 float tTrig, tTrigRMS, kFactor;
128 vector<DTChamber*>::const_iterator ch_it =
muonGeom->chambers().begin();
129 vector<DTChamber*>::const_iterator ch_end =
muonGeom->chambers().end();
131 for (; ch_it != ch_end; ++ch_it) {
133 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
134 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
138 TH2F * noiseHisto = noiseME->
getTH2F();
141 double nevents = (int) noiseHisto->GetEntries();
143 double normalization =0;
147 float noiseStatistics=0;
148 int newNoiseChannels=0;
150 for(; sl_it != sl_end; ++sl_it) {
155 if (tTrig==0) tTrig=1;
156 const double ns_s = 1e9*(32/25);
157 normalization = ns_s/float(tTrig*nevents);
159 noiseHisto->Scale(normalization);
172 for (
int binX=1; binX <= noiseHisto->GetNbinsX(); binX++) {
179 average += noiseHisto->GetBinContent(binX,binY);
185 if (nOfChannels) noiseStatistics = average/nOfChannels;
186 histoTag =
"NoiseAverage";
194 bool isNoisy =
false;
195 bool isFEMasked =
false;
196 bool isTDCMasked =
false;
197 bool isTrigMask =
false;
200 statusMap->cellStatus((*nb_it), isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
202 if (!isNoisy) newNoiseChannels++;
205 histoTag =
"NewNoisyChannels";
206 if (
histos[histoTag].
find((*ch_it)->id().rawId()) ==
histos[histoTag].
end())
bookHistos((*ch_it)->id(),string(
"NewNoisyChannels"), histoTag );
207 histos[histoTag].find((*ch_it)->id().rawId())->
second->setBinContent(slID.
superLayer(), newNoiseChannels);
211 vector<const DTSuperLayer*>::const_iterator sl2_it = (*ch_it)->superLayers().begin();
212 vector<const DTSuperLayer*>::const_iterator sl2_end = (*ch_it)->superLayers().end();
213 for(; sl2_it != sl2_end; ++sl2_it) {
214 vector<const DTLayer*>::const_iterator l_it = (*sl2_it)->layers().begin();
215 vector<const DTLayer*>::const_iterator l_end = (*sl2_it)->layers().end();
216 for(; l_it != l_end; ++l_it) {
221 if (noisePerEventME) {
222 TH2F * noiseHistoPerEvent = noisePerEventME->
getTH2F();
223 int nWires =
muonGeom->layer(lID)->specificTopology().channels();
224 double MeanNumerator=0, MeanDenominator=0;
225 histoTag =
"MeanDigiPerEvent";
226 for (
int w=1;
w<=nWires;
w++){
227 for(
int numDigi=1; numDigi<=10; numDigi++){
228 MeanNumerator+=(noiseHistoPerEvent->GetBinContent(
w,numDigi)*(numDigi-1));
229 MeanDenominator+=noiseHistoPerEvent->GetBinContent(
w,numDigi);
231 double Mean=MeanNumerator/MeanDenominator;
232 if (
histos[histoTag].
find((*l_it)->id().rawId()) ==
histos[histoTag].
end())
bookHistos((*l_it)->id(),nWires, string(
"MeanDigiPerEvent"), histoTag );
233 histos[histoTag].find((*l_it)->id().rawId())->
second->setBinContent(
w, Mean);
241 histoTag =
"MeanDigiPerEvent";
243 for(map<uint32_t, MonitorElement*>::const_iterator hMean =
histos[histoTag].
begin();
244 hMean !=
histos[histoTag].end();
246 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
248 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
249 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
250 channel != badChannels.end(); channel++) {
251 LogVerbatim (
"tTrigCalibration")<<
"LayerId : "<<(*hMean).first<<
" Bad mean channels: "<<(*channel).getBin()<<
" Contents : "<<(*channel).getContents();
T getUntrackedParameter(std::string const &, T const &) const
edm::ESHandle< DTGeometry > muonGeom
std::vector< DTWireId > theNoisyChannels
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.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
const std::vector< DQMChannel > & getBadChannels(void) const
edm::ParameterSet parameters
void bookHistos(const DTChamberId &ch, std::string folder, std::string histoTag)
book the new ME
std::string getMEName(const DTChamberId &ch)
Get the ME name.
std::map< std::string, std::map< uint32_t, MonitorElement * > > histos
TH2F * getTH2F(void) const