CMS 3D CMS Logo

PhotonAnalyzer.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 //
4 
6 
17 using namespace std;
18 
20  fName_ = pset.getParameter<string>("analyzerName");
21  prescaleFactor_ = pset.getUntrackedParameter<int>("prescaleFactor", 1);
22 
23  photon_token_ = consumes<vector<reco::Photon> >(pset.getParameter<edm::InputTag>("phoProducer"));
24  barrelRecHit_token_ = consumes<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > >(
25  pset.getParameter<edm::InputTag>("barrelRecHitProducer"));
26  PhotonIDLoose_token_ = consumes<edm::ValueMap<bool> >(pset.getParameter<edm::InputTag>("photonIDLoose"));
27  PhotonIDTight_token_ = consumes<edm::ValueMap<bool> >(pset.getParameter<edm::InputTag>("photonIDTight"));
28  endcapRecHit_token_ = consumes<edm::SortedCollection<EcalRecHit, edm::StrictWeakOrdering<EcalRecHit> > >(
29  pset.getParameter<edm::InputTag>("endcapRecHitProducer"));
30  triggerEvent_token_ = consumes<trigger::TriggerEvent>(pset.getParameter<edm::InputTag>("triggerEvent"));
31  offline_pvToken_ = consumes<reco::VertexCollection>(
32  pset.getUntrackedParameter<edm::InputTag>("offlinePV", edm::InputTag("offlinePrimaryVertices")));
33 
34  minPhoEtCut_ = pset.getParameter<double>("minPhoEtCut");
35  photonMaxEta_ = pset.getParameter<double>("maxPhoEta");
36  invMassEtCut_ = pset.getParameter<double>("invMassEtCut");
37  cutStep_ = pset.getParameter<double>("cutStep");
38  numberOfSteps_ = pset.getParameter<int>("numberOfSteps");
39  useBinning_ = pset.getParameter<bool>("useBinning");
40  useTriggerFiltering_ = pset.getParameter<bool>("useTriggerFiltering");
41  minimalSetOfHistos_ = pset.getParameter<bool>("minimalSetOfHistos");
42  excludeBkgHistos_ = pset.getParameter<bool>("excludeBkgHistos");
43  standAlone_ = pset.getParameter<bool>("standAlone");
44  isolationStrength_ = pset.getParameter<int>("isolationStrength");
45  isHeavyIon_ = pset.getUntrackedParameter<bool>("isHeavyIon", false);
46 
47  histo_index_photons_ = 0;
48  histo_index_conversions_ = 0;
49  histo_index_efficiency_ = 0;
50  histo_index_invMass_ = 0;
51 
52  nEvt_ = 0;
53 
54  // Determining parts...
55  parts_.push_back("AllEcal");
56  parts_.push_back("Barrel");
57  parts_.push_back("Endcaps");
58  // ...and types
59  types_.push_back("All");
60  types_.push_back("GoodCandidate");
61  if (!excludeBkgHistos_) {
62  types_.push_back("Background");
63  }
64 
65  // Histogram parameters
66  etaBin_ = pset.getParameter<int>("etaBin");
67  etaMin_ = pset.getParameter<double>("etaMin");
68  etaMax_ = pset.getParameter<double>("etaMax");
69 
70  etBin_ = pset.getParameter<int>("etBin");
71  etMin_ = pset.getParameter<double>("etMin");
72  etMax_ = pset.getParameter<double>("etMax");
73 
74  phiBin_ = pset.getParameter<int>("phiBin");
75  phiMin_ = pset.getParameter<double>("phiMin");
76  phiMax_ = pset.getParameter<double>("phiMax");
77 
78  eBin_ = pset.getParameter<int>("eBin");
79  eMin_ = pset.getParameter<double>("eMin");
80  eMax_ = pset.getParameter<double>("eMax");
81 
82  numberBin_ = pset.getParameter<int>("numberBin");
83  numberMin_ = pset.getParameter<double>("numberMin");
84  numberMax_ = pset.getParameter<double>("numberMax");
85 
86  r9Bin_ = pset.getParameter<int>("r9Bin");
87  r9Min_ = pset.getParameter<double>("r9Min");
88  r9Max_ = pset.getParameter<double>("r9Max");
89 
90  sigmaIetaBin_ = pset.getParameter<int>("sigmaIetaBin");
91  sigmaIetaMin_ = pset.getParameter<double>("sigmaIetaMin");
92  sigmaIetaMax_ = pset.getParameter<double>("sigmaIetaMax");
93 
94  sumBin_ = pset.getParameter<int>("sumBin");
95  sumMin_ = pset.getParameter<double>("sumMin");
96  sumMax_ = pset.getParameter<double>("sumMax");
97 
98  hOverEBin_ = pset.getParameter<int>("hOverEBin");
99  hOverEMin_ = pset.getParameter<double>("hOverEMin");
100  hOverEMax_ = pset.getParameter<double>("hOverEMax");
101 
102  eOverPBin_ = pset.getParameter<int>("eOverPBin");
103  eOverPMin_ = pset.getParameter<double>("eOverPMin");
104  eOverPMax_ = pset.getParameter<double>("eOverPMax");
105 
106  dPhiTracksBin_ = pset.getParameter<int>("dPhiTracksBin");
107  dPhiTracksMin_ = pset.getParameter<double>("dPhiTracksMin");
108  dPhiTracksMax_ = pset.getParameter<double>("dPhiTracksMax");
109 
110  dEtaTracksBin_ = pset.getParameter<int>("dEtaTracksBin");
111  dEtaTracksMin_ = pset.getParameter<double>("dEtaTracksMin");
112  dEtaTracksMax_ = pset.getParameter<double>("dEtaTracksMax");
113 
114  chi2Bin_ = pset.getParameter<int>("chi2Bin");
115  chi2Min_ = pset.getParameter<double>("chi2Min");
116  chi2Max_ = pset.getParameter<double>("chi2Max");
117 
118  zBin_ = pset.getParameter<int>("zBin");
119  zMin_ = pset.getParameter<double>("zMin");
120  zMax_ = pset.getParameter<double>("zMax");
121 
122  rBin_ = pset.getParameter<int>("rBin");
123  rMin_ = pset.getParameter<double>("rMin");
124  rMax_ = pset.getParameter<double>("rMax");
125 
126  xBin_ = pset.getParameter<int>("xBin");
127  xMin_ = pset.getParameter<double>("xMin");
128  xMax_ = pset.getParameter<double>("xMax");
129 
130  yBin_ = pset.getParameter<int>("yBin");
131  yMin_ = pset.getParameter<double>("yMin");
132  yMax_ = pset.getParameter<double>("yMax");
133 
134  reducedEtBin_ = etBin_ / 4;
135  reducedEtaBin_ = etaBin_ / 4;
136  reducedR9Bin_ = r9Bin_ / 4;
137  reducedSumBin_ = sumBin_ / 4;
138 }
139 
141 
143  edm::Run const& /* iRun */,
144  edm::EventSetup const& /* iSetup */) {
145  bookHistogramsForHistogramCounts(iBooker);
146 
147  bookHistogramsEfficiency(iBooker);
148  bookHistogramsInvMass(iBooker);
149  bookHistogramsPhotons(iBooker);
150  bookHistogramsConversions(iBooker);
151 
152  fillHistogramsForHistogramCounts(iBooker);
153 }
154 
156  iBooker.setCurrentFolder("Egamma/" + fName_ + "/");
157  // Int values stored in MEs to keep track of how many histograms are in each folder
158  totalNumberOfHistos_efficiencyFolder = iBooker.bookInt("numberOfHistogramsInEfficiencyFolder");
159  totalNumberOfHistos_invMassFolder = iBooker.bookInt("numberOfHistogramsInInvMassFolder");
160  totalNumberOfHistos_photonsFolder = iBooker.bookInt("numberOfHistogramsInPhotonsFolder");
161  totalNumberOfHistos_conversionsFolder = iBooker.bookInt("numberOfHistogramsInConversionsFolder");
162 }
163 
165  iBooker.setCurrentFolder("Egamma/" + fName_ + "/");
166  totalNumberOfHistos_efficiencyFolder->Fill(histo_index_efficiency_);
167  totalNumberOfHistos_invMassFolder->Fill(histo_index_invMass_);
168  totalNumberOfHistos_photonsFolder->Fill(histo_index_photons_);
169  totalNumberOfHistos_conversionsFolder->Fill(histo_index_conversions_);
170 }
171 
173  // Set folder
174  iBooker.setCurrentFolder("Egamma/" + fName_ + "/Efficiencies");
175 
176  // Don't number these histograms with the "bookHisto" method, since they'll be erased in the offline client
177  h_phoEta_Loose_ = iBooker.book1D("phoEtaLoose", "Loose Photon #eta", etaBin_, etaMin_, etaMax_);
178  h_phoEta_Tight_ = iBooker.book1D("phoEtaTight", "Tight Photon #eta", etaBin_, etaMin_, etaMax_);
179 
180  h_phoEt_Loose_ = iBooker.book1D("phoEtLoose", "Loose Photon E_{T}", etBin_, etMin_, etMax_);
181  h_phoEt_Tight_ = iBooker.book1D("phoEtTight", "Tight Photon E_{T}", etBin_, etMin_, etMax_);
182 
183  h_phoEta_preHLT_ = iBooker.book1D("phoEtaPreHLT", "Photon #eta: before HLT", etaBin_, etaMin_, etaMax_);
184  h_phoEta_postHLT_ = iBooker.book1D("phoEtaPostHLT", "Photon #eta: after HLT", etaBin_, etaMin_, etaMax_);
185  h_phoEt_preHLT_ = iBooker.book1D("phoEtPreHLT", "Photon E_{T}: before HLT", etBin_, etMin_, etMax_);
186  h_phoEt_postHLT_ = iBooker.book1D("phoEtPostHLT", "Photon E_{T}: after HLT", etBin_, etMin_, etMax_);
187 
188  h_convEta_Loose_ = iBooker.book1D("convEtaLoose", "Converted Loose Photon #eta", etaBin_, etaMin_, etaMax_);
189  h_convEta_Tight_ = iBooker.book1D("convEtaTight", "Converted Tight Photon #eta", etaBin_, etaMin_, etaMax_);
190  h_convEt_Loose_ = iBooker.book1D("convEtLoose", "Converted Loose Photon E_{T}", etBin_, etMin_, etMax_);
191  h_convEt_Tight_ = iBooker.book1D("convEtTight", "Converted Tight Photon E_{T}", etBin_, etMin_, etMax_);
192 
193  h_phoEta_Vertex_ =
194  iBooker.book1D("phoEtaVertex", "Converted Photons before valid vertex cut: #eta", etaBin_, etaMin_, etaMax_);
195 
196  // Some temporary vectors
197  vector<MonitorElement*> temp1DVectorEta;
198  vector<MonitorElement*> temp1DVectorPhi;
199  vector<vector<MonitorElement*> > temp2DVectorPhi;
200 
201  for (int cut = 0; cut != numberOfSteps_; ++cut) { //looping over Et cut values
202  for (uint type = 0; type != types_.size(); ++type) { //looping over isolation type
203  currentFolder_.str("");
204  currentFolder_ << "Egamma/" + fName_ + "/" << types_[type] << "Photons/Et above " << (cut + 1) * cutStep_
205  << " GeV/Conversions";
206  iBooker.setCurrentFolder(currentFolder_.str());
207 
208  temp1DVectorEta.push_back(
209  iBooker.book1D("phoConvEtaForEfficiency", "Converted Photon #eta;#eta", etaBin_, etaMin_, etaMax_));
210  for (uint part = 0; part != parts_.size(); ++part) {
211  temp1DVectorPhi.push_back(iBooker.book1D(
212  "phoConvPhiForEfficiency" + parts_[part], "Converted Photon #phi;#phi", phiBin_, phiMin_, phiMax_));
213  }
214  temp2DVectorPhi.push_back(temp1DVectorPhi);
215  temp1DVectorPhi.clear();
216  }
217  h_phoConvEtaForEfficiency_.push_back(temp1DVectorEta);
218  temp1DVectorEta.clear();
219  h_phoConvPhiForEfficiency_.push_back(temp2DVectorPhi);
220  temp2DVectorPhi.clear();
221  }
222 }
223 
225  // Set folder
226  iBooker.setCurrentFolder("Egamma/" + fName_ + "/InvMass");
227 
228  h_invMassAllPhotons_ = bookHisto(iBooker,
229  "invMassAllIsolatedPhotons",
230  "Two photon invariant mass: All isolated photons;M (GeV)",
231  etBin_,
232  etMin_,
233  etMax_);
234  h_invMassPhotonsEBarrel_ = bookHisto(iBooker,
235  "invMassIsoPhotonsEBarrel",
236  "Two photon invariant mass: isolated photons in barrel; M (GeV)",
237  etBin_,
238  etMin_,
239  etMax_);
240  h_invMassPhotonsEEndcap_ = bookHisto(iBooker,
241  "invMassIsoPhotonsEEndcap",
242  "Two photon invariant mass: isolated photons in endcap; M (GeV)",
243  etBin_,
244  etMin_,
245  etMax_);
246  h_invMassPhotonsEEndcapEBarrel_ = bookHisto(iBooker,
247  "invMassIsoPhotonsEEndcapEBarrel",
248  "Two photon invariant mass: isolated photons in endcap-barrel; M (GeV)",
249  etBin_,
250  etMin_,
251  etMax_);
252 
253  h_invMassZeroWithTracks_ = bookHisto(
254  iBooker, "invMassZeroWithTracks", "Two photon invariant mass: Neither has tracks;M (GeV)", etBin_, etMin_, etMax_);
255  h_invMassOneWithTracks_ = bookHisto(
256  iBooker, "invMassOneWithTracks", "Two photon invariant mass: Only one has tracks;M (GeV)", etBin_, etMin_, etMax_);
257  h_invMassTwoWithTracks_ = bookHisto(
258  iBooker, "invMassTwoWithTracks", "Two photon invariant mass: Both have tracks;M (GeV)", etBin_, etMin_, etMax_);
259 
260  h_nRecoVtx_ = bookHisto(iBooker, "nOfflineVtx", "# of Offline Vertices", 200, -0.5, 199.5);
261 }
262 
264  // Set folder
265  // Folder is set by the book2DHistoVector and book3DHistoVector methods
266 
267  //ENERGY VARIABLES
268  book3DHistoVector(iBooker, h_phoE_, "1D", "phoE", "Energy;E (GeV)", eBin_, eMin_, eMax_);
269  book3DHistoVector(iBooker, h_phoSigmaEoverE_, "1D", "phoSigmaEoverE", "#sigma_{E}/E; #sigma_{E}/E", 100, 0., 0.08);
270  book3DHistoVector(iBooker,
271  p_phoSigmaEoverEvsNVtx_,
272  "Profile",
273  "phoSigmaEoverEvsNVtx",
274  "#sigma_{E}/E vs NVtx; N_{vtx}; #sigma_{E}/E",
275  200,
276  -0.5,
277  199.5,
278  100,
279  0.,
280  0.08);
281  book3DHistoVector(iBooker, h_phoEt_, "1D", "phoEt", "E_{T};E_{T} (GeV)", etBin_, etMin_, etMax_);
282 
283  //NUMBER OF PHOTONS
284  book3DHistoVector(
285  iBooker, h_nPho_, "1D", "nPho", "Number of Photons per Event;# #gamma", numberBin_, numberMin_, numberMax_);
286 
287  //GEOMETRICAL VARIABLES
288  //photon eta/phi
289  book2DHistoVector(iBooker, h_phoEta_, "1D", "phoEta", "#eta;#eta", etaBin_, etaMin_, etaMax_);
290  book3DHistoVector(iBooker, h_phoPhi_, "1D", "phoPhi", "#phi;#phi", phiBin_, phiMin_, phiMax_);
291 
292  //supercluster eta/phi
293  book2DHistoVector(iBooker, h_scEta_, "1D", "scEta", "SuperCluster #eta;#eta", etaBin_, etaMin_, etaMax_);
294  book3DHistoVector(iBooker, h_scPhi_, "1D", "scPhi", "SuperCluster #phi;#phi", phiBin_, phiMin_, phiMax_);
295 
296  //SHOWER SHAPE VARIABLES
297  //r9
298  book3DHistoVector(iBooker, h_r9_, "1D", "r9", "R9;R9", r9Bin_, r9Min_, r9Max_);
299  if (standAlone_) {
300  book2DHistoVector(iBooker,
301  h_r9VsEt_,
302  "2D",
303  "r9VsEt2D",
304  "R9 vs E_{T};E_{T} (GeV);R9",
305  reducedEtBin_,
306  etMin_,
307  etMax_,
308  reducedR9Bin_,
309  r9Min_,
310  r9Max_);
311  }
312  book2DHistoVector(iBooker,
313  p_r9VsEt_,
314  "Profile",
315  "r9VsEt",
316  "Avg R9 vs E_{T};E_{T} (GeV);R9",
317  etBin_,
318  etMin_,
319  etMax_,
320  r9Bin_,
321  r9Min_,
322  r9Max_);
323  if (standAlone_) {
324  book2DHistoVector(iBooker,
325  h_r9VsEta_,
326  "2D",
327  "r9VsEta2D",
328  "R9 vs #eta;#eta;R9",
329  reducedEtaBin_,
330  etaMin_,
331  etaMax_,
332  reducedR9Bin_,
333  r9Min_,
334  r9Max_);
335  }
336  book2DHistoVector(iBooker,
337  p_r9VsEta_,
338  "Profile",
339  "r9VsEta",
340  "Avg R9 vs #eta;#eta;R9",
341  etaBin_,
342  etaMin_,
343  etaMax_,
344  r9Bin_,
345  r9Min_,
346  r9Max_);
347 
348  //sigma ieta ieta
349  book3DHistoVector(iBooker,
350  h_phoSigmaIetaIeta_,
351  "1D",
352  "phoSigmaIetaIeta",
353  "#sigma_{i#etai#eta};#sigma_{i#etai#eta}",
354  sigmaIetaBin_,
355  sigmaIetaMin_,
356  sigmaIetaMax_);
357  if (standAlone_) {
358  book2DHistoVector(iBooker,
359  h_sigmaIetaIetaVsEta_,
360  "2D",
361  "sigmaIetaIetaVsEta2D",
362  "#sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",
363  reducedEtaBin_,
364  etaMin_,
365  etaMax_,
366  sigmaIetaBin_,
367  sigmaIetaMin_,
368  sigmaIetaMax_);
369  }
370  book2DHistoVector(iBooker,
371  p_sigmaIetaIetaVsEta_,
372  "Profile",
373  "sigmaIetaIetaVsEta",
374  "Avg #sigma_{i#etai#eta} vs #eta;#eta;#sigma_{i#etai#eta}",
375  etaBin_,
376  etaMin_,
377  etaMax_,
378  sigmaIetaBin_,
379  sigmaIetaMin_,
380  sigmaIetaMax_);
381 
382  //e1x5
383  if (standAlone_) {
384  book2DHistoVector(iBooker,
385  h_e1x5VsEt_,
386  "2D",
387  "e1x5VsEt2D",
388  "E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",
389  reducedEtBin_,
390  etMin_,
391  etMax_,
392  reducedEtBin_,
393  etMin_,
394  etMax_);
395  }
396  book2DHistoVector(iBooker,
397  p_e1x5VsEt_,
398  "Profile",
399  "e1x5VsEt",
400  "Avg E1x5 vs E_{T};E_{T} (GeV);E1X5 (GeV)",
401  etBin_,
402  etMin_,
403  etMax_,
404  etBin_,
405  etMin_,
406  etMax_);
407  if (standAlone_) {
408  book2DHistoVector(iBooker,
409  h_e1x5VsEta_,
410  "2D",
411  "e1x5VsEta2D",
412  "E1x5 vs #eta;#eta;E1X5 (GeV)",
413  reducedEtaBin_,
414  etaMin_,
415  etaMax_,
416  reducedEtBin_,
417  etMin_,
418  etMax_);
419  }
420  book2DHistoVector(iBooker,
421  p_e1x5VsEta_,
422  "Profile",
423  "e1x5VsEta",
424  "Avg E1x5 vs #eta;#eta;E1X5 (GeV)",
425  etaBin_,
426  etaMin_,
427  etaMax_,
428  etBin_,
429  etMin_,
430  etMax_);
431 
432  //e2x5
433  if (standAlone_) {
434  book2DHistoVector(iBooker,
435  h_e2x5VsEt_,
436  "2D",
437  "e2x5VsEt2D",
438  "E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",
439  reducedEtBin_,
440  etMin_,
441  etMax_,
442  reducedEtBin_,
443  etMin_,
444  etMax_);
445  }
446  book2DHistoVector(iBooker,
447  p_e2x5VsEt_,
448  "Profile",
449  "e2x5VsEt",
450  "Avg E2x5 vs E_{T};E_{T} (GeV);E2X5 (GeV)",
451  etBin_,
452  etMin_,
453  etMax_,
454  etBin_,
455  etMin_,
456  etMax_);
457  if (standAlone_) {
458  book2DHistoVector(iBooker,
459  h_e2x5VsEta_,
460  "2D",
461  "e2x5VsEta2D",
462  "E2x5 vs #eta;#eta;E2X5 (GeV)",
463  reducedEtaBin_,
464  etaMin_,
465  etaMax_,
466  reducedEtBin_,
467  etMin_,
468  etMax_);
469  }
470  book2DHistoVector(iBooker,
471  p_e2x5VsEta_,
472  "Profile",
473  "e2x5VsEta",
474  "Avg E2x5 vs #eta;#eta;E2X5 (GeV)",
475  etaBin_,
476  etaMin_,
477  etaMax_,
478  etBin_,
479  etMin_,
480  etMax_);
481 
482  //r1x5
483  if (standAlone_) {
484  book2DHistoVector(iBooker,
485  h_r1x5VsEt_,
486  "2D",
487  "r1x5VsEt2D",
488  "R1x5 vs E_{T};E_{T} (GeV);R1X5",
489  reducedEtBin_,
490  etMin_,
491  etMax_,
492  reducedR9Bin_,
493  r9Min_,
494  r9Max_);
495  }
496  book2DHistoVector(iBooker,
497  p_r1x5VsEt_,
498  "Profile",
499  "r1x5VsEt",
500  "Avg R1x5 vs E_{T};E_{T} (GeV);R1X5",
501  etBin_,
502  etMin_,
503  etMax_,
504  r9Bin_,
505  r9Min_,
506  r9Max_);
507  if (standAlone_) {
508  book2DHistoVector(iBooker,
509  h_r1x5VsEta_,
510  "2D",
511  "r1x5VsEta2D",
512  "R1x5 vs #eta;#eta;R1X5",
513  reducedEtaBin_,
514  etaMin_,
515  etaMax_,
516  reducedR9Bin_,
517  r9Min_,
518  r9Max_);
519  }
520  book2DHistoVector(iBooker,
521  p_r1x5VsEta_,
522  "Profile",
523  "r1x5VsEta",
524  "Avg R1x5 vs #eta;#eta;R1X5",
525  etaBin_,
526  etaMin_,
527  etaMax_,
528  r9Bin_,
529  r9Min_,
530  r9Max_);
531 
532  //r2x5
533  if (standAlone_) {
534  book2DHistoVector(iBooker,
535  h_r2x5VsEt_,
536  "2D",
537  "r2x5VsEt2D",
538  "R2x5 vs E_{T};E_{T} (GeV);R2X5",
539  reducedEtBin_,
540  etMin_,
541  etMax_,
542  reducedR9Bin_,
543  r9Min_,
544  r9Max_);
545  }
546  book2DHistoVector(iBooker,
547  p_r2x5VsEt_,
548  "Profile",
549  "r2x5VsEt",
550  "Avg R2x5 vs E_{T};E_{T} (GeV);R2X5",
551  etBin_,
552  etMin_,
553  etMax_,
554  r9Bin_,
555  r9Min_,
556  r9Max_);
557  if (standAlone_) {
558  book2DHistoVector(iBooker,
559  h_r2x5VsEta_,
560  "2D",
561  "r2x5VsEta2D",
562  "R2x5 vs #eta;#eta;R2X5",
563  reducedEtaBin_,
564  etaMin_,
565  etaMax_,
566  reducedR9Bin_,
567  r9Min_,
568  r9Max_);
569  }
570  book2DHistoVector(iBooker,
571  p_r2x5VsEta_,
572  "Profile",
573  "r2x5VsEta",
574  "Avg R2x5 vs #eta;#eta;R2X5",
575  etaBin_,
576  etaMin_,
577  etaMax_,
578  r9Bin_,
579  r9Min_,
580  r9Max_);
581 
582  //maxEXtalOver3x3
583  if (standAlone_) {
584  book2DHistoVector(iBooker,
585  h_maxEXtalOver3x3VsEt_,
586  "2D",
587  "maxEXtalOver3x3VsEt2D",
588  "(Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",
589  reducedEtBin_,
590  etMin_,
591  etMax_,
592  r9Bin_,
593  r9Min_,
594  r9Max_);
595  }
596  book2DHistoVector(iBooker,
597  p_maxEXtalOver3x3VsEt_,
598  "Profile",
599  "maxEXtalOver3x3VsEt",
600  "Avg (Max Xtal E)/E3x3 vs E_{T};E_{T} (GeV);(Max Xtal E)/E3x3",
601  etBin_,
602  etMin_,
603  etMax_,
604  r9Bin_,
605  r9Min_,
606  r9Max_);
607  if (standAlone_) {
608  book2DHistoVector(iBooker,
609  h_maxEXtalOver3x3VsEta_,
610  "2D",
611  "maxEXtalOver3x3VsEta2D",
612  "(Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",
613  reducedEtaBin_,
614  etaMin_,
615  etaMax_,
616  r9Bin_,
617  r9Min_,
618  r9Max_);
619  }
620  book2DHistoVector(iBooker,
621  p_maxEXtalOver3x3VsEta_,
622  "Profile",
623  "maxEXtalOver3x3VsEta",
624  "Avg (Max Xtal E)/E3x3 vs #eta;#eta;(Max Xtal E)/E3x3",
625  etaBin_,
626  etaMin_,
627  etaMax_,
628  r9Bin_,
629  r9Min_,
630  r9Max_);
631 
632  //TRACK ISOLATION VARIABLES
633  //nTrackIsolSolid
634  book2DHistoVector(iBooker,
635  h_nTrackIsolSolid_,
636  "1D",
637  "nIsoTracksSolid",
638  "Number Of Tracks in the Solid Iso Cone;# tracks",
639  numberBin_,
640  numberMin_,
641  numberMax_);
642  if (standAlone_) {
643  book2DHistoVector(iBooker,
644  h_nTrackIsolSolidVsEt_,
645  "2D",
646  "nIsoTracksSolidVsEt2D",
647  "Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",
648  reducedEtBin_,
649  etMin_,
650  etMax_,
651  numberBin_,
652  numberMin_,
653  numberMax_);
654  }
655  book2DHistoVector(iBooker,
656  p_nTrackIsolSolidVsEt_,
657  "Profile",
658  "nIsoTracksSolidVsEt",
659  "Avg Number Of Tracks in the Solid Iso Cone vs E_{T};E_{T};# tracks",
660  etBin_,
661  etMin_,
662  etMax_,
663  numberBin_,
664  numberMin_,
665  numberMax_);
666  if (standAlone_) {
667  book2DHistoVector(iBooker,
668  h_nTrackIsolSolidVsEta_,
669  "2D",
670  "nIsoTracksSolidVsEta2D",
671  "Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",
672  reducedEtaBin_,
673  etaMin_,
674  etaMax_,
675  numberBin_,
676  numberMin_,
677  numberMax_);
678  }
679  book2DHistoVector(iBooker,
680  p_nTrackIsolSolidVsEta_,
681  "Profile",
682  "nIsoTracksSolidVsEta",
683  "Avg Number Of Tracks in the Solid Iso Cone vs #eta;#eta;# tracks",
684  etaBin_,
685  etaMin_,
686  etaMax_,
687  numberBin_,
688  numberMin_,
689  numberMax_);
690 
691  //nTrackIsolHollow
692  book2DHistoVector(iBooker,
693  h_nTrackIsolHollow_,
694  "1D",
695  "nIsoTracksHollow",
696  "Number Of Tracks in the Hollow Iso Cone;# tracks",
697  numberBin_,
698  numberMin_,
699  numberMax_);
700  if (standAlone_) {
701  book2DHistoVector(iBooker,
702  h_nTrackIsolHollowVsEt_,
703  "2D",
704  "nIsoTracksHollowVsEt2D",
705  "Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",
706  reducedEtBin_,
707  etMin_,
708  etMax_,
709  numberBin_,
710  numberMin_,
711  numberMax_);
712  }
713  book2DHistoVector(iBooker,
714  p_nTrackIsolHollowVsEt_,
715  "Profile",
716  "nIsoTracksHollowVsEt",
717  "Avg Number Of Tracks in the Hollow Iso Cone vs E_{T};E_{T};# tracks",
718  etBin_,
719  etMin_,
720  etMax_,
721  numberBin_,
722  numberMin_,
723  numberMax_);
724  if (standAlone_) {
725  book2DHistoVector(iBooker,
726  h_nTrackIsolHollowVsEta_,
727  "2D",
728  "nIsoTracksHollowVsEta2D",
729  "Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",
730  reducedEtaBin_,
731  etaMin_,
732  etaMax_,
733  numberBin_,
734  numberMin_,
735  numberMax_);
736  }
737  book2DHistoVector(iBooker,
738  p_nTrackIsolHollowVsEta_,
739  "Profile",
740  "nIsoTracksHollowVsEta",
741  "Avg Number Of Tracks in the Hollow Iso Cone vs #eta;#eta;# tracks",
742  etaBin_,
743  etaMin_,
744  etaMax_,
745  numberBin_,
746  numberMin_,
747  numberMax_);
748 
749  //trackPtSumSolid
750  book2DHistoVector(iBooker,
751  h_trackPtSumSolid_,
752  "1D",
753  "isoPtSumSolid",
754  "Track P_{T} Sum in the Solid Iso Cone;P_{T} (GeV)",
755  sumBin_,
756  sumMin_,
757  sumMax_);
758  if (standAlone_) {
759  book2DHistoVector(iBooker,
760  h_trackPtSumSolidVsEt_,
761  "2D",
762  "isoPtSumSolidVsEt2D",
763  "Track P_{T} Sum in the Solid Iso Cone;E_{T} (GeV);P_{T} (GeV)",
764  reducedEtBin_,
765  etMin_,
766  etMax_,
767  reducedSumBin_,
768  sumMin_,
769  sumMax_);
770  }
771  book2DHistoVector(iBooker,
772  p_trackPtSumSolidVsEt_,
773  "Profile",
774  "isoPtSumSolidVsEt",
775  "Avg Track P_{T} Sum in the Solid Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
776  etBin_,
777  etMin_,
778  etMax_,
779  sumBin_,
780  sumMin_,
781  sumMax_);
782  if (standAlone_) {
783  book2DHistoVector(iBooker,
784  h_trackPtSumSolidVsEta_,
785  "2D",
786  "isoPtSumSolidVsEta2D",
787  "Track P_{T} Sum in the Solid Iso Cone;#eta;P_{T} (GeV)",
788  reducedEtaBin_,
789  etaMin_,
790  etaMax_,
791  reducedSumBin_,
792  sumMin_,
793  sumMax_);
794  }
795  book2DHistoVector(iBooker,
796  p_trackPtSumSolidVsEta_,
797  "Profile",
798  "isoPtSumSolidVsEta",
799  "Avg Track P_{T} Sum in the Solid Iso Cone vs #eta;#eta;P_{T} (GeV)",
800  etaBin_,
801  etaMin_,
802  etaMax_,
803  sumBin_,
804  sumMin_,
805  sumMax_);
806 
807  //trackPtSumHollow
808  book2DHistoVector(iBooker,
809  h_trackPtSumHollow_,
810  "1D",
811  "isoPtSumHollow",
812  "Track P_{T} Sum in the Hollow Iso Cone;P_{T} (GeV)",
813  sumBin_,
814  sumMin_,
815  sumMax_);
816  if (standAlone_) {
817  book2DHistoVector(iBooker,
818  h_trackPtSumHollowVsEt_,
819  "2D",
820  "isoPtSumHollowVsEt2D",
821  "Track P_{T} Sum in the Hollow Iso Cone;E_{T} (GeV);P_{T} (GeV)",
822  reducedEtBin_,
823  etMin_,
824  etMax_,
825  reducedSumBin_,
826  sumMin_,
827  sumMax_);
828  }
829  book2DHistoVector(iBooker,
830  p_trackPtSumHollowVsEt_,
831  "Profile",
832  "isoPtSumHollowVsEt",
833  "Avg Track P_{T} Sum in the Hollow Iso Cone vs E_{T};E_{T} (GeV);P_{T} (GeV)",
834  etBin_,
835  etMin_,
836  etMax_,
837  sumBin_,
838  sumMin_,
839  sumMax_);
840  if (standAlone_) {
841  book2DHistoVector(iBooker,
842  h_trackPtSumHollowVsEta_,
843  "2D",
844  "isoPtSumHollowVsEta2D",
845  "Track P_{T} Sum in the Hollow Iso Cone;#eta;P_{T} (GeV)",
846  reducedEtaBin_,
847  etaMin_,
848  etaMax_,
849  reducedSumBin_,
850  sumMin_,
851  sumMax_);
852  }
853  book2DHistoVector(iBooker,
854  p_trackPtSumHollowVsEta_,
855  "Profile",
856  "isoPtSumHollowVsEta",
857  "Avg Track P_{T} Sum in the Hollow Iso Cone vs #eta;#eta;P_{T} (GeV)",
858  etaBin_,
859  etaMin_,
860  etaMax_,
861  sumBin_,
862  sumMin_,
863  sumMax_);
864 
865  //CALORIMETER ISOLATION VARIABLES
866  //ecal sum
867  book2DHistoVector(
868  iBooker, h_ecalSum_, "1D", "ecalSum", "Ecal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
869  book2DHistoVector(iBooker,
870  h_ecalSumEBarrel_,
871  "1D",
872  "ecalSumEBarrel",
873  "Ecal Sum in the IsoCone for Barrel;E (GeV)",
874  sumBin_,
875  sumMin_,
876  sumMax_);
877  book2DHistoVector(iBooker,
878  h_ecalSumEEndcap_,
879  "1D",
880  "ecalSumEEndcap",
881  "Ecal Sum in the IsoCone for Endcap;E (GeV)",
882  sumBin_,
883  sumMin_,
884  sumMax_);
885  if (standAlone_) {
886  book2DHistoVector(iBooker,
887  h_ecalSumVsEt_,
888  "2D",
889  "ecalSumVsEt2D",
890  "Ecal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",
891  reducedEtBin_,
892  etMin_,
893  etMax_,
894  reducedSumBin_,
895  sumMin_,
896  sumMax_);
897  }
898  book3DHistoVector(iBooker,
899  p_ecalSumVsEt_,
900  "Profile",
901  "ecalSumVsEt",
902  "Avg Ecal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
903  etBin_,
904  etMin_,
905  etMax_,
906  sumBin_,
907  sumMin_,
908  sumMax_);
909  if (standAlone_) {
910  book2DHistoVector(iBooker,
911  h_ecalSumVsEta_,
912  "2D",
913  "ecalSumVsEta2D",
914  "Ecal Sum in the Iso Cone;#eta;E (GeV)",
915  reducedEtaBin_,
916  etaMin_,
917  etaMax_,
918  reducedSumBin_,
919  sumMin_,
920  sumMax_);
921  }
922  book2DHistoVector(iBooker,
923  p_ecalSumVsEta_,
924  "Profile",
925  "ecalSumVsEta",
926  "Avg Ecal Sum in the Iso Cone vs #eta;#eta;E (GeV)",
927  etaBin_,
928  etaMin_,
929  etaMax_,
930  sumBin_,
931  sumMin_,
932  sumMax_);
933 
934  //hcal sum
935  book2DHistoVector(
936  iBooker, h_hcalSum_, "1D", "hcalSum", "Hcal Sum in the Iso Cone;E (GeV)", sumBin_, sumMin_, sumMax_);
937  book2DHistoVector(iBooker,
938  h_hcalSumEBarrel_,
939  "1D",
940  "hcalSumEBarrel",
941  "Hcal Sum in the IsoCone for Barrel;E (GeV)",
942  sumBin_,
943  sumMin_,
944  sumMax_);
945  book2DHistoVector(iBooker,
946  h_hcalSumEEndcap_,
947  "1D",
948  "hcalSumEEndcap",
949  "Hcal Sum in the IsoCone for Endcap;E (GeV)",
950  sumBin_,
951  sumMin_,
952  sumMax_);
953  if (standAlone_) {
954  book2DHistoVector(iBooker,
955  h_hcalSumVsEt_,
956  "2D",
957  "hcalSumVsEt2D",
958  "Hcal Sum in the Iso Cone;E_{T} (GeV);E (GeV)",
959  reducedEtBin_,
960  etMin_,
961  etMax_,
962  reducedSumBin_,
963  sumMin_,
964  sumMax_);
965  }
966  book3DHistoVector(iBooker,
967  p_hcalSumVsEt_,
968  "Profile",
969  "hcalSumVsEt",
970  "Avg Hcal Sum in the Iso Cone vs E_{T};E_{T} (GeV);E (GeV)",
971  etBin_,
972  etMin_,
973  etMax_,
974  sumBin_,
975  sumMin_,
976  sumMax_);
977  if (standAlone_) {
978  book2DHistoVector(iBooker,
979  h_hcalSumVsEta_,
980  "2D",
981  "hcalSumVsEta2D",
982  "Hcal Sum in the Iso Cone;#eta;E (GeV)",
983  reducedEtaBin_,
984  etaMin_,
985  etaMax_,
986  reducedSumBin_,
987  sumMin_,
988  sumMax_);
989  }
990  book2DHistoVector(iBooker,
991  p_hcalSumVsEta_,
992  "Profile",
993  "hcalSumVsEta",
994  "Avg Hcal Sum in the Iso Cone vs #eta;#eta;E (GeV)",
995  etaBin_,
996  etaMin_,
997  etaMax_,
998  sumBin_,
999  sumMin_,
1000  sumMax_);
1001 
1002  //h over e
1003  book3DHistoVector(iBooker, h_hOverE_, "1D", "hOverE", "H/E;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
1004  book2DHistoVector(iBooker,
1005  p_hOverEVsEt_,
1006  "Profile",
1007  "hOverEVsEt",
1008  "Avg H/E vs Et;E_{T} (GeV);H/E",
1009  etBin_,
1010  etMin_,
1011  etMax_,
1012  hOverEBin_,
1013  hOverEMin_,
1014  hOverEMax_);
1015  book2DHistoVector(iBooker,
1016  p_hOverEVsEta_,
1017  "Profile",
1018  "hOverEVsEta",
1019  "Avg H/E vs #eta;#eta;H/E",
1020  etaBin_,
1021  etaMin_,
1022  etaMax_,
1023  hOverEBin_,
1024  hOverEMin_,
1025  hOverEMax_);
1026  book3DHistoVector(iBooker, h_h1OverE_, "1D", "h1OverE", "H/E for Depth 1;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
1027  book3DHistoVector(iBooker, h_h2OverE_, "1D", "h2OverE", "H/E for Depth 2;H/E", hOverEBin_, hOverEMin_, hOverEMax_);
1028 
1029  // pf isolation
1030  book2DHistoVector(
1031  iBooker, h_phoIsoBarrel_, "1D", "phoIsoBarrel", "PF photon iso Barrel;E (GeV)", reducedEtBin_, etMin_, 25.);
1032  book2DHistoVector(
1033  iBooker, h_phoIsoEndcap_, "1D", "phoIsoEndcap", "PF photon iso Endcap;E (GeV)", reducedEtBin_, etMin_, 25.);
1034  book2DHistoVector(iBooker,
1035  h_chHadIsoBarrel_,
1036  "1D",
1037  "chHadIsoBarrel",
1038  "PF charged Had iso Barrel;E (GeV)",
1039  reducedEtBin_,
1040  etMin_,
1041  25.);
1042  book2DHistoVector(iBooker,
1043  h_chHadIsoEndcap_,
1044  "1D",
1045  "chHadIsoEndcap",
1046  "PF charged Had iso Endcap;E (GeV)",
1047  reducedEtBin_,
1048  etMin_,
1049  25.);
1050  book2DHistoVector(iBooker,
1051  h_nHadIsoBarrel_,
1052  "1D",
1053  "neutralHadIsoBarrel",
1054  "PF neutral Had iso Barrel;E (GeV)",
1055  reducedEtBin_,
1056  etMin_,
1057  25.);
1058  book2DHistoVector(iBooker,
1059  h_nHadIsoEndcap_,
1060  "1D",
1061  "neutralHadIsoEndcap",
1062  "PF neutral Had iso Endcap;E (GeV)",
1063  reducedEtBin_,
1064  etMin_,
1065  25.);
1066 
1067  //OTHER VARIABLES
1068  //bad channel histograms
1069  book2DHistoVector(iBooker,
1070  h_phoEt_BadChannels_,
1071  "1D",
1072  "phoEtBadChannels",
1073  "Fraction Containing Bad Channels: E_{T};E_{T} (GeV)",
1074  etBin_,
1075  etMin_,
1076  etMax_);
1077  book2DHistoVector(iBooker,
1078  h_phoEta_BadChannels_,
1079  "1D",
1080  "phoEtaBadChannels",
1081  "Fraction Containing Bad Channels: #eta;#eta",
1082  etaBin_,
1083  etaMin_,
1084  etaMax_);
1085  book2DHistoVector(iBooker,
1086  h_phoPhi_BadChannels_,
1087  "1D",
1088  "phoPhiBadChannels",
1089  "Fraction Containing Bad Channels: #phi;#phi",
1090  phiBin_,
1091  phiMin_,
1092  phiMax_);
1093 }
1094 
1096  // Set folder
1097  iBooker.setCurrentFolder("Egamma/" + fName_ + "/AllPhotons/Et Above 0 GeV/Conversions");
1098 
1099  //ENERGY VARIABLES
1100  book3DHistoVector(iBooker, h_phoConvE_, "1D", "phoConvE", "E;E (GeV)", eBin_, eMin_, eMax_);
1101  book3DHistoVector(iBooker, h_phoConvEt_, "1D", "phoConvEt", "E_{T};E_{T} (GeV)", etBin_, etMin_, etMax_);
1102 
1103  //GEOMETRICAL VARIABLES
1104  book2DHistoVector(iBooker, h_phoConvEta_, "1D", "phoConvEta", "#eta;#eta", etaBin_, etaMin_, etaMax_);
1105  book3DHistoVector(iBooker, h_phoConvPhi_, "1D", "phoConvPhi", "#phi;#phi", phiBin_, phiMin_, phiMax_);
1106 
1107  //NUMBER OF PHOTONS
1108  book3DHistoVector(iBooker,
1109  h_nConv_,
1110  "1D",
1111  "nConv",
1112  "Number Of Conversions per Event ;# conversions",
1113  numberBin_,
1114  numberMin_,
1115  numberMax_);
1116 
1117  //SHOWER SHAPE VARIABLES
1118  book3DHistoVector(iBooker, h_phoConvR9_, "1D", "phoConvR9", "R9;R9", r9Bin_, r9Min_, r9Max_);
1119 
1120  //TRACK RELATED VARIABLES
1121  book3DHistoVector(iBooker, h_eOverPTracks_, "1D", "eOverPTracks", "E/P;E/P", eOverPBin_, eOverPMin_, eOverPMax_);
1122  book3DHistoVector(iBooker, h_pOverETracks_, "1D", "pOverETracks", "P/E;P/E", eOverPBin_, eOverPMin_, eOverPMax_);
1123  book3DHistoVector(iBooker,
1124  h_dPhiTracksAtVtx_,
1125  "1D",
1126  "dPhiTracksAtVtx",
1127  "#Delta#phi of Tracks at Vertex;#Delta#phi",
1128  dPhiTracksBin_,
1129  dPhiTracksMin_,
1130  dPhiTracksMax_);
1131  book3DHistoVector(iBooker,
1132  h_dPhiTracksAtEcal_,
1133  "1D",
1134  "dPhiTracksAtEcal",
1135  "Abs(#Delta#phi) of Tracks at Ecal;#Delta#phi",
1136  dPhiTracksBin_,
1137  0.,
1138  dPhiTracksMax_);
1139  book3DHistoVector(iBooker,
1140  h_dEtaTracksAtEcal_,
1141  "1D",
1142  "dEtaTracksAtEcal",
1143  "#Delta#eta of Tracks at Ecal;#Delta#eta",
1144  dEtaTracksBin_,
1145  dEtaTracksMin_,
1146  dEtaTracksMax_);
1147  book3DHistoVector(iBooker,
1148  h_dCotTracks_,
1149  "1D",
1150  "dCotTracks",
1151  "#Deltacot(#theta) of Tracks;#Deltacot(#theta)",
1152  dEtaTracksBin_,
1153  dEtaTracksMin_,
1154  dEtaTracksMax_);
1155  book2DHistoVector(iBooker,
1156  p_dCotTracksVsEta_,
1157  "Profile",
1158  "dCotTracksVsEta",
1159  "Avg #Deltacot(#theta) of Tracks vs #eta;#eta;#Deltacot(#theta)",
1160  etaBin_,
1161  etaMin_,
1162  etaMax_,
1163  dEtaTracksBin_,
1164  dEtaTracksMin_,
1165  dEtaTracksMax_);
1166  book2DHistoVector(iBooker,
1167  p_nHitsVsEta_,
1168  "Profile",
1169  "nHitsVsEta",
1170  "Avg Number of Hits per Track vs #eta;#eta;# hits",
1171  etaBin_,
1172  etaMin_,
1173  etaMax_,
1174  etaBin_,
1175  0,
1176  16);
1177  book2DHistoVector(
1178  iBooker, h_tkChi2_, "1D", "tkChi2", "#chi^{2} of Track Fitting;#chi^{2}", chi2Bin_, chi2Min_, chi2Max_);
1179  book2DHistoVector(iBooker,
1180  p_tkChi2VsEta_,
1181  "Profile",
1182  "tkChi2VsEta",
1183  "Avg #chi^{2} of Track Fitting vs #eta;#eta;#chi^{2}",
1184  etaBin_,
1185  etaMin_,
1186  etaMax_,
1187  chi2Bin_,
1188  chi2Min_,
1189  chi2Max_);
1190 
1191  //VERTEX RELATED VARIABLES
1192  book2DHistoVector(iBooker,
1193  h_convVtxRvsZ_,
1194  "2D",
1195  "convVtxRvsZ",
1196  "Vertex Position;Z (cm);R (cm)",
1197  500,
1198  zMin_,
1199  zMax_,
1200  rBin_,
1201  rMin_,
1202  rMax_);
1203  book2DHistoVector(
1204  iBooker, h_convVtxZEndcap_, "1D", "convVtxZEndcap", "Vertex Position: #eta > 1.5;Z (cm)", zBin_, zMin_, zMax_);
1205  book2DHistoVector(iBooker, h_convVtxZ_, "1D", "convVtxZ", "Vertex Position;Z (cm)", zBin_, zMin_, zMax_);
1206  book2DHistoVector(iBooker, h_convVtxR_, "1D", "convVtxR", "Vertex Position: #eta < 1;R (cm)", rBin_, rMin_, rMax_);
1207  book2DHistoVector(iBooker,
1208  h_convVtxYvsX_,
1209  "2D",
1210  "convVtxYvsX",
1211  "Vertex Position: #eta < 1;X (cm);Y (cm)",
1212  xBin_,
1213  xMin_,
1214  xMax_,
1215  yBin_,
1216  yMin_,
1217  yMax_);
1218  book2DHistoVector(iBooker,
1219  h_vertexChi2Prob_,
1220  "1D",
1221  "vertexChi2Prob",
1222  "#chi^{2} Probability of Vertex Fitting;#chi^{2}",
1223  100,
1224  0.,
1225  1.0);
1226 }
1227 
1228 // Booking helper methods:
1229 
1231  DQMStore::IBooker& iBooker, string histoName, string title, int bin, double min, double max) {
1232  int histo_index = 0;
1233  stringstream histo_number_stream;
1234 
1235  //determining which folder we're in
1236  if (iBooker.pwd().find("InvMass") != string::npos) {
1237  histo_index_invMass_++;
1238  histo_index = histo_index_invMass_;
1239  }
1240  if (iBooker.pwd().find("Efficiencies") != string::npos) {
1241  histo_index_efficiency_++;
1242  histo_index = histo_index_efficiency_;
1243  }
1244 
1245  histo_number_stream << "h_";
1246  if (histo_index < 10)
1247  histo_number_stream << "0";
1248  histo_number_stream << histo_index;
1249 
1250  return iBooker.book1D(histo_number_stream.str() + "_" + histoName, title, bin, min, max);
1251 }
1252 
1254  vector<vector<MonitorElement*> >& temp2DVector,
1255  string histoType,
1256  string histoName,
1257  string title,
1258  int xbin,
1259  double xmin,
1260  double xmax,
1261  int ybin,
1262  double ymin,
1263  double ymax) {
1264  int histo_index = 0;
1265 
1266  vector<MonitorElement*> temp1DVector;
1267 
1268  //determining which folder we're in
1269  bool conversionPlot = false;
1270  if (iBooker.pwd().find("Conversions") != string::npos)
1271  conversionPlot = true;
1272  bool TwoDPlot = false;
1273  if (histoName.find("2D") != string::npos)
1274  TwoDPlot = true;
1275 
1276  if (conversionPlot) {
1277  histo_index_conversions_++;
1278  histo_index = histo_index_conversions_;
1279  } else {
1280  histo_index_photons_++;
1281  histo_index = histo_index_photons_;
1282  }
1283 
1284  stringstream histo_number_stream;
1285  histo_number_stream << "h_";
1286  if (histo_index < 10)
1287  histo_number_stream << "0";
1288  histo_number_stream << histo_index << "_";
1289 
1290  for (int cut = 0; cut != numberOfSteps_; ++cut) { //looping over Et cut values
1291  for (uint type = 0; type != types_.size(); ++type) { //looping over isolation type
1292  currentFolder_.str("");
1293  currentFolder_ << "Egamma/" + fName_ + "/" << types_[type] << "Photons/Et above " << (cut + 1) * cutStep_
1294  << " GeV";
1295  if (conversionPlot)
1296  currentFolder_ << "/Conversions";
1297 
1298  iBooker.setCurrentFolder(currentFolder_.str());
1299 
1300  string kind;
1301  if (conversionPlot)
1302  kind = " Conversions: ";
1303  else
1304  kind = " Photons: ";
1305 
1306  if (histoType == "1D")
1307  temp1DVector.push_back(
1308  iBooker.book1D(histo_number_stream.str() + histoName, types_[type] + kind + title, xbin, xmin, xmax));
1309  else if (histoType == "2D") {
1310  if ((TwoDPlot && type == 0) || !TwoDPlot) { //only book the 2D plots in the "AllPhotons" folder
1311  temp1DVector.push_back(iBooker.book2D(
1312  histo_number_stream.str() + histoName, types_[type] + kind + title, xbin, xmin, xmax, ybin, ymin, ymax));
1313  }
1314  } else if (histoType == "Profile")
1315  temp1DVector.push_back(iBooker.bookProfile(
1316  histo_number_stream.str() + histoName, types_[type] + kind + title, xbin, xmin, xmax, ybin, ymin, ymax, ""));
1317  else
1318  cout << "bad histoType\n";
1319  }
1320 
1321  temp2DVector.push_back(temp1DVector);
1322  temp1DVector.clear();
1323  }
1324 }
1325 
1327  vector<vector<vector<MonitorElement*> > >& temp3DVector,
1328  string histoType,
1329  string histoName,
1330  string title,
1331  int xbin,
1332  double xmin,
1333  double xmax,
1334  int ybin,
1335  double ymin,
1336  double ymax) {
1337  int histo_index = 0;
1338 
1339  vector<MonitorElement*> temp1DVector;
1340  vector<vector<MonitorElement*> > temp2DVector;
1341 
1342  //determining which folder we're in
1343  bool conversionPlot = false;
1344  if (iBooker.pwd().find("Conversions") != string::npos)
1345  conversionPlot = true;
1346 
1347  if (conversionPlot) {
1348  histo_index_conversions_++;
1349  histo_index = histo_index_conversions_;
1350  } else {
1351  histo_index_photons_++;
1352  histo_index = histo_index_photons_;
1353  }
1354 
1355  stringstream histo_number_stream;
1356  histo_number_stream << "h_";
1357  if (histo_index < 10)
1358  histo_number_stream << "0";
1359  histo_number_stream << histo_index << "_";
1360 
1361  for (int cut = 0; cut != numberOfSteps_; ++cut) { //looping over Et cut values
1362  for (uint type = 0; type != types_.size(); ++type) { //looping over isolation type
1363  for (uint part = 0; part != parts_.size(); ++part) { //looping over different parts of the ecal
1364  currentFolder_.str("");
1365  currentFolder_ << "Egamma/" + fName_ + "/" << types_[type] << "Photons/Et above " << (cut + 1) * cutStep_
1366  << " GeV";
1367  if (conversionPlot)
1368  currentFolder_ << "/Conversions";
1369  iBooker.setCurrentFolder(currentFolder_.str());
1370 
1371  string kind;
1372  if (conversionPlot)
1373  kind = " Conversions: ";
1374  else
1375  kind = " Photons: ";
1376 
1377  if (histoType == "1D")
1378  temp1DVector.push_back(iBooker.book1D(histo_number_stream.str() + histoName + parts_[part],
1379  types_[type] + kind + parts_[part] + ": " + title,
1380  xbin,
1381  xmin,
1382  xmax));
1383  else if (histoType == "2D")
1384  temp1DVector.push_back(iBooker.book2D(histo_number_stream.str() + histoName + parts_[part],
1385  types_[type] + kind + parts_[part] + ": " + title,
1386  xbin,
1387  xmin,
1388  xmax,
1389  ybin,
1390  ymin,
1391  ymax));
1392  else if (histoType == "Profile")
1393  temp1DVector.push_back(iBooker.bookProfile(histo_number_stream.str() + histoName + parts_[part],
1394  types_[type] + kind + parts_[part] + ": " + title,
1395  xbin,
1396  xmin,
1397  xmax,
1398  ybin,
1399  ymin,
1400  ymax,
1401  ""));
1402  else
1403  cout << "bad histoType\n";
1404  }
1405  temp2DVector.push_back(temp1DVector);
1406  temp1DVector.clear();
1407  }
1408  temp3DVector.push_back(temp2DVector);
1409  temp2DVector.clear();
1410  }
1411 }
1412 
1413 // Analysis:
1414 
1416  using namespace edm;
1417 
1418  if (nEvt_ % prescaleFactor_)
1419  return;
1420  nEvt_++;
1421  LogInfo(fName_) << "PhotonAnalyzer Analyzing event number: " << e.id() << " Global Counter " << nEvt_ << "\n";
1422 
1423  // Get the trigger results
1424  bool validTriggerEvent = true;
1425  edm::Handle<trigger::TriggerEvent> triggerEventHandle;
1426  const trigger::TriggerEvent dummyTE;
1427  e.getByToken(triggerEvent_token_, triggerEventHandle);
1428  if (!triggerEventHandle.isValid()) {
1429  edm::LogInfo(fName_) << "Error! Can't get the product: triggerEvent_" << endl;
1430  validTriggerEvent = false;
1431  }
1432  const trigger::TriggerEvent& triggerEvent(validTriggerEvent ? *(triggerEventHandle.product()) : dummyTE);
1433 
1434  // Get the reconstructed photons
1435  // bool validPhotons=true;
1436  Handle<reco::PhotonCollection> photonHandle;
1437  e.getByToken(photon_token_, photonHandle);
1438  if (!photonHandle.isValid()) {
1439  edm::LogInfo(fName_) << "Error! Can't get the product: photon_token_" << endl;
1440  // validPhotons=false;
1441  }
1442  const reco::PhotonCollection& photonCollection(*(photonHandle.product()));
1443 
1444  // Get the PhotonId objects
1445  // bool validloosePhotonID=true;
1446  Handle<edm::ValueMap<bool> > loosePhotonFlag;
1447  e.getByToken(PhotonIDLoose_token_, loosePhotonFlag);
1448  if (!loosePhotonFlag.isValid()) {
1449  edm::LogInfo(fName_) << "Error! Can't get the product: PhotonIDLoose_token_" << endl;
1450  // validloosePhotonID=false;
1451  }
1452  // edm::ValueMap<bool> dummyLPID;
1453  // const edm::ValueMap<bool>& loosePhotonID(validloosePhotonID? *(loosePhotonFlag.product()) : dummyLPID);
1454 
1455  // bool validtightPhotonID=true;
1456  Handle<edm::ValueMap<bool> > tightPhotonFlag;
1457  e.getByToken(PhotonIDTight_token_, tightPhotonFlag);
1458  if (!tightPhotonFlag.isValid()) {
1459  edm::LogInfo(fName_) << "Error! Can't get the product: PhotonIDTight_token_" << endl;
1460  // validtightPhotonID=false;
1461  }
1462  // edm::ValueMap<bool> dummyTPI;
1463  // const edm::ValueMap<bool>& tightPhotonID(validtightPhotonID ? *(tightPhotonFlag.product()) : dummyTPI);
1464 
1466  if (!isHeavyIon_) {
1467  e.getByToken(offline_pvToken_, vtxH);
1468  h_nRecoVtx_->Fill(float(vtxH->size()));
1469  }
1470 
1471  // Create array to hold #photons/event information
1472  int nPho[100][3][3];
1473 
1474  for (int cut = 0; cut != 100; ++cut) {
1475  for (unsigned int type = 0; type != types_.size(); ++type) {
1476  for (unsigned int part = 0; part != parts_.size(); ++part) {
1477  nPho[cut][type][part] = 0;
1478  }
1479  }
1480  }
1481  // Create array to hold #conversions/event information
1482  int nConv[100][3][3];
1483 
1484  for (int cut = 0; cut != 100; ++cut) {
1485  for (unsigned int type = 0; type != types_.size(); ++type) {
1486  for (unsigned int part = 0; part != parts_.size(); ++part) {
1487  nConv[cut][type][part] = 0;
1488  }
1489  }
1490  }
1491 
1492  //Prepare list of photon-related HLT filter names
1493  vector<int> Keys;
1494 
1495  for (uint filterIndex = 0; filterIndex < triggerEvent.sizeFilters();
1496  ++filterIndex) { //loop over all trigger filters in event (i.e. filters passed)
1497  string label = triggerEvent.filterTag(filterIndex).label();
1498  if (label.find("Photon") != string::npos) { //get photon-related filters
1499  for (uint filterKeyIndex = 0; filterKeyIndex < triggerEvent.filterKeys(filterIndex).size();
1500  ++filterKeyIndex) { //loop over keys to objects passing this filter
1501  Keys.push_back(
1502  triggerEvent.filterKeys(filterIndex)[filterKeyIndex]); //add keys to a vector for later reference
1503  }
1504  }
1505  }
1506 
1507  // sort Keys vector in ascending order
1508  // and erases duplicate entries from the vector
1509  sort(Keys.begin(), Keys.end());
1510  for (uint i = 0; i < Keys.size();) {
1511  if (i != (Keys.size() - 1)) {
1512  if (Keys[i] == Keys[i + 1])
1513  Keys.erase(Keys.begin() + i + 1);
1514  else
1515  ++i;
1516  } else
1517  ++i;
1518  }
1519 
1520  //We now have a vector of unique keys to TriggerObjects passing a photon-related filter
1521 
1522  // old int photonCounter = 0;
1523 
1525  for (unsigned int iPho = 0; iPho < photonHandle->size(); iPho++) {
1526  const reco::Photon* aPho = &photonCollection[iPho];
1527  // for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
1528 
1529  //for HLT efficiency plots
1530 
1531  h_phoEta_preHLT_->Fill(aPho->eta());
1532  h_phoEt_preHLT_->Fill(aPho->et());
1533 
1534  double deltaR = 1000.;
1535  double deltaRMin = 1000.;
1536  double deltaRMax = 0.05; //sets deltaR threshold for matching photons to trigger objects
1537 
1538  for (vector<int>::const_iterator objectKey = Keys.begin(); objectKey != Keys.end();
1539  objectKey++) { //loop over keys to objects that fired photon triggers
1540 
1541  deltaR = reco::deltaR(triggerEvent.getObjects()[(*objectKey)].eta(),
1542  triggerEvent.getObjects()[(*objectKey)].phi(),
1543  aPho->superCluster()->eta(),
1544  aPho->superCluster()->phi());
1545  if (deltaR < deltaRMin)
1546  deltaRMin = deltaR;
1547  }
1548 
1549  if (deltaRMin > deltaRMax) { //photon fails delta R cut
1550  if (useTriggerFiltering_)
1551  continue; //throw away photons that haven't passed any photon filters
1552  }
1553 
1554  if (deltaRMin <= deltaRMax) { //photon passes delta R cut
1555  h_phoEta_postHLT_->Fill(aPho->eta());
1556  h_phoEt_postHLT_->Fill(aPho->et());
1557  }
1558 
1559  // if (aPho->et() < minPhoEtCut_) continue;
1560  bool isLoosePhoton(false), isTightPhoton(false);
1561  if (photonSelection(aPho))
1562  isLoosePhoton = true;
1563 
1564  //find out which part of the Ecal contains the photon
1565  bool phoIsInBarrel = false;
1566  bool phoIsInEndcap = false;
1567  float etaPho = aPho->superCluster()->eta();
1568  if (fabs(etaPho) < 1.479)
1569  phoIsInBarrel = true;
1570  else {
1571  phoIsInEndcap = true;
1572  }
1573 
1574  int part = 0;
1575  if (phoIsInBarrel)
1576  part = 1;
1577  if (phoIsInEndcap)
1578  part = 2;
1579 
1581  bool isIsolated = false;
1582  if (isolationStrength_ == 0)
1583  isIsolated = isLoosePhoton;
1584  if (isolationStrength_ == 1)
1585  isIsolated = isTightPhoton;
1586  if (isolationStrength_ == 2)
1587  isIsolated = photonSelectionSlimmed(aPho);
1588 
1589  int type = 0;
1590  if (isIsolated)
1591  type = 1;
1592  if (!excludeBkgHistos_ && !isIsolated)
1593  type = 2;
1594 
1595  //get rechit collection containing this photon
1596  bool validEcalRecHits = true;
1597  edm::Handle<EcalRecHitCollection> ecalRecHitHandle;
1598  EcalRecHitCollection ecalRecHitCollection;
1599  if (phoIsInBarrel) {
1600  // Get handle to barrel rec hits
1601  e.getByToken(barrelRecHit_token_, ecalRecHitHandle);
1602  if (!ecalRecHitHandle.isValid()) {
1603  edm::LogError(fName_) << "Error! Can't get the product: barrelRecHit_token_";
1604  validEcalRecHits = false;
1605  }
1606  } else if (phoIsInEndcap) {
1607  // Get handle to endcap rec hits
1608  e.getByToken(endcapRecHit_token_, ecalRecHitHandle);
1609  if (!ecalRecHitHandle.isValid()) {
1610  edm::LogError(fName_) << "Error! Can't get the product: endcapRecHit_token";
1611  validEcalRecHits = false;
1612  }
1613  }
1614  if (validEcalRecHits)
1615  ecalRecHitCollection = *(ecalRecHitHandle.product());
1616 
1617  //if (aPho->isEBEEGap()) continue; //cut out gap photons
1618 
1619  //filling histograms to make isolation efficiencies
1620  if (isLoosePhoton) {
1621  h_phoEta_Loose_->Fill(aPho->eta());
1622  h_phoEt_Loose_->Fill(aPho->et());
1623  }
1624  if (isTightPhoton) {
1625  h_phoEta_Tight_->Fill(aPho->eta());
1626  h_phoEt_Tight_->Fill(aPho->et());
1627  }
1628 
1629  for (int cut = 0; cut != numberOfSteps_; ++cut) { //loop over different transverse energy cuts
1630  double Et = aPho->et();
1631  bool passesCuts = false;
1632 
1633  //sorting the photon into the right Et-dependant folder
1634  if (useBinning_ && Et > (cut + 1) * cutStep_ && ((Et < (cut + 2) * cutStep_) | (cut == numberOfSteps_ - 1))) {
1635  passesCuts = true;
1636  } else if (!useBinning_ && Et > (cut + 1) * cutStep_) {
1637  passesCuts = true;
1638  }
1639 
1640  if (passesCuts) {
1641  //filling isolation variable histograms
1642 
1643  //tracker isolation variables
1644  fill2DHistoVector(h_nTrackIsolSolid_, aPho->nTrkSolidConeDR04(), cut, type);
1645  fill2DHistoVector(h_nTrackIsolHollow_, aPho->nTrkHollowConeDR04(), cut, type);
1646 
1647  if (standAlone_)
1648  fill2DHistoVector(h_nTrackIsolSolidVsEta_, aPho->eta(), aPho->nTrkSolidConeDR04(), cut, type);
1649  fill2DHistoVector(p_nTrackIsolSolidVsEta_, aPho->eta(), aPho->nTrkSolidConeDR04(), cut, type);
1650  if (standAlone_)
1651  fill2DHistoVector(h_nTrackIsolHollowVsEta_, aPho->eta(), aPho->nTrkHollowConeDR04(), cut, type);
1652  fill2DHistoVector(p_nTrackIsolHollowVsEta_, aPho->eta(), aPho->nTrkHollowConeDR04(), cut, type);
1653 
1654  if (standAlone_)
1655  fill2DHistoVector(h_nTrackIsolSolidVsEt_, aPho->et(), aPho->nTrkSolidConeDR04(), cut, type);
1656  fill2DHistoVector(p_nTrackIsolSolidVsEt_, aPho->et(), aPho->nTrkSolidConeDR04(), cut, type);
1657  if (standAlone_)
1658  fill2DHistoVector(h_nTrackIsolHollowVsEt_, aPho->et(), aPho->nTrkHollowConeDR04(), cut, type);
1659  fill2DHistoVector(p_nTrackIsolHollowVsEt_, aPho->et(), aPho->nTrkHollowConeDR04(), cut, type);
1660 
1662  fill2DHistoVector(h_trackPtSumSolid_, aPho->trkSumPtSolidConeDR04(), cut, type);
1663  fill2DHistoVector(h_trackPtSumHollow_, aPho->trkSumPtSolidConeDR04(), cut, type);
1664 
1665  if (standAlone_)
1666  fill2DHistoVector(h_trackPtSumSolidVsEta_, aPho->eta(), aPho->trkSumPtSolidConeDR04(), cut, type);
1667  fill2DHistoVector(p_trackPtSumSolidVsEta_, aPho->eta(), aPho->trkSumPtSolidConeDR04(), cut, type);
1668  if (standAlone_)
1669  fill2DHistoVector(h_trackPtSumHollowVsEta_, aPho->eta(), aPho->trkSumPtHollowConeDR04(), cut, type);
1670  fill2DHistoVector(p_trackPtSumHollowVsEta_, aPho->eta(), aPho->trkSumPtHollowConeDR04(), cut, type);
1671 
1672  if (standAlone_)
1673  fill2DHistoVector(h_trackPtSumSolidVsEt_, aPho->et(), aPho->trkSumPtSolidConeDR04(), cut, type);
1674  fill2DHistoVector(p_trackPtSumSolidVsEt_, aPho->et(), aPho->trkSumPtSolidConeDR04(), cut, type);
1675  if (standAlone_)
1676  fill2DHistoVector(h_trackPtSumHollowVsEt_, aPho->et(), aPho->trkSumPtHollowConeDR04(), cut, type);
1677  fill2DHistoVector(p_trackPtSumHollowVsEt_, aPho->et(), aPho->trkSumPtHollowConeDR04(), cut, type);
1678  //calorimeter isolation variables
1679 
1680  fill2DHistoVector(h_ecalSum_, aPho->ecalRecHitSumEtConeDR04(), cut, type);
1681  if (aPho->isEB()) {
1682  fill2DHistoVector(h_ecalSumEBarrel_, aPho->ecalRecHitSumEtConeDR04(), cut, type);
1683  }
1684  if (aPho->isEE()) {
1685  fill2DHistoVector(h_ecalSumEEndcap_, aPho->ecalRecHitSumEtConeDR04(), cut, type);
1686  }
1687  if (standAlone_)
1688  fill2DHistoVector(h_ecalSumVsEta_, aPho->eta(), aPho->ecalRecHitSumEtConeDR04(), cut, type);
1689  fill2DHistoVector(p_ecalSumVsEta_, aPho->eta(), aPho->ecalRecHitSumEtConeDR04(), cut, type);
1690  if (standAlone_)
1691  fill2DHistoVector(h_ecalSumVsEt_, aPho->et(), aPho->ecalRecHitSumEtConeDR04(), cut, type);
1692  fill3DHistoVector(p_ecalSumVsEt_, aPho->et(), aPho->ecalRecHitSumEtConeDR04(), cut, type, part);
1693 
1695 
1696  fill2DHistoVector(h_hcalSum_, aPho->hcalTowerSumEtConeDR04(), cut, type);
1697  if (aPho->isEB()) {
1698  fill2DHistoVector(h_hcalSumEBarrel_, aPho->hcalTowerSumEtConeDR04(), cut, type);
1699  }
1700  if (aPho->isEE()) {
1701  fill2DHistoVector(h_hcalSumEEndcap_, aPho->hcalTowerSumEtConeDR04(), cut, type);
1702  }
1703  if (standAlone_)
1704  fill2DHistoVector(h_hcalSumVsEta_, aPho->eta(), aPho->hcalTowerSumEtConeDR04(), cut, type);
1705  fill2DHistoVector(p_hcalSumVsEta_, aPho->eta(), aPho->hcalTowerSumEtConeDR04(), cut, type);
1706  if (standAlone_)
1707  fill2DHistoVector(h_hcalSumVsEt_, aPho->et(), aPho->hcalTowerSumEtConeDR04(), cut, type);
1708  fill3DHistoVector(p_hcalSumVsEt_, aPho->et(), aPho->hcalTowerSumEtConeDR04(), cut, type, part);
1709 
1710  fill3DHistoVector(h_hOverE_, aPho->hadronicOverEm(), cut, type, part);
1711  fill2DHistoVector(p_hOverEVsEta_, aPho->eta(), aPho->hadronicOverEm(), cut, type);
1712  fill2DHistoVector(p_hOverEVsEt_, aPho->et(), aPho->hadronicOverEm(), cut, type);
1713 
1714  fill3DHistoVector(h_h1OverE_, aPho->hadronicOverEm(1), cut, type, part);
1715  fill3DHistoVector(h_h2OverE_, aPho->hadronicOverEm(2), cut, type, part);
1716 
1717  // filling pf isolation variables
1718  if (aPho->isEB()) {
1719  fill2DHistoVector(h_phoIsoBarrel_, aPho->photonIso(), cut, type);
1720  fill2DHistoVector(h_chHadIsoBarrel_, aPho->chargedHadronIso(), cut, type);
1721  fill2DHistoVector(h_nHadIsoBarrel_, aPho->neutralHadronIso(), cut, type);
1722  }
1723  if (aPho->isEE()) {
1724  fill2DHistoVector(h_phoIsoEndcap_, aPho->photonIso(), cut, type);
1725  fill2DHistoVector(h_chHadIsoEndcap_, aPho->chargedHadronIso(), cut, type);
1726  fill2DHistoVector(h_nHadIsoEndcap_, aPho->neutralHadronIso(), cut, type);
1727  }
1728 
1729  //filling photon histograms
1730  nPho[cut][0][0]++;
1731  nPho[cut][0][part]++;
1732  if (type != 0) {
1733  nPho[cut][type][0]++;
1734  nPho[cut][type][part]++;
1735  }
1736 
1737  //energy variables
1738 
1739  fill3DHistoVector(h_phoE_, aPho->energy(), cut, type, part);
1740  fill3DHistoVector(h_phoSigmaEoverE_,
1741  aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy(),
1742  cut,
1743  type,
1744  part);
1745 
1746  if (!isHeavyIon_)
1747  fill3DHistoVector(p_phoSigmaEoverEvsNVtx_,
1748  float(vtxH->size()),
1749  aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy(),
1750  cut,
1751  type,
1752  part);
1753 
1754  fill3DHistoVector(h_phoEt_, aPho->et(), cut, type, part);
1755 
1756  //geometrical variables
1757 
1758  fill2DHistoVector(h_phoEta_, aPho->eta(), cut, type);
1759  fill2DHistoVector(h_scEta_, aPho->superCluster()->eta(), cut, type);
1760 
1761  fill3DHistoVector(h_phoPhi_, aPho->phi(), cut, type, part);
1762  fill3DHistoVector(h_scPhi_, aPho->superCluster()->phi(), cut, type, part);
1763 
1764  //shower shape variables
1765 
1766  fill3DHistoVector(h_r9_, aPho->r9(), cut, type, part);
1767  if (standAlone_)
1768  fill2DHistoVector(h_r9VsEta_, aPho->eta(), aPho->r9(), cut, type);
1769  fill2DHistoVector(p_r9VsEta_, aPho->eta(), aPho->r9(), cut, type);
1770  if (standAlone_)
1771  fill2DHistoVector(h_r9VsEt_, aPho->et(), aPho->r9(), cut, type);
1772  fill2DHistoVector(p_r9VsEt_, aPho->et(), aPho->r9(), cut, type);
1773 
1774  if (standAlone_)
1775  fill2DHistoVector(h_e1x5VsEta_, aPho->eta(), aPho->e1x5(), cut, type);
1776  fill2DHistoVector(p_e1x5VsEta_, aPho->eta(), aPho->e1x5(), cut, type);
1777  if (standAlone_)
1778  fill2DHistoVector(h_e1x5VsEt_, aPho->et(), aPho->e1x5(), cut, type);
1779  fill2DHistoVector(p_e1x5VsEt_, aPho->et(), aPho->e1x5(), cut, type);
1780 
1781  if (standAlone_)
1782  fill2DHistoVector(h_e2x5VsEta_, aPho->eta(), aPho->e2x5(), cut, type);
1783  fill2DHistoVector(p_e2x5VsEta_, aPho->eta(), aPho->e2x5(), cut, type);
1784  if (standAlone_)
1785  fill2DHistoVector(h_e2x5VsEt_, aPho->et(), aPho->e2x5(), cut, type);
1786  fill2DHistoVector(p_e2x5VsEt_, aPho->et(), aPho->e2x5(), cut, type);
1787 
1788  if (standAlone_)
1789  fill2DHistoVector(h_maxEXtalOver3x3VsEta_, aPho->eta(), aPho->maxEnergyXtal() / aPho->e3x3(), cut, type);
1790  fill2DHistoVector(p_maxEXtalOver3x3VsEta_, aPho->eta(), aPho->maxEnergyXtal() / aPho->e3x3(), cut, type);
1791  if (standAlone_)
1792  fill2DHistoVector(h_maxEXtalOver3x3VsEt_, aPho->et(), aPho->maxEnergyXtal() / aPho->e3x3(), cut, type);
1793  fill2DHistoVector(p_maxEXtalOver3x3VsEt_, aPho->et(), aPho->maxEnergyXtal() / aPho->e3x3(), cut, type);
1794 
1795  if (standAlone_)
1796  fill2DHistoVector(h_r1x5VsEta_, aPho->eta(), aPho->r1x5(), cut, type);
1797  fill2DHistoVector(p_r1x5VsEta_, aPho->eta(), aPho->r1x5(), cut, type);
1798  if (standAlone_)
1799  fill2DHistoVector(h_r1x5VsEt_, aPho->et(), aPho->r1x5(), cut, type);
1800  fill2DHistoVector(p_r1x5VsEt_, aPho->et(), aPho->r1x5(), cut, type);
1801 
1802  if (standAlone_)
1803  fill2DHistoVector(h_r2x5VsEta_, aPho->eta(), aPho->r2x5(), cut, type);
1804  fill2DHistoVector(p_r2x5VsEta_, aPho->eta(), aPho->r2x5(), cut, type);
1805  if (standAlone_)
1806  fill2DHistoVector(h_r2x5VsEt_, aPho->et(), aPho->r2x5(), cut, type);
1807  fill2DHistoVector(p_r2x5VsEt_, aPho->et(), aPho->r2x5(), cut, type);
1808 
1809  fill3DHistoVector(h_phoSigmaIetaIeta_, aPho->sigmaIetaIeta(), cut, type, part);
1810  if (standAlone_)
1811  fill2DHistoVector(h_sigmaIetaIetaVsEta_, aPho->eta(), aPho->sigmaIetaIeta(), cut, type);
1812  fill2DHistoVector(p_sigmaIetaIetaVsEta_, aPho->eta(), aPho->sigmaIetaIeta(), cut, type);
1813 
1814  //filling histograms for photons containing a bad ECAL channel
1815  bool atLeastOneDeadChannel = false;
1816  for (reco::CaloCluster_iterator bcIt = aPho->superCluster()->clustersBegin();
1817  bcIt != aPho->superCluster()->clustersEnd();
1818  ++bcIt) { //loop over basic clusters in SC
1819  for (vector<pair<DetId, float> >::const_iterator rhIt = (*bcIt)->hitsAndFractions().begin();
1820  rhIt != (*bcIt)->hitsAndFractions().end();
1821  ++rhIt) { //loop over rec hits in basic cluster
1822 
1823  for (EcalRecHitCollection::const_iterator it = ecalRecHitCollection.begin();
1824  it != ecalRecHitCollection.end();
1825  ++it) { //loop over all rec hits to find the right ones
1826  if (rhIt->first == (*it).id()) { //found the matching rechit
1827  if ((*it).recoFlag() == 9) { //has a bad channel
1828  atLeastOneDeadChannel = true;
1829  break;
1830  }
1831  }
1832  }
1833  }
1834  }
1835  if (atLeastOneDeadChannel) {
1836  fill2DHistoVector(h_phoPhi_BadChannels_, aPho->phi(), cut, type);
1837  fill2DHistoVector(h_phoEta_BadChannels_, aPho->eta(), cut, type);
1838  fill2DHistoVector(h_phoEt_BadChannels_, aPho->et(), cut, type);
1839  }
1840 
1841  // filling conversion-related histograms
1842  if (aPho->hasConversionTracks()) {
1843  nConv[cut][0][0]++;
1844  nConv[cut][0][part]++;
1845  nConv[cut][type][0]++;
1846  nConv[cut][type][part]++;
1847  }
1848 
1849  //loop over conversions (don't forget, we're still inside the photon loop,
1850  // i.e. these are all the conversions for this ONE photon, not for all the photons in the event)
1852  for (unsigned int iConv = 0; iConv < conversions.size(); iConv++) {
1853  reco::ConversionRef aConv = conversions[iConv];
1854 
1855  if (aConv->nTracks() < 2)
1856  continue;
1857 
1858  //fill histogram for denominator of vertex reconstruction efficiency plot
1859  if (cut == 0)
1860  h_phoEta_Vertex_->Fill(aConv->refittedPairMomentum().eta());
1861 
1862  if (!(aConv->conversionVertex().isValid()))
1863  continue;
1864 
1865  float chi2Prob = ChiSquaredProbability(aConv->conversionVertex().chi2(), aConv->conversionVertex().ndof());
1866 
1867  if (chi2Prob < 0.0005)
1868  continue;
1869 
1870  fill2DHistoVector(h_vertexChi2Prob_, chi2Prob, cut, type);
1871 
1872  fill3DHistoVector(h_phoConvE_, aPho->energy(), cut, type, part);
1873  fill3DHistoVector(h_phoConvEt_, aPho->et(), cut, type, part);
1874  fill3DHistoVector(h_phoConvR9_, aPho->r9(), cut, type, part);
1875 
1876  if (cut == 0 && isLoosePhoton) {
1877  h_convEta_Loose_->Fill(aPho->eta());
1878  h_convEt_Loose_->Fill(aPho->et());
1879  }
1880  if (cut == 0 && isTightPhoton) {
1881  h_convEta_Tight_->Fill(aPho->eta());
1882  h_convEt_Tight_->Fill(aPho->et());
1883  }
1884 
1885  fill2DHistoVector(h_phoConvEta_, aConv->refittedPairMomentum().eta(), cut, type);
1886  fill3DHistoVector(h_phoConvPhi_, aConv->refittedPairMomentum().phi(), cut, type, part);
1887 
1888  //we use the photon position because we'll be dividing it by a photon histogram (not a conversion histogram)
1889  fill2DHistoVector(h_phoConvEtaForEfficiency_, aPho->eta(), cut, type);
1890  fill3DHistoVector(h_phoConvPhiForEfficiency_, aPho->phi(), cut, type, part);
1891 
1892  //vertex histograms
1893  double convR = sqrt(aConv->conversionVertex().position().perp2());
1894  double scalar = aConv->conversionVertex().position().x() * aConv->refittedPairMomentum().x() +
1895  aConv->conversionVertex().position().y() * aConv->refittedPairMomentum().y();
1896  if (scalar < 0)
1897  convR = -convR;
1898 
1899  fill2DHistoVector(h_convVtxRvsZ_,
1900  aConv->conversionVertex().position().z(),
1901  convR,
1902  cut,
1903  type); //trying to "see" R-Z view of tracker
1904  fill2DHistoVector(h_convVtxZ_, aConv->conversionVertex().position().z(), cut, type);
1905 
1906  if (fabs(aPho->eta()) > 1.5) { //trying to "see" tracker endcaps
1907  fill2DHistoVector(h_convVtxZEndcap_, aConv->conversionVertex().position().z(), cut, type);
1908  } else if (fabs(aPho->eta()) < 1) { //trying to "see" tracker barrel
1909  fill2DHistoVector(h_convVtxR_, convR, cut, type);
1910  fill2DHistoVector(h_convVtxYvsX_,
1911  aConv->conversionVertex().position().x(),
1912  aConv->conversionVertex().position().y(),
1913  cut,
1914  type);
1915  }
1916 
1917  const std::vector<edm::RefToBase<reco::Track> > tracks = aConv->tracks();
1918 
1919  for (unsigned int i = 0; i < tracks.size(); i++) {
1920  fill2DHistoVector(h_tkChi2_, tracks[i]->normalizedChi2(), cut, type);
1921  fill2DHistoVector(p_tkChi2VsEta_, aPho->eta(), tracks[i]->normalizedChi2(), cut, type);
1922  fill2DHistoVector(p_dCotTracksVsEta_, aPho->eta(), aConv->pairCotThetaSeparation(), cut, type);
1923  fill2DHistoVector(p_nHitsVsEta_, aPho->eta(), float(tracks[i]->numberOfValidHits()), cut, type);
1924  }
1925 
1926  //calculating delta eta and delta phi of the two tracks
1927 
1928  float DPhiTracksAtVtx = -99;
1929  float dPhiTracksAtEcal = -99;
1930  float dEtaTracksAtEcal = -99;
1931 
1932  float phiTk1 = aConv->tracksPin()[0].phi();
1933  float phiTk2 = aConv->tracksPin()[1].phi();
1934  DPhiTracksAtVtx = phiTk1 - phiTk2;
1935  DPhiTracksAtVtx = phiNormalization(DPhiTracksAtVtx);
1936 
1937  if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[0].isNonnull() &&
1938  aConv->bcMatchingWithTracks()[1].isNonnull()) {
1939  float recoPhi1 = aConv->ecalImpactPosition()[0].phi();
1940  float recoPhi2 = aConv->ecalImpactPosition()[1].phi();
1941  float recoEta1 = aConv->ecalImpactPosition()[0].eta();
1942  float recoEta2 = aConv->ecalImpactPosition()[1].eta();
1943 
1944  recoPhi1 = phiNormalization(recoPhi1);
1945  recoPhi2 = phiNormalization(recoPhi2);
1946 
1947  dPhiTracksAtEcal = recoPhi1 - recoPhi2;
1948  dPhiTracksAtEcal = phiNormalization(dPhiTracksAtEcal);
1949  dEtaTracksAtEcal = recoEta1 - recoEta2;
1950  }
1951 
1952  fill3DHistoVector(h_dPhiTracksAtVtx_, DPhiTracksAtVtx, cut, type, part);
1953  fill3DHistoVector(h_dPhiTracksAtEcal_, fabs(dPhiTracksAtEcal), cut, type, part);
1954  fill3DHistoVector(h_dEtaTracksAtEcal_, dEtaTracksAtEcal, cut, type, part);
1955  fill3DHistoVector(h_eOverPTracks_, aConv->EoverPrefittedTracks(), cut, type, part);
1956  fill3DHistoVector(h_pOverETracks_, 1. / aConv->EoverPrefittedTracks(), cut, type, part);
1957  fill3DHistoVector(h_dCotTracks_, aConv->pairCotThetaSeparation(), cut, type, part);
1958  } //end loop over conversions
1959  } //end loop over photons passing cuts
1960  } //end loop over transverse energy cuts
1961 
1962  //make invariant mass plots
1963 
1964  if (isIsolated && aPho->et() >= invMassEtCut_) {
1965  for (unsigned int iPho2 = iPho + 1; iPho2 < photonHandle->size(); iPho2++) {
1966  const reco::Photon* aPho2 = &photonCollection[iPho2];
1967 
1968  // for (reco::PhotonCollection::const_iterator iPho2=iPho+1; iPho2!=photonCollection.end(); iPho2++){
1969 
1970  // edm::Ref<reco::PhotonCollection> photonref2(photonHandle, photonCounter); //note: it's correct to use photonCounter and not photonCounter+1
1971  //since it has already been incremented earlier
1972 
1973  bool isTightPhoton2(false), isLoosePhoton2(false);
1974  if (photonSelection(aPho2))
1975  isLoosePhoton2 = true;
1976 
1977  // Old if ( !isHeavyIon_ ) {
1978  // isTightPhoton2 = (tightPhotonID)[aPho2];
1979  // isLoosePhoton2 = (loosePhotonID)[aPho2];
1980  // }
1981 
1982  bool isIsolated2 = false;
1983  if (isolationStrength_ == 0)
1984  isIsolated2 = isLoosePhoton2;
1985  if (isolationStrength_ == 1)
1986  isIsolated2 = isTightPhoton2;
1987  if (isolationStrength_ == 2)
1988  isIsolated2 = photonSelectionSlimmed(aPho2);
1989 
1991  reco::ConversionRefVector conversions2 = aPho2->conversions();
1992 
1993  if (isIsolated2 && aPho2->et() >= invMassEtCut_) {
1994  math::XYZTLorentzVector p12 = aPho->p4() + aPho2->p4();
1995  float gamgamMass2 = p12.Dot(p12);
1996 
1997  h_invMassAllPhotons_->Fill(sqrt(gamgamMass2));
1998  if (aPho->isEB() && aPho2->isEB()) {
1999  h_invMassPhotonsEBarrel_->Fill(sqrt(gamgamMass2));
2000  } else if (aPho->isEE() && aPho2->isEE()) {
2001  h_invMassPhotonsEEndcap_->Fill(sqrt(gamgamMass2));
2002  } else {
2003  h_invMassPhotonsEEndcapEBarrel_->Fill(sqrt(gamgamMass2));
2004  }
2005 
2006  if (!conversions.empty() && conversions[0]->nTracks() >= 2) {
2007  if (!conversions2.empty() && conversions2[0]->nTracks() >= 2)
2008  h_invMassTwoWithTracks_->Fill(sqrt(gamgamMass2));
2009  else
2010  h_invMassOneWithTracks_->Fill(sqrt(gamgamMass2));
2011  } else if (!conversions2.empty() && conversions2[0]->nTracks() >= 2)
2012  h_invMassOneWithTracks_->Fill(sqrt(gamgamMass2));
2013  else
2014  h_invMassZeroWithTracks_->Fill(sqrt(gamgamMass2));
2015  }
2016  }
2017  }
2018  }
2019 
2020  //filling number of photons/conversions per event histograms
2021  for (int cut = 0; cut != numberOfSteps_; ++cut) {
2022  for (uint type = 0; type != types_.size(); ++type) {
2023  for (uint part = 0; part != parts_.size(); ++part) {
2024  h_nPho_[cut][type][part]->Fill(float(nPho[cut][type][part]));
2025  h_nConv_[cut][type][part]->Fill(float(nConv[cut][type][part]));
2026  }
2027  }
2028  }
2029 } //End of Analyze method
2030 
2032 
2034  const float PI = 3.1415927;
2035  const float TWOPI = 2.0 * PI;
2036 
2037  if (phi > PI) {
2038  phi = phi - TWOPI;
2039  }
2040  if (phi < -PI) {
2041  phi = phi + TWOPI;
2042  }
2043 
2044  return phi;
2045 }
2046 
2048  vector<vector<MonitorElement*> >& histoVector, double x, double y, int cut, int type) {
2049  histoVector[cut][0]->Fill(x, y);
2050  if (histoVector[cut].size() > 1)
2051  histoVector[cut][type]->Fill(x, y); //don't try to fill 2D histos that are only in the "AllPhotons" folder
2052 }
2053 
2054 void PhotonAnalyzer::fill2DHistoVector(vector<vector<MonitorElement*> >& histoVector, double x, int cut, int type) {
2055  histoVector[cut][0]->Fill(x);
2056  histoVector[cut][type]->Fill(x);
2057 }
2058 
2060  vector<vector<vector<MonitorElement*> > >& histoVector, double x, int cut, int type, int part) {
2061  histoVector[cut][0][0]->Fill(x);
2062  histoVector[cut][0][part]->Fill(x);
2063  histoVector[cut][type][0]->Fill(x);
2064  histoVector[cut][type][part]->Fill(x);
2065 }
2066 
2068  vector<vector<vector<MonitorElement*> > >& histoVector, double x, double y, int cut, int type, int part) {
2069  histoVector[cut][0][0]->Fill(x, y);
2070  histoVector[cut][0][part]->Fill(x, y);
2071  histoVector[cut][type][0]->Fill(x, y);
2072  histoVector[cut][type][part]->Fill(x, y);
2073 }
2074 
2076  bool result = true;
2077  if (pho->pt() < minPhoEtCut_)
2078  result = false;
2079  if (fabs(pho->eta()) > photonMaxEta_)
2080  result = false;
2081  if (pho->isEBEEGap())
2082  result = false;
2083 
2084  double EtCorrHcalIso = pho->hcalTowerSumEtConeDR03() - 0.005 * pho->pt();
2085  double EtCorrTrkIso = pho->trkSumPtHollowConeDR03() - 0.002 * pho->pt();
2086 
2087  if (pho->r9() <= 0.9) {
2088  if (pho->isEB() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.014))
2089  result = false;
2090  if (pho->isEE() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.034))
2091  result = false;
2093  if (EtCorrHcalIso > 4.0)
2094  result = false;
2095  if (EtCorrTrkIso > 4.0)
2096  result = false;
2097  if (pho->chargedHadronIso() > 4)
2098  result = false;
2099  } else {
2100  if (pho->isEB() && (pho->hadTowOverEm() > 0.082 || pho->sigmaIetaIeta() > 0.014))
2101  result = false;
2102  if (pho->isEE() && (pho->hadTowOverEm() > 0.075 || pho->sigmaIetaIeta() > 0.034))
2103  result = false;
2105  if (EtCorrHcalIso > 50.0)
2106  result = false;
2107  if (EtCorrTrkIso > 50.0)
2108  result = false;
2109  if (pho->chargedHadronIso() > 4)
2110  result = false;
2111  }
2112  return result;
2113 }
2114 
2116  bool result = true;
2117 
2118  if (pho->pt() < minPhoEtCut_)
2119  result = false;
2120  if (fabs(pho->eta()) > photonMaxEta_)
2121  result = false;
2122  if (pho->isEBEEGap())
2123  result = false;
2124 
2125  return result;
2126 }
bool photonSelection(const reco::Photon *p)
void fill3DHistoVector(std::vector< std::vector< std::vector< MonitorElement *> > > &histoVector, double x, int cut, int type, int part)
bool empty() const
Is the RefVector empty.
Definition: RefVector.h:99
void bookHistogramsPhotons(DQMStore::IBooker &)
float hcalTowerSumEtConeDR03(int depth=0) const
Hcal isolation sum for each depth excluding the region containing the rechits used for hcalOverEcal()...
Definition: Photon.h:506
double pt() const final
transverse momentum
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:26
reco::ConversionRefVector conversions() const
vector of references to Conversion&#39;s
Definition: Photon.h:64
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:457
virtual std::string pwd()
Definition: DQMStore.cc:20
T const * product() const
Definition: Handle.h:70
std::vector< EcalRecHit >::const_iterator const_iterator
void book2DHistoVector(DQMStore::IBooker &, std::vector< std::vector< MonitorElement *> > &toFill, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
float e1x5() const
Shower shape variables.
Definition: Photon.h:267
bool isEB() const
Definition: Photon.h:123
float maxEnergyXtal() const
Definition: Photon.h:271
float r1x5() const
Definition: Photon.h:274
Log< level::Error, false > LogError
void bookHistogramsConversions(DQMStore::IBooker &)
MonitorElement * bookHisto(DQMStore::IBooker &, std::string histoName, std::string title, int bin, double min, double max)
float photonIso() const
Definition: Photon.h:550
P4type getCandidateP4type() const
Definition: Photon.h:360
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
float trkSumPtSolidConeDR04() const
Definition: Photon.h:495
char const * label
void fillHistogramsForHistogramCounts(DQMStore::IBooker &)
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
float hcalTowerSumEtConeDR04(int depth=0) const
Definition: Photon.h:475
void analyze(const edm::Event &, const edm::EventSetup &) override
float sigmaIetaIeta() const
Definition: Photon.h:273
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
T sqrt(T t)
Definition: SSEVec.h:19
float chargedHadronIso() const
Accessors for Particle Flow Isolation variables.
Definition: Photon.h:545
float getCorrectedEnergyError(P4type type) const
bool isEE() const
Definition: Photon.h:125
#define TWOPI
float ChiSquaredProbability(double chiSquared, double nrDOF)
const_iterator begin() const
float trkSumPtHollowConeDR03() const
Definition: Photon.h:512
#define PI
Definition: QcdUeDQM.h:37
void bookHistogramsInvMass(DQMStore::IBooker &)
float phiNormalization(float &a)
float hadTowOverEm(int depth=0) const
Definition: Photon.h:256
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
const_iterator end() const
Log< level::Info, false > LogInfo
int nTrkSolidConeDR04() const
Definition: Photon.h:499
float trkSumPtHollowConeDR04() const
Definition: Photon.h:497
float r2x5() const
Definition: Photon.h:275
float hadronicOverEm(int depth=0) const
Definition: Photon.h:236
bool photonSelectionSlimmed(const reco::Photon *p)
std::vector< size_type > Keys
part
Definition: HCALResponse.h:20
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
bool hasConversionTracks() const
Bool flagging photons with a vector of refereces to conversions with size >0.
Definition: Photon.h:70
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
float r9() const
Definition: Photon.h:276
bool isValid() const
Definition: HandleBase.h:70
double et() const final
transverse energy
HLT enums.
void bookHistogramsForHistogramCounts(DQMStore::IBooker &)
void fill2DHistoVector(std::vector< std::vector< MonitorElement *> > &histoVector, double x, int cut, int type)
const LorentzVector & p4(P4type type) const
void bookHistogramsEfficiency(DQMStore::IBooker &)
int nTrkHollowConeDR04() const
Definition: Photon.h:501
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
~PhotonAnalyzer() override
double phi() const final
momentum azimuthal angle
float neutralHadronIso() const
Definition: Photon.h:549
PhotonAnalyzer(const edm::ParameterSet &)
bool isEBEEGap() const
true if photon is in boundary between EB and EE
Definition: Photon.h:135
Definition: Run.h:45
void book3DHistoVector(DQMStore::IBooker &, std::vector< std::vector< std::vector< MonitorElement *> > > &toFill, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
float e3x3() const
Definition: Photon.h:269
float e2x5() const
Definition: Photon.h:268
double energy() const final
energy
double eta() const final
momentum pseudorapidity