79 if(
verbose_)
std::cout <<
">>> EndRun (PhotonDataCertification) <<<" << std::endl;
81 std::vector<string> histoNameVector;
95 MonitorElement* CertificationSummaryMap =
dbe_->
book2D(
"CertificationSummaryMap",
"CertificationSummaryMap",2,0,2,2,0,2);
97 TH2 * reportSummaryMapTH2 = reportSummaryMap->
getTH2F();
99 reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Eta");
100 reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Phi");
101 reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"SpikeTest");
102 reportSummaryMapTH2->GetYaxis()->SetBinLabel(2,
"HoleTest");
104 TH2 * CertificationSummaryMapTH2 = CertificationSummaryMap->
getTH2F();
106 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,
"Eta");
107 CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,
"Phi");
108 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,
"SpikeTest");
109 CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(2,
"HoleTest");
114 histoNameVector.push_back(
"nPhoAllEcal");
115 histoNameVector.push_back(
"r9AllEcal");
116 histoNameVector.push_back(
"phoEta");
117 histoNameVector.push_back(
"phoPhi");
133 for(std::vector<string>::iterator it=histoNameVector.begin();it!=histoNameVector.end();++it){
140 if(HistoName.find(
"Efficiency")!=std::string::npos){
141 TestHist =
dbe_->
get(
"Egamma/PhotonAnalyzer/Efficiencies/"+HistoName);
144 TestHist =
dbe_->
get(
"Egamma/PhotonAnalyzer/GoodCandidatePhotons/Et above 0 GeV/"+HistoName);
146 bool validMe = TestHist!=0;
148 if(!validMe)
continue;
155 std::vector<QReport *> myQReports = TestHist->
getQReports();
156 if(
verbose_)
cout << TestHist->
getName() <<
": myQReports.size() = " << myQReports.size() <<
"\n\n";
157 for(uint
i=0;
i!=myQReports.size();++
i) {
159 std::string qtname = myQReports[
i]->getQRName() ;
160 float qtresult = myQReports[
i]->getQTresult();
161 int qtstatus = myQReports[
i]->getStatus() ;
171 Float->
Fill(qtresult);
180 float etaSpikeTestResult=0;
181 float phiSpikeTestResult=0;
182 float etaHoleTestResult=0;
183 float phiHoleTestResult=0;
185 if(
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoEta_SpikeTest")!=0)
186 etaSpikeTestResult =
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoEta_SpikeTest")->
getFloatValue();
187 else etaSpikeTestResult = -1;
189 if(
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoPhi_SpikeTest")!=0)
190 phiSpikeTestResult =
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoPhi_SpikeTest")->
getFloatValue();
191 else phiSpikeTestResult = -1;
193 if(
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoEta_HoleTest")!=0)
194 etaHoleTestResult =
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoEta_HoleTest")->
getFloatValue();
195 else etaHoleTestResult = -1;
197 if(
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoPhi_HoleTest")!=0)
198 phiHoleTestResult =
dbe_->
get(
"Egamma/EventInfo/reportSummaryContents/phoPhi_HoleTest")->
getFloatValue();
199 else phiHoleTestResult = -1;
203 if(
verbose_)
std::cout <<
">>> Results of tests to be put into Summary Maps <<<\n\n";
204 if(
verbose_)
std::cout <<
"\tetaSpikeTestResult= " << etaSpikeTestResult <<
"\n";
205 if(
verbose_)
std::cout <<
"\tphiSpikeTestResult= " << phiSpikeTestResult <<
"\n";
207 if(
verbose_)
std::cout <<
"\tphiHoleTestResult= " << phiHoleTestResult <<
"\n\n";
211 float reportSummaryFloat = (etaSpikeTestResult+etaHoleTestResult+phiSpikeTestResult+phiHoleTestResult)/4.;
212 if(reportSummaryFloat<0) reportSummaryFloat = -1;
213 reportSummary->
Fill(reportSummaryFloat);
214 CertificationSummary->
Fill(reportSummaryFloat);
216 reportSummaryMap->
Fill(0,0,etaSpikeTestResult);
217 reportSummaryMap->
Fill(0,1,etaHoleTestResult);
218 reportSummaryMap->
Fill(1,0,phiSpikeTestResult);
219 reportSummaryMap->
Fill(1,1,phiHoleTestResult);
221 CertificationSummaryMap->
Fill(0,0,etaSpikeTestResult);
222 CertificationSummaryMap->
Fill(0,1,etaHoleTestResult);
223 CertificationSummaryMap->
Fill(1,0,phiSpikeTestResult);
224 CertificationSummaryMap->
Fill(1,1,phiHoleTestResult);
const std::string & getName(void) const
get name of ME
MonitorElement * bookFloat(const char *name)
Book float.
double getFloatValue(void) const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< QReport * > getQReports(void) const
get map of QReports
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)