CMS 3D CMS Logo

ElectronAnalyzer.cc
Go to the documentation of this file.
2 
4 
11 
19 
20 #include "CLHEP/Units/GlobalPhysicalConstants.h"
21 #include "TMath.h"
22 
23 #include <iostream>
24 
25 using namespace reco;
26 
28  // general, collections
29  Selection_ = conf.getParameter<int>("Selection");
30  electronCollection_ = consumes<GsfElectronCollection>(conf.getParameter<edm::InputTag>("ElectronCollection"));
32  consumes<SuperClusterCollection>(conf.getParameter<edm::InputTag>("MatchingObjectCollection"));
33  trackCollection_ = consumes<TrackCollection>(conf.getParameter<edm::InputTag>("TrackCollection"));
34  vertexCollection_ = consumes<VertexCollection>(conf.getParameter<edm::InputTag>("VertexCollection"));
35  gsftrackCollection_ = consumes<GsfTrackCollection>(conf.getParameter<edm::InputTag>("GsfTrackCollection"));
36  beamSpotTag_ = consumes<BeamSpot>(conf.getParameter<edm::InputTag>("BeamSpot"));
37  readAOD_ = conf.getParameter<bool>("ReadAOD");
38 
39  // matching
40  matchingCondition_ = conf.getParameter<std::string>("MatchingCondition");
41  assert(matchingCondition_ == "Cone");
42  maxPtMatchingObject_ = conf.getParameter<double>("MaxPtMatchingObject");
43  maxAbsEtaMatchingObject_ = conf.getParameter<double>("MaxAbsEtaMatchingObject");
44  deltaR_ = conf.getParameter<double>("DeltaR");
45 
46  // electron selection
47  minEt_ = conf.getParameter<double>("MinEt");
48  minPt_ = conf.getParameter<double>("MinPt");
49  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
50  isEB_ = conf.getParameter<bool>("SelectEb");
51  isEE_ = conf.getParameter<bool>("SelectEe");
52  isNotEBEEGap_ = conf.getParameter<bool>("SelectNotEbEeGap");
53  isEcalDriven_ = conf.getParameter<bool>("SelectEcalDriven");
54  isTrackerDriven_ = conf.getParameter<bool>("SelectTrackerDriven");
55  eOverPMinBarrel_ = conf.getParameter<double>("MinEopBarrel");
56  eOverPMaxBarrel_ = conf.getParameter<double>("MaxEopBarrel");
57  eOverPMinEndcaps_ = conf.getParameter<double>("MinEopEndcaps");
58  eOverPMaxEndcaps_ = conf.getParameter<double>("MaxEopEndcaps");
59  dEtaMinBarrel_ = conf.getParameter<double>("MinDetaBarrel");
60  dEtaMaxBarrel_ = conf.getParameter<double>("MaxDetaBarrel");
61  dEtaMinEndcaps_ = conf.getParameter<double>("MinDetaEndcaps");
62  dEtaMaxEndcaps_ = conf.getParameter<double>("MaxDetaEndcaps");
63  dPhiMinBarrel_ = conf.getParameter<double>("MinDphiBarrel");
64  dPhiMaxBarrel_ = conf.getParameter<double>("MaxDphiBarrel");
65  dPhiMinEndcaps_ = conf.getParameter<double>("MinDphiEndcaps");
66  dPhiMaxEndcaps_ = conf.getParameter<double>("MaxDphiEndcaps");
67  sigIetaIetaMinBarrel_ = conf.getParameter<double>("MinSigIetaIetaBarrel");
68  sigIetaIetaMaxBarrel_ = conf.getParameter<double>("MaxSigIetaIetaBarrel");
69  sigIetaIetaMinEndcaps_ = conf.getParameter<double>("MinSigIetaIetaEndcaps");
70  sigIetaIetaMaxEndcaps_ = conf.getParameter<double>("MaxSigIetaIetaEndcaps");
71  hadronicOverEmMaxBarrel_ = conf.getParameter<double>("MaxHoeBarrel");
72  hadronicOverEmMaxEndcaps_ = conf.getParameter<double>("MaxHoeEndcaps");
73  mvaMin_ = conf.getParameter<double>("MinMva");
74  tipMaxBarrel_ = conf.getParameter<double>("MaxTipBarrel");
75  tipMaxEndcaps_ = conf.getParameter<double>("MaxTipEndcaps");
76  tkIso03Max_ = conf.getParameter<double>("MaxTkIso03");
77  hcalIso03Depth1MaxBarrel_ = conf.getParameter<double>("MaxHcalIso03Depth1Barrel");
78  hcalIso03Depth1MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth1Endcaps");
79  hcalIso03Depth2MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth2Endcaps");
80  ecalIso03MaxBarrel_ = conf.getParameter<double>("MaxEcalIso03Barrel");
81  ecalIso03MaxEndcaps_ = conf.getParameter<double>("MaxEcalIso03Endcaps");
82 
83  // for trigger
84  triggerResults_ = conf.getParameter<edm::InputTag>("TriggerResults");
85 
86  // histos limits and binning
87  // edm::ParameterSet histosSet = conf.getParameter<edm::ParameterSet>("histosCfg") ;
88 
89  nbineta = conf.getParameter<int>("NbinEta");
90  nbineta2D = conf.getParameter<int>("NbinEta2D");
91  etamin = conf.getParameter<double>("EtaMin");
92  etamax = conf.getParameter<double>("EtaMax");
93  //
94  nbinphi = conf.getParameter<int>("NbinPhi");
95  nbinphi2D = conf.getParameter<int>("NbinPhi2D");
96  phimin = conf.getParameter<double>("PhiMin");
97  phimax = conf.getParameter<double>("PhiMax");
98  //
99  nbinpt = conf.getParameter<int>("NbinPt");
100  nbinpteff = conf.getParameter<int>("NbinPtEff");
101  nbinpt2D = conf.getParameter<int>("NbinPt2D");
102  ptmax = conf.getParameter<double>("PtMax");
103  //
104  nbinp = conf.getParameter<int>("NbinP");
105  nbinp2D = conf.getParameter<int>("NbinP2D");
106  pmax = conf.getParameter<double>("PMax");
107  //
108  nbineop = conf.getParameter<int>("NbinEop");
109  nbineop2D = conf.getParameter<int>("NbinEop2D");
110  eopmax = conf.getParameter<double>("EopMax");
111  eopmaxsht = conf.getParameter<double>("EopMaxSht");
112  //
113  nbindeta = conf.getParameter<int>("NbinDeta");
114  detamin = conf.getParameter<double>("DetaMin");
115  detamax = conf.getParameter<double>("DetaMax");
116  //
117  nbindphi = conf.getParameter<int>("NbinDphi");
118  dphimin = conf.getParameter<double>("DphiMin");
119  dphimax = conf.getParameter<double>("DphiMax");
120  //
121  nbindetamatch = conf.getParameter<int>("NbinDetaMatch");
122  nbindetamatch2D = conf.getParameter<int>("NbinDetaMatch2D");
123  detamatchmin = conf.getParameter<double>("DetaMatchMin");
124  detamatchmax = conf.getParameter<double>("DetaMatchMax");
125  //
126  nbindphimatch = conf.getParameter<int>("NbinDphiMatch");
127  nbindphimatch2D = conf.getParameter<int>("NbinDphiMatch2D");
128  dphimatchmin = conf.getParameter<double>("DphiMatchMin");
129  dphimatchmax = conf.getParameter<double>("DphiMatchMax");
130  //
131  nbinfhits = conf.getParameter<int>("NbinFhits");
132  fhitsmax = conf.getParameter<double>("FhitsMax");
133  //
134  nbinlhits = conf.getParameter<int>("NbinLhits");
135  lhitsmax = conf.getParameter<double>("LhitsMax");
136  //
137  nbinxyz = conf.getParameter<int>("NbinXyz");
138  nbinxyz2D = conf.getParameter<int>("NbinXyz2D");
139  //
140  nbinpoptrue = conf.getParameter<int>("NbinPopTrue");
141  poptruemin = conf.getParameter<double>("PopTrueMin");
142  poptruemax = conf.getParameter<double>("PopTrueMax");
143  //
144  nbinmee = conf.getParameter<int>("NbinMee");
145  meemin = conf.getParameter<double>("MeeMin");
146  meemax = conf.getParameter<double>("MeeMax");
147  //
148  nbinhoe = conf.getParameter<int>("NbinHoe");
149  hoemin = conf.getParameter<double>("HoeMin");
150  hoemax = conf.getParameter<double>("HoeMax");
151 
152  // set_EfficiencyFlag=histosSet.getParameter<bool>("EfficiencyFlag");
153  // set_StatOverflowFlag=histosSet.getParameter<bool>("StatOverflowFlag");
154 }
155 
157 
160 
161  nEvents_ = 0;
162 
163  // basic quantities
165  iBooker, "vertexPt_barrel", "ele transverse momentum in barrel", nbinpt, 0., ptmax, "p_{T vertex} (GeV/c)");
167  iBooker, "vertexPt_endcaps", "ele transverse momentum in endcaps", nbinpt, 0., ptmax, "p_{T vertex} (GeV/c)");
168  h1_vertexEta = bookH1(iBooker, "vertexEta", "ele momentum #eta", nbineta, etamin, etamax, "#eta");
169  h2_vertexEtaVsPhi = bookH2(iBooker,
170  "vertexEtaVsPhi",
171  "ele momentum #eta vs #phi",
172  nbineta2D,
173  etamin,
174  etamax,
175  nbinphi2D,
176  phimin,
177  phimax,
178  "#eta",
179  "#phi (rad)");
181  iBooker, "vertexXvsY", "ele vertex x vs y", nbinxyz2D, -0.1, 0.1, nbinxyz2D, -0.1, 0.1, "x (cm)", "y (cm)");
182  h1_vertexZ = bookH1(iBooker, "vertexZ", "ele vertex z", nbinxyz, -25, 25, "z (cm)");
183 
184  // super-clusters
185  h1_sclEt = bookH1(iBooker, "sclEt", "ele supercluster transverse energy", nbinpt, 0., ptmax, "E_{T} (GeV)");
186 
187  // electron track
188  h1_chi2 = bookH1(iBooker, "chi2", "ele track #chi^{2}", 100, 0., 15., "#Chi^{2}");
190  iBooker, "chi2VsEta", "ele track #chi^{2} vs #eta", nbineta2D, etamin, etamax, 0., 15., "#eta", "<#chi^{2}>");
191  py_chi2VsPhi = bookP1(iBooker,
192  "chi2VsPhi",
193  "ele track #chi^{2} vs #phi",
194  nbinphi2D,
195  phimin,
196  phimax,
197  0.,
198  15.,
199  "#phi (rad)",
200  "<#chi^{2}>");
201  h1_foundHits = bookH1(iBooker, "foundHits", "ele track # found hits", nbinfhits, 0., fhitsmax, "N_{hits}");
202  py_foundHitsVsEta = bookP1(iBooker,
203  "foundHitsVsEta",
204  "ele track # found hits vs #eta",
205  nbineta2D,
206  etamin,
207  etamax,
208  0.,
209  fhitsmax,
210  "#eta",
211  "<# hits>");
212  py_foundHitsVsPhi = bookP1(iBooker,
213  "foundHitsVsPhi",
214  "ele track # found hits vs #phi",
215  nbinphi2D,
216  phimin,
217  phimax,
218  0.,
219  fhitsmax,
220  "#phi (rad)",
221  "<# hits>");
222  h1_lostHits = bookH1(iBooker, "lostHits", "ele track # lost hits", 5, 0., 5., "N_{lost hits}");
223  py_lostHitsVsEta = bookP1(iBooker,
224  "lostHitsVsEta",
225  "ele track # lost hits vs #eta",
226  nbineta2D,
227  etamin,
228  etamax,
229  0.,
230  lhitsmax,
231  "#eta",
232  "<# hits>");
233  py_lostHitsVsPhi = bookP1(iBooker,
234  "lostHitsVsPhi",
235  "ele track # lost hits vs #eta",
236  nbinphi2D,
237  phimin,
238  phimax,
239  0.,
240  lhitsmax,
241  "#phi (rad)",
242  "<# hits>");
243 
244  // electron matching and ID
245  h1_Eop_barrel = bookH1(iBooker, "Eop_barrel", "ele E/P_{vertex} in barrel", nbineop, 0., eopmax, "E/P_{vertex}");
246  h1_Eop_endcaps = bookH1(iBooker, "Eop_endcaps", "ele E/P_{vertex} in endcaps", nbineop, 0., eopmax, "E/P_{vertex}");
247  py_EopVsPhi = bookP1(iBooker,
248  "EopVsPhi",
249  "ele E/P_{vertex} vs #phi",
250  nbinphi2D,
251  phimin,
252  phimax,
253  0.,
254  eopmax,
255  "#phi (rad)",
256  "<E/P_{vertex}>");
258  bookH1(iBooker, "EeleOPout_barrel", "ele E_{ele}/P_{out} in barrel", nbineop, 0., eopmax, "E_{ele}/P_{out}");
260  bookH1(iBooker, "EeleOPout_endcaps", "ele E_{ele}/P_{out} in endcaps", nbineop, 0., eopmax, "E_{ele}/P_{out}");
262  "dEtaSc_propVtx_barrel",
263  "ele #eta_{sc} - #eta_{tr}, prop from vertex, in barrel",
265  detamatchmin,
266  detamatchmax,
267  "#eta_{sc} - #eta_{tr}");
269  "dEtaSc_propVtx_endcapsPos",
270  "ele #eta_{sc} - #eta_{tr}, prop from vertex, in positive endcap",
272  detamatchmin,
273  detamatchmax,
274  "#eta_{sc} - #eta_{tr}");
276  "dEtaSc_propVtx_endcapsNeg",
277  "ele #eta_{sc} - #eta_{tr}, prop from vertex, in negative endcap",
279  detamatchmin,
280  detamatchmax,
281  "#eta_{sc} - #eta_{tr}");
282  py_dEtaSc_propVtxVsPhi = bookP1(iBooker,
283  "dEtaSc_propVtxVsPhi",
284  "ele #eta_{sc} - #eta_{tr}, prop from vertex vs #phi",
285  nbinphi2D,
286  phimin,
287  phimax,
288  detamatchmin,
289  detamatchmax,
290  "#phi (rad)",
291  "<#eta_{sc} - #eta_{tr}>");
293  "dEtaEleCl_propOut_barrel",
294  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, in barrel",
296  detamatchmin,
297  detamatchmax,
298  "#eta_{elecl} - #eta_{tr}");
300  "dEtaEleCl_propOut_endcapsPos",
301  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, in positive endcap",
303  detamatchmin,
304  detamatchmax,
305  "#eta_{elecl} - #eta_{tr}");
307  "dEtaEleCl_propOut_endcapsNeg",
308  "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, in negative endcap",
310  detamatchmin,
311  detamatchmax,
312  "#eta_{elecl} - #eta_{tr}");
314  "dPhiSc_propVtx_barrel",
315  "ele #phi_{sc} - #phi_{tr}, prop from vertex, in barrel",
317  dphimatchmin,
318  dphimatchmax,
319  "#phi_{sc} - #phi_{tr} (rad)");
321  "dPhiSc_propVtx_endcapsPos",
322  "ele #phi_{sc} - #phi_{tr}, prop from vertex, in positive endcap",
324  dphimatchmin,
325  dphimatchmax,
326  "#phi_{sc} - #phi_{tr} (rad)");
328  "dPhiSc_propVtx_endcapsNeg",
329  "ele #phi_{sc} - #phi_{tr}, prop from vertex, in negative endcap",
331  dphimatchmin,
332  dphimatchmax,
333  "#phi_{sc} - #phi_{tr} (rad)");
334  py_dPhiSc_propVtxVsPhi = bookP1(iBooker,
335  "dPhiSc_propVtxVsPhi",
336  "ele #phi_{sc} - #phi_{tr}, prop from vertex vs #phi",
337  nbinphi2D,
338  phimin,
339  phimax,
340  dphimatchmin,
341  dphimatchmax,
342  "#phi (rad)",
343  "<#phi_{sc} - #phi_{tr}> (rad)");
345  "dPhiEleCl_propOut_barrel",
346  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, in barrel",
348  dphimatchmin,
349  dphimatchmax,
350  "#phi_{elecl} - #phi_{tr} (rad)");
352  "dPhiEleCl_propOut_endcapsPos",
353  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, in positive endcap",
355  dphimatchmin,
356  dphimatchmax,
357  "#phi_{elecl} - #phi_{tr} (rad)");
359  "dPhiEleCl_propOut_endcapsNeg",
360  "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, in negative endcap",
362  dphimatchmin,
363  dphimatchmax,
364  "#phi_{elecl} - #phi_{tr} (rad)");
365  h1_Hoe_barrel = bookH1(iBooker,
366  "Hoe_barrel",
367  "ele hadronic energy / em energy, in barrel",
368  nbinhoe,
369  hoemin,
370  hoemax,
371  "H/E",
372  "Events",
373  "ELE_LOGY E1 P");
374  h1_Hoe_endcaps = bookH1(iBooker,
375  "Hoe_endcaps",
376  "ele hadronic energy / em energy, in endcaps",
377  nbinhoe,
378  hoemin,
379  hoemax,
380  "H/E",
381  "Events",
382  "ELE_LOGY E1 P");
383  py_HoeVsPhi = bookP1(iBooker,
384  "HoeVsPhi",
385  "ele hadronic energy / em energy vs #phi",
386  nbinphi2D,
387  phimin,
388  phimax,
389  hoemin,
390  hoemax,
391  "#phi (rad)",
392  "<H/E>",
393  "E1 P");
395  bookH1(iBooker, "sclSigEtaEta_barrel", "ele sigma eta eta in barrel", 100, 0., 0.05, "sietaieta");
397  bookH1(iBooker, "sclSigEtaEta_endcaps", "ele sigma eta eta in endcaps", 100, 0., 0.05, "sietaieta");
399  bookH1(iBooker, "sigIEtaIEta5x5_barrel", "ele sigma ieta ieta 5x5 in barrel", 100, 0., 0.05, "sietaieta5x5");
401  bookH1(iBooker, "sigIEtaIEta5x5_endcaps", "ele sigma ieta ieta 5x5 in endcaps", 100, 0., 0.05, "sietaieta5x5");
402 
403  // fbrem
404  h1_fbrem = bookH1(iBooker, "fbrem", "ele brem fraction", 100, 0., 1., "P_{in} - P_{out} / P_{in}");
405  py_fbremVsEta = bookP1(iBooker,
406  "fbremVsEta",
407  "ele brem fraction vs #eta",
408  nbineta2D,
409  etamin,
410  etamax,
411  0.,
412  1.,
413  "#eta",
414  "<P_{in} - P_{out} / P_{in}>");
415  py_fbremVsPhi = bookP1(iBooker,
416  "fbremVsPhi",
417  "ele brem fraction vs #phi",
418  nbinphi2D,
419  phimin,
420  phimax,
421  0.,
422  1.,
423  "#phi (rad)",
424  "<P_{in} - P_{out} / P_{in}>");
425  h1_classes = bookH1(iBooker, "classes", "ele electron classes", 10, 0.0, 10.);
426 
427  // pflow
428  h1_mva = bookH1(iBooker, "mva", "ele identification mva", 100, -1., 1., "mva");
429  h1_provenance = bookH1(iBooker, "provenance", "ele provenance", 5, -2., 3., "provenance");
430 
431  // isolation
433  iBooker, "tkSumPt_dr03", "tk isolation sum, dR=0.3", 100, 0.0, 20., "TkIsoSum (GeV/c)", "Events", "ELE_LOGY E1 P");
435  "ecalRecHitSumEt_dr03",
436  "ecal isolation sum, dR=0.3",
437  100,
438  0.0,
439  20.,
440  "EcalIsoSum (GeV)",
441  "Events",
442  "ELE_LOGY E1 P");
443  h1_hcalTowerSumEt_dr03 = bookH1(iBooker,
444  "hcalTowerSumEt_dr03",
445  "hcal isolation sum, dR=0.3",
446  100,
447  0.0,
448  20.,
449  "HcalIsoSum (GeV)",
450  "Events",
451  "ELE_LOGY E1 P");
452 
453  // pf isolation
454  h1_PFch_dr03 = bookH1(iBooker,
455  "PFch_dr03",
456  "Charged PF candidate sum, dR=0.3",
457  100,
458  0.0,
459  20.,
460  "PF charged (GeV/c)",
461  "Events",
462  "ELE_LOGY E1 P");
463  h1_PFem_dr03 = bookH1(iBooker,
464  "PFem_dr03",
465  "Neutral EM PF candidate sum, dR=0.3",
466  100,
467  0.0,
468  20.,
469  "PF neutral EM (GeV)",
470  "Events",
471  "ELE_LOGY E1 P");
472  h1_PFnh_dr03 = bookH1(iBooker,
473  "PFnh_dr03",
474  "Neutral Had PF candidate sum, dR=0.3",
475  100,
476  0.0,
477  20.,
478  "PF neutral Had (GeV)",
479  "Events",
480  "ELE_LOGY E1 P");
481 
482  // di-electron mass
483  setBookIndex(200);
484  h1_mee = bookH1(iBooker, "mee", "ele pairs invariant mass", nbinmee, meemin, meemax, "m_{ee} (GeV/c^{2})");
485  h1_mee_os = bookH1(iBooker,
486  "mee_os",
487  "ele pairs invariant mass, opposite sign",
488  nbinmee,
489  meemin,
490  meemax,
491  "m_{e^{+}e^{-}} (GeV/c^{2})");
492  h1_mee_os_bb = bookH1(iBooker,
493  "mee_os_bb",
494  "ele pairs invariant mass, opposite sign, barrel-barrel",
495  nbinmee,
496  meemin,
497  meemax,
498  "m_{e^{+}e^{-}} (GeV/c^{2})");
499  h1_mee_os_ee = bookH1(iBooker,
500  "mee_os_ee",
501  "ele pairs invariant mass, opposite sign, endcap-endcap",
502  nbinmee,
503  meemin,
504  meemax,
505  "m_{e^{+}e^{-}} (GeV/c^{2})");
506  h1_mee_os_eb = bookH1(iBooker,
507  "mee_os_eb",
508  "ele pairs invariant mass, opposite sign, barrel-endcap",
509  nbinmee,
510  meemin,
511  meemax,
512  "m_{e^{+}e^{-}} (GeV/c^{2})");
513 
514  //===========================
515  // histos for matching and matched matched objects
516  //===========================
517 
518  // matching object
519  std::string matchingObjectType;
520  Labels l;
521  labelsForToken(matchingObjectCollection_, l);
522  if (std::string::npos != std::string(l.module).find("SuperCluster", 0)) {
523  matchingObjectType = "SC";
524  }
525  if (matchingObjectType.empty()) {
526  edm::LogError("ElectronMcFakeValidator::beginJob") << "Unknown matching object type !";
527  } else {
528  edm::LogInfo("ElectronMcFakeValidator::beginJob") << "Matching object type: " << matchingObjectType;
529  }
530 
531  // matching object distributions
533  iBooker, "matchingObject_Eta", matchingObjectType + " #eta", nbineta, etamin, etamax, "#eta_{SC}");
534 
536  iBooker, "matchingObject_Pt", matchingObjectType + " pt", nbinpteff, 5., ptmax, "pt_{SC} (GeV/c)");
538  iBooker, "matchingObject_Phi", matchingObjectType + " #phi", nbinphi, phimin, phimax, "#phi (rad)");
539 
541  iBooker, "matchedObject_Eta", "Efficiency vs matching SC #eta", nbineta, etamin, etamax, "#eta_{SC}");
543  iBooker, "matchedObject_Pt", "Efficiency vs matching SC E_{T}", nbinpteff, 5., ptmax, "pt_{SC} (GeV/c)");
545  iBooker, "matchedObject_Phi", "Efficiency vs matching SC #phi", nbinphi, phimin, phimax, "#phi (rad)");
546 
547 }
548 
550  nEvents_++;
551 
555  iEvent.getByToken(matchingObjectCollection_, recoClusters);
557  iEvent.getByToken(trackCollection_, tracks);
559  iEvent.getByToken(gsftrackCollection_, gsfTracks);
561  iEvent.getByToken(vertexCollection_, vertices);
562  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
563  iEvent.getByToken(beamSpotTag_, recoBeamSpotHandle);
564  const BeamSpot bs = *recoBeamSpotHandle;
565 
566  edm::EventNumber_t ievt = iEvent.id().event();
567  edm::RunNumber_t irun = iEvent.id().run();
568  edm::LuminosityBlockNumber_t ils = iEvent.luminosityBlock();
569 
570  edm::LogInfo("ElectronAnalyzer::analyze") << "Treating " << gsfElectrons.product()->size() << " electrons"
571  << " from event " << ievt << " in run " << irun << " and lumiblock " << ils;
572  //h1_num_->Fill((*gsfElectrons).size()) ;
573 
574  // selected rec electrons
575  reco::GsfElectronCollection::const_iterator gsfIter;
576  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
577  // vertex TIP
578  double vertexTIP = (gsfIter->vertex().x() - bs.position().x()) * (gsfIter->vertex().x() - bs.position().x()) +
579  (gsfIter->vertex().y() - bs.position().y()) * (gsfIter->vertex().y() - bs.position().y());
580  vertexTIP = sqrt(vertexTIP);
581 
582  // select electrons
583  if (!selected(gsfIter, vertexTIP))
584  continue;
585 
586  // invariant mass of 2 selected electrons
587  reco::GsfElectronCollection::const_iterator gsfIter2;
588  for (gsfIter2 = gsfIter + 1; gsfIter2 != gsfElectrons->end(); gsfIter2++) {
589  if (!selected(gsfIter2, vertexTIP))
590  continue;
591  float invMass = computeInvMass(*gsfIter, *gsfIter2);
592  h1_mee->Fill(invMass);
593  if (((gsfIter->charge()) * (gsfIter2->charge())) < 0.) {
594  h1_mee_os->Fill(invMass);
595  if (gsfIter->isEB() && gsfIter2->isEB())
596  h1_mee_os_bb->Fill(invMass);
597  else if (gsfIter->isEE() && gsfIter2->isEE())
598  h1_mee_os_ee->Fill(invMass);
599  else
600  h1_mee_os_eb->Fill(invMass);
601  }
602  }
603 
604  // basic quantities
605  if (gsfIter->isEB())
606  h1_vertexPt_barrel->Fill(gsfIter->pt());
607  if (gsfIter->isEE())
608  h1_vertexPt_endcaps->Fill(gsfIter->pt());
609  h1_vertexEta->Fill(gsfIter->eta());
610  h2_vertexEtaVsPhi->Fill(gsfIter->eta(), gsfIter->phi());
611  h2_vertexXvsY->Fill(gsfIter->vertex().x(), gsfIter->vertex().y());
612  h1_vertexZ->Fill(gsfIter->vertex().z());
613 
614  // supercluster related distributions
615  reco::SuperClusterRef sclRef = gsfIter->superCluster();
616  // ALREADY DONE IN GSF ELECTRON CORE
617  double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
618  double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
619  h1_sclEt->Fill(sclRef->energy() * (Rt / R));
620 
621  // track related distributions
622  if (!readAOD_) { // track extra does not exist in AOD
623  h1_foundHits->Fill(gsfIter->gsfTrack()->numberOfValidHits());
624  py_foundHitsVsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->numberOfValidHits());
625  py_foundHitsVsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->numberOfValidHits());
626  h1_lostHits->Fill(gsfIter->gsfTrack()->numberOfLostHits());
627  py_lostHitsVsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->numberOfLostHits());
628  py_lostHitsVsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->numberOfLostHits());
629  h1_chi2->Fill(gsfIter->gsfTrack()->normalizedChi2());
630  py_chi2VsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->normalizedChi2());
631  py_chi2VsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->normalizedChi2());
632  }
633 
634  // match distributions
635  if (gsfIter->isEB()) {
636  h1_Eop_barrel->Fill(gsfIter->eSuperClusterOverP());
637  h1_EeleOPout_barrel->Fill(gsfIter->eEleClusterOverPout());
638  h1_dEtaSc_propVtx_barrel->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
639  h1_dEtaEleCl_propOut_barrel->Fill(gsfIter->deltaEtaEleClusterTrackAtCalo());
640  h1_dPhiSc_propVtx_barrel->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
641  h1_dPhiEleCl_propOut_barrel->Fill(gsfIter->deltaPhiEleClusterTrackAtCalo());
642  h1_Hoe_barrel->Fill(gsfIter->hadronicOverEm());
643  h1_sclSigEtaEta_barrel->Fill(gsfIter->scSigmaEtaEta());
644  h1_sigIEtaIEta5x5_barrel->Fill(gsfIter->full5x5_sigmaIetaIeta());
645  }
646  if (gsfIter->isEE()) {
647  h1_Eop_endcaps->Fill(gsfIter->eSuperClusterOverP());
648  h1_EeleOPout_endcaps->Fill(gsfIter->eEleClusterOverPout());
649  if (gsfIter->eta() > 0) {
650  h1_dEtaSc_propVtx_endcapsPos->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
651  h1_dEtaEleCl_propOut_endcapsPos->Fill(gsfIter->deltaEtaEleClusterTrackAtCalo());
652  h1_dPhiSc_propVtx_endcapsPos->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
653  h1_dPhiEleCl_propOut_endcapsPos->Fill(gsfIter->deltaPhiEleClusterTrackAtCalo());
654  } else {
655  h1_dEtaSc_propVtx_endcapsNeg->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
656  h1_dEtaEleCl_propOut_endcapsNeg->Fill(gsfIter->deltaEtaEleClusterTrackAtCalo());
657  h1_dPhiSc_propVtx_endcapsNeg->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
658  h1_dPhiEleCl_propOut_endcapsNeg->Fill(gsfIter->deltaPhiEleClusterTrackAtCalo());
659  }
660  h1_Hoe_endcaps->Fill(gsfIter->hadronicOverEm());
661  h1_sclSigEtaEta_endcaps->Fill(gsfIter->scSigmaEtaEta());
662  h1_sigIEtaIEta5x5_endcaps->Fill(gsfIter->full5x5_sigmaIetaIeta());
663  }
664  py_EopVsPhi->Fill(gsfIter->phi(), gsfIter->eSuperClusterOverP());
665  py_dEtaSc_propVtxVsPhi->Fill(gsfIter->phi(), gsfIter->deltaEtaSuperClusterTrackAtVtx());
666  py_dPhiSc_propVtxVsPhi->Fill(gsfIter->phi(), gsfIter->deltaPhiSuperClusterTrackAtVtx());
667  py_HoeVsPhi->Fill(gsfIter->phi(), gsfIter->hadronicOverEm());
668 
669  // fbrem, classes
670  h1_fbrem->Fill(gsfIter->fbrem());
671  py_fbremVsEta->Fill(gsfIter->eta(), gsfIter->fbrem());
672  py_fbremVsPhi->Fill(gsfIter->phi(), gsfIter->fbrem());
673  int eleClass = gsfIter->classification();
674  if (gsfIter->isEE())
675  eleClass += 5;
676  h1_classes->Fill(eleClass);
677 
678  // pflow
679  h1_mva->Fill(gsfIter->mva_e_pi());
680  if (gsfIter->ecalDrivenSeed())
681  h1_provenance->Fill(1.);
682  if (gsfIter->trackerDrivenSeed())
683  h1_provenance->Fill(-1.);
684  if (gsfIter->trackerDrivenSeed() || gsfIter->ecalDrivenSeed())
685  h1_provenance->Fill(0.);
686  if (gsfIter->trackerDrivenSeed() && !gsfIter->ecalDrivenSeed())
687  h1_provenance->Fill(-2.);
688  if (!gsfIter->trackerDrivenSeed() && gsfIter->ecalDrivenSeed())
689  h1_provenance->Fill(2.);
690 
691  // isolation
692  h1_tkSumPt_dr03->Fill(gsfIter->dr03TkSumPt());
693  h1_ecalRecHitSumEt_dr03->Fill(gsfIter->dr03EcalRecHitSumEt());
694  h1_hcalTowerSumEt_dr03->Fill(gsfIter->dr03HcalTowerSumEt());
695 
696  // PF isolation
697  GsfElectron::PflowIsolationVariables pfIso = gsfIter->pfIsolationVariables();
699  h1_PFem_dr03->Fill(pfIso.sumPhotonEt);
701  }
702 
703  // association matching object-reco electrons
704  int matchingObjectNum = 0;
705  reco::SuperClusterCollection::const_iterator moIter;
706  for (moIter = recoClusters->begin(); moIter != recoClusters->end(); moIter++) {
707  // // number of matching objects
708  matchingObjectNum++;
709 
710  if (moIter->energy() / cosh(moIter->eta()) > maxPtMatchingObject_ ||
711  std::abs(moIter->eta()) > maxAbsEtaMatchingObject_) {
712  continue;
713  }
714 
715  // // suppress the endcaps
716  h1_matchingObject_Eta->Fill(moIter->eta());
717  h1_matchingObject_Pt->Fill(moIter->energy() / cosh(moIter->eta()));
718  h1_matchingObject_Phi->Fill(moIter->phi());
719 
720  bool okGsfFound = false;
721  double gsfOkRatio = 999999999.;
722  reco::GsfElectron bestGsfElectron;
723  reco::GsfElectronCollection::const_iterator gsfIter;
724  for (gsfIter = gsfElectrons->begin(); gsfIter != gsfElectrons->end(); gsfIter++) {
725  double vertexTIP = (gsfIter->vertex().x() - bs.position().x()) * (gsfIter->vertex().x() - bs.position().x()) +
726  (gsfIter->vertex().y() - bs.position().y()) * (gsfIter->vertex().y() - bs.position().y());
727  vertexTIP = sqrt(vertexTIP);
728 
729  // select electrons
730  if (!selected(gsfIter, vertexTIP))
731  continue;
732 
733  // matching with a cone in eta phi
734  if (matchingCondition_ == "Cone") {
735  double dphi = gsfIter->phi() - moIter->phi();
736  if (std::abs(dphi) > CLHEP::pi) {
737  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
738  }
739  double deltaR = sqrt(pow((moIter->eta() - gsfIter->eta()), 2) + pow(dphi, 2));
740  if (deltaR < deltaR_) {
741  double tmpGsfRatio = gsfIter->p() / moIter->energy();
742  if (std::abs(tmpGsfRatio - 1) < std::abs(gsfOkRatio - 1)) {
743  gsfOkRatio = tmpGsfRatio;
744  bestGsfElectron = *gsfIter;
745  okGsfFound = true;
746  }
747  }
748  }
749  } // loop over rec ele to look for the best one
750  if (okGsfFound) {
751  // generated distributions for matched electrons
752  h1_matchedObject_Eta->Fill(moIter->eta());
753  h1_matchedObject_Pt->Fill(moIter->energy() / cosh(moIter->eta()));
754  h1_matchedObject_Phi->Fill(moIter->phi());
755 
756  //classes
757  }
758 
759  } // loop overmatching object
760 }
761 
763  math::XYZTLorentzVector p12 = e1.p4() + e2.p4();
764  float mee2 = p12.Dot(p12);
765  float invMass = mee2 > 0. ? sqrt(mee2) : 0;
766  return invMass;
767 }
768 
769 bool ElectronAnalyzer::selected(const reco::GsfElectronCollection::const_iterator& gsfIter, double vertexTIP) {
770  if ((Selection_ > 0) && generalCut(gsfIter))
771  return false;
772  if ((Selection_ >= 1) && etCut(gsfIter))
773  return false;
774  if ((Selection_ >= 2) && isolationCut(gsfIter, vertexTIP))
775  return false;
776  if ((Selection_ >= 3) && idCut(gsfIter))
777  return false;
778  return true;
779 }
780 
781 bool ElectronAnalyzer::generalCut(const reco::GsfElectronCollection::const_iterator& gsfIter) {
782  if (std::abs(gsfIter->eta()) > maxAbsEta_)
783  return true;
784  if (gsfIter->pt() < minPt_)
785  return true;
786 
787  if (gsfIter->isEB() && isEE_)
788  return true;
789  if (gsfIter->isEE() && isEB_)
790  return true;
791  if (gsfIter->isEBEEGap() && isNotEBEEGap_)
792  return true;
793 
794  if (gsfIter->ecalDrivenSeed() && isTrackerDriven_)
795  return true;
796  if (gsfIter->trackerDrivenSeed() && isEcalDriven_)
797  return true;
798 
799  return false;
800 }
801 
802 bool ElectronAnalyzer::etCut(const reco::GsfElectronCollection::const_iterator& gsfIter) {
803  if (gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()) < minEt_)
804  return true;
805 
806  return false;
807 }
808 
809 bool ElectronAnalyzer::isolationCut(const reco::GsfElectronCollection::const_iterator& gsfIter, double vertexTIP) {
810  if (gsfIter->isEB() && vertexTIP > tipMaxBarrel_)
811  return true;
812  if (gsfIter->isEE() && vertexTIP > tipMaxEndcaps_)
813  return true;
814 
815  if (gsfIter->dr03TkSumPt() > tkIso03Max_)
816  return true;
817  if (gsfIter->isEB() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxBarrel_)
818  return true;
819  if (gsfIter->isEE() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxEndcaps_)
820  return true;
821  if (gsfIter->isEE() && gsfIter->dr03HcalDepth2TowerSumEt() > hcalIso03Depth2MaxEndcaps_)
822  return true;
823  if (gsfIter->isEB() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxBarrel_)
824  return true;
825  if (gsfIter->isEE() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxEndcaps_)
826  return true;
827 
828  return false;
829 }
830 
831 bool ElectronAnalyzer::idCut(const reco::GsfElectronCollection::const_iterator& gsfIter) {
832  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() < eOverPMinBarrel_)
833  return true;
834  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() > eOverPMaxBarrel_)
835  return true;
836  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() < eOverPMinEndcaps_)
837  return true;
838  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() > eOverPMaxEndcaps_)
839  return true;
840  if (gsfIter->isEB() && std::abs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinBarrel_)
841  return true;
842  if (gsfIter->isEB() && std::abs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxBarrel_)
843  return true;
844  if (gsfIter->isEE() && std::abs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinEndcaps_)
845  return true;
846  if (gsfIter->isEE() && std::abs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxEndcaps_)
847  return true;
848  if (gsfIter->isEB() && std::abs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinBarrel_)
849  return true;
850  if (gsfIter->isEB() && std::abs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxBarrel_)
851  return true;
852  if (gsfIter->isEE() && std::abs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinEndcaps_)
853  return true;
854  if (gsfIter->isEE() && std::abs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxEndcaps_)
855  return true;
856  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinBarrel_)
857  return true;
858  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxBarrel_)
859  return true;
860  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinEndcaps_)
861  return true;
862  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxEndcaps_)
863  return true;
864  if (gsfIter->isEB() && gsfIter->hadronicOverEm() > hadronicOverEmMaxBarrel_)
865  return true;
866  if (gsfIter->isEE() && gsfIter->hadronicOverEm() > hadronicOverEmMaxEndcaps_)
867  return true;
868 
869  return false;
870 }
ElectronAnalyzer.h
ElectronAnalyzer::h1_mee_os_bb
MonitorElement * h1_mee_os_bb
Definition: ElectronAnalyzer.h:331
ElectronAnalyzer::isEB_
bool isEB_
Definition: ElectronAnalyzer.h:74
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
ElectronAnalyzer::hoemax
double hoemax
Definition: ElectronAnalyzer.h:159
ElectronAnalyzer::h1_mee_os
MonitorElement * h1_mee_os
Definition: ElectronAnalyzer.h:330
Handle.h
ElectronAnalyzer::nbindphimatch
int nbindphimatch
Definition: ElectronAnalyzer.h:141
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
ElectronAnalyzer::selected
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
Definition: ElectronAnalyzer.cc:769
ElectronAnalyzer::py_chi2VsEta
MonitorElement * py_chi2VsEta
Definition: ElectronAnalyzer.h:228
ElectronAnalyzer::detamatchmin
double detamatchmin
Definition: ElectronAnalyzer.h:139
ElectronAnalyzer::h1_foundHits
MonitorElement * h1_foundHits
Definition: ElectronAnalyzer.h:231
MessageLogger.h
ElectronAnalyzer::matchingObjectCollection_
edm::EDGetTokenT< reco::SuperClusterCollection > matchingObjectCollection_
Definition: ElectronAnalyzer.h:52
ElectronAnalyzer::h1_PFch_dr03
MonitorElement * h1_PFch_dr03
Definition: ElectronAnalyzer.h:317
ElectronAnalyzer::poptruemax
double poptruemax
Definition: ElectronAnalyzer.h:153
ElectronAnalyzer::minPt_
double minPt_
Definition: ElectronAnalyzer.h:72
ElectronAnalyzer::hadronicOverEmMaxBarrel_
double hadronicOverEmMaxBarrel_
Definition: ElectronAnalyzer.h:95
ElectronAnalyzer::nbinpoptrue
int nbinpoptrue
Definition: ElectronAnalyzer.h:151
TriggerResults.h
ElectronAnalyzer::py_chi2VsPhi
MonitorElement * py_chi2VsPhi
Definition: ElectronAnalyzer.h:229
ElectronAnalyzer::hoemin
double hoemin
Definition: ElectronAnalyzer.h:158
ElectronAnalyzer::eOverPMinBarrel_
double eOverPMinBarrel_
Definition: ElectronAnalyzer.h:79
ElectronAnalyzer::meemin
double meemin
Definition: ElectronAnalyzer.h:155
ElectronAnalyzer::eopmax
double eopmax
Definition: ElectronAnalyzer.h:129
ElectronAnalyzer::h1_dPhiEleCl_propOut_endcapsNeg
MonitorElement * h1_dPhiEleCl_propOut_endcapsNeg
Definition: ElectronAnalyzer.h:281
ElectronAnalyzer::h1_Hoe_barrel
MonitorElement * h1_Hoe_barrel
Definition: ElectronAnalyzer.h:286
edm::Run
Definition: Run.h:45
ElectronDqmAnalyzerBase
Definition: ElectronDqmAnalyzerBase.h:19
ElectronAnalyzer::h1_hcalTowerSumEt_dr03
MonitorElement * h1_hcalTowerSumEt_dr03
Definition: ElectronAnalyzer.h:316
ElectronAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: ElectronAnalyzer.cc:158
ElectronAnalyzer::h1_sclSigEtaEta_barrel
MonitorElement * h1_sclSigEtaEta_barrel
Definition: ElectronAnalyzer.h:290
ElectronAnalyzer::nbinpt2D
int nbinpt2D
Definition: ElectronAnalyzer.h:122
ElectronAnalyzer::isEE_
bool isEE_
Definition: ElectronAnalyzer.h:75
ElectronAnalyzer::py_HoeVsPhi
MonitorElement * py_HoeVsPhi
Definition: ElectronAnalyzer.h:288
ElectronAnalyzer::h1_matchedObject_Pt
MonitorElement * h1_matchedObject_Pt
Definition: ElectronAnalyzer.h:345
ElectronAnalyzer::nbindetamatch2D
int nbindetamatch2D
Definition: ElectronAnalyzer.h:138
ElectronAnalyzer::dPhiMaxEndcaps_
double dPhiMaxEndcaps_
Definition: ElectronAnalyzer.h:90
ElectronAnalyzer::h1_mva
MonitorElement * h1_mva
Definition: ElectronAnalyzer.h:310
reco::GsfElectron::PflowIsolationVariables
Definition: GsfElectron.h:606
ElectronAnalyzer::isolationCut
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
Definition: ElectronAnalyzer.cc:809
ElectronAnalyzer::h1_tkSumPt_dr03
MonitorElement * h1_tkSumPt_dr03
Definition: ElectronAnalyzer.h:314
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
ElectronAnalyzer::h1_dPhiSc_propVtx_barrel
MonitorElement * h1_dPhiSc_propVtx_barrel
Definition: ElectronAnalyzer.h:272
ElectronAnalyzer::nbinmee
int nbinmee
Definition: ElectronAnalyzer.h:154
cms::cuda::assert
assert(be >=bs)
ElectronAnalyzer::nbinxyz
int nbinxyz
Definition: ElectronAnalyzer.h:149
ElectronAnalyzer::py_lostHitsVsEta
MonitorElement * py_lostHitsVsEta
Definition: ElectronAnalyzer.h:236
DQMStore.h
ElectronAnalyzer::eOverPMaxBarrel_
double eOverPMaxBarrel_
Definition: ElectronAnalyzer.h:80
ElectronAnalyzer::nbinlhits
int nbinlhits
Definition: ElectronAnalyzer.h:147
ElectronAnalyzer::h1_dEtaEleCl_propOut_endcapsPos
MonitorElement * h1_dEtaEleCl_propOut_endcapsPos
Definition: ElectronAnalyzer.h:266
ElectronAnalyzer::h1_dEtaEleCl_propOut_barrel
MonitorElement * h1_dEtaEleCl_propOut_barrel
Definition: ElectronAnalyzer.h:265
EDAnalyzer.h
ElectronAnalyzer::h1_dEtaSc_propVtx_endcapsPos
MonitorElement * h1_dEtaSc_propVtx_endcapsPos
Definition: ElectronAnalyzer.h:259
ElectronDqmAnalyzerBase::bookH1withSumw2
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
Definition: ElectronDqmAnalyzerBase.cc:83
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
ElectronAnalyzer::nEvents_
unsigned int nEvents_
Definition: ElectronAnalyzer.h:166
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
ElectronAnalyzer::nbindphi
int nbindphi
Definition: ElectronAnalyzer.h:134
ElectronAnalyzer::hadronicOverEmMaxEndcaps_
double hadronicOverEmMaxEndcaps_
Definition: ElectronAnalyzer.h:96
ElectronAnalyzer::meemax
double meemax
Definition: ElectronAnalyzer.h:156
ElectronAnalyzer::h1_matchedObject_Phi
MonitorElement * h1_matchedObject_Phi
Definition: ElectronAnalyzer.h:346
ElectronAnalyzer::h1_ecalRecHitSumEt_dr03
MonitorElement * h1_ecalRecHitSumEt_dr03
Definition: ElectronAnalyzer.h:315
ElectronAnalyzer::h1_vertexEta
MonitorElement * h1_vertexEta
Definition: ElectronAnalyzer.h:211
electronIsolatorFromEffectiveArea_cfi.gsfElectrons
gsfElectrons
Definition: electronIsolatorFromEffectiveArea_cfi.py:4
edm::Handle
Definition: AssociativeIterator.h:50
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
ElectronAnalyzer::fhitsmax
double fhitsmax
Definition: ElectronAnalyzer.h:146
ElectronAnalyzer::triggerResults_
edm::InputTag triggerResults_
Definition: ElectronAnalyzer.h:108
BasicClusterFwd.h
edm::Ref< SuperClusterCollection >
ElectronAnalyzer::dEtaMinBarrel_
double dEtaMinBarrel_
Definition: ElectronAnalyzer.h:83
ElectronAnalyzer::eOverPMinEndcaps_
double eOverPMinEndcaps_
Definition: ElectronAnalyzer.h:81
ElectronAnalyzer::sigIetaIetaMinBarrel_
double sigIetaIetaMinBarrel_
Definition: ElectronAnalyzer.h:91
ElectronAnalyzer::dPhiMinEndcaps_
double dPhiMinEndcaps_
Definition: ElectronAnalyzer.h:89
ElectronAnalyzer::nbineop
int nbineop
Definition: ElectronAnalyzer.h:127
ElectronAnalyzer::h1_matchingObject_Eta
MonitorElement * h1_matchingObject_Eta
Definition: ElectronAnalyzer.h:350
MakerMacros.h
ElectronAnalyzer::pmax
double pmax
Definition: ElectronAnalyzer.h:126
reco::GsfElectron::PflowIsolationVariables::sumPhotonEt
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:610
cms::cuda::bs
bs
Definition: HistoContainer.h:127
ElectronAnalyzer::deltaR_
double deltaR_
Definition: ElectronAnalyzer.h:68
ElectronAnalyzer::tipMaxEndcaps_
double tipMaxEndcaps_
Definition: ElectronAnalyzer.h:99
ElectronAnalyzer::nbinpt
int nbinpt
Definition: ElectronAnalyzer.h:120
ElectronAnalyzer::h1_Eop_barrel
MonitorElement * h1_Eop_barrel
Definition: ElectronAnalyzer.h:246
ElectronAnalyzer::nbinxyz2D
int nbinxyz2D
Definition: ElectronAnalyzer.h:150
BeamSpot.h
ElectronAnalyzer::h1_PFnh_dr03
MonitorElement * h1_PFnh_dr03
Definition: ElectronAnalyzer.h:319
ElectronAnalyzer::h1_Eop_endcaps
MonitorElement * h1_Eop_endcaps
Definition: ElectronAnalyzer.h:247
ElectronAnalyzer::maxPtMatchingObject_
double maxPtMatchingObject_
Definition: ElectronAnalyzer.h:66
ElectronAnalyzer::nbinpteff
int nbinpteff
Definition: ElectronAnalyzer.h:121
Service.h
ElectronAnalyzer::detamax
double detamax
Definition: ElectronAnalyzer.h:133
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ElectronAnalyzer::nbindphimatch2D
int nbindphimatch2D
Definition: ElectronAnalyzer.h:142
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
reco::BeamSpot
Definition: BeamSpot.h:21
ElectronAnalyzer::isEcalDriven_
bool isEcalDriven_
Definition: ElectronAnalyzer.h:77
ElectronAnalyzer::detamatchmax
double detamatchmax
Definition: ElectronAnalyzer.h:140
ElectronAnalyzer::dEtaMaxBarrel_
double dEtaMaxBarrel_
Definition: ElectronAnalyzer.h:84
ElectronDqmAnalyzerBase::setBookIndex
void setBookIndex(short)
Definition: ElectronDqmAnalyzerBase.cc:32
ElectronDqmAnalyzerBase::bookH2
MonitorElement * bookH2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
Definition: ElectronDqmAnalyzerBase.cc:111
ElectronAnalyzer::h2_vertexXvsY
MonitorElement * h2_vertexXvsY
Definition: ElectronAnalyzer.h:213
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
reco::GsfElectron
Definition: GsfElectron.h:35
ecalDrivenGsfElectronCoresFromMultiCl_cff.gsfTracks
gsfTracks
Definition: ecalDrivenGsfElectronCoresFromMultiCl_cff.py:4
ElectronAnalyzer::ecalIso03MaxBarrel_
double ecalIso03MaxBarrel_
Definition: ElectronAnalyzer.h:104
ElectronAnalyzer::matchingCondition_
std::string matchingCondition_
Definition: ElectronAnalyzer.h:65
ElectronAnalyzer::py_lostHitsVsPhi
MonitorElement * py_lostHitsVsPhi
Definition: ElectronAnalyzer.h:237
GsfElectron.h
ElectronAnalyzer::h1_provenance
MonitorElement * h1_provenance
Definition: ElectronAnalyzer.h:311
ElectronAnalyzer::isTrackerDriven_
bool isTrackerDriven_
Definition: ElectronAnalyzer.h:78
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
ElectronAnalyzer::sigIetaIetaMaxBarrel_
double sigIetaIetaMaxBarrel_
Definition: ElectronAnalyzer.h:92
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ElectronAnalyzer::sigIetaIetaMinEndcaps_
double sigIetaIetaMinEndcaps_
Definition: ElectronAnalyzer.h:93
ElectronAnalyzer::h1_mee_os_ee
MonitorElement * h1_mee_os_ee
Definition: ElectronAnalyzer.h:332
ElectronAnalyzer::h1_dPhiSc_propVtx_endcapsNeg
MonitorElement * h1_dPhiSc_propVtx_endcapsNeg
Definition: ElectronAnalyzer.h:274
ElectronAnalyzer::py_fbremVsEta
MonitorElement * py_fbremVsEta
Definition: ElectronAnalyzer.h:304
edm::ParameterSet
Definition: ParameterSet.h:47
ElectronAnalyzer::sigIetaIetaMaxEndcaps_
double sigIetaIetaMaxEndcaps_
Definition: ElectronAnalyzer.h:94
ElectronAnalyzer::h1_PFem_dr03
MonitorElement * h1_PFem_dr03
Definition: ElectronAnalyzer.h:318
Event.h
ElectronAnalyzer::nbinphi
int nbinphi
Definition: ElectronAnalyzer.h:116
ElectronAnalyzer::detamin
double detamin
Definition: ElectronAnalyzer.h:132
ElectronAnalyzer::h1_dPhiSc_propVtx_endcapsPos
MonitorElement * h1_dPhiSc_propVtx_endcapsPos
Definition: ElectronAnalyzer.h:273
ElectronAnalyzer::ElectronAnalyzer
ElectronAnalyzer(const edm::ParameterSet &conf)
Definition: ElectronAnalyzer.cc:27
ElectronAnalyzer::phimax
double phimax
Definition: ElectronAnalyzer.h:119
ElectronAnalyzer::h1_classes
MonitorElement * h1_classes
Definition: ElectronAnalyzer.h:307
ElectronAnalyzer::h1_sigIEtaIEta5x5_barrel
MonitorElement * h1_sigIEtaIEta5x5_barrel
Definition: ElectronAnalyzer.h:292
StorageManager_cfg.e1
e1
Definition: StorageManager_cfg.py:16
ElectronAnalyzer::nbinp
int nbinp
Definition: ElectronAnalyzer.h:124
ElectronAnalyzer::h1_dEtaSc_propVtx_endcapsNeg
MonitorElement * h1_dEtaSc_propVtx_endcapsNeg
Definition: ElectronAnalyzer.h:260
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
ElectronAnalyzer::h1_mee
MonitorElement * h1_mee
Definition: ElectronAnalyzer.h:329
ElectronAnalyzer::dphimatchmin
double dphimatchmin
Definition: ElectronAnalyzer.h:143
GsfTrack.h
ElectronDqmAnalyzerBase::bookH1
MonitorElement * bookH1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
Definition: ElectronDqmAnalyzerBase.cc:57
ElectronAnalyzer::py_dPhiSc_propVtxVsPhi
MonitorElement * py_dPhiSc_propVtxVsPhi
Definition: ElectronAnalyzer.h:275
ElectronAnalyzer::py_EopVsPhi
MonitorElement * py_EopVsPhi
Definition: ElectronAnalyzer.h:248
ElectronAnalyzer::h1_vertexPt_endcaps
MonitorElement * h1_vertexPt_endcaps
Definition: ElectronAnalyzer.h:210
ElectronAnalyzer::h1_chi2
MonitorElement * h1_chi2
Definition: ElectronAnalyzer.h:227
ElectronAnalyzer::outputInternalPath_
std::string outputInternalPath_
Definition: ElectronAnalyzer.h:62
ElectronAnalyzer::h1_Hoe_endcaps
MonitorElement * h1_Hoe_endcaps
Definition: ElectronAnalyzer.h:287
ElectronAnalyzer::dPhiMinBarrel_
double dPhiMinBarrel_
Definition: ElectronAnalyzer.h:87
edm::EventSetup
Definition: EventSetup.h:57
ElectronAnalyzer::py_dEtaSc_propVtxVsPhi
MonitorElement * py_dEtaSc_propVtxVsPhi
Definition: ElectronAnalyzer.h:261
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
ElectronAnalyzer::h1_dPhiEleCl_propOut_endcapsPos
MonitorElement * h1_dPhiEleCl_propOut_endcapsPos
Definition: ElectronAnalyzer.h:280
ElectronAnalyzer::h1_dEtaSc_propVtx_barrel
MonitorElement * h1_dEtaSc_propVtx_barrel
Definition: ElectronAnalyzer.h:258
ElectronAnalyzer::ptmax
double ptmax
Definition: ElectronAnalyzer.h:123
ElectronAnalyzer::h1_mee_os_eb
MonitorElement * h1_mee_os_eb
Definition: ElectronAnalyzer.h:333
reco::GsfElectron::p4
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:211
ElectronAnalyzer::hcalIso03Depth1MaxEndcaps_
double hcalIso03Depth1MaxEndcaps_
Definition: ElectronAnalyzer.h:102
ElectronAnalyzer::tkIso03Max_
double tkIso03Max_
Definition: ElectronAnalyzer.h:100
reco::GsfElectron::PflowIsolationVariables::sumNeutralHadronEt
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:609
ElectronAnalyzer::h2_vertexEtaVsPhi
MonitorElement * h2_vertexEtaVsPhi
Definition: ElectronAnalyzer.h:212
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
ElectronAnalyzer::generalCut
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
Definition: ElectronAnalyzer.cc:781
ElectronAnalyzer::h1_vertexZ
MonitorElement * h1_vertexZ
Definition: ElectronAnalyzer.h:214
ElectronAnalyzer::etCut
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
Definition: ElectronAnalyzer.cc:802
ElectronAnalyzer::hcalIso03Depth1MaxBarrel_
double hcalIso03Depth1MaxBarrel_
Definition: ElectronAnalyzer.h:101
ElectronAnalyzer::h1_fbrem
MonitorElement * h1_fbrem
Definition: ElectronAnalyzer.h:303
ElectronAnalyzer::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: ElectronAnalyzer.cc:549
ElectronAnalyzer::h1_dEtaEleCl_propOut_endcapsNeg
MonitorElement * h1_dEtaEleCl_propOut_endcapsNeg
Definition: ElectronAnalyzer.h:267
ElectronDqmAnalyzerBase::bookP1
MonitorElement * bookP1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
Definition: ElectronDqmAnalyzerBase.cc:171
ElectronAnalyzer::~ElectronAnalyzer
~ElectronAnalyzer() override
Definition: ElectronAnalyzer.cc:156
ElectronAnalyzer::h1_matchedObject_Eta
MonitorElement * h1_matchedObject_Eta
Definition: ElectronAnalyzer.h:343
ElectronAnalyzer::eOverPMaxEndcaps_
double eOverPMaxEndcaps_
Definition: ElectronAnalyzer.h:82
ElectronAnalyzer::h1_EeleOPout_endcaps
MonitorElement * h1_EeleOPout_endcaps
Definition: ElectronAnalyzer.h:253
ElectronAnalyzer::maxAbsEtaMatchingObject_
double maxAbsEtaMatchingObject_
Definition: ElectronAnalyzer.h:67
ElectronAnalyzer::nbineop2D
int nbineop2D
Definition: ElectronAnalyzer.h:128
ElectronAnalyzer::h1_sigIEtaIEta5x5_endcaps
MonitorElement * h1_sigIEtaIEta5x5_endcaps
Definition: ElectronAnalyzer.h:293
ElectronAnalyzer::nbineta
int nbineta
Definition: ElectronAnalyzer.h:112
ElectronAnalyzer::ecalIso03MaxEndcaps_
double ecalIso03MaxEndcaps_
Definition: ElectronAnalyzer.h:105
ElectronAnalyzer::gsftrackCollection_
edm::EDGetTokenT< reco::GsfTrackCollection > gsftrackCollection_
Definition: ElectronAnalyzer.h:53
ElectronAnalyzer::py_foundHitsVsEta
MonitorElement * py_foundHitsVsEta
Definition: ElectronAnalyzer.h:232
ElectronAnalyzer::lhitsmax
double lhitsmax
Definition: ElectronAnalyzer.h:148
ElectronAnalyzer::dEtaMaxEndcaps_
double dEtaMaxEndcaps_
Definition: ElectronAnalyzer.h:86
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
ElectronAnalyzer::py_fbremVsPhi
MonitorElement * py_fbremVsPhi
Definition: ElectronAnalyzer.h:305
ElectronAnalyzer::electronCollection_
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
Definition: ElectronAnalyzer.h:51
ElectronAnalyzer::Selection_
int Selection_
Definition: ElectronAnalyzer.h:50
ElectronAnalyzer::dphimax
double dphimax
Definition: ElectronAnalyzer.h:136
ElectronAnalyzer::h1_dPhiEleCl_propOut_barrel
MonitorElement * h1_dPhiEleCl_propOut_barrel
Definition: ElectronAnalyzer.h:279
ElectronAnalyzer::mvaMin_
double mvaMin_
Definition: ElectronAnalyzer.h:97
ElectronAnalyzer::h1_sclSigEtaEta_endcaps
MonitorElement * h1_sclSigEtaEta_endcaps
Definition: ElectronAnalyzer.h:291
ElectronAnalyzer::h1_sclEt
MonitorElement * h1_sclEt
Definition: ElectronAnalyzer.h:220
ElectronAnalyzer::minEt_
double minEt_
Definition: ElectronAnalyzer.h:71
ElectronAnalyzer::dPhiMaxBarrel_
double dPhiMaxBarrel_
Definition: ElectronAnalyzer.h:88
ElectronAnalyzer::trackCollection_
edm::EDGetTokenT< reco::TrackCollection > trackCollection_
Definition: ElectronAnalyzer.h:54
ElectronAnalyzer::tipMaxBarrel_
double tipMaxBarrel_
Definition: ElectronAnalyzer.h:98
ElectronAnalyzer::nbinhoe
int nbinhoe
Definition: ElectronAnalyzer.h:157
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ElectronAnalyzer::nbinfhits
int nbinfhits
Definition: ElectronAnalyzer.h:145
ElectronAnalyzer::dphimin
double dphimin
Definition: ElectronAnalyzer.h:135
ElectronAnalyzer::nbinp2D
int nbinp2D
Definition: ElectronAnalyzer.h:125
ElectronAnalyzer::hcalIso03Depth2MaxEndcaps_
double hcalIso03Depth2MaxEndcaps_
Definition: ElectronAnalyzer.h:103
dqm::implementation::IBooker
Definition: DQMStore.h:43
ElectronAnalyzer::dphimatchmax
double dphimatchmax
Definition: ElectronAnalyzer.h:144
ElectronAnalyzer::py_foundHitsVsPhi
MonitorElement * py_foundHitsVsPhi
Definition: ElectronAnalyzer.h:233
ElectronAnalyzer::computeInvMass
float computeInvMass(const reco::GsfElectron &e1, const reco::GsfElectron &e2)
Definition: ElectronAnalyzer.cc:762
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
ElectronAnalyzer::vertexCollection_
edm::EDGetTokenT< reco::VertexCollection > vertexCollection_
Definition: ElectronAnalyzer.h:55
ElectronAnalyzer::isNotEBEEGap_
bool isNotEBEEGap_
Definition: ElectronAnalyzer.h:76
pi
const Double_t pi
Definition: trackSplitPlot.h:36
ElectronAnalyzer::nbinphi2D
int nbinphi2D
Definition: ElectronAnalyzer.h:117
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
ElectronAnalyzer::beamSpotTag_
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
Definition: ElectronAnalyzer.h:56
ElectronAnalyzer::nbindetamatch
int nbindetamatch
Definition: ElectronAnalyzer.h:137
ElectronAnalyzer::h1_lostHits
MonitorElement * h1_lostHits
Definition: ElectronAnalyzer.h:235
ElectronAnalyzer::dEtaMinEndcaps_
double dEtaMinEndcaps_
Definition: ElectronAnalyzer.h:85
ElectronAnalyzer::h1_EeleOPout_barrel
MonitorElement * h1_EeleOPout_barrel
Definition: ElectronAnalyzer.h:252
edm::Event
Definition: Event.h:73
ElectronAnalyzer::nbineta2D
int nbineta2D
Definition: ElectronAnalyzer.h:113
ElectronAnalyzer::phimin
double phimin
Definition: ElectronAnalyzer.h:118
ElectronAnalyzer::eopmaxsht
double eopmaxsht
Definition: ElectronAnalyzer.h:130
ElectronAnalyzer::etamax
double etamax
Definition: ElectronAnalyzer.h:115
dttmaxenums::R
Definition: DTTMax.h:29
ElectronAnalyzer::h1_vertexPt_barrel
MonitorElement * h1_vertexPt_barrel
Definition: ElectronAnalyzer.h:209
ElectronAnalyzer::h1_matchingObject_Phi
MonitorElement * h1_matchingObject_Phi
Definition: ElectronAnalyzer.h:354
ElectronAnalyzer::maxAbsEta_
double maxAbsEta_
Definition: ElectronAnalyzer.h:73
edm::InputTag
Definition: InputTag.h:15
ElectronAnalyzer::readAOD_
bool readAOD_
Definition: ElectronAnalyzer.h:57
ElectronAnalyzer::etamin
double etamin
Definition: ElectronAnalyzer.h:114
ElectronAnalyzer::poptruemin
double poptruemin
Definition: ElectronAnalyzer.h:152
reco::GsfElectron::PflowIsolationVariables::sumChargedHadronPt
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:608
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
ElectronAnalyzer::nbindeta
int nbindeta
Definition: ElectronAnalyzer.h:131
ElectronAnalyzer::idCut
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
Definition: ElectronAnalyzer.cc:831
ElectronAnalyzer::h1_matchingObject_Pt
MonitorElement * h1_matchingObject_Pt
Definition: ElectronAnalyzer.h:353