CMS 3D CMS Logo

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