CMS 3D CMS Logo

PhotonOfflineClient.cc
Go to the documentation of this file.
1 #include <iostream>
2 //
3 
5 
6 
7 //#define TWOPI 6.283185308
8 //
9 
22 using namespace std;
23 using std::cout;
24 
26 {
27 
28  //dbe_ = 0;
29  //dbe_ = edm::Service<DQMStore>().operator->();
30  // dbe_->setVerbose(0);
31  parameters_ = pset;
32 
33  analyzerName_ = pset.getParameter<string>("analyzerName");
34  cutStep_ = pset.getParameter<double>("cutStep");
35  numberOfSteps_ = pset.getParameter<int>("numberOfSteps");
36 
37  etMin = pset.getParameter<double>("etMin");
38  etMax = pset.getParameter<double>("etMax");
39  etBin = pset.getParameter<int>("etBin");
40  etaMin = pset.getParameter<double>("etaMin");
41  etaMax = pset.getParameter<double>("etaMax");
42  etaBin = pset.getParameter<int>("etaBin");
43  phiMin = pset.getParameter<double>("phiMin");
44  phiMax = pset.getParameter<double>("phiMax");
45  phiBin = pset.getParameter<int>("phiBin");
46 
47  standAlone_ = pset.getParameter<bool>("standAlone");
48  batch_ = pset.getParameter<bool>("batch");
49  excludeBkgHistos_ = pset.getParameter<bool>("excludeBkgHistos");
50 
51  outputFileName_ = pset.getParameter<string>("OutputFileName");
52  inputFileName_ = pset.getUntrackedParameter<string>("InputFileName");
53 
54  histo_index_photons_ = 0;
55  histo_index_conversions_ = 0;
56  histo_index_efficiency_ = 0;
57  histo_index_invMass_ = 0;
58 
59  types_.push_back("All");
60  types_.push_back("GoodCandidate");
61  if (!excludeBkgHistos_) types_.push_back("Background");
62 
63  parts_.push_back("AllEcal");
64  parts_.push_back("Barrel");
65  parts_.push_back("Endcaps");
66 
67 }
68 
70 {}
71 //void PhotonOfflineClient::beginJob(){}
72 //void PhotonOfflineClient::analyze(const edm::Event& e, const edm::EventSetup& esup){}
73 
75 {
76  if(!standAlone_) runClient(iBooker, iGetter);
77 }
78 //void PhotonOfflineClient::endRun(const edm::Run& run, const edm::EventSetup& setup){ if(!standAlone_) runClient();}
79 
81 {
82  // if(!dbe_) return;
83 
84  //if(batch_) dbe_->open(inputFileName_);
85 
86  //std::cout << " PostProcessing analyzer name " << analyzerName_ << std::endl;
87  if(!iGetter.dirExists("Egamma/"+analyzerName_)){
88  std::cout << "Folder Egamma/"+analyzerName_+" does not exist - Abort the efficiency calculation " << std::endl;
89  return;
90  }
91 
92  //find out how many histograms are in the various folders
93  histo_index_photons_ = iGetter.get("Egamma/"+analyzerName_+"/numberOfHistogramsInPhotonsFolder")->getIntValue();
94  histo_index_conversions_ = iGetter.get("Egamma/"+analyzerName_+"/numberOfHistogramsInConversionsFolder")->getIntValue();
95  histo_index_efficiency_ = iGetter.get("Egamma/"+analyzerName_+"/numberOfHistogramsInEfficiencyFolder")->getIntValue();
96  histo_index_invMass_ = iGetter.get("Egamma/"+analyzerName_+"/numberOfHistogramsInInvMassFolder")->getIntValue();
97 
98  iGetter.setCurrentFolder("Egamma/"+analyzerName_+"/");
99  iGetter.removeElement("numberOfHistogramsInPhotonsFolder");
100  iGetter.removeElement("numberOfHistogramsInConversionsFolder");
101  iGetter.removeElement("numberOfHistogramsInEfficiencyFolder");
102  iGetter.removeElement("numberOfHistogramsInInvMassFolder");
103 
104  string AllPath = "Egamma/"+analyzerName_+"/AllPhotons/";
105  string IsoPath = "Egamma/"+analyzerName_+"/GoodCandidatePhotons/";
106  string NonisoPath = "Egamma/"+analyzerName_+"/BackgroundPhotons/";
107  string EffPath = "Egamma/"+analyzerName_+"/Efficiencies/";
108 
109  //booking efficiency histograms
110  iGetter.setCurrentFolder(EffPath);
111 
112  p_efficiencyVsEtaLoose_ = bookHisto(iBooker,"EfficiencyVsEtaLoose","Fraction of Photons passing Loose Isolation vs #eta;#eta",etaBin,etaMin, etaMax);
113  p_efficiencyVsEtLoose_ = bookHisto(iBooker,"EfficiencyVsEtLoose", "Fraction of Photons passing Loose Isolation vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
114  p_efficiencyVsEtaTight_ = bookHisto(iBooker,"EfficiencyVsEtaTight","Fraction of Photons passing Tight Isolation vs #eta;#eta",etaBin,etaMin, etaMax);
115  p_efficiencyVsEtTight_ = bookHisto(iBooker,"EfficiencyVsEtTight", "Fraction of Photons passing Tight Isolation vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
116 
117  p_efficiencyVsEtaHLT_ = bookHisto(iBooker,"EfficiencyVsEtaHLT","Fraction of Photons firing HLT vs #eta;#eta",etaBin,etaMin, etaMax);
118  p_efficiencyVsEtHLT_ = bookHisto(iBooker,"EfficiencyVsEtHLT", "Fraction of Photons firing HLT vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
119 
120  p_convFractionVsEtaLoose_ = bookHisto(iBooker,"ConvFractionVsEtaLoose","Fraction of Loosely Isolated Photons which are matched to two tracks vs #eta;#eta",etaBin,etaMin, etaMax);
121  p_convFractionVsEtLoose_ = bookHisto(iBooker,"ConvFractionVsEtLoose", "Fraction of Loosely Isolated Photons which are matched to two tracks vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
122  p_convFractionVsEtaTight_ = bookHisto(iBooker,"ConvFractionVsEtaTight","Fraction of Tightly Isolated Photons which are matched to two tracks vs #eta;#eta",etaBin,etaMin, etaMax);
123  p_convFractionVsEtTight_ = bookHisto(iBooker,"ConvFractionVsEtTight", "Fraction of Tightly Isolated Photons which are matched to two tracks vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
124 
125  p_vertexReconstructionEfficiencyVsEta_ = bookHisto(iBooker,"VertexReconstructionEfficiencyVsEta","Fraction of Converted Photons which have a valid vertex vs #eta;#eta",etaBin,etaMin, etaMax);
126 
127  //booking conversion fraction histograms
128  iGetter.setCurrentFolder(AllPath+"Et above 20 GeV/Conversions");
129  book2DHistoVector(iBooker, p_convFractionVsEt_, "1D","convFractionVsEt", "Fraction of Converted Photons vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
130  book3DHistoVector(iBooker, p_convFractionVsPhi_,"1D","convFractionVsPhi","Fraction of Converted Photons vs #phi;#phi",phiBin,phiMin,phiMax);
131  book2DHistoVector(iBooker, p_convFractionVsEta_, "1D","convFractionVsEta","Fraction of Converted Photons vs #eta;#eta",etaBin,etaMin,etaMax);
132 
133  //booking bad channel fraction histograms
134  iGetter.setCurrentFolder(AllPath+"Et above 20 GeV/");
135  book2DHistoVector(iBooker, p_badChannelsFractionVsPhi_, "1D","badChannelsFractionVsPhi","Fraction of Photons which have at least one bad channel vs #phi;#phi",phiBin,phiMin,phiMax);
136  book2DHistoVector(iBooker, p_badChannelsFractionVsEta_, "1D","badChannelsFractionVsEta","Fraction of Photons which have at least one bad channel vs #eta;#eta",etaBin,etaMin, etaMax);
137  book2DHistoVector(iBooker, p_badChannelsFractionVsEt_, "1D","badChannelsFractionVsEt", "Fraction of Photons which have at least one bad channel vs E_{T};E_{T} (GeV)",etBin,etMin,etMax);
138 
139  //making efficiency plots
140  MonitorElement * dividend;
143 
144  currentFolder_.str("");
145  currentFolder_ << AllPath << "Et above 20 GeV/";
146 
147  //HLT efficiency plots
148  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtaHLT");
149  numerator = retrieveHisto(iGetter,EffPath,"phoEtaPostHLT");
150  denominator = retrieveHisto(iGetter,EffPath,"phoEtaPreHLT");
151  dividePlots(dividend,numerator,denominator);
152 
153  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtHLT");
154  numerator = retrieveHisto(iGetter,EffPath,"phoEtPostHLT");
155  denominator = retrieveHisto(iGetter,EffPath,"phoEtPreHLT");
156  dividePlots(dividend,numerator,denominator);
157 
158  //efficiencies vs Eta
159  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEta");
160 
161  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtaLoose");
162  numerator = retrieveHisto(iGetter,EffPath,"phoEtaLoose");
163  dividePlots(dividend,numerator,denominator);
164 
165  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtaTight");
166  numerator = retrieveHisto(iGetter,EffPath,"phoEtaTight");
167  dividePlots(dividend,numerator,denominator);
168 
169  //efficiencies vs Et
170  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEtAllEcal");
171 
172  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtLoose");
173  numerator = retrieveHisto(iGetter,EffPath,"phoEtLoose");
174  dividePlots(dividend,numerator,denominator);
175 
176  dividend = retrieveHisto(iGetter,EffPath,"EfficiencyVsEtTight");
177  numerator = retrieveHisto(iGetter,EffPath,"phoEtTight");
178  dividePlots(dividend,numerator,denominator);
179 
180  //conversion fractions vs Eta
181  dividend = retrieveHisto(iGetter,EffPath,"ConvFractionVsEtaLoose");
182  numerator = retrieveHisto(iGetter,EffPath,"convEtaLoose");
183  denominator = retrieveHisto(iGetter,EffPath,"phoEtaLoose");
184  dividePlots(dividend,numerator,denominator);
185 
186  dividend = retrieveHisto(iGetter,EffPath,"ConvFractionVsEtaTight");
187  numerator = retrieveHisto(iGetter,EffPath,"convEtaTight");
188  denominator = retrieveHisto(iGetter,EffPath,"phoEtaTight");
189  dividePlots(dividend,numerator,denominator);
190 
191  //conversion fractions vs Et
192  dividend = retrieveHisto(iGetter,EffPath,"ConvFractionVsEtLoose");
193  numerator = retrieveHisto(iGetter,EffPath,"convEtLoose");
194  denominator = retrieveHisto(iGetter,EffPath,"phoEtLoose");
195  dividePlots(dividend,numerator,denominator);
196 
197  dividend = retrieveHisto(iGetter,EffPath,"ConvFractionVsEtTight");
198  numerator = retrieveHisto(iGetter,EffPath,"convEtTight");
199  denominator = retrieveHisto(iGetter,EffPath,"phoEtTight");
200  dividePlots(dividend,numerator,denominator);
201 
202  //conversion vertex recontruction efficiency
203  dividend = retrieveHisto(iGetter,EffPath,"VertexReconstructionEfficiencyVsEta");
204  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvEta");
205  denominator = retrieveHisto(iGetter,EffPath,"phoEtaVertex");
206  dividePlots(dividend,numerator,denominator);
207 
208  iGetter.setCurrentFolder(EffPath);
209 
210  iGetter.removeElement("phoEtaPreHLT");
211  iGetter.removeElement("phoEtPreHLT");
212  iGetter.removeElement("phoEtaPostHLT");
213  iGetter.removeElement("phoEtPostHLT");
214  iGetter.removeElement("phoEtaLoose");
215  iGetter.removeElement("phoEtaTight");
216  iGetter.removeElement("phoEtLoose");
217  iGetter.removeElement("phoEtTight");
218  iGetter.removeElement("phoEtaVertex");
219  iGetter.removeElement("convEtaLoose");
220  iGetter.removeElement("convEtaTight");
221  iGetter.removeElement("convEtLoose");
222  iGetter.removeElement("convEtTight");
223 
224  for(uint type=0;type!=types_.size();++type){
225 
226  for (int cut = 0; cut !=numberOfSteps_; ++cut) {
227 
228  currentFolder_.str("");
229  currentFolder_ << "Egamma/"+analyzerName_+"/" << types_[type] << "Photons/Et above " << (cut+1)*cutStep_ << " GeV/";
230 
231  //making bad channel histograms
232 
233  //vs Et
234  dividend = retrieveHisto(iGetter,currentFolder_.str(),"badChannelsFractionVsEt");
235  numerator = retrieveHisto(iGetter,currentFolder_.str(),"phoEtBadChannels");
236  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEtAllEcal");
237  dividePlots(dividend,numerator,denominator);
238 
239  //vs eta
240  dividend = retrieveHisto(iGetter,currentFolder_.str(),"badChannelsFractionVsEta");
241  numerator = retrieveHisto(iGetter,currentFolder_.str(),"phoEtaBadChannels");
242  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEta");
243  dividePlots(dividend,numerator,denominator);
244 
245  //vs phi
246  dividend = retrieveHisto(iGetter,currentFolder_.str(),"badChannelsFractionVsPhi");
247  numerator = retrieveHisto(iGetter,currentFolder_.str(),"phoPhiBadChannels");
248  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoPhiAllEcal");
249  dividePlots(dividend,numerator,denominator);
250 
251  //making conversion fraction histograms
252 
253  //vs Et
254  dividend = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","convFractionVsEt");
255  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvEtAllEcal");
256  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEtAllEcal");
257  dividePlots(dividend,numerator,denominator);
258 
259  //vs eta
260  dividend = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","convFractionVsEta");
261  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvEtaForEfficiency");
262  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoEta");
263  dividePlots(dividend,numerator,denominator);
264 
265  //vs phi
266  dividend = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","convFractionVsPhiAllEcal");
267  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvPhiForEfficiencyAllEcal");
268  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoPhiAllEcal");
269  dividePlots(dividend,numerator,denominator);
270  dividend = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","convFractionVsPhiBarrel");
271  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvPhiForEfficiencyBarrel");
272  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoPhiBarrel");
273  dividePlots(dividend,numerator,denominator);
274  dividend = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","convFractionVsPhiEndcaps");
275  numerator = retrieveHisto(iGetter,currentFolder_.str()+"Conversions/","phoConvPhiForEfficiencyEndcaps");
276  denominator = retrieveHisto(iGetter,currentFolder_.str(),"phoPhiEndcaps");
277  dividePlots(dividend,numerator,denominator);
278 
279 
280  iGetter.setCurrentFolder(currentFolder_.str()+"Conversions/");
281  iGetter.removeElement("phoConvEtaForEfficiency");
282  iGetter.removeElement("phoConvPhiForEfficiencyAllEcal");
283  iGetter.removeElement("phoConvPhiForEfficiencyBarrel");
284  iGetter.removeElement("phoConvPhiForEfficiencyEndcaps");
285  }
286  }
287 
288  // if(standAlone_) dbe_->save(outputFileName_);
289  //else if(batch_) dbe_->save(inputFileName_);
290 
291 }
292 
294  double value,err;
295 
296  dividend->setEfficiencyFlag();
297  if(denominator->getEntries()==0) return;
298 
299  for (int j=1; j<=numerator->getNbinsX(); j++){
300  if (denominator->getBinContent(j)!=0){
301  value = ((double) numerator->getBinContent(j))/((double) denominator->getBinContent(j));
302  err = sqrt( value*(1-value) / ((double) denominator->getBinContent(j)) );
303  dividend->setBinContent(j, value);
304  dividend->setBinError(j,err);
305  }
306  else {
307  dividend->setBinContent(j, 0);
308  dividend->setBinError(j,0);
309  }
310  dividend->setEntries(numerator->getEntries());
311  }
312 }
313 
314 
316  double value,err;
317 
318  dividend->setEfficiencyFlag();
319  for (int j=1; j<=numerator->getNbinsX(); j++){
320  if (denominator!=0){
321  value = ((double) numerator->getBinContent(j))/denominator;
322  err = sqrt( value*(1-value) / denominator);
323  dividend->setBinContent(j, value);
324  dividend->setBinError(j,err);
325  }
326  else {
327  dividend->setBinContent(j, 0);
328  }
329  }
330 
331 }
332 
333 MonitorElement* PhotonOfflineClient::bookHisto(DQMStore::IBooker& iBooker, string histoName, string title, int bin, double min, double max)
334 {
335 
336  int histo_index = 0;
337  stringstream histo_number_stream;
338 
339 
340  //determining which folder we're in
341  if(iBooker.pwd().find( "InvMass" ) != string::npos){
342  histo_index_invMass_++;
343  histo_index = histo_index_invMass_;
344  }
345  if(iBooker.pwd().find( "Efficiencies" ) != string::npos){
346  histo_index_efficiency_++;
347  histo_index = histo_index_efficiency_;
348  }
349  histo_number_stream << "h_";
350  if(histo_index<10) histo_number_stream << "0";
351  histo_number_stream << histo_index;
352 
353  return iBooker.book1D(histo_number_stream.str()+"_"+histoName,title,bin,min,max);
354 
355 }
356 
357 
358 
359 void PhotonOfflineClient::book2DHistoVector(DQMStore::IBooker& iBooker, std::vector<vector<MonitorElement*> >& temp2DVector,
360  std::string histoType, std::string histoName, std::string title,
361  int xbin, double xmin,double xmax,
362  int ybin, double ymin, double ymax)
363 {
364  int histo_index = 0;
365 
366  vector<MonitorElement*> temp1DVector;
367 
368  //determining which folder we're in
369  bool conversionPlot = false;
370  if(iBooker.pwd().find( "Conversions" ) != string::npos) conversionPlot = true;
371 
372 
373  if(conversionPlot){
374  histo_index_conversions_++;
375  histo_index = histo_index_conversions_;
376  }
377  else{
378  histo_index_photons_++;
379  histo_index = histo_index_photons_;
380  }
381 
382 
383  stringstream histo_number_stream;
384  histo_number_stream << "h_";
385  if(histo_index<10) histo_number_stream << "0";
386  histo_number_stream << histo_index << "_";
387 
388 
389  for(int cut = 0; cut != numberOfSteps_; ++cut){ //looping over Et cut values
390 
391  for(uint type=0;type!=types_.size();++type){ //looping over isolation type
392 
393  currentFolder_.str("");
394  currentFolder_ << "Egamma/"+analyzerName_+"/" << types_[type] << "Photons/Et above " << (cut+1)*cutStep_ << " GeV";
395  if(conversionPlot) currentFolder_ << "/Conversions";
396 
397  iBooker.setCurrentFolder(currentFolder_.str());
398 
399  string kind;
400  if(conversionPlot) kind = " Conversions: ";
401  else kind = " Photons: ";
402 
403  if(histoType=="1D") temp1DVector.push_back(iBooker.book1D(histo_number_stream.str()+histoName,types_[type]+kind+title,xbin,xmin,xmax));
404  else if(histoType=="2D") temp1DVector.push_back(iBooker.book2D(histo_number_stream.str()+histoName,types_[type]+kind+title,xbin,xmin,xmax,ybin,ymin,ymax));
405  else if(histoType=="Profile") temp1DVector.push_back(iBooker.bookProfile(histo_number_stream.str()+histoName,types_[type]+kind+title,xbin,xmin,xmax,ybin,ymin,ymax,""));
406  //else cout << "bad histoType\n";
407  }
408 
409  temp2DVector.push_back(temp1DVector);
410  temp1DVector.clear();
411  }
412 
413 
414 
415 }
416 
417 
418 
419 
420 void PhotonOfflineClient::book3DHistoVector(DQMStore::IBooker& iBooker, std::vector<vector<vector<MonitorElement*> > >& temp3DVector,
421  std::string histoType, std::string histoName, std::string title,
422  int xbin, double xmin,double xmax,
423  int ybin, double ymin, double ymax)
424 {
425  int histo_index = 0;
426 
427  vector<MonitorElement*> temp1DVector;
428  vector<vector<MonitorElement*> > temp2DVector;
429 
430  //determining which folder we're in
431  bool conversionPlot = false;
432  if(iBooker.pwd().find( "Conversions" ) != string::npos) conversionPlot = true;
433 
434 
435  if(conversionPlot){
436  histo_index_conversions_++;
437  histo_index = histo_index_conversions_;
438  }
439  else{
440  histo_index_photons_++;
441  histo_index = histo_index_photons_;
442  }
443 
444  stringstream histo_number_stream;
445  histo_number_stream << "h_";
446  if(histo_index<10) histo_number_stream << "0";
447  histo_number_stream << histo_index << "_";
448 
449 
450  for(int cut = 0; cut != numberOfSteps_; ++cut){ //looping over Et cut values
451 
452  for(uint type=0;type!=types_.size();++type){ //looping over isolation type
453 
454  for(uint part=0;part!=parts_.size();++part){ //looping over different parts of the ecal
455 
456  currentFolder_.str("");
457  currentFolder_ << "Egamma/"+analyzerName_+"/" << types_[type] << "Photons/Et above " << (cut+1)*cutStep_ << " GeV";
458  if(conversionPlot) currentFolder_ << "/Conversions";
459 
460  iBooker.setCurrentFolder(currentFolder_.str());
461 
462  string kind;
463  if(conversionPlot) kind = " Conversions: ";
464  else kind = " Photons: ";
465 
466  if(histoType=="1D") temp1DVector.push_back(iBooker.book1D( histo_number_stream.str()+histoName+parts_[part],types_[type]+kind+parts_[part]+": "+title,xbin,xmin,xmax));
467  else if(histoType=="2D") temp1DVector.push_back(iBooker.book2D( histo_number_stream.str()+histoName+parts_[part],types_[type]+kind+parts_[part]+": "+title,xbin,xmin,xmax,ybin,ymin,ymax));
468  else if(histoType=="Profile") temp1DVector.push_back(iBooker.bookProfile( histo_number_stream.str()+histoName+parts_[part],types_[type]+kind+parts_[part]+": "+title,xbin,xmin,xmax,ybin,ymin,ymax,""));
469  //else cout << "bad histoType\n";
470 
471 
472  }
473 
474  temp2DVector.push_back(temp1DVector);
475  temp1DVector.clear();
476  }
477 
478  temp3DVector.push_back(temp2DVector);
479  temp2DVector.clear();
480  }
481 
482 
483 }
484 
485 
487  //cout << "dir = " << dir << endl;
488  //cout << "name = " << name << endl;
489  vector<MonitorElement*> histoVector;
490  uint indexOfRelevantHistogram=0;
491  string fullMEName = "";
492  histoVector = iGetter.getContents(dir);
493  for(uint index=0;index!=histoVector.size();index++){
494  string MEName = histoVector[index]->getName();
495  if(MEName.find( name ) != string::npos){
496  indexOfRelevantHistogram = index;
497  break;
498  }
499  }
500  return histoVector[indexOfRelevantHistogram];
501 }
502 
type
Definition: HCALResponse.h:21
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:305
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int64_t getIntValue() const
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:160
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
PhotonOfflineClient(const edm::ParameterSet &pset)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void book2DHistoVector(DQMStore::IBooker &iBooker, std::vector< std::vector< MonitorElement * > > &vecOfHist, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
MonitorElement * retrieveHisto(DQMStore::IGetter &iGetter, std::string dir, std::string name)
void setEfficiencyFlag()
T sqrt(T t)
Definition: SSEVec.h:18
void dividePlots(MonitorElement *dividend, MonitorElement *numerator, MonitorElement *denominator)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
T min(T a, T b)
Definition: MathUtil.h:58
void setEntries(double nentries)
set # of entries
bin
set the eta bin as selection string.
bool dirExists(const std::string &path)
Definition: DQMStore.cc:332
double getEntries() const
get # of entries
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
part
Definition: HCALResponse.h:20
const std::string & pwd()
Definition: DQMStore.cc:282
def uint(string)
void book3DHistoVector(DQMStore::IBooker &iBooker, std::vector< std::vector< std::vector< MonitorElement * > > > &vecOfHist, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
virtual void runClient(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:344
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX() const
get # of bins in X-axis
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * bookHisto(DQMStore::IBooker &iBooker, std::string histoName, std::string title, int bin, double min, double max)
void removeElement(Args &&...args)
Definition: DQMStore.h:310