85 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
96 (*histo).second->Reset();
101 (*histo).second->Reset();
107 (*histo).second->Reset();
112 for (
int i = -2;
i < 3;
i++) {
113 for (
int j = 1;
j < 15;
j++) {
119 for (
int i = -2;
i < 3;
i++) {
120 for (
int j = 1;
j < 15;
j++) {
127 for (
int i = -2;
i < 3;
i++) {
128 for (
int j = 1;
j < 15;
j++) {
135 for (
int wh = -2; wh <= 3; wh++) {
161 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
162 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
164 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: Residual Distribution tests results";
166 for (; ch_it != ch_end; ++ch_it) {
180 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
181 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
183 for (; sl_it != sl_end; ++sl_it) {
186 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: Superlayer: " << slID;
194 stringstream superLayer;
198 string supLayer =
"W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" +
sector.str() +
"_SL" + superLayer.str();
203 string GaussianCriterionName =
206 if (GaussianReport) {
214 float mean = (*res_histo).getMean(1);
215 float sigma = (*res_histo).getRMS(1);
224 TH2F* res_histo_2D_root = res_histo_2D->
getTH2F();
228 TProfile* prof = res_histo_2D_root->ProfileX();
229 prof->GetXaxis()->SetRangeUser(0, 2);
232 TF1 fitting(
"mypol1",
"pol1");
234 prof->Fit(&fitting,
"Q0");
236 edm::LogError(
"resolution") <<
"[DTResolutionTest]: Exception when fitting..." 237 <<
"SuperLayer : " << slID <<
"\n" 240 <<
"Filling slope histogram with standard value -99. for bin " << BinNumber;
244 double slope = fitting.GetParameter(1);
255 const QReport* theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
257 wheel << (*hMean).first.first;
259 sector << (*hMean).first.second;
261 if (theMeanQReport) {
262 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
263 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
267 <<
" sl: " <<
slFromBin((*channel).getBin())
268 <<
" mean (cm): " << (*channel).getContents();
276 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second) - 1, (*channel).getBin() - 1, 1);
278 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second) - 1, (*channel).getBin() - 1, 2);
282 cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]++;
283 if (((*hMean).first.second < 13 &&
284 double(
cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]) / 11 >
286 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] ==
false) ||
287 ((*hMean).first.first >= 13 &&
288 double(
cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]) / 2 >
290 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] ==
false)) {
291 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] =
true;
292 wheelMeanHistos[3]->Fill(((*hMean).first.second) - 1, (*hMean).first.first);
304 const QReport* theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
306 wheel << (*hSigma).first.first;
308 sector << (*hSigma).first.second;
309 if (theSigmaQReport) {
310 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
311 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
315 <<
" sl: " <<
slFromBin((*channel).getBin())
316 <<
" sigma (cm): " << (*channel).getContents();
321 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second) - 1, (*channel).getBin() - 1);
324 cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]++;
325 if (((*hSigma).first.second < 13 &&
326 double(
cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]) / 11 >
328 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] ==
false) ||
329 ((*hSigma).first.first >= 13 &&
330 double(
cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]) / 2 >
332 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] ==
false)) {
333 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] =
true;
334 wheelSigmaHistos[3]->Fill((*hSigma).first.second - 1, (*hSigma).first.first);
346 const QReport* theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
348 wheel << (*hSlope).first.first;
350 sector << (*hSlope).first.second;
351 if (theSlopeQReport) {
352 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
353 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
357 <<
" sl: " <<
slFromBin((*channel).getBin())
358 <<
" slope: " << (*channel).getContents();
363 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second) - 1, (*channel).getBin() - 1);
366 cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]++;
367 if (((*hSlope).first.second < 13 &&
368 double(
cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]) / 11 >
370 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] ==
false) ||
371 ((*hSlope).first.first >= 13 &&
372 double(
cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]) / 2 >
374 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] ==
false)) {
375 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] =
true;
376 wheelSlopeHistos[3]->Fill((*hSlope).first.second - 1, (*hSlope).first.first);
402 stringstream superLayer;
413 "/Sector" +
sector.str() +
"/";
419 "_SL" + superLayer.str();
431 stringstream superLayer;
442 "/Sector" +
sector.str() +
"/";
448 "_SL" + superLayer.str();
471 ibooker.
book1D(MeanHistoName.c_str(), MeanHistoName.c_str(), 11, 0, 11);
487 ibooker.
book1D(SigmaHistoName.c_str(), SigmaHistoName.c_str(), 11, 0, 11);
504 ibooker.
book1D(SlopeHistoName.c_str(), SlopeHistoName.c_str(), 11, 0, 11);
525 ibooker.
book1D(MeanHistoNameSetRange.c_str(), MeanHistoNameSetRange.c_str(), 11, 0.5, 11.5);
527 wheel.str() +
"_Sec" +
sector.str() +
"_SetRange" +
"_2D";
529 MeanHistoNameSetRange2D.c_str(), MeanHistoNameSetRange2D.c_str(), 11, 0.5, 11.5, 100, -0.05, 0.05);
537 ibooker.
book1D(SigmaHistoNameSetRange.c_str(), SigmaHistoNameSetRange.c_str(), 11, 0.5, 11.5);
539 wheel.str() +
"_Sec" +
sector.str() +
"_SetRange" +
"_2D";
542 ibooker.
book2D(SigmaHistoNameSetRange2D.c_str(), SigmaHistoNameSetRange2D.c_str(), 11, 0.5, 11.5, 500, 0, 0.5);
550 ibooker.
book1D(SlopeHistoNameSetRange.c_str(), SlopeHistoNameSetRange.c_str(), 11, 0.5, 11.5);
552 wheel.str() +
"_Sec" +
sector.str() +
"_SetRange" +
"_2D";
555 SlopeHistoNameSetRange2D.c_str(), SlopeHistoNameSetRange2D.c_str(), 11, 0.5, 11.5, 200, -0.1, 0.1);
755 if (
ret == 0 ||
bin == 11)
Log< level::Info, true > LogVerbatim
DTResolutionTest(const edm::ParameterSet &ps)
Constructor.
int station() const
Return the station number.
~DTResolutionTest() override
Destructor.
std::map< std::pair< int, int >, int > cmsMeanHistos
std::map< std::string, MonitorElement * > MeanHistosSetRange
LuminosityBlockNumber_t luminosityBlock() const
edm::ParameterSet parameters
int superLayer() const
Return the superlayer number.
virtual void setCurrentFolder(std::string const &fullpath)
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
ret
prodAgent to be discontinued
static const double slope[3]
const std::vector< DQMChannel > & getBadChannels() const
std::map< std::pair< int, int >, MonitorElement * > MeanHistos
std::map< std::pair< int, int >, MonitorElement * > SlopeHistos
Log< level::Error, false > LogError
std::map< std::pair< int, int >, bool > MeanFilled
std::map< std::string, MonitorElement * > SigmaHistosSetRange2D
std::string getMEName(const DTSuperLayerId &slID)
Get the ME name.
std::map< std::pair< int, int >, int > cmsSigmaHistos
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::pair< int, int >, MonitorElement * > SigmaHistos
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
std::map< std::string, MonitorElement * > MeanHistosSetRange2D
virtual TH2F * getTH2F() const
int slFromBin(int bin) const
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
int stationFromBin(int bin) const
std::map< std::string, MonitorElement * > SlopeHistosSetRange2D
Abs< T >::type abs(const T &t)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::map< std::pair< int, int >, int > cmsSlopeHistos
int superlayer() const
Return the superlayer number (deprecated method name)
LuminosityBlockID id() const
std::map< std::string, MonitorElement * > SigmaHistosSetRange
std::string getMEName2D(const DTSuperLayerId &slID)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::map< int, MonitorElement * > wheelMeanHistos
std::map< int, MonitorElement * > wheelSigmaHistos
virtual MonitorElement * get(std::string const &fullpath) const
std::map< std::pair< int, int >, bool > SigmaFilled
int wheel() const
Return the wheel number.
const DTGeometry * muonGeom
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
static char chambers[264][20]
std::map< std::string, MonitorElement * > SlopeHistosSetRange
std::map< int, MonitorElement * > wheelSlopeHistos
std::map< std::pair< int, int >, bool > SlopeFilled