38 prescaleFactor =
parameters.getUntrackedParameter<
int>(
"diagnosticPrescale", 1);
40 GaussianCriterionName =
parameters.getUntrackedParameter<
string>(
"resDistributionTestName",
"ResidualsDistributionGaussianTest");
41 SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
42 MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
51 string histName, MeanHistoName, SigmaHistoName, MeanHistoTitle, SigmaHistoTitle;
53 type.push_back(
"eta");
54 type.push_back(
"theta");
55 type.push_back(
"phi");
58 for(
unsigned int c=0;
c<type.size();
c++){
60 MeanHistoName =
"MeanTest_" + type[
c];
61 SigmaHistoName =
"SigmaTest_" + type[
c];
63 MeanHistoTitle =
"Mean of the #" + type[
c] +
" residuals distribution";
64 SigmaHistoTitle =
"Sigma of the #" + type[
c] +
" residuals distribution";
66 histName =
"Res_GlbSta_"+type[
c];
67 histoNames[type[
c]].push_back(histName);
68 histName =
"Res_TkGlb_"+type[
c];
69 histoNames[type[
c]].push_back(histName);
70 histName =
"Res_TkSta_"+type[
c];
71 histoNames[type[
c]].push_back(histName);
74 MeanHistos[type[
c]] = ibooker.
book1D(MeanHistoName.c_str(),MeanHistoTitle.c_str(),3,0.5,3.5);
75 (MeanHistos[type[
c]])->setBinLabel(1,
"Res_StaGlb",1);
76 (MeanHistos[type[
c]])->setBinLabel(2,
"Res_TkGlb",1);
77 (MeanHistos[type[
c]])->setBinLabel(3,
"Res_TkSta",1);
80 SigmaHistos[type[
c]] = ibooker.
book1D(SigmaHistoName.c_str(),SigmaHistoTitle.c_str(),3,0.5,3.5);
81 (SigmaHistos[type[
c]])->setBinLabel(1,
"Res_StaGlb",1);
82 (SigmaHistos[type[
c]])->setBinLabel(2,
"Res_TkGlb",1);
83 (SigmaHistos[type[
c]])->setBinLabel(3,
"Res_TkSta",1);
90 for(
map<
string, vector<string> > ::const_iterator
histo = histoNames.begin();
91 histo != histoNames.end();
94 for (
unsigned int type=0; type< (*histo).second.size(); type++){
96 string path =
"Muons/MuonRecoAnalyzer/" + (*histo).second[
type];
102 int BinNumber = type+1;
103 float mean = (*res_histo).getMean(1);
104 float sigma = (*res_histo).getRMS(1);
105 MeanHistos.find((*histo).first)->second->setBinContent(BinNumber, mean);
106 SigmaHistos.find((*histo).first)->second->setBinContent(BinNumber, sigma);
113 for(map<string, MonitorElement*>::const_iterator hMean = MeanHistos.begin();
114 hMean != MeanHistos.end();
116 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
118 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
119 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
120 channel != badChannels.end(); channel++) {
126 for(map<string, MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
127 hSigma != SigmaHistos.end();
129 const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
130 if(theSigmaQReport) {
131 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
132 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
133 channel != badChannels.end(); channel++) {
MonitorElement * get(const std::string &path)
MuonTrackResidualsTest(const edm::ParameterSet &ps)
Constructor.
MonitorElement * book1D(Args &&...args)
const std::vector< DQMChannel > & getBadChannels(void) const
void setCurrentFolder(const std::string &fullpath)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override