CMS 3D CMS Logo

DQMAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEgamma/Examples
4 // Class: GsfElectronDataAnalyzer
5 //
11 //
12 // Original Author: Ursula Berthon, Claude Charlot
13 // Created: Mon Mar 27 13:22:06 CEST 2006
14 //
15 //
16 
36 
37 #include "CLHEP/Units/GlobalPhysicalConstants.h"
38 
39 #include "TFile.h"
40 #include "TH1F.h"
41 #include "TH2F.h"
42 #include "TTree.h"
43 
44 #include <cassert>
45 #include <iostream>
46 
48 public:
49  explicit DQMAnalyzer(const edm::ParameterSet &conf);
50 
51  ~DQMAnalyzer() override;
52 
53  void beginJob() override;
54  void endJob() override;
55  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
56 
57 private:
58  //=========================================
59  // parameters
60  //=========================================
61 
67  bool readAOD_;
68 
69  // matching
72  double deltaR_;
73 
74  // tag and probe
76  double massLow_;
77  double massHigh_;
82 
83  // electron selection
84  double minEt_;
85  double minPt_;
86  double maxAbsEta_;
87  bool isEB_;
88  bool isEE_;
110  double mvaMin_;
113  double tkIso03Max_;
119 
120  // for trigger
122  std::vector<std::string> HLTPathsByName_;
123 
124  // histos limits and binning
125  int nbineta;
127  double etamin;
128  double etamax;
129  int nbinphi;
131  double phimin;
132  double phimax;
133  int nbinpt;
135  int nbinpt2D;
136  double ptmax;
137  int nbinp;
138  int nbinp2D;
139  double pmax;
140  int nbineop;
142  double eopmax;
143  double eopmaxsht;
144  int nbindeta;
145  double detamin;
146  double detamax;
147  int nbindphi;
148  double dphimin;
149  double dphimax;
152  double detamatchmin;
153  double detamatchmax;
156  double dphimatchmin;
157  double dphimatchmax;
159  double fhitsmax;
161  double lhitsmax;
162  int nbinxyz;
164  double poptruemin;
165  double poptruemax;
166  int nbinmee;
167  double meemin;
168  double meemax;
169  int nbinhoe;
170  double hoemin;
171  double hoemax;
172 
173  //=========================================
174  // usual attributes and methods
175  //=========================================
176 
177  unsigned int nEvents_;
178 
179  bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
180  bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
181  bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
182  bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
183  bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
184 
185  bool trigger(const edm::Event &e);
186  unsigned int nAfterTrigger_;
187  std::vector<unsigned int> HLTPathsByIndex_;
188 
192 
193  TFile *histfile_;
194  TTree *tree_;
195 
196  float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
198  float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
199 
200  //=========================================
201  // histograms
202  //=========================================
203 
205 
212 
218 
220  TH1F *h_ele_Et;
228 
229  TH1F *histNum_;
230 
231  TH1F *histSclEn_;
232  TH1F *histSclEt_;
233  TH1F *histSclEta_;
234  TH1F *histSclPhi_;
236 
249  TH1F *h_ele_chi2;
253 
254  TH1F *h_ele_EoP;
262  TH1F *h_ele_HoE;
267 
270 
271  TH1F *h_ele_mva;
273 
282 
284 };
285 
286 using namespace reco;
287 
288 DQMAnalyzer::DQMAnalyzer(const edm::ParameterSet &conf) : beamSpot_(conf.getParameter<edm::InputTag>("beamSpot")) {
289  outputFile_ = conf.getParameter<std::string>("outputFile");
290  electronCollection_ = conf.getParameter<edm::InputTag>("electronCollection");
291  matchingObjectCollection_ = conf.getParameter<edm::InputTag>("matchingObjectCollection");
292  matchingCondition_ = conf.getParameter<std::string>("matchingCondition");
293  readAOD_ = conf.getParameter<bool>("readAOD");
294 
295  histfile_ = new TFile(outputFile_.c_str(), "RECREATE");
296 
297  // currently only one possible matching conditions
298  assert(matchingCondition_ == "Cone");
299  maxPtMatchingObject_ = conf.getParameter<double>("MaxPtMatchingObject");
300  maxAbsEtaMatchingObject_ = conf.getParameter<double>("MaxAbsEtaMatchingObject");
301  deltaR_ = conf.getParameter<double>("DeltaR");
302 
303  Selection_ = conf.getParameter<int>("Selection");
304  massLow_ = conf.getParameter<double>("MassLow");
305  massHigh_ = conf.getParameter<double>("MassHigh");
306  TPchecksign_ = conf.getParameter<bool>("TPchecksign");
307  TAGcheckclass_ = conf.getParameter<bool>("TAGcheckclass");
308  PROBEetcut_ = conf.getParameter<bool>("PROBEetcut");
309  PROBEcheckclass_ = conf.getParameter<bool>("PROBEcheckclass");
310 
311  minEt_ = conf.getParameter<double>("MinEt");
312  minPt_ = conf.getParameter<double>("MinPt");
313  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
314  isEB_ = conf.getParameter<bool>("SelectEB");
315  isEE_ = conf.getParameter<bool>("SelectEE");
316  isNotEBEEGap_ = conf.getParameter<bool>("SelectNotEBEEGap");
317  isEcalDriven_ = conf.getParameter<bool>("SelectEcalDriven");
318  isTrackerDriven_ = conf.getParameter<bool>("SelectTrackerDriven");
319  eOverPMinBarrel_ = conf.getParameter<double>("MinEOverPBarrel");
320  eOverPMaxBarrel_ = conf.getParameter<double>("MaxEOverPBarrel");
321  eOverPMinEndcaps_ = conf.getParameter<double>("MinEOverPEndcaps");
322  eOverPMaxEndcaps_ = conf.getParameter<double>("MaxEOverPEndcaps");
323  dEtaMinBarrel_ = conf.getParameter<double>("MinDetaBarrel");
324  dEtaMaxBarrel_ = conf.getParameter<double>("MaxDetaBarrel");
325  dEtaMinEndcaps_ = conf.getParameter<double>("MinDetaEndcaps");
326  dEtaMaxEndcaps_ = conf.getParameter<double>("MaxDetaEndcaps");
327  dPhiMinBarrel_ = conf.getParameter<double>("MinDphiBarrel");
328  dPhiMaxBarrel_ = conf.getParameter<double>("MaxDphiBarrel");
329  dPhiMinEndcaps_ = conf.getParameter<double>("MinDphiEndcaps");
330  dPhiMaxEndcaps_ = conf.getParameter<double>("MaxDphiEndcaps");
331  sigIetaIetaMinBarrel_ = conf.getParameter<double>("MinSigIetaIetaBarrel");
332  sigIetaIetaMaxBarrel_ = conf.getParameter<double>("MaxSigIetaIetaBarrel");
333  sigIetaIetaMinEndcaps_ = conf.getParameter<double>("MinSigIetaIetaEndcaps");
334  sigIetaIetaMaxEndcaps_ = conf.getParameter<double>("MaxSigIetaIetaEndcaps");
335  hadronicOverEmMaxBarrel_ = conf.getParameter<double>("MaxHoEBarrel");
336  hadronicOverEmMaxEndcaps_ = conf.getParameter<double>("MaxHoEEndcaps");
337  mvaMin_ = conf.getParameter<double>("MinMVA");
338  tipMaxBarrel_ = conf.getParameter<double>("MaxTipBarrel");
339  tipMaxEndcaps_ = conf.getParameter<double>("MaxTipEndcaps");
340  tkIso03Max_ = conf.getParameter<double>("MaxTkIso03");
341  hcalIso03Depth1MaxBarrel_ = conf.getParameter<double>("MaxHcalIso03Depth1Barrel");
342  hcalIso03Depth1MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth1Endcaps");
343  hcalIso03Depth2MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth2Endcaps");
344  ecalIso03MaxBarrel_ = conf.getParameter<double>("MaxEcalIso03Barrel");
345  ecalIso03MaxEndcaps_ = conf.getParameter<double>("MaxEcalIso03Endcaps");
346 
347  triggerResults_ = conf.getParameter<edm::InputTag>("triggerResults");
348  HLTPathsByName_ = conf.getParameter<std::vector<std::string> >("hltPaths");
349  HLTPathsByIndex_.resize(HLTPathsByName_.size());
350 
351  edm::ParameterSet pset = conf.getParameter<edm::ParameterSet>("HistosConfigurationData");
352 
353  etamin = pset.getParameter<double>("Etamin");
354  etamax = pset.getParameter<double>("Etamax");
355  phimin = pset.getParameter<double>("Phimin");
356  phimax = pset.getParameter<double>("Phimax");
357  ptmax = pset.getParameter<double>("Ptmax");
358  pmax = pset.getParameter<double>("Pmax");
359  eopmax = pset.getParameter<double>("Eopmax");
360  eopmaxsht = pset.getParameter<double>("Eopmaxsht");
361  detamin = pset.getParameter<double>("Detamin");
362  detamax = pset.getParameter<double>("Detamax");
363  dphimin = pset.getParameter<double>("Dphimin");
364  dphimax = pset.getParameter<double>("Dphimax");
365  detamatchmin = pset.getParameter<double>("Detamatchmin");
366  detamatchmax = pset.getParameter<double>("Detamatchmax");
367  dphimatchmin = pset.getParameter<double>("Dphimatchmin");
368  dphimatchmax = pset.getParameter<double>("Dphimatchmax");
369  fhitsmax = pset.getParameter<double>("Fhitsmax");
370  lhitsmax = pset.getParameter<double>("Lhitsmax");
371  nbineta = pset.getParameter<int>("Nbineta");
372  nbineta2D = pset.getParameter<int>("Nbineta2D");
373  nbinp = pset.getParameter<int>("Nbinp");
374  nbinpt = pset.getParameter<int>("Nbinpt");
375  nbinp2D = pset.getParameter<int>("Nbinp2D");
376  nbinpt2D = pset.getParameter<int>("Nbinpt2D");
377  nbinpteff = pset.getParameter<int>("Nbinpteff");
378  nbinphi = pset.getParameter<int>("Nbinphi");
379  nbinphi2D = pset.getParameter<int>("Nbinphi2D");
380  nbineop = pset.getParameter<int>("Nbineop");
381  nbineop2D = pset.getParameter<int>("Nbineop2D");
382  nbinfhits = pset.getParameter<int>("Nbinfhits");
383  nbinlhits = pset.getParameter<int>("Nbinlhits");
384  nbinxyz = pset.getParameter<int>("Nbinxyz");
385  nbindeta = pset.getParameter<int>("Nbindeta");
386  nbindphi = pset.getParameter<int>("Nbindphi");
387  nbindetamatch = pset.getParameter<int>("Nbindetamatch");
388  nbindphimatch = pset.getParameter<int>("Nbindphimatch");
389  nbindetamatch2D = pset.getParameter<int>("Nbindetamatch2D");
390  nbindphimatch2D = pset.getParameter<int>("Nbindphimatch2D");
391  nbinpoptrue = pset.getParameter<int>("Nbinpoptrue");
392  poptruemin = pset.getParameter<double>("Poptruemin");
393  poptruemax = pset.getParameter<double>("Poptruemax");
394  nbinmee = pset.getParameter<int>("Nbinmee");
395  meemin = pset.getParameter<double>("Meemin");
396  meemax = pset.getParameter<double>("Meemax");
397  nbinhoe = pset.getParameter<int>("Nbinhoe");
398  hoemin = pset.getParameter<double>("Hoemin");
399  hoemax = pset.getParameter<double>("Hoemax");
400 }
401 
403  // do anything here that needs to be done at desctruction time
404  // (e.g. close files, deallocate resources etc.)
405  histfile_->Write();
406  histfile_->Close();
407 }
408 
410  histfile_->cd();
411 
412  nEvents_ = 0;
413  nAfterTrigger_ = 0;
414 
415  // matching object
416  std::string::size_type locSC = matchingObjectCollection_.label().find("SuperCluster", 0);
418  if (locSC != std::string::npos) {
419  std::cout << "Matching objects are SuperClusters " << std::endl;
420  type = "SC";
421  } else {
422  std::cout << "Didn't recognize input matching objects!! " << std::endl;
423  }
424 
425  //==================================================
426  // matching object distributions
427  //==================================================
428 
429  std::string htitle, hlabel;
430  hlabel = "h_" + type + "Num";
431  htitle = "# " + type + "s";
432  h_matchingObjectNum = new TH1F(hlabel.c_str(), htitle.c_str(), nbinfhits, 0., fhitsmax);
433  hlabel = "h_" + type + "_eta";
434  htitle = type + " #eta";
435  h_matchingObjectEta = new TH1F(hlabel.c_str(), htitle.c_str(), nbineta, etamin, etamax);
436  hlabel = "h_" + type + "_abseta";
437  htitle = type + " |#eta|";
438  h_matchingObjectAbsEta = new TH1F(hlabel.c_str(), htitle.c_str(), nbineta / 2, 0., etamax);
439  hlabel = "h_" + type + "_P";
440  htitle = type + " p";
441  h_matchingObjectP = new TH1F(hlabel.c_str(), htitle.c_str(), nbinp, 0., pmax);
442  hlabel = "h_" + type + "_Pt";
443  htitle = type + " pt";
444  h_matchingObjectPt = new TH1F(hlabel.c_str(), htitle.c_str(), nbinpteff, 5., ptmax);
445  hlabel = "h_" + type + "_phi";
446  htitle = type + " phi";
447  h_matchingObjectPhi = new TH1F(hlabel.c_str(), htitle.c_str(), nbinphi, phimin, phimax);
448  hlabel = "h_" + type + "_z";
449  htitle = type + " z";
450  h_matchingObjectZ = new TH1F(hlabel.c_str(), htitle.c_str(), nbinxyz, -25, 25);
451 
452  h_matchingObjectNum->GetXaxis()->SetTitle("N_{SC}");
453  h_matchingObjectNum->GetYaxis()->SetTitle("Events");
454  h_matchingObjectEta->GetXaxis()->SetTitle("#eta_{SC}");
455  h_matchingObjectEta->GetYaxis()->SetTitle("Events");
456  h_matchingObjectP->GetXaxis()->SetTitle("E_{SC} (GeV)");
457  h_matchingObjectP->GetYaxis()->SetTitle("Events");
458 
460  new TH1F("h_ele_matchingObjectEta_matched", "Efficiency vs matching SC #eta", nbineta, etamin, etamax);
463  new TH1F("h_ele_matchingObjectAbsEta_matched", "Efficiency vs matching SC |#eta|", nbineta / 2, 0., 2.5);
466  new TH1F("h_ele_matchingObjectPt_matched", "Efficiency vs matching SC E_{T}", nbinpteff, 5., ptmax);
469  new TH1F("h_ele_matchingObjectPhi_matched", "Efficiency vs matching SC phi", nbinphi, phimin, phimax);
472  new TH1F("h_ele_matchingObjectZ_matched", "Efficiency vs matching SC z", nbinxyz, -25, 25);
474 
475  //==================================================
476  // caractéristique particule
477  //==================================================
478 
479  h_ele_vertexPt = new TH1F("h_ele_vertexPt", "ele transverse momentum", nbinpt, 0., ptmax);
480  h_ele_Et = new TH1F("h_ele_Et", "ele SC transverse energy", nbinpt, 0., ptmax);
481  h_ele_vertexEta = new TH1F("h_ele_vertexEta", "ele momentum eta", nbineta, etamin, etamax);
482  h_ele_vertexPhi = new TH1F("h_ele_vertexPhi", "ele momentum #phi", nbinphi, phimin, phimax);
483  h_ele_vertexX = new TH1F("h_ele_vertexX", "ele vertex x", nbinxyz, -0.1, 0.1);
484  h_ele_vertexY = new TH1F("h_ele_vertexY", "ele vertex y", nbinxyz, -0.1, 0.1);
485  h_ele_vertexZ = new TH1F("h_ele_vertexZ", "ele vertex z", nbinxyz, -25, 25);
486  h_ele_vertexTIP = new TH1F("h_ele_vertexTIP", "ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
487  h_ele_charge = new TH1F("h_ele_charge", "ele charge", 5, -2., 2.);
488 
489  h_ele_charge->GetXaxis()->SetTitle("charge");
490  h_ele_charge->GetYaxis()->SetTitle("Events");
491 
492  h_ele_vertexPt->GetXaxis()->SetTitle("p_{T vertex} (GeV/c)");
493  h_ele_vertexPt->GetYaxis()->SetTitle("Events");
494 
495  h_ele_Et->GetXaxis()->SetTitle("E_{T} (GeV)");
496  h_ele_Et->GetYaxis()->SetTitle("Events");
497 
498  h_ele_vertexEta->GetXaxis()->SetTitle("#eta");
499  h_ele_vertexEta->GetYaxis()->SetTitle("Events");
500  h_ele_vertexPhi->GetXaxis()->SetTitle("#phi (rad)");
501  h_ele_vertexPhi->GetYaxis()->SetTitle("Events");
502 
503  h_ele_vertexX->GetXaxis()->SetTitle("x (cm)");
504  h_ele_vertexX->GetYaxis()->SetTitle("Events");
505  h_ele_vertexY->GetXaxis()->SetTitle("y (cm)");
506  h_ele_vertexY->GetYaxis()->SetTitle("Events");
507  h_ele_vertexZ->GetXaxis()->SetTitle("z (cm)");
508  h_ele_vertexZ->GetYaxis()->SetTitle("Events");
509 
510  h_ele_vertexTIP->GetXaxis()->SetTitle("TIP (cm)");
511  h_ele_vertexTIP->GetYaxis()->SetTitle("Events");
512 
513  //==================================================
514  // # rec electrons
515  //==================================================
516 
517  histNum_ = new TH1F("h_recEleNum", "# rec electrons", 20, 0., 20.);
518 
519  histNum_->GetXaxis()->SetTitle("N_{ele}");
520  histNum_->GetYaxis()->SetTitle("Events");
521 
522  //==================================================
523  // SuperClusters
524  //==================================================
525 
526  histSclEn_ = new TH1F("h_scl_energy", "ele supercluster energy", nbinp, 0., pmax);
527  histSclEt_ = new TH1F("h_scl_et", "ele supercluster transverse energy", nbinpt, 0., ptmax);
528  histSclEta_ = new TH1F("h_scl_eta", "ele supercluster eta", nbineta, etamin, etamax);
529  histSclPhi_ = new TH1F("h_scl_phi", "ele supercluster phi", nbinphi, phimin, phimax);
530  histSclSigEtaEta_ = new TH1F("h_scl_sigetaeta", "ele supercluster sigma eta eta", 100, 0., 0.05);
531 
532  //==================================================
533  // electron track
534  //==================================================
535 
536  h_ele_ambiguousTracks = new TH1F("h_ele_ambiguousTracks", "ele # ambiguous tracks", 5, 0., 5.);
538  new TH2F("h_ele_ambiguousTracksVsEta", "ele # ambiguous tracks vs eta", nbineta2D, etamin, etamax, 5, 0., 5.);
540  new TH2F("h_ele_ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", nbinphi2D, phimin, phimax, 5, 0., 5.);
542  new TH2F("h_ele_ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", nbinpt2D, 0., ptmax, 5, 0., 5.);
543  h_ele_foundHits = new TH1F("h_ele_foundHits", "ele track # found hits", nbinfhits, 0., fhitsmax);
544  h_ele_foundHitsVsEta = new TH2F(
545  "h_ele_foundHitsVsEta", "ele track # found hits vs eta", nbineta2D, etamin, etamax, nbinfhits, 0., fhitsmax);
546  h_ele_foundHitsVsPhi = new TH2F(
547  "h_ele_foundHitsVsPhi", "ele track # found hits vs phi", nbinphi2D, phimin, phimax, nbinfhits, 0., fhitsmax);
549  new TH2F("h_ele_foundHitsVsPt", "ele track # found hits vs pt", nbinpt2D, 0., ptmax, nbinfhits, 0., fhitsmax);
550  h_ele_lostHits = new TH1F("h_ele_lostHits", "ele track # lost hits", 5, 0., 5.);
551  h_ele_lostHitsVsEta = new TH2F(
552  "h_ele_lostHitsVsEta", "ele track # lost hits vs eta", nbineta2D, etamin, etamax, nbinlhits, 0., lhitsmax);
553  h_ele_lostHitsVsPhi = new TH2F(
554  "h_ele_lostHitsVsPhi", "ele track # lost hits vs eta", nbinphi2D, phimin, phimax, nbinlhits, 0., lhitsmax);
556  new TH2F("h_ele_lostHitsVsPt", "ele track # lost hits vs eta", nbinpt2D, 0., ptmax, nbinlhits, 0., lhitsmax);
557  h_ele_chi2 = new TH1F("h_ele_chi2", "ele track #chi^{2}", 100, 0., 15.);
558  h_ele_chi2VsEta = new TH2F("h_ele_chi2VsEta", "ele track #chi^{2} vs eta", nbineta2D, etamin, etamax, 50, 0., 15.);
559  h_ele_chi2VsPhi = new TH2F("h_ele_chi2VsPhi", "ele track #chi^{2} vs phi", nbinphi2D, phimin, phimax, 50, 0., 15.);
560  h_ele_chi2VsPt = new TH2F("h_ele_chi2VsPt", "ele track #chi^{2} vs pt", nbinpt2D, 0., ptmax, 50, 0., 15.);
561 
562  h_ele_foundHits->GetXaxis()->SetTitle("N_{hits}");
563  h_ele_foundHits->GetYaxis()->SetTitle("Events");
564  h_ele_lostHits->GetXaxis()->SetTitle("N_{lost hits}");
565  h_ele_lostHits->GetYaxis()->SetTitle("Events");
566  h_ele_chi2->GetXaxis()->SetTitle("#Chi^{2}");
567  h_ele_chi2->GetYaxis()->SetTitle("Events");
568 
569  //==================================================
570  // electron matching and ID
571  //==================================================
572 
573  h_ele_EoP = new TH1F("h_ele_EoP", "ele E/P_{vertex}", nbineop, 0., eopmax);
574  h_ele_EeleOPout = new TH1F("h_ele_EeleOPout", "ele E_{ele}/P_{out}", nbineop, 0., eopmax);
575  h_ele_dEtaSc_propVtx = new TH1F(
576  "h_ele_dEtaSc_propVtx", "ele #eta_{sc} - #eta_{tr}, prop from vertex", nbindetamatch, detamatchmin, detamatchmax);
577  h_ele_dPhiSc_propVtx = new TH1F(
578  "h_ele_dPhiSc_propVtx", "ele #phi_{sc} - #phi_{tr}, prop from vertex", nbindphimatch, dphimatchmin, dphimatchmax);
579  h_ele_dEtaCl_propOut = new TH1F("h_ele_dEtaCl_propOut",
580  "ele #eta_{cl} - #eta_{tr}, prop from outermost",
582  detamatchmin,
583  detamatchmax);
584  h_ele_dPhiCl_propOut = new TH1F("h_ele_dPhiCl_propOut",
585  "ele #phi_{cl} - #phi_{tr}, prop from outermost",
587  dphimatchmin,
588  dphimatchmax);
589  h_ele_dEtaEleCl_propOut = new TH1F("h_ele_dEtaEleCl_propOut",
590  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
592  detamatchmin,
593  detamatchmax);
594  h_ele_dPhiEleCl_propOut = new TH1F("h_ele_dPhiEleCl_propOut",
595  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
597  dphimatchmin,
598  dphimatchmax);
599  h_ele_HoE = new TH1F("h_ele_HoE", "ele hadronic energy / em energy", nbinhoe, hoemin, hoemax);
600  h_ele_outerP = new TH1F("h_ele_outerP", "ele track outer p, mean", nbinp, 0., pmax);
601  h_ele_outerP_mode = new TH1F("h_ele_outerP_mode", "ele track outer p, mode", nbinp, 0., pmax);
602  h_ele_outerPt = new TH1F("h_ele_outerPt", "ele track outer p_{T}, mean", nbinpt, 0., ptmax);
603  h_ele_outerPt_mode = new TH1F("h_ele_outerPt_mode", "ele track outer p_{T}, mode", nbinpt, 0., ptmax);
604 
605  h_ele_PinMnPout = new TH1F("h_ele_PinMnPout", "ele track inner p - outer p, mean", nbinp, 0., 200.);
606  h_ele_PinMnPout_mode = new TH1F("h_ele_PinMnPout_mode", "ele track inner p - outer p, mode", nbinp, 0., 100.);
607 
608  h_ele_mva = new TH1F("h_ele_mva", "ele identification mva", 100, -1., 1.);
609  h_ele_provenance = new TH1F("h_ele_provenance", "ele provenance", 5, -2., 3.);
610 
611  h_ele_PinMnPout->GetXaxis()->SetTitle("P_{vertex} - P_{out} (GeV/c)");
612  h_ele_PinMnPout->GetYaxis()->SetTitle("Events");
613  h_ele_PinMnPout_mode->GetXaxis()->SetTitle("P_{vertex} - P_{out}, mode (GeV/c)");
614  h_ele_PinMnPout_mode->GetYaxis()->SetTitle("Events");
615 
616  h_ele_outerP->GetXaxis()->SetTitle("P_{out} (GeV/c)");
617  h_ele_outerP->GetYaxis()->SetTitle("Events");
618  h_ele_outerP_mode->GetXaxis()->SetTitle("P_{out} (GeV/c)");
619  h_ele_outerP_mode->GetYaxis()->SetTitle("Events");
620 
621  h_ele_outerPt->GetXaxis()->SetTitle("P_{T out} (GeV/c)");
622  h_ele_outerPt->GetYaxis()->SetTitle("Events");
623  h_ele_outerPt_mode->GetXaxis()->SetTitle("P_{T out} (GeV/c)");
624  h_ele_outerPt_mode->GetYaxis()->SetTitle("Events");
625 
626  h_ele_EoP->GetXaxis()->SetTitle("E/P_{vertex}");
627  h_ele_EoP->GetYaxis()->SetTitle("Events");
628 
629  h_ele_EeleOPout->GetXaxis()->SetTitle("E_{ele}/P_{out}");
630  h_ele_EeleOPout->GetYaxis()->SetTitle("Events");
631 
632  h_ele_dEtaSc_propVtx->GetXaxis()->SetTitle("#eta_{sc} - #eta_{tr}");
633  h_ele_dEtaSc_propVtx->GetYaxis()->SetTitle("Events");
634  h_ele_dEtaCl_propOut->GetXaxis()->SetTitle("#eta_{seedcl} - #eta_{tr}");
635  h_ele_dEtaCl_propOut->GetYaxis()->SetTitle("Events");
636  h_ele_dEtaEleCl_propOut->GetXaxis()->SetTitle("#eta_{elecl} - #eta_{tr}");
637  h_ele_dEtaEleCl_propOut->GetYaxis()->SetTitle("Events");
638  h_ele_dPhiSc_propVtx->GetXaxis()->SetTitle("#phi_{sc} - #phi_{tr} (rad)");
639  h_ele_dPhiSc_propVtx->GetYaxis()->SetTitle("Events");
640  h_ele_dPhiCl_propOut->GetXaxis()->SetTitle("#phi_{seedcl} - #phi_{tr} (rad)");
641  h_ele_dPhiCl_propOut->GetYaxis()->SetTitle("Events");
642  h_ele_dPhiEleCl_propOut->GetXaxis()->SetTitle("#phi_{elecl} - #phi_{tr} (rad)");
643  h_ele_dPhiEleCl_propOut->GetYaxis()->SetTitle("Events");
644  h_ele_HoE->GetXaxis()->SetTitle("H/E");
645  h_ele_HoE->GetYaxis()->SetTitle("Events");
646 
647  //==================================================
648  // isolation
649  //==================================================
650 
651  h_ele_tkSumPt_dr03 = new TH1F("h_ele_tkSumPt_dr03", "tk isolation sum, dR=0.3", 100, 0.0, 20.);
652  h_ele_ecalRecHitSumEt_dr03 = new TH1F("h_ele_ecalRecHitSumEt_dr03", "ecal isolation sum, dR=0.3", 100, 0.0, 20.);
654  new TH1F("h_ele_hcalDepth1TowerSumEt_dr03", "hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
656  new TH1F("h_ele_hcalDepth2TowerSumEt_dr03", "hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
657  h_ele_tkSumPt_dr04 = new TH1F("h_ele_tkSumPt_dr04", "hcal isolation sum", 100, 0.0, 20.);
658  h_ele_ecalRecHitSumEt_dr04 = new TH1F("h_ele_ecalRecHitSumEt_dr04", "ecal isolation sum, dR=0.4", 100, 0.0, 20.);
660  new TH1F("h_ele_hcalDepth1TowerSumEt_dr04", "hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
662  new TH1F("h_ele_hcalDepth2TowerSumEt_dr04", "hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
663 
664  //==================================================
665  // T&P
666  //==================================================
667  h_ele_mee_os = new TH1F("h_ele_mee_os", "ele pairs invariant mass, opposite sign", nbinmee, meemin, meemax);
668 }
669 
671  histfile_->cd();
672  std::cout << "efficiency calculation " << std::endl;
673 
674  // efficiency vs pt
675  TH1F *h_ele_ptEff = (TH1F *)h_ele_matchingObjectPt_matched->Clone("h_ele_ptEff");
676  h_ele_ptEff->Reset();
677  h_ele_ptEff->Divide(h_ele_matchingObjectPt_matched, h_matchingObjectPt, 1, 1, "b");
678  h_ele_ptEff->GetXaxis()->SetTitle("p_{T} (GeV/c)");
679  h_ele_ptEff->GetYaxis()->SetTitle("Efficiency");
680 
681  // efficiency vs eta
682  TH1F *h_ele_etaEff = (TH1F *)h_ele_matchingObjectEta_matched->Clone("h_ele_etaEff");
683  h_ele_etaEff->Reset();
684  h_ele_etaEff->Divide(h_ele_matchingObjectEta_matched, h_matchingObjectEta, 1, 1, "b");
685  h_ele_etaEff->Print();
686  h_ele_etaEff->GetXaxis()->SetTitle("#eta");
687  h_ele_etaEff->GetYaxis()->SetTitle("Efficiency");
688 
689  // efficiency vs |eta|
690  TH1F *h_ele_absetaEff = (TH1F *)h_ele_matchingObjectAbsEta_matched->Clone("h_ele_absetaEff");
691  h_ele_absetaEff->Reset();
692  h_ele_absetaEff->Divide(h_ele_matchingObjectAbsEta_matched, h_matchingObjectAbsEta, 1, 1, "b");
693  h_ele_absetaEff->GetXaxis()->SetTitle("|#eta|");
694  h_ele_absetaEff->GetYaxis()->SetTitle("Efficiency");
695 
696  // efficiency vs phi
697  TH1F *h_ele_phiEff = (TH1F *)h_ele_matchingObjectPhi_matched->Clone("h_ele_phiEff");
698  h_ele_phiEff->Reset();
699  h_ele_phiEff->Divide(h_ele_matchingObjectPhi_matched, h_matchingObjectPhi, 1, 1, "b");
700  h_ele_phiEff->GetXaxis()->SetTitle("#phi (rad)");
701  h_ele_phiEff->GetYaxis()->SetTitle("Efficiency");
702 
703  // efficiency vs z
704  TH1F *h_ele_zEff = (TH1F *)h_ele_matchingObjectZ_matched->Clone("h_ele_zEff");
705  h_ele_zEff->Reset();
706  h_ele_zEff->Divide(h_ele_matchingObjectZ_matched, h_matchingObjectZ, 1, 1, "b");
707  h_ele_zEff->Print();
708  h_ele_zEff->GetXaxis()->SetTitle("z (cm)");
709  h_ele_zEff->GetYaxis()->SetTitle("Efficiency");
710 
711  // classes
712 
713  // fbrem
714 
715  //profiles from 2D histos
716 
717  // mc truth
718 
719  h_matchingObjectNum->Write();
720 
721  // rec event
722 
723  histNum_->Write();
724 
725  // mc
726  h_matchingObjectEta->Write();
727  h_matchingObjectAbsEta->Write();
728  h_matchingObjectP->Write();
729  h_matchingObjectPt->Write();
730  h_matchingObjectPhi->Write();
731  h_matchingObjectZ->Write();
732 
733  // matched electrons
734  h_ele_charge->Write();
735 
736  h_ele_vertexPt->Write();
737  h_ele_vertexEta->Write();
738  h_ele_vertexPhi->Write();
739  h_ele_vertexX->Write();
740  h_ele_vertexY->Write();
741  h_ele_vertexZ->Write();
742 
743  h_ele_vertexTIP->Write();
744 
745  h_ele_Et->Write();
746 
752 
753  // h_ele_PoPmatchingObject_matched->Write();
754  // h_ele_PtoPtmatchingObject_matched->Write();
755  // h_ele_PoPmatchingObject_barrel_matched ->Write();
756  // h_ele_PoPmatchingObject_endcaps_matched->Write();
757  // h_ele_PtoPtmatchingObject_barrel_matched ->Write();
758  // h_ele_PtoPtmatchingObject_endcaps_matched->Write();
759  // h_ele_EtaMnEtamatchingObject_matched->Write();
760  // h_ele_PhiMnPhimatchingObject_matched ->Write();
761  // h_ele_PhiMnPhimatchingObject2_matched ->Write();
762 
763  // matched electron, superclusters
764  histSclEn_->Write();
765  histSclEt_->Write();
766  histSclEta_->Write();
767  histSclPhi_->Write();
768  histSclSigEtaEta_->Write();
769 
770  // matched electron, gsf tracks
771  h_ele_ambiguousTracks->Write();
774  h_ele_ambiguousTracksVsPt->Write();
775 
776  h_ele_foundHits->Write();
777  h_ele_foundHitsVsEta->Write();
778  h_ele_foundHitsVsPhi->Write();
779  h_ele_foundHitsVsPt->Write();
780 
781  h_ele_lostHits->Write();
782  h_ele_lostHitsVsEta->Write();
783  h_ele_lostHitsVsPhi->Write();
784  h_ele_lostHitsVsPt->Write();
785 
786  h_ele_chi2->Write();
787  h_ele_chi2VsEta->Write();
788  h_ele_chi2VsPhi->Write();
789  h_ele_chi2VsPt->Write();
790 
791  h_ele_PinMnPout->Write();
792  h_ele_PinMnPout_mode->Write();
793  h_ele_outerP->Write();
794  h_ele_outerP_mode->Write();
795  h_ele_outerPt->Write();
796  h_ele_outerPt_mode->Write();
797 
798  // matched electrons, matching
799  h_ele_EoP->Write();
800  h_ele_EeleOPout->Write();
801  h_ele_dEtaSc_propVtx->Write();
802  h_ele_dPhiSc_propVtx->Write();
803  h_ele_dEtaCl_propOut->Write();
804  h_ele_dPhiCl_propOut->Write();
805  h_ele_dEtaEleCl_propOut->Write();
806  h_ele_dPhiEleCl_propOut->Write();
807  h_ele_HoE->Write();
808 
809  h_ele_mee_os->GetXaxis()->SetTitle("m_{e^{+}e^{-}} (GeV/c^{2})");
810  h_ele_mee_os->GetYaxis()->SetTitle("Events");
811  h_ele_mee_os->Write();
812 
813  // classes
814 
815  // fbrem
816 
817  // Eff
818  h_ele_etaEff->Write();
819  h_ele_zEff->Write();
820  h_ele_phiEff->Write();
821  h_ele_absetaEff->Write();
822  h_ele_ptEff->Write();
823 
824  // e/g et pflow electrons
825  h_ele_mva->Write();
826  h_ele_provenance->Write();
827 
828  // isolation
829  h_ele_tkSumPt_dr03->GetXaxis()->SetTitle("TkIsoSum, cone 0.3 (GeV/c)");
830  h_ele_tkSumPt_dr03->GetYaxis()->SetTitle("Events");
831  h_ele_ecalRecHitSumEt_dr03->GetXaxis()->SetTitle("EcalIsoSum, cone 0.3 (GeV)");
832  h_ele_ecalRecHitSumEt_dr03->GetYaxis()->SetTitle("Events");
833  h_ele_hcalDepth1TowerSumEt_dr03->GetXaxis()->SetTitle("Hcal1IsoSum, cone 0.3 (GeV)");
834  h_ele_hcalDepth1TowerSumEt_dr03->GetYaxis()->SetTitle("Events");
835  h_ele_hcalDepth2TowerSumEt_dr03->GetXaxis()->SetTitle("Hcal2IsoSum, cone 0.3 (GeV)");
836  h_ele_hcalDepth2TowerSumEt_dr03->GetYaxis()->SetTitle("Events");
837  h_ele_tkSumPt_dr04->GetXaxis()->SetTitle("TkIsoSum, cone 0.4 (GeV/c)");
838  h_ele_tkSumPt_dr04->GetYaxis()->SetTitle("Events");
839  h_ele_ecalRecHitSumEt_dr04->GetXaxis()->SetTitle("EcalIsoSum, cone 0.4 (GeV)");
840  h_ele_ecalRecHitSumEt_dr04->GetYaxis()->SetTitle("Events");
841  h_ele_hcalDepth1TowerSumEt_dr04->GetXaxis()->SetTitle("Hcal1IsoSum, cone 0.4 (GeV)");
842  h_ele_hcalDepth1TowerSumEt_dr04->GetYaxis()->SetTitle("Events");
843  h_ele_hcalDepth2TowerSumEt_dr04->GetXaxis()->SetTitle("Hcal2IsoSum, cone 0.4 (GeV)");
844  h_ele_hcalDepth2TowerSumEt_dr04->GetYaxis()->SetTitle("Events");
845 
846  h_ele_tkSumPt_dr03->Write();
850  h_ele_tkSumPt_dr04->Write();
854 }
855 
857  edm::LogInfo("DQMAnalyzer::analyze") << "Treating event " << iEvent.id();
858  nEvents_++;
859  if (!trigger(iEvent))
860  return;
861  nAfterTrigger_++;
862  edm::LogInfo("DQMAnalyzer::analyze") << "Trigger OK";
865  edm::LogInfo("DQMAnalyzer::analyze") << "Event has " << gsfElectrons.product()->size() << " electrons";
867  iEvent.getByLabel(matchingObjectCollection_, recoClusters);
868  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
869  iEvent.getByLabel(beamSpot_, recoBeamSpotHandle);
870  const reco::BeamSpot bs = *recoBeamSpotHandle;
871  histNum_->Fill((*gsfElectrons).size());
872 
873  // selected rec electrons
874  reco::GsfElectronCollection::const_iterator gsfIter;
875  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
876  // vertex TIP
877  double vertexTIP = (gsfIter->vertex().x() - bs.position().x()) * (gsfIter->vertex().x() - bs.position().x()) +
878  (gsfIter->vertex().y() - bs.position().y()) * (gsfIter->vertex().y() - bs.position().y());
879  vertexTIP = sqrt(vertexTIP);
880 
881  // select electrons
882  if (!selected(gsfIter, vertexTIP))
883  continue;
884 
885  // electron related distributions
886  h_ele_charge->Fill(gsfIter->charge());
887  h_ele_vertexPt->Fill(gsfIter->pt());
888  h_ele_Et->Fill(gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()));
889  h_ele_vertexEta->Fill(gsfIter->eta());
890  h_ele_vertexPhi->Fill(gsfIter->phi());
891  h_ele_vertexX->Fill(gsfIter->vertex().x());
892  h_ele_vertexY->Fill(gsfIter->vertex().y());
893  h_ele_vertexZ->Fill(gsfIter->vertex().z());
894  h_ele_vertexTIP->Fill(vertexTIP);
895 
896  // supercluster related distributions
897  reco::SuperClusterRef sclRef = gsfIter->superCluster();
898  // ALREADY DONE IN GSF ELECTRON CORE
899  // if (!gsfIter->ecalDrivenSeed()&&gsfIter->trackerDrivenSeed())
900  // sclRef = gsfIter->parentSuperCluster() ;
901  histSclEn_->Fill(sclRef->energy());
902  double R = std::sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
903  double Rt = std::sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
904  histSclEt_->Fill(sclRef->energy() * (Rt / R));
905  histSclEta_->Fill(sclRef->eta());
906  histSclPhi_->Fill(sclRef->phi());
907  histSclSigEtaEta_->Fill(gsfIter->scSigmaEtaEta());
908 
909  // track related distributions
910  h_ele_ambiguousTracks->Fill(gsfIter->ambiguousGsfTracksSize());
911  h_ele_ambiguousTracksVsEta->Fill(gsfIter->eta(), gsfIter->ambiguousGsfTracksSize());
912  h_ele_ambiguousTracksVsPhi->Fill(gsfIter->phi(), gsfIter->ambiguousGsfTracksSize());
913  h_ele_ambiguousTracksVsPt->Fill(gsfIter->pt(), gsfIter->ambiguousGsfTracksSize());
914  if (!readAOD_) { // track extra does not exist in AOD
915  h_ele_foundHits->Fill(gsfIter->gsfTrack()->numberOfValidHits());
916  h_ele_foundHitsVsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->numberOfValidHits());
917  h_ele_foundHitsVsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->numberOfValidHits());
918  h_ele_foundHitsVsPt->Fill(gsfIter->pt(), gsfIter->gsfTrack()->numberOfValidHits());
919  h_ele_lostHits->Fill(gsfIter->gsfTrack()->numberOfLostHits());
920  h_ele_lostHitsVsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->numberOfLostHits());
921  h_ele_lostHitsVsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->numberOfLostHits());
922  h_ele_lostHitsVsPt->Fill(gsfIter->pt(), gsfIter->gsfTrack()->numberOfLostHits());
923  h_ele_chi2->Fill(gsfIter->gsfTrack()->normalizedChi2());
924  h_ele_chi2VsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->normalizedChi2());
925  h_ele_chi2VsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->normalizedChi2());
926  h_ele_chi2VsPt->Fill(gsfIter->pt(), gsfIter->gsfTrack()->normalizedChi2());
927  }
928 
929  // from gsf track interface, hence using mean
930  if (!readAOD_) { // track extra does not exist in AOD
931  h_ele_PinMnPout->Fill(gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R());
932  h_ele_outerP->Fill(gsfIter->gsfTrack()->outerMomentum().R());
933  h_ele_outerPt->Fill(gsfIter->gsfTrack()->outerMomentum().Rho());
934  }
935 
936  // from electron interface, hence using mode
937  h_ele_PinMnPout_mode->Fill(gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
938  h_ele_outerP_mode->Fill(gsfIter->trackMomentumOut().R());
939  h_ele_outerPt_mode->Fill(gsfIter->trackMomentumOut().Rho());
940 
941  // match distributions
942  h_ele_EoP->Fill(gsfIter->eSuperClusterOverP());
943  h_ele_EeleOPout->Fill(gsfIter->eEleClusterOverPout());
944  h_ele_dEtaSc_propVtx->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
945  h_ele_dPhiSc_propVtx->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
946  h_ele_dEtaCl_propOut->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
947  h_ele_dPhiCl_propOut->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
948  h_ele_dEtaEleCl_propOut->Fill(gsfIter->deltaEtaEleClusterTrackAtCalo());
949  h_ele_dPhiEleCl_propOut->Fill(gsfIter->deltaPhiEleClusterTrackAtCalo());
950  h_ele_HoE->Fill(gsfIter->hadronicOverEm());
951 
952  //classes
953 
954  //fbrem
955 
956  h_ele_mva->Fill(gsfIter->mva_e_pi());
957  if (gsfIter->ecalDrivenSeed())
958  h_ele_provenance->Fill(1.);
959  if (gsfIter->trackerDrivenSeed())
960  h_ele_provenance->Fill(-1.);
961  if (gsfIter->trackerDrivenSeed() || gsfIter->ecalDrivenSeed())
962  h_ele_provenance->Fill(0.);
963  if (gsfIter->trackerDrivenSeed() && !gsfIter->ecalDrivenSeed())
964  h_ele_provenance->Fill(-2.);
965  if (!gsfIter->trackerDrivenSeed() && gsfIter->ecalDrivenSeed())
966  h_ele_provenance->Fill(2.);
967 
968  h_ele_tkSumPt_dr03->Fill(gsfIter->dr03TkSumPt());
969  h_ele_ecalRecHitSumEt_dr03->Fill(gsfIter->dr03EcalRecHitSumEt());
970  h_ele_hcalDepth1TowerSumEt_dr03->Fill(gsfIter->dr03HcalTowerSumEt(1));
971  h_ele_hcalDepth2TowerSumEt_dr03->Fill(gsfIter->dr03HcalTowerSumEt(2));
972  h_ele_tkSumPt_dr04->Fill(gsfIter->dr04TkSumPt());
973  h_ele_ecalRecHitSumEt_dr04->Fill(gsfIter->dr04EcalRecHitSumEt());
974  h_ele_hcalDepth1TowerSumEt_dr04->Fill(gsfIter->dr04HcalTowerSumEt(1));
975  h_ele_hcalDepth2TowerSumEt_dr04->Fill(gsfIter->dr04HcalTowerSumEt(2));
976  }
977 
978  // association matching object-reco electrons
979  int matchingObjectNum = 0;
980  reco::SuperClusterCollection::const_iterator moIter;
981  for (moIter = recoClusters->begin(); moIter != recoClusters->end(); moIter++) {
982  // number of matching objects
983  matchingObjectNum++;
984 
985  if (moIter->energy() / cosh(moIter->eta()) > maxPtMatchingObject_ ||
986  fabs(moIter->eta()) > maxAbsEtaMatchingObject_) {
987  continue;
988  }
989 
990  // suppress the endcaps
991  //if (fabs(moIter->eta()) > 1.5) continue;
992  // select central z
993  //if ( fabs((*mcIter)->production_vertex()->position().z())>50.) continue;
994 
995  h_matchingObjectEta->Fill(moIter->eta());
996  h_matchingObjectAbsEta->Fill(fabs(moIter->eta()));
997  h_matchingObjectP->Fill(moIter->energy());
998  h_matchingObjectPt->Fill(moIter->energy() / cosh(moIter->eta()));
999  h_matchingObjectPhi->Fill(moIter->phi());
1000  h_matchingObjectZ->Fill(moIter->z());
1001 
1002  // find best matched electron
1003  bool okGsfFound = false;
1004  double gsfOkRatio = 999999.;
1005  reco::GsfElectron bestGsfElectron;
1006  reco::GsfElectronCollection::const_iterator gsfIter;
1007  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
1008  double vertexTIP = (gsfIter->vertex().x() - bs.position().x()) * (gsfIter->vertex().x() - bs.position().x()) +
1009  (gsfIter->vertex().y() - bs.position().y()) * (gsfIter->vertex().y() - bs.position().y());
1010  vertexTIP = sqrt(vertexTIP);
1011 
1012  // select electrons
1013  if (!selected(gsfIter, vertexTIP))
1014  continue;
1015 
1016  if (Selection_ >= 4) {
1017  reco::GsfElectronCollection::const_iterator gsfIter2;
1018  for (gsfIter2 = gsfIter + 1; gsfIter2 != gsfElectrons->end(); gsfIter2++) {
1019  math::XYZTLorentzVector p12 = (*gsfIter).p4() + (*gsfIter2).p4();
1020  float mee2 = p12.Dot(p12);
1021  bool opsign = (gsfIter->charge() * gsfIter2->charge() < 0.);
1022  float invMass = sqrt(mee2);
1023 
1024  if (TPchecksign_ && !opsign)
1025  break;
1026 
1027  // conditions Tag
1028  if (TAGcheckclass_ && (gsfIter->classification() == GsfElectron::SHOWERING || gsfIter->isGap()))
1029  break;
1030 
1031  // conditions Probe
1032  if (PROBEetcut_ && (gsfIter2->superCluster()->energy() / cosh(gsfIter2->superCluster()->eta()) < minEt_))
1033  continue;
1034  if (PROBEcheckclass_ && (gsfIter2->classification() == GsfElectron::SHOWERING || gsfIter2->isGap()))
1035  continue;
1036 
1037  if (invMass < massLow_ || invMass > massHigh_)
1038  continue;
1039 
1040  h_ele_mee_os->Fill(invMass);
1041  bestGsfElectron = *gsfIter2;
1042  okGsfFound = true;
1043  }
1044  } else {
1045  reco::GsfElectronCollection::const_iterator gsfIter2;
1046  for (gsfIter2 = gsfIter + 1; gsfIter2 != gsfElectrons->end(); gsfIter2++) {
1047  math::XYZTLorentzVector p12 = (*gsfIter).p4() + (*gsfIter2).p4();
1048  float mee2 = p12.Dot(p12);
1049  //bool opsign = (gsfIter->charge()*gsfIter2->charge()<0.) ;
1050  float invMass = sqrt(mee2);
1051  h_ele_mee_os->Fill(invMass);
1052  }
1053 
1054  // matching with a cone in eta phi
1055  if (matchingCondition_ == "Cone") {
1056  double dphi = gsfIter->phi() - moIter->phi();
1057  if (fabs(dphi) > CLHEP::pi) {
1058  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1059  }
1060  double deltaR = sqrt(std::pow((moIter->eta() - gsfIter->eta()), 2) + std::pow(dphi, 2));
1061  if (deltaR < deltaR_) {
1062  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
1063  //(gsfIter->charge() > 0.) ){
1064  double tmpGsfRatio = gsfIter->p() / moIter->energy();
1065  if (fabs(tmpGsfRatio - 1) < fabs(gsfOkRatio - 1) && Selection_ != 4) {
1066  gsfOkRatio = tmpGsfRatio;
1067  bestGsfElectron = *gsfIter;
1068  okGsfFound = true;
1069  }
1070  //}
1071  }
1072  }
1073  }
1074  } // loop over rec ele to look for the best one
1075 
1076  // analysis when the matching object is matched by a rec electron
1077  if (okGsfFound) {
1078  // generated distributions for matched electrons
1079  h_ele_matchingObjectPt_matched->Fill(moIter->energy() / cosh(moIter->eta()));
1080  h_ele_matchingObjectPhi_matched->Fill(moIter->phi());
1081  h_ele_matchingObjectAbsEta_matched->Fill(fabs(moIter->eta()));
1082  h_ele_matchingObjectEta_matched->Fill(moIter->eta());
1083  h_ele_matchingObjectZ_matched->Fill(moIter->z());
1084 
1085  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster();
1086 
1087  // add here distributions for matched electrons as for all electrons
1088  //..
1089  } // gsf electron found
1090 
1091  } // loop overmatching object
1092 
1093  h_matchingObjectNum->Fill(matchingObjectNum);
1094 }
1095 
1097  // retreive TriggerResults from the event
1099  e.getByLabel(triggerResults_, triggerResults);
1100 
1101  bool accept = false;
1102 
1103  if (triggerResults.isValid()) {
1104  //std::cout << "TriggerResults found, number of HLT paths: " << triggerResults->size() << std::endl;
1105 
1106  // get trigger names
1107  const edm::TriggerNames &triggerNames = e.triggerNames(*triggerResults);
1108  if (nEvents_ == 1) {
1109  for (unsigned int i = 0; i < triggerNames.size(); i++) {
1110  // std::cout << "trigger path= " << triggerNames.triggerName(i) << std::endl;
1111  }
1112  }
1113 
1114  unsigned int n = HLTPathsByName_.size();
1115  for (unsigned int i = 0; i != n; i++) {
1116  HLTPathsByIndex_[i] = triggerNames.triggerIndex(HLTPathsByName_[i]);
1117  }
1118 
1119  // empty input vectors (n==0) means any trigger paths
1120  if (n == 0) {
1121  n = triggerResults->size();
1122  HLTPathsByName_.resize(n);
1123  HLTPathsByIndex_.resize(n);
1124  for (unsigned int i = 0; i != n; i++) {
1125  HLTPathsByName_[i] = triggerNames.triggerName(i);
1126  HLTPathsByIndex_[i] = i;
1127  }
1128  }
1129 
1130  // if (nEvents_==1)
1131  // {
1132  // if (n>0)
1133  // {
1134  // std::cout << "HLT trigger paths requested: index, name and valididty:" << std::endl;
1135  // for (unsigned int i=0; i!=n; i++)
1136  // {
1137  // bool validity = HLTPathsByIndex_[i]<triggerResults->size();
1138  // std::cout
1139  // << " " << HLTPathsByIndex_[i]
1140  // << " " << HLTPathsByName_[i]
1141  // << " " << validity << std::endl;
1142  // }
1143  // }
1144  // }
1145 
1146  // count number of requested HLT paths which have fired
1147  unsigned int fired = 0;
1148  for (unsigned int i = 0; i != n; i++) {
1149  if (HLTPathsByIndex_[i] < triggerResults->size()) {
1150  if (triggerResults->accept(HLTPathsByIndex_[i])) {
1151  fired++;
1152  //std::cout << "Fired HLT path= " << HLTPathsByName_[i] << std::endl ;
1153  accept = true;
1154  }
1155  }
1156  }
1157  }
1158 
1159  return accept;
1160 }
1161 
1162 bool DQMAnalyzer::selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP) {
1163  if ((Selection_ > 0) && generalCut(gsfIter))
1164  return false;
1165  if ((Selection_ >= 1) && etCut(gsfIter))
1166  return false;
1167  if ((Selection_ >= 2) && isolationCut(gsfIter, vertexTIP))
1168  return false;
1169  if ((Selection_ >= 3) && idCut(gsfIter))
1170  return false;
1171  return true;
1172 }
1173 
1174 bool DQMAnalyzer::generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter) {
1175  if (fabs(gsfIter->eta()) > maxAbsEta_)
1176  return true;
1177  if (gsfIter->pt() < minPt_)
1178  return true;
1179 
1180  if (gsfIter->isEB() && isEE_)
1181  return true;
1182  if (gsfIter->isEE() && isEB_)
1183  return true;
1184  if (gsfIter->isEBEEGap() && isNotEBEEGap_)
1185  return true;
1186 
1187  if (gsfIter->ecalDrivenSeed() && isTrackerDriven_)
1188  return true;
1189  if (gsfIter->trackerDrivenSeed() && isEcalDriven_)
1190  return true;
1191 
1192  return false;
1193 }
1194 
1195 bool DQMAnalyzer::etCut(const reco::GsfElectronCollection::const_iterator &gsfIter) {
1196  if (gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()) < minEt_)
1197  return true;
1198 
1199  return false;
1200 }
1201 
1202 bool DQMAnalyzer::isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP) {
1203  if (gsfIter->isEB() && vertexTIP > tipMaxBarrel_)
1204  return true;
1205  if (gsfIter->isEE() && vertexTIP > tipMaxEndcaps_)
1206  return true;
1207 
1208  if (gsfIter->dr03TkSumPt() > tkIso03Max_)
1209  return true;
1210  if (gsfIter->isEB() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxBarrel_)
1211  return true;
1212  if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(1) > hcalIso03Depth1MaxEndcaps_)
1213  return true;
1214  if (gsfIter->isEE() && gsfIter->dr03HcalTowerSumEt(2) > hcalIso03Depth2MaxEndcaps_)
1215  return true;
1216  if (gsfIter->isEB() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxBarrel_)
1217  return true;
1218  if (gsfIter->isEE() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxEndcaps_)
1219  return true;
1220 
1221  return false;
1222 }
1223 
1224 bool DQMAnalyzer::idCut(const reco::GsfElectronCollection::const_iterator &gsfIter) {
1225  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() < eOverPMinBarrel_)
1226  return true;
1227  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() > eOverPMaxBarrel_)
1228  return true;
1229  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() < eOverPMinEndcaps_)
1230  return true;
1231  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() > eOverPMaxEndcaps_)
1232  return true;
1233  if (gsfIter->isEB() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinBarrel_)
1234  return true;
1235  if (gsfIter->isEB() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxBarrel_)
1236  return true;
1237  if (gsfIter->isEE() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinEndcaps_)
1238  return true;
1239  if (gsfIter->isEE() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxEndcaps_)
1240  return true;
1241  if (gsfIter->isEB() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinBarrel_)
1242  return true;
1243  if (gsfIter->isEB() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxBarrel_)
1244  return true;
1245  if (gsfIter->isEE() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinEndcaps_)
1246  return true;
1247  if (gsfIter->isEE() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxEndcaps_)
1248  return true;
1249  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinBarrel_)
1250  return true;
1251  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxBarrel_)
1252  return true;
1253  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinEndcaps_)
1254  return true;
1255  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxEndcaps_)
1256  return true;
1257  if (gsfIter->isEB() && gsfIter->hadronicOverEm() > hadronicOverEmMaxBarrel_)
1258  return true;
1259  if (gsfIter->isEE() && gsfIter->hadronicOverEm() > hadronicOverEmMaxEndcaps_)
1260  return true;
1261 
1262  return false;
1263 }
bool isEcalDriven_
Definition: DQMAnalyzer.cc:90
TH1F * histNum_
Definition: DQMAnalyzer.cc:229
double hcalIso03Depth2MaxEndcaps_
Definition: DQMAnalyzer.cc:116
bool trigger(const edm::Event &e)
double minEt_
Definition: DQMAnalyzer.cc:84
double fhitsmax
Definition: DQMAnalyzer.cc:159
TH1F * h_matchingObjectAbsEta
Definition: DQMAnalyzer.cc:207
TFile * histfile_
Definition: DQMAnalyzer.cc:193
double dEtaMinBarrel_
Definition: DQMAnalyzer.cc:96
double lhitsmax
Definition: DQMAnalyzer.cc:161
edm::InputTag beamSpot_
Definition: DQMAnalyzer.cc:65
double hoemin
Definition: DQMAnalyzer.cc:170
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double eOverPMinBarrel_
Definition: DQMAnalyzer.cc:92
float mcPt[10]
Definition: DQMAnalyzer.cc:196
float seedPhi[10]
Definition: DQMAnalyzer.cc:198
double etamin
Definition: DQMAnalyzer.cc:127
double dEtaMaxEndcaps_
Definition: DQMAnalyzer.cc:99
edm::InputTag matchingObjectCollection_
Definition: DQMAnalyzer.cc:64
TH1F * h_ele_provenance
Definition: DQMAnalyzer.cc:272
double ptmax
Definition: DQMAnalyzer.cc:136
double sigIetaIetaMinEndcaps_
Definition: DQMAnalyzer.cc:106
TH1F * h_ele_mva
Definition: DQMAnalyzer.cc:271
double dPhiMinBarrel_
Definition: DQMAnalyzer.cc:100
TH1F * h_matchingObjectEta
Definition: DQMAnalyzer.cc:206
TH2F * h_ele_ambiguousTracksVsEta
Definition: DQMAnalyzer.cc:238
double maxAbsEtaMatchingObject_
Definition: DQMAnalyzer.cc:71
TH1F * h_ele_Et
Definition: DQMAnalyzer.cc:220
TH1F * h_ele_dEtaSc_propVtx
Definition: DQMAnalyzer.cc:256
TH1F * h_ele_ecalRecHitSumEt_dr04
Definition: DQMAnalyzer.cc:279
TH2F * h_ele_chi2VsPhi
Definition: DQMAnalyzer.cc:251
TH1F * h_ele_dEtaEleCl_propOut
Definition: DQMAnalyzer.cc:260
TH1F * h_ele_dPhiSc_propVtx
Definition: DQMAnalyzer.cc:257
float superclusterPhi[10]
Definition: DQMAnalyzer.cc:197
float mcEnergy[10]
Definition: DQMAnalyzer.cc:196
double hcalIso03Depth1MaxBarrel_
Definition: DQMAnalyzer.cc:114
TH1F * h_ele_ecalRecHitSumEt_dr03
Definition: DQMAnalyzer.cc:275
TH1F * h_ele_vertexPhi
Definition: DQMAnalyzer.cc:222
TH1F * h_ele_tkSumPt_dr03
Definition: DQMAnalyzer.cc:274
double etamax
Definition: DQMAnalyzer.cc:128
double poptruemin
Definition: DQMAnalyzer.cc:164
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double dphimatchmax
Definition: DQMAnalyzer.cc:157
float seedPt[10]
Definition: DQMAnalyzer.cc:198
double massHigh_
Definition: DQMAnalyzer.cc:77
double deltaR_
Definition: DQMAnalyzer.cc:72
TH1F * h_matchingObjectP
Definition: DQMAnalyzer.cc:208
TH1F * h_ele_matchingObjectAbsEta_matched
Definition: DQMAnalyzer.cc:214
float mcPhi[10]
Definition: DQMAnalyzer.cc:196
TH1F * h_ele_outerPt_mode
Definition: DQMAnalyzer.cc:266
double maxPtMatchingObject_
Definition: DQMAnalyzer.cc:70
double phimin
Definition: DQMAnalyzer.cc:131
double detamatchmax
Definition: DQMAnalyzer.cc:153
std::string const & label() const
Definition: InputTag.h:36
TH1F * h_ele_vertexX
Definition: DQMAnalyzer.cc:223
double poptruemax
Definition: DQMAnalyzer.cc:165
float seedMomentum[10]
Definition: DQMAnalyzer.cc:198
double detamax
Definition: DQMAnalyzer.cc:146
TH1F * histSclSigEtaEta_
Definition: DQMAnalyzer.cc:235
double sigIetaIetaMaxBarrel_
Definition: DQMAnalyzer.cc:105
assert(be >=bs)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool PROBEetcut_
Definition: DQMAnalyzer.cc:80
uint16_t size_type
TH1F * h_ele_outerP_mode
Definition: DQMAnalyzer.cc:264
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
Definition: DQMAnalyzer.cc:276
double hadronicOverEmMaxBarrel_
Definition: DQMAnalyzer.cc:108
edm::ESHandle< TrackerGeometry > pDD
Definition: DQMAnalyzer.cc:190
float superclusterEt[10]
Definition: DQMAnalyzer.cc:197
double phimax
Definition: DQMAnalyzer.cc:132
double hcalIso03Depth1MaxEndcaps_
Definition: DQMAnalyzer.cc:115
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
Definition: DQMAnalyzer.cc:280
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
const Double_t pi
bool isTrackerDriven_
Definition: DQMAnalyzer.cc:91
double sigIetaIetaMaxEndcaps_
Definition: DQMAnalyzer.cc:107
double dPhiMaxBarrel_
Definition: DQMAnalyzer.cc:101
edm::ESHandle< MagneticField > theMagField
Definition: DQMAnalyzer.cc:191
TH1F * h_ele_lostHits
Definition: DQMAnalyzer.cc:245
void endJob() override
Definition: DQMAnalyzer.cc:670
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
float seedEta[10]
Definition: DQMAnalyzer.cc:198
float seedQ[10]
Definition: DQMAnalyzer.cc:198
TH2F * h_ele_lostHitsVsEta
Definition: DQMAnalyzer.cc:246
double dphimin
Definition: DQMAnalyzer.cc:148
unsigned int nAfterTrigger_
Definition: DQMAnalyzer.cc:186
int iEvent
Definition: GenABIO.cc:224
std::vector< std::string > HLTPathsByName_
Definition: DQMAnalyzer.cc:122
TH1F * h_ele_vertexEta
Definition: DQMAnalyzer.cc:221
double eOverPMinEndcaps_
Definition: DQMAnalyzer.cc:94
TH1F * h_ele_vertexZ
Definition: DQMAnalyzer.cc:225
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: DQMAnalyzer.cc:856
TrajectoryStateTransform transformer_
Definition: DQMAnalyzer.cc:189
std::vector< unsigned int > HLTPathsByIndex_
Definition: DQMAnalyzer.cc:187
T sqrt(T t)
Definition: SSEVec.h:19
TH2F * h_ele_lostHitsVsPhi
Definition: DQMAnalyzer.cc:247
TH1F * h_ele_mee_os
Definition: DQMAnalyzer.cc:283
double massLow_
Definition: DQMAnalyzer.cc:76
double eOverPMaxBarrel_
Definition: DQMAnalyzer.cc:93
bool isNotEBEEGap_
Definition: DQMAnalyzer.cc:89
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool PROBEcheckclass_
Definition: DQMAnalyzer.cc:81
double dphimatchmin
Definition: DQMAnalyzer.cc:156
TH2F * h_ele_ambiguousTracksVsPhi
Definition: DQMAnalyzer.cc:239
std::string outputFile_
Definition: DQMAnalyzer.cc:62
TH1F * h_ele_vertexY
Definition: DQMAnalyzer.cc:224
bool TAGcheckclass_
Definition: DQMAnalyzer.cc:79
TH1F * histSclEta_
Definition: DQMAnalyzer.cc:233
TH1F * h_matchingObjectPhi
Definition: DQMAnalyzer.cc:210
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double tkIso03Max_
Definition: DQMAnalyzer.cc:113
double maxAbsEta_
Definition: DQMAnalyzer.cc:86
TH1F * histSclEt_
Definition: DQMAnalyzer.cc:232
TH1F * h_ele_matchingObjectZ_matched
Definition: DQMAnalyzer.cc:217
TTree * tree_
Definition: DQMAnalyzer.cc:194
TH1F * h_ele_foundHits
Definition: DQMAnalyzer.cc:241
TH1F * h_ele_PinMnPout_mode
Definition: DQMAnalyzer.cc:269
int nbindetamatch2D
Definition: DQMAnalyzer.cc:151
static std::string const triggerResults
Definition: EdmProvDump.cc:44
int nbindphimatch2D
Definition: DQMAnalyzer.cc:155
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:217
double eopmaxsht
Definition: DQMAnalyzer.cc:143
TH2F * h_ele_chi2VsPt
Definition: DQMAnalyzer.cc:252
TH1F * h_ele_dPhiEleCl_propOut
Definition: DQMAnalyzer.cc:261
TH1F * h_matchingObjectZ
Definition: DQMAnalyzer.cc:211
TH1F * histSclPhi_
Definition: DQMAnalyzer.cc:234
TH1F * h_ele_matchingObjectPhi_matched
Definition: DQMAnalyzer.cc:216
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
Definition: DQMAnalyzer.cc:277
TH2F * h_ele_foundHitsVsPhi
Definition: DQMAnalyzer.cc:243
float mcQ[10]
Definition: DQMAnalyzer.cc:196
~DQMAnalyzer() override
Definition: DQMAnalyzer.cc:402
double hadronicOverEmMaxEndcaps_
Definition: DQMAnalyzer.cc:109
double tipMaxEndcaps_
Definition: DQMAnalyzer.cc:112
Log< level::Info, false > LogInfo
double eOverPMaxEndcaps_
Definition: DQMAnalyzer.cc:95
double meemin
Definition: DQMAnalyzer.cc:167
TH2F * h_ele_foundHitsVsPt
Definition: DQMAnalyzer.cc:244
TH1F * h_ele_outerP
Definition: DQMAnalyzer.cc:263
TH1F * h_ele_outerPt
Definition: DQMAnalyzer.cc:265
double meemax
Definition: DQMAnalyzer.cc:168
TH2F * h_ele_ambiguousTracksVsPt
Definition: DQMAnalyzer.cc:240
std::string matchingCondition_
Definition: DQMAnalyzer.cc:66
double sigIetaIetaMinBarrel_
Definition: DQMAnalyzer.cc:104
TH1F * h_ele_EoP
Definition: DQMAnalyzer.cc:254
double detamin
Definition: DQMAnalyzer.cc:145
TH1F * h_ele_charge
Definition: DQMAnalyzer.cc:227
TH1F * h_ele_tkSumPt_dr04
Definition: DQMAnalyzer.cc:278
TH1F * h_ele_matchingObjectPt_matched
Definition: DQMAnalyzer.cc:215
double detamatchmin
Definition: DQMAnalyzer.cc:152
double minPt_
Definition: DQMAnalyzer.cc:85
TH1F * h_ele_vertexPt
Definition: DQMAnalyzer.cc:219
edm::InputTag electronCollection_
Definition: DQMAnalyzer.cc:63
double ecalIso03MaxEndcaps_
Definition: DQMAnalyzer.cc:118
TH1F * h_ele_dEtaCl_propOut
Definition: DQMAnalyzer.cc:258
double hoemax
Definition: DQMAnalyzer.cc:171
fixed size matrix
TH2F * h_ele_chi2VsEta
Definition: DQMAnalyzer.cc:250
HLT enums.
TH1F * h_matchingObjectPt
Definition: DQMAnalyzer.cc:209
TH1F * h_ele_EeleOPout
Definition: DQMAnalyzer.cc:255
TH1F * h_ele_vertexTIP
Definition: DQMAnalyzer.cc:226
edm::InputTag triggerResults_
Definition: DQMAnalyzer.cc:121
TH1F * histSclEn_
Definition: DQMAnalyzer.cc:231
TH1F * h_ele_dPhiCl_propOut
Definition: DQMAnalyzer.cc:259
double dPhiMinEndcaps_
Definition: DQMAnalyzer.cc:102
TH1F * h_ele_HoE
Definition: DQMAnalyzer.cc:262
TH2F * h_ele_lostHitsVsPt
Definition: DQMAnalyzer.cc:248
TH1F * h_ele_chi2
Definition: DQMAnalyzer.cc:249
TH1F * h_ele_matchingObjectEta_matched
Definition: DQMAnalyzer.cc:213
double dEtaMinEndcaps_
Definition: DQMAnalyzer.cc:98
double dphimax
Definition: DQMAnalyzer.cc:149
TH1F * h_matchingObjectNum
Definition: DQMAnalyzer.cc:204
double eopmax
Definition: DQMAnalyzer.cc:142
bool TPchecksign_
Definition: DQMAnalyzer.cc:78
TH1F * h_ele_ambiguousTracks
Definition: DQMAnalyzer.cc:237
unsigned int nEvents_
Definition: DQMAnalyzer.cc:177
TH2F * h_ele_foundHitsVsEta
Definition: DQMAnalyzer.cc:242
double dPhiMaxEndcaps_
Definition: DQMAnalyzer.cc:103
double dEtaMaxBarrel_
Definition: DQMAnalyzer.cc:97
float superclusterEnergy[10]
Definition: DQMAnalyzer.cc:197
DQMAnalyzer(const edm::ParameterSet &conf)
Definition: DQMAnalyzer.cc:288
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
Definition: DQMAnalyzer.cc:281
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
void beginJob() override
Definition: DQMAnalyzer.cc:409
double mvaMin_
Definition: DQMAnalyzer.cc:110
double tipMaxBarrel_
Definition: DQMAnalyzer.cc:111
double ecalIso03MaxBarrel_
Definition: DQMAnalyzer.cc:117
float superclusterEta[10]
Definition: DQMAnalyzer.cc:197
float mcEta[10]
Definition: DQMAnalyzer.cc:196
TH1F * h_ele_PinMnPout
Definition: DQMAnalyzer.cc:268