CMS 3D CMS Logo

EwkElecDQM.cc
Go to the documentation of this file.
2 
6 
9 
12 
16 
17 //#include "DataFormats/MuonReco/interface/Muon.h"
18 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" // I guess this is the right one??
19 // also need Fwd.h file ???
22 
24 
28 
30 
32 
33 using namespace edm;
34 using namespace std;
35 using namespace reco;
36 
38  :
39  // Input collections
40  metTag_(cfg.getUntrackedParameter<edm::InputTag>("METTag",
41  edm::InputTag("met"))),
42  jetTag_(cfg.getUntrackedParameter<edm::InputTag>(
43  "JetTag", edm::InputTag("sisCone5CaloJets"))),
44 // trigTag_(consumes<edm::TriggerResults>(
45  // cfg.getUntrackedParameter<edm::InputTag>(
46  // "TrigTag", edm::InputTag("TriggerResults::HLT")))),
47  elecTag_(consumes<edm::View<reco::GsfElectron> >(
48  cfg.getUntrackedParameter<edm::InputTag>(
49  "ElecTag", edm::InputTag("gsfElectrons")))),
50  metToken_(consumes<edm::View<reco::MET> >(
51  cfg.getUntrackedParameter<edm::InputTag>("METTag",
52  edm::InputTag("met")))),
53  jetToken_(consumes<edm::View<reco::Jet> >(
54  cfg.getUntrackedParameter<edm::InputTag>(
55  "JetTag", edm::InputTag("sisCone5CaloJets")))),
56  vertexTag_(consumes<edm::View<reco::Vertex> >(
57  cfg.getUntrackedParameter<edm::InputTag>(
58  "VertexTag", edm::InputTag("offlinePrimaryVertices")))),
59  beamSpotTag_(
60  consumes<reco::BeamSpot>(cfg.getUntrackedParameter<edm::InputTag>(
61  "BeamSpotTag", edm::InputTag("BeamSpot")))),
62 
63  // Main cuts
64  // muonTrig_(cfg.getUntrackedParameter<std::string> ("MuonTrig",
65  // "HLT_Mu9")),
66  // elecTrig_(cfg.getUntrackedParameter<std::vector< std::string >
67  // >("ElecTrig", "HLT_Ele10_SW_L1R")),
68  elecTrig_(
69  cfg.getUntrackedParameter<std::vector<std::string> >("ElecTrig")),
70  // ptCut_(cfg.getUntrackedParameter<double>("PtCut", 25.)),
71  ptCut_(cfg.getUntrackedParameter<double>("PtCut", 10.)),
72  // etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.1)),
73  etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.4)),
74  sieieCutBarrel_(cfg.getUntrackedParameter<double>("SieieBarrel", 0.01)),
75  sieieCutEndcap_(cfg.getUntrackedParameter<double>("SieieEndcap", 0.028)),
76  detainCutBarrel_(
77  cfg.getUntrackedParameter<double>("DetainBarrel", 0.0071)),
78  detainCutEndcap_(
79  cfg.getUntrackedParameter<double>("DetainEndcap", 0.0066)),
80  // isRelativeIso_(cfg.getUntrackedParameter<bool>("IsRelativeIso",
81  // true)),
82  // isCombinedIso_(cfg.getUntrackedParameter<bool>("IsCombinedIso",
83  // false)),
84  // isoCut03_(cfg.getUntrackedParameter<double>("IsoCut03", 0.1)),
85  ecalIsoCutBarrel_(
86  cfg.getUntrackedParameter<double>("EcalIsoCutBarrel", 5.7)),
87  ecalIsoCutEndcap_(
88  cfg.getUntrackedParameter<double>("EcalIsoCutEndcap", 5.0)),
89  hcalIsoCutBarrel_(
90  cfg.getUntrackedParameter<double>("HcalIsoCutBarrel", 8.1)),
91  hcalIsoCutEndcap_(
92  cfg.getUntrackedParameter<double>("HcalIsoCutEndcap", 3.4)),
93  trkIsoCutBarrel_(
94  cfg.getUntrackedParameter<double>("TrkIsoCutBarrel", 7.2)),
95  trkIsoCutEndcap_(
96  cfg.getUntrackedParameter<double>("TrkIsoCutEndcap", 5.1)),
97  mtMin_(cfg.getUntrackedParameter<double>("MtMin", -999999)),
98  mtMax_(cfg.getUntrackedParameter<double>("MtMax", 999999.)),
99  metMin_(cfg.getUntrackedParameter<double>("MetMin", -999999.)),
100  metMax_(cfg.getUntrackedParameter<double>("MetMax", 999999.)),
101  // acopCut_(cfg.getUntrackedParameter<double>("AcopCut", 2.)),
102 
103  // Muon quality cuts
104  // dxyCut_(cfg.getUntrackedParameter<double>("DxyCut", 0.2)),
105  // normalizedChi2Cut_(cfg.getUntrackedParameter<double>("NormalizedChi2Cut",
106  // 10.)),
107  // trackerHitsCut_(cfg.getUntrackedParameter<int>("TrackerHitsCut",
108  // 11)),
109  // isAlsoTrackerMuon_(cfg.getUntrackedParameter<bool>("IsAlsoTrackerMuon",
110  // true)),
111 
112  // Z rejection
113  // ptThrForZ1_(cfg.getUntrackedParameter<double>("PtThrForZ1", 20.)),
114  // ptThrForZ2_(cfg.getUntrackedParameter<double>("PtThrForZ2", 10.)),
115 
116  // Top rejection
117  eJetMin_(cfg.getUntrackedParameter<double>("EJetMin", 999999.)),
118  nJetMax_(cfg.getUntrackedParameter<int>("NJetMax", 999999)),
119  PUMax_(cfg.getUntrackedParameter<unsigned int>("PUMax", 60)),
120  PUBinCount_(cfg.getUntrackedParameter<unsigned int>("PUBinCount", 12)),
121  hltPrescaleProvider_(cfg, consumesCollector(), *this)
122  // caloJetCollection_(cfg.getUntrackedParameter<edm:InputTag>("CaloJetCollection","sisCone5CaloJets"))
123 {
124  isValidHltConfig_ = false;
125 }
126 
127 void EwkElecDQM::dqmBeginRun(const Run& iRun, const EventSetup& iSet) {
128  nall = 0;
129  nsel = 0;
130 
131  nrec = 0;
132  neid = 0;
133  niso = 0;
134  // nhlt = 0;
135  // nmet = 0;
136 
137  // passed as parameter to HLTConfigProvider::init(), not yet used
138  bool isConfigChanged = false;
139  // isValidHltConfig_ could be used to short-circuit analyze() in case of
140  // problems
142  hltPrescaleProvider_.init(iRun, iSet, "HLT", isConfigChanged);
143 
144  LogTrace("") << "isValidHltConfig_=" << isValidHltConfig_ << "\n";
145 }
146 
148  edm::Run const &, edm::EventSetup const &) {
149 
150  ibooker.setCurrentFolder("Physics/EwkElecDQM");
151 
152  char chtitle[256] = "";
153 
154  pt_before_ = ibooker.book1D("PT_BEFORECUTS",
155  "Electron transverse momentum [GeV]", 100, 0., 100.);
156  pt_after_ = ibooker.book1D("PT_LASTCUT",
157  "Electron transverse momentum [GeV]", 100, 0., 100.);
158 
159  eta_before_ = ibooker.book1D("ETA_BEFORECUTS",
160  "Electron pseudo-rapidity", 50, -2.5, 2.5);
161  eta_after_ = ibooker.book1D("ETA_LASTCUT",
162  "Electron pseudo-rapidity", 50, -2.5, 2.5);
163 
164  sieiebarrel_before_ = ibooker.book1D("SIEIEBARREL_BEFORECUTS",
165  "Electron #sigma_{i#etai#eta} (barrel)", 70, 0., 0.07);
166  sieiebarrel_after_ = ibooker.book1D("SIEIEBARREL_LASTCUT",
167  "Electron #sigma_{i#etai#eta} (barrel)", 70, 0., 0.07);
168 
169  sieieendcap_before_ = ibooker.book1D("SIEIEENDCAP_BEFORECUTS",
170  "Electron #sigma_{i#etai#eta} (endcap)", 70, 0., 0.07);
171  sieieendcap_after_ = ibooker.book1D("SIEIEENDCAP_LASTCUT",
172  "Electron #sigma_{i#etai#eta} (endcap)", 70, 0., 0.07);
173 
174  detainbarrel_before_ = ibooker.book1D("DETAINBARREL_BEFORECUTS",
175  "Electron #Delta#eta_{in} (barrel)", 40, -0.02, 0.02);
176  detainbarrel_after_ = ibooker.book1D("DETAINBARREL_LASTCUT",
177  "Electron #Delta#eta_{in} (barrel)", 40, -0.02, 0.02);
178 
179  detainendcap_before_ = ibooker.book1D("DETAINENDCAP_BEFORECUTS",
180  "Electron #Delta#eta_{in} (endcap)", 40, -0.02, 0.02);
181  detainendcap_after_ = ibooker.book1D("DETAINENDCAP_LASTCUT",
182  "Electron #Delta#eta_{in} (endcap)", 40, -0.02, 0.02);
183 
184  ecalisobarrel_before_ = ibooker.book1D("ECALISOBARREL_BEFORECUTS",
185  "Absolute electron ECAL isolation variable (barrel) [GeV]", 50, 0., 50.);
186  ecalisobarrel_after_ = ibooker.book1D("ECALISOBARREL_LASTCUT",
187  "Absolute electron ECAL isolation variable (barrel) [GeV]", 50, 0., 50.);
188 
189  ecalisoendcap_before_ = ibooker.book1D("ECALISOENDCAP_BEFORECUTS",
190  "Absolute electron ECAL isolation variable (endcap) [GeV]", 50, 0., 50.);
191  ecalisoendcap_after_ = ibooker.book1D("ECALISOENDCAP_LASTCUT",
192  "Absolute electron ECAL isolation variable (endcap) [GeV]", 50, 0., 50.);
193 
194  hcalisobarrel_before_ = ibooker.book1D("HCALISOBARREL_BEFORECUTS",
195  "Absolute electron HCAL isolation variable (barrel) [GeV]", 50, 0., 50.);
196  hcalisobarrel_after_ = ibooker.book1D("HCALISOBARREL_LASTCUT",
197  "Absolute electron HCAL isolation variable (barrel) [GeV]", 50, 0., 50.);
198 
199  hcalisoendcap_before_ = ibooker.book1D("HCALISOENDCAP_BEFORECUTS",
200  "Absolute electron HCAL isolation variable (endcap) [GeV]", 50, 0., 50.);
201  hcalisoendcap_after_ = ibooker.book1D("HCALISOENDCAP_LASTCUT",
202  "Absolute electron HCAL isolation variable (endcap) [GeV]", 50, 0., 50.);
203 
204  trkisobarrel_before_ = ibooker.book1D("TRKISOBARREL_BEFORECUTS",
205  "Absolute electron track isolation variable (barrel) [GeV]", 50, 0., 50.);
206  trkisobarrel_after_ = ibooker.book1D("TRKISOBARREL_LASTCUT",
207  "Absolute electron track isolation variable (barrel) [GeV]", 50, 0., 50.);
208 
209  trkisoendcap_before_ = ibooker.book1D("TRKISOENDCAP_BEFORECUTS",
210  "Absolute electron track isolation variable (endcap) [GeV]", 50, 0., 50.);
211  trkisoendcap_after_ = ibooker.book1D("TRKISOENDCAP_LASTCUT",
212  "Absolute electron track isolation variable (endcap) [GeV]", 50, 0., 50.);
213 
214  // trig_before_ = ibooker.book1D("TRIG_BEFORECUTS", "Trigger response", 2, -0.5,
216 // trig_after_ = ibooker.book1D("TRIG_LASTCUT", "Trigger response", 2, -0.5, 1.5);
217 
218  invmass_before_ = ibooker.book1D("INVMASS_BEFORECUTS",
219  "Di-electron invariant mass [GeV]", 100, 0., 200.);
220  invmass_after_ = ibooker.book1D("INVMASS_AFTERCUTS",
221  "Di-electron invariant mass [GeV]", 100, 0., 200.);
222 
223  invmassPU_before_ = ibooker.book2D("INVMASS_PU_BEFORECUTS",
224  "Di-electron invariant mass [GeV] vs PU; mass [GeV]; PU count", 100, 0.,
225  200., PUBinCount_, -0.5, PUMax_ + 0.5);
226  invmassPU_afterZ_ = ibooker.book2D("INVMASS_PU_AFTERZCUTS",
227  "Di-electron invariant mass [GeV] vs PU; mass [GeV]; PU count", 100, 0.,
228  200., PUBinCount_, -0.5, PUMax_ + 0.5);
229 
230  npvs_before_ = ibooker.book1D("NPVs_BEFORECUTS",
231  "Number of Valid Primary Vertices; nGoodPVs", PUMax_ + 1, -0.5, PUMax_ + 0.5);
232 
233  npvs_afterZ_ = ibooker.book1D("NPVs_AFTERZCUTS",
234  "Number of Valid Primary Vertices; nGoodPVs", PUMax_ + 1, -0.5, PUMax_ + 0.5);
235 
236  nelectrons_before_ = ibooker.book1D("NELECTRONS_BEFORECUTS",
237  "Number of electrons in event", 10, -0.5, 9.5);
238  nelectrons_after_ = ibooker.book1D("NELECTRONS_AFTERCUTS",
239  "Number of electrons in event", 10, -0.5, 9.5);
240 
241  snprintf(chtitle, 255, "Transverse mass (%s) [GeV]", metTag_.label().data());
242  mt_before_ = ibooker.book1D("MT_BEFORECUTS", chtitle, 150, 0., 300.);
243  mt_after_ = ibooker.book1D("MT_LASTCUT", chtitle, 150, 0., 300.);
244 
245 
246  snprintf(chtitle, 255, "Missing transverse energy (%s) [GeV]",
247  metTag_.label().data());
248  met_before_ = ibooker.book1D("MET_BEFORECUTS", chtitle, 100, 0., 200.);
249  met_after_ = ibooker.book1D("MET_LASTCUT", chtitle, 100, 0., 200.);
250 
251  snprintf(chtitle, 255, "Number of jets (%s) above %.2f GeV",
252  jetTag_.label().data(), eJetMin_);
253  njets_before_ = ibooker.book1D("NJETS_BEFORECUTS", chtitle, 10, -0.5, 9.5);
254  njets_after_ = ibooker.book1D("NJETS_LASTCUT", chtitle, 10, -0.5, 9.5);
255 
256  snprintf(chtitle, 255, "Jet with highest E_{T} (%s)", jetTag_.label().data());
257  jet_et_before_ = ibooker.book1D("JETET1_BEFORECUTS", chtitle, 20, 0., 200.0);
258  jet_et_after_ = ibooker.book1D("JETET1_AFTERCUTS", chtitle, 20, 0., 200.0);
259 
260  snprintf(chtitle, 255, "Eta of Jet with highest E_{T} (%s)",
261  jetTag_.label().data());
262  jet_eta_before_ = ibooker.book1D("JETETA1_BEFORECUTS", chtitle, 20, -5, 5);
263  jet_eta_after_ = ibooker.book1D("JETETA1_AFTERCUTS", chtitle, 20, -5, 5);
264 
265 }
266 
267 void EwkElecDQM::endRun(const Run& r, const EventSetup&) {
268 
269  // overall
270  double all = nall;
271  double esel = nsel / all;
272  LogVerbatim("") << "\n>>>>>> SELECTION SUMMARY BEGIN >>>>>>>>>>>>>>>";
273  LogVerbatim("") << "Total number of events analyzed: " << nall << " [events]";
274  LogVerbatim("") << "Total number of events selected: " << nsel << " [events]";
275  LogVerbatim("") << "Overall efficiency: "
276  << "(" << setprecision(4) << esel * 100. << " +/- "
277  << setprecision(2) << sqrt(esel * (1 - esel) / all) * 100.
278  << ")%";
279 
280  double erec = nrec / all;
281  double eeid = neid / all;
282  double eiso = niso / all;
283  // double ehlt = nhlt/all;
284  // double emet = nmet/all;
285 
286  // general reconstruction step??
287  double num = nrec;
288  double eff = erec;
289  double err = sqrt(eff * (1 - eff) / all);
290  LogVerbatim("") << "Passing Pt/Eta/Quality cuts: " << num << " [events], ("
291  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
292  << err * 100. << ")%";
293 
294  // electron ID step
295  num = neid;
296  eff = eeid;
297  err = sqrt(eff * (1 - eff) / all);
298  double effstep = 0.;
299  double errstep = 0.;
300  if (nrec > 0) effstep = eeid / erec;
301  if (nrec > 0) errstep = sqrt(effstep * (1 - effstep) / nrec);
302  LogVerbatim("") << "Passing eID cuts: " << num << " [events], ("
303  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
304  << err * 100. << ")%, to previous step: (" << setprecision(4)
305  << effstep * 100. << " +/- " << setprecision(2)
306  << errstep * 100. << ")%";
307 
308  // isolation step
309  num = niso;
310  eff = eiso;
311  err = sqrt(eff * (1 - eff) / all);
312  effstep = 0.;
313  errstep = 0.;
314  if (neid > 0) effstep = eiso / eeid;
315  if (neid > 0) errstep = sqrt(effstep * (1 - effstep) / neid);
316  LogVerbatim("") << "Passing isolation cuts: " << num << " [events], ("
317  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
318  << err * 100. << ")%, to previous step: (" << setprecision(4)
319  << effstep * 100. << " +/- " << setprecision(2)
320  << errstep * 100. << ")%";
321 
322  // // trigger step
323  // num = nhlt;
324  // eff = ehlt;
325  // err = sqrt(eff*(1-eff)/all);
326  // effstep = 0.;
327  // errstep = 0.;
328  // if (niso>0) effstep = ehlt/eiso;
329  // if (niso>0) errstep = sqrt(effstep*(1-effstep)/niso);
330  // LogVerbatim("") << "Passing HLT criteria: " << num << "
331  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
332  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
333  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
334 
335  // trigger step
336  num = nsel;
337  eff = esel;
338  err = sqrt(eff * (1 - eff) / all);
339  effstep = 0.;
340  errstep = 0.;
341  if (niso > 0) effstep = esel / eiso;
342  if (niso > 0) errstep = sqrt(effstep * (1 - effstep) / niso);
343  LogVerbatim("") << "Passing HLT criteria: " << num << " [events], ("
344  << setprecision(4) << eff * 100. << " +/- " << setprecision(2)
345  << err * 100. << ")%, to previous step: (" << setprecision(4)
346  << effstep * 100. << " +/- " << setprecision(2)
347  << errstep * 100. << ")%";
348 
349  // // met/acoplanarity cuts
350  // num = nmet;
351  // eff = emet;
352  // err = sqrt(eff*(1-eff)/all);
353  // effstep = 0.;
354  // errstep = 0.;
355  // if (nhlt>0) effstep = emet/ehlt;
356  // if (nhlt>0) errstep = sqrt(effstep*(1-effstep)/nhlt);
357  // LogVerbatim("") << "Passing MET/acoplanarity cuts: " << num << "
358  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
359  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
360  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
361 
362  // // Z/top selection cuts ALSO LAST STEP so "sel" for "selection"
363  // num = nsel;
364  // eff = esel;
365  // err = sqrt(eff*(1-eff)/all);
366  // effstep = 0.;
367  // errstep = 0.;
368  // if (nmet>0) effstep = esel/emet;
369  // if (nmet>0) errstep = sqrt(effstep*(1-effstep)/nmet);
370  // LogVerbatim("") << "Passing Z/top rejection cuts: " << num << "
371  // [events], (" << setprecision(4) << eff*100. <<" +/- "<< setprecision(2) <<
372  // err*100. << ")%, to previous step: (" << setprecision(4) << effstep*100.
373  // << " +/- "<< setprecision(2) << errstep*100. <<")%";
374 
375  LogVerbatim("") << ">>>>>> SELECTION SUMMARY END >>>>>>>>>>>>>>>\n";
376 }
377 
378 inline void HERE(const char* msg) { std::cout << msg << "\n"; }
379 
380 void EwkElecDQM::analyze(const Event& ev, const EventSetup& iSet) {
381 
382  // Reset global event selection flags
383  bool rec_sel = false;
384  bool eid_sel = false;
385  bool iso_sel = false;
386  bool all_sel = false;
387 
388  // Electron collection
390  if (!ev.getByToken(elecTag_, electronCollection)) {
391  // LogWarning("") << ">>> Electron collection does not exist !!!";
392  return;
393  }
394  unsigned int electronCollectionSize = electronCollection->size();
395 
396  // Beam spot
397  Handle<reco::BeamSpot> beamSpotHandle;
398  if (!ev.getByToken(beamSpotTag_, beamSpotHandle)) {
399  // LogWarning("") << ">>> No beam spot found !!!";
400  return;
401  }
402 
403  // MET
404  double met_px = 0.;
405  double met_py = 0.;
407  if (!ev.getByToken(metToken_, metCollection)) {
408  // LogWarning("") << ">>> MET collection does not exist !!!";
409  return;
410  }
411 
412  const MET& met = metCollection->at(0);
413  met_px = met.px();
414  met_py = met.py();
415  // if (!metIncludesMuons_) {
416  // for (unsigned int i=0; i<muonCollectionSize; i++) {
417  // const Muon& mu = muonCollection->at(i);
418  // if (!mu.isGlobalMuon()) continue;
419  // met_px -= mu.px();
420  // met_py -= mu.py();
421  // }
422  // }
423  double met_et = sqrt(met_px * met_px + met_py * met_py);
424  LogTrace("") << ">>> MET, MET_px, MET_py: " << met_et << ", " << met_px
425  << ", " << met_py << " [GeV]";
426  met_before_->Fill(met_et);
427 
428  // Vertices in the event
429  int npvCount = 0;
431  if (!ev.getByToken(vertexTag_, vertexCollection)) {
432  LogError("") << ">>> Vertex collection does not exist !!!";
433  return;
434  }
435 
436  for (unsigned int i = 0; i < vertexCollection->size(); i++) {
437  const Vertex& vertex = vertexCollection->at(i);
438  if (vertex.isValid()) npvCount++;
439  }
440  npvs_before_->Fill(npvCount);
441 
442  // Trigger
443  // Handle<TriggerResults> triggerResults;
444  // if (!ev.getByToken(trigTag_, triggerResults)) {
445  // LogWarning("") << ">>> TRIGGER collection does not exist !!!";
446  return;
447  // }
448  // const edm::TriggerNames& trigNames = ev.triggerNames(*triggerResults);
449  // bool trigger_fired = false;
450 
451  // HLTConfigProvider const& hltConfigProvider = hltPrescaleProvider_.hltConfigProvider();
452 
453  /* very old code
454  for (unsigned int i=0; i<triggerResults->size(); i++) {
455  if (triggerResults->accept(i)) {
456  LogTrace("") << "Accept by: " << i << ", Trigger: " <<
457  trigNames.triggerName(i);
458  }
459  }
460  */
461 
462  // the following gives error on CRAFT08 data where itrig1=19 (vector index out
463  // of range)
464  /*
465  int itrig1 = trigNames.triggerIndex(muonTrig_);
466  if (triggerResults->accept(itrig1)) trigger_fired = true;
467  */
468  // suggested replacement: lm250909
469  /* Fix buggy trigger logic
470  for (unsigned int i=0; i<triggerResults->size(); i++)
471  {
472  std::string trigName = trigNames.triggerName(i);
473  bool found=false;
474 
475 // for (unsigned int j = 0; j < elecTrig_.size(); j++)
476 // {
477 // if ( trigName == elecTrig_.at(j) && triggerResults->accept(i))
478 // {
479 // trigger_fired = true;
480 // }
481 // }
482 
483 
484  for(unsigned int index=0; index<elecTrig_.size() && found==false; index++)
485 {
486  size_t trigPath = trigName.find(elecTrig_.at(index)); // 0 if found, pos
487 if not
488  if (trigPath==0) found=true;
489  }
490  if(!found) continue;
491 
492  bool prescaled=false;
493  for (unsigned int ps= 0; ps< hltConfigProvider.prescaleSize();
494 ps++){
495  const unsigned int prescaleValue =
496 hltConfigProvider.prescaleValue(ps, trigName) ;
497  if (prescaleValue != 1) prescaled =true;
498  }
499 
500  if(triggerResults->accept(i) && !prescaled) trigger_fired=true;
501 
502  }
503  */
504 
505  // get the prescale set for this event
506  const int prescaleSet = hltPrescaleProvider_.prescaleSet(ev, iSet);
507  if (prescaleSet == -1) {
508  LogTrace("") << "Failed to determine prescaleSet\n";
509  // std::cout << "Failed to determine prescaleSet. Check cmsRun GlobalTag\n";
510  return;
511  }
512 
513  // for (unsigned int i = 0;
514  // (i < triggerResults->size()) && (trigger_fired == false); i++) {
515  // skip trigger, if it did not fire
516  // if (!triggerResults->accept(i)) continue;
517 
518  // skip trigger, if it is not on our list
519  // bool found = false;
520  // const std::string trigName = trigNames.triggerName(i);
521  // for (unsigned int index = 0; index < elecTrig_.size() && found == false;
522  // index++) {
523  // if (trigName.find(elecTrig_.at(index)) == 0) found = true;
524  // }
525  // if (!found) continue;
526 
527  // skip trigger, if it is prescaled
528  // if (hltConfigProvider.prescaleValue(prescaleSet, trigName) != 1) continue;
529 
530  // std::cout << "found unprescaled trigger that fired: " << trigName <<
531  // "\n";
532  // trigger_fired = true;
533  // }
534 
535 /* LogTrace("") << ">>> Trigger bit: " << trigger_fired << " for one of ( ";
536  for (unsigned int k = 0; k < elecTrig_.size(); k++) {
537  LogTrace("") << elecTrig_.at(k) << " ";
538  }
539  LogTrace("") << ")";
540  trig_before_->Fill(trigger_fired);
541 */
542  // Jet collection
543  Handle<View<Jet> > jetCollection;
544  if (!ev.getByToken(jetToken_, jetCollection)) {
545  // LogError("") << ">>> JET collection does not exist !!!";
546  return;
547  }
548  float electron_et = -8.0;
549  float electron_eta = -8.0;
550  float electron_phi = -8.0;
551  float electron2_et = -9.0;
552  float electron2_eta = -9.0;
553  float electron2_phi = -9.0;
554  // need to get some electron info so jets can be cleaned of them
555  for (unsigned int i = 0; i < electronCollectionSize; i++) {
556  const GsfElectron& elec = electronCollection->at(i);
557 
558  if (i < 1) {
559  electron_et = elec.pt();
560  electron_eta = elec.eta();
561  electron_phi = elec.phi();
562  }
563  if (i == 2) {
564  electron2_et = elec.pt();
565  electron2_eta = elec.eta();
566  electron2_phi = elec.phi();
567  }
568  }
569 
570  float jet_et = -8.0;
571  float jet_eta = -8.0;
572  int jet_count = 0;
573  float jet2_et = -9.0;
574  unsigned int jetCollectionSize = jetCollection->size();
575  int njets = 0;
576  for (unsigned int i = 0; i < jetCollectionSize; i++) {
577  const Jet& jet = jetCollection->at(i);
578 
579  float jet_current_et = jet.et();
580  // cout << "jet_current_et " << jet_current_et << endl;
581  // if it overlaps with electron, it is not a jet
582  if (electron_et > 0.0 && fabs(jet.eta() - electron_eta) < 0.2 &&
583  calcDeltaPhi(jet.phi(), electron_phi) < 0.2)
584  continue;
585  if (electron2_et > 0.0 && fabs(jet.eta() - electron2_eta) < 0.2 &&
586  calcDeltaPhi(jet.phi(), electron2_phi) < 0.2)
587  continue;
588 
589  // if it has too low Et, throw away
590  // if (jet_current_et < eJetMin_) continue; //Keep if only want to plot
591  // above jet cut
592 
593  if (jet.et() > eJetMin_) {
594  njets++;
595  jet_count++;
596  }
597  if (jet_current_et > jet_et) {
598  jet2_et = jet_et; // 2nd highest jet get's et from current highest
599  jet_et = jet.et(); // current highest jet gets et from the new highest
600  jet_eta = jet.eta();
601  } else if (jet_current_et > jet2_et) {
602  jet2_et = jet.et();
603  }
604  }
605 
606  // Fill After all electron cuts (or both before and after)
607  if (jet_et > 10) // don't want low energy "jets"
608  {
609  jet_et_before_->Fill(jet_et);
610  // jet2_et_before_ ->Fill(jet2_et);
611  jet_eta_before_->Fill(jet_eta);
612  }
613 
614  LogTrace("") << ">>> Total number of jets: " << jetCollectionSize;
615  LogTrace("") << ">>> Number of jets above " << eJetMin_
616  << " [GeV]: " << njets;
617  njets_before_->Fill(njets);
618 
619  // Start counting
620  nall++;
621 
622  // Histograms per event should be done only once, so keep track of them
623  //bool hlt_hist_done = false;
624  // bool minv_hist_done = false;
625  bool met_hist_done = false;
626  // bool nz1_hist_done = false;
627  // bool nz2_hist_done = false;
628  bool njets_hist_done = false;
629 
630  // Central selection criteria
631  // const int NFLAGS = 13; // number of individual selection criteria
632  const int NFLAGS = 10; // number of individual selection criteria
633  // 0: pt cut | rec
634  // 1: eta cut | rec
635  // 2: sieie | eid
636  // 3: detain | eid
637  // 4: ecal iso | iso
638  // 5: hcal iso | iso
639  // 6: trk iso | iso
640  // 7: trigger fired | hlt/all
641  bool electron_sel[NFLAGS];
642 
643  // for invariant mass calculation
644  // keep track of highest-pt electrons for initial (RECO) electrons
645  // and "good" electrons (passing all cuts)
646  // first array dimension is for first or second good electron
647  // second array dimension is for relevant quantities of good electron
648  // [0]: 1 for electron found or 0 for not found (if 0, no other quantities
649  // filled)
650  // [1]: mSqr
651  // [2]: E
652  // [3]: px
653  // [4]: py
654  // [5]: pz
655  // inv mass = sqrt(m_1^2 + m_2^2 + 2*(E_1*E_2 - (px1*px2 + py1*py2 + pz1+pz2)
656  // ) )
657  double electron[2][6];
658  double goodElectron[2][6];
659  nGoodElectrons = 0;
660  for (unsigned int i = 0; i < 2; i++) {
661  for (unsigned int j = 0; j < 6; j++) {
662  electron[i][j] = 0.;
663  goodElectron[i][j] = 0.;
664  }
665  }
666 
667  for (unsigned int i = 0; i < electronCollectionSize; i++) {
668  for (int j = 0; j < NFLAGS; ++j) {
669  electron_sel[j] = false;
670  }
671 
672  const GsfElectron& elec = electronCollection->at(i);
673  // if (!mu.isGlobalMuon()) continue;
674  // if (mu.globalTrack().isNull()) continue;
675  // if (mu.innerTrack().isNull()) continue;
676 
677  LogTrace("") << "> elec: processing electron number " << i << "...";
678  // reco::TrackRef gm = mu.globalTrack();
679  // reco::TrackRef tk = mu.innerTrack();
680  // should have stuff for electron track?
681 
682  if (i < 2) {
683  electron[i][0] = 1.;
684  electron[i][1] = elec.massSqr();
685  electron[i][2] = elec.energy();
686  electron[i][3] = elec.px();
687  electron[i][4] = elec.py();
688  electron[i][5] = elec.pz();
689  }
690 
691  // Pt,eta cuts
692  double pt = elec.pt();
693  double px = elec.px();
694  double py = elec.py();
695  double eta = elec.eta();
696  LogTrace("") << "\t... pt, eta: " << pt << " [GeV], " << eta;
697  ;
698  if (pt > ptCut_) electron_sel[0] = true;
699  if (fabs(eta) < etaCut_) electron_sel[1] = true;
700 
701  bool isBarrel = false;
702  bool isEndcap = false;
703  if (eta < 1.4442 && eta > -1.4442) {
704  isBarrel = true;
705  } else if ((eta > 1.56 && eta < 2.4) || (eta < -1.56 && eta > -2.4)) {
706  isEndcap = true;
707  }
708 
709  // // d0, chi2, nhits quality cuts
710  // double dxy = tk->dxy(beamSpotHandle->position());
711  // double normalizedChi2 = gm->normalizedChi2();
712  // double trackerHits = tk->numberOfValidHits();
713  // LogTrace("") << "\t... dxy, normalizedChi2, trackerHits,
714  // isTrackerMuon?: " << dxy << " [cm], " << normalizedChi2 << ", " <<
715  // trackerHits << ", " << mu.isTrackerMuon();
716  // if (fabs(dxy)<dxyCut_) muon_sel[2] = true;
717  // if (normalizedChi2<normalizedChi2Cut_) muon_sel[3] = true;
718  // if (trackerHits>=trackerHitsCut_) muon_sel[4] = true;
719  // if (mu.isTrackerMuon()) muon_sel[5] = true;
720 
721  pt_before_->Fill(pt);
722  eta_before_->Fill(eta);
723  // dxy_before_->Fill(dxy);
724  // chi2_before_->Fill(normalizedChi2);
725  // nhits_before_->Fill(trackerHits);
726  // tkmu_before_->Fill(mu.isTrackerMuon());
727 
728  // Electron ID cuts
729  double sieie = (double)elec.sigmaIetaIeta();
730  double detain =
731  (double)elec.deltaEtaSuperClusterTrackAtVtx(); // think this is detain
732  if (sieie < sieieCutBarrel_ && isBarrel) electron_sel[2] = true;
733  if (sieie < sieieCutEndcap_ && isEndcap) electron_sel[2] = true;
734  if (detain < detainCutBarrel_ && isBarrel) electron_sel[3] = true;
735  if (detain < detainCutEndcap_ && isEndcap) electron_sel[3] = true;
736  if (isBarrel) {
737  LogTrace("") << "\t... sieie value " << sieie << " (barrel), pass? "
738  << electron_sel[2];
739  LogTrace("") << "\t... detain value " << detain << " (barrel), pass? "
740  << electron_sel[3];
741  } else if (isEndcap) {
742  LogTrace("") << "\t... sieie value " << sieie << " (endcap), pass? "
743  << electron_sel[2];
744  LogTrace("") << "\t... detain value " << detain << " (endcap), pass? "
745  << electron_sel[2];
746  }
747 
748  if (isBarrel) {
749  sieiebarrel_before_->Fill(sieie);
750  detainbarrel_before_->Fill(detain);
751  } else if (isEndcap) {
752  sieieendcap_before_->Fill(sieie);
753  detainendcap_before_->Fill(detain);
754  }
755 
756  // Isolation cuts
757  // double isovar = mu.isolationR03().sumPt;
758  double ecalisovar = elec.dr03EcalRecHitSumEt(); // picked one set!
759  double hcalisovar = elec.dr03HcalTowerSumEt(); // try others if
760  double trkisovar = elec.dr04TkSumPt(); // doesn't work
761  // if (isCombinedIso_) {
762  // isovar += mu.isolationR03().emEt;
763  // isovar += mu.isolationR03().hadEt;
764  //}
765  // if (isRelativeIso_) isovar /= pt;
766  if (ecalisovar < ecalIsoCutBarrel_ && isBarrel) electron_sel[4] = true;
767  if (ecalisovar < ecalIsoCutEndcap_ && isEndcap) electron_sel[4] = true;
768  if (hcalisovar < hcalIsoCutBarrel_ && isBarrel) electron_sel[5] = true;
769  if (hcalisovar < hcalIsoCutEndcap_ && isEndcap) electron_sel[5] = true;
770  if (trkisovar < trkIsoCutBarrel_ && isBarrel) electron_sel[6] = true;
771  if (trkisovar < trkIsoCutEndcap_ && isEndcap) electron_sel[6] = true;
772  if (isBarrel) {
773  LogTrace("") << "\t... ecal isolation value " << ecalisovar
774  << " (barrel), pass? " << electron_sel[4];
775  LogTrace("") << "\t... hcal isolation value " << hcalisovar
776  << " (barrel), pass? " << electron_sel[5];
777  LogTrace("") << "\t... trk isolation value " << trkisovar
778  << " (barrel), pass? " << electron_sel[6];
779  } else if (isEndcap) {
780  LogTrace("") << "\t... ecal isolation value " << ecalisovar
781  << " (endcap), pass? " << electron_sel[4];
782  LogTrace("") << "\t... hcal isolation value " << hcalisovar
783  << " (endcap), pass? " << electron_sel[5];
784  LogTrace("") << "\t... trk isolation value " << trkisovar
785  << " (endcap), pass? " << electron_sel[6];
786  }
787 
788  // iso_before_->Fill(isovar);
789  if (isBarrel) {
790  ecalisobarrel_before_->Fill(ecalisovar);
791  hcalisobarrel_before_->Fill(hcalisovar);
792  trkisobarrel_before_->Fill(trkisovar);
793  } else if (isEndcap) {
794  ecalisoendcap_before_->Fill(ecalisovar);
795  hcalisoendcap_before_->Fill(hcalisovar);
796  trkisoendcap_before_->Fill(trkisovar);
797  }
798 
799  // HLT
800  // if (trigger_fired) electron_sel[7] = true;
801 
802  // // MET/MT cuts
803  double w_et = met_et + pt;
804  double w_px = met_px + px;
805  double w_py = met_py + py;
806 
807  double massT = w_et * w_et - w_px * w_px - w_py * w_py;
808  massT = (massT > 0) ? sqrt(massT) : 0;
809 
810  LogTrace("") << "\t... W mass, W_et, W_px, W_py: " << massT << ", " << w_et
811  << ", " << w_px << ", " << w_py << " [GeV]";
812  if (massT > mtMin_ && massT < mtMax_) electron_sel[7] = true;
813  mt_before_->Fill(massT);
814  if (met_et > metMin_ && met_et < metMax_) electron_sel[8] = true;
815 
816  // // Acoplanarity cuts
817  // Geom::Phi<double> deltaphi(mu.phi()-atan2(met_py,met_px));
818  // double acop = deltaphi.value();
819  // if (acop<0) acop = - acop;
820  // acop = M_PI - acop;
821  // LogTrace("") << "\t... acoplanarity: " << acop;
822  // if (acop<acopCut_) muon_sel[10] = true;
823  // acop_before_->Fill(acop);
824 
825  // // Remaining flags (from global event information)
826  // if (nmuonsForZ1<1 || nmuonsForZ2<2) muon_sel[11] = true;
827  if (njets <= nJetMax_) electron_sel[9] = true;
828 
829  // Collect necessary flags "per electron"
830  int flags_passed = 0;
831  bool rec_sel_this = true;
832  bool eid_sel_this = true;
833  bool iso_sel_this = true;
834  bool all_sel_this = true;
835  for (int j = 0; j < NFLAGS; ++j) {
836  if (electron_sel[j]) flags_passed += 1;
837  if (j < 2 && !electron_sel[j]) rec_sel_this = false;
838  if (j < 4 && !electron_sel[j]) eid_sel_this = false;
839  if (j < 7 && !electron_sel[j]) iso_sel_this = false;
840  if (!electron_sel[j]) all_sel_this = false;
841  }
842 
843  if (all_sel_this) {
844  if (nGoodElectrons < 2) {
845  goodElectron[nGoodElectrons][0] = 1.;
846  goodElectron[nGoodElectrons][1] = elec.massSqr();
847  goodElectron[nGoodElectrons][2] = elec.energy();
848  goodElectron[nGoodElectrons][3] = elec.px();
849  goodElectron[nGoodElectrons][4] = elec.py();
850  goodElectron[nGoodElectrons][5] = elec.pz();
851  }
852  nGoodElectrons++;
853  }
854 
855  // // "rec" => pt,eta and quality cuts are satisfied
856  // if (rec_sel_this) rec_sel = true;
857  // // "iso" => "rec" AND "muon is isolated"
858  // if (iso_sel_this) iso_sel = true;
859  // // "hlt" => "iso" AND "event is triggered"
860  // if (hlt_sel_this) hlt_sel = true;
861  // // "all" => "met" AND "Z/top rejection cuts"
862  // if (all_sel_this) all_sel = true;
863 
864  // "rec" => pt,eta cuts are satisfied
865  if (rec_sel_this) rec_sel = true;
866  // "eid" => "rec" AND "electron passes ID"
867  if (eid_sel_this) iso_sel = true;
868  // "iso" => "eid" AND "electron is isolated"
869  if (iso_sel_this) iso_sel = true;
870  // "met" => "iso" AND "MET/MT"
871  // "all" => "met" AND "event is triggered"
872  if (all_sel_this) all_sel = true;
873 
874  // Do N-1 histograms now (and only once for global event quantities)
875  if (flags_passed >= (NFLAGS - 1)) {
876  if (!electron_sel[0] || flags_passed == NFLAGS) {
877  pt_after_->Fill(pt);
878  }
879  if (!electron_sel[1] || flags_passed == NFLAGS) {
880  eta_after_->Fill(eta);
881  }
882  if (!electron_sel[2] || flags_passed == NFLAGS) {
883  if (isBarrel) {
884  sieiebarrel_after_->Fill(sieie);
885  } else if (isEndcap) {
886  sieieendcap_after_->Fill(sieie);
887  }
888  }
889  if (!electron_sel[3] || flags_passed == NFLAGS) {
890  if (isBarrel) {
891  detainbarrel_after_->Fill(detain);
892  } else if (isEndcap) {
893  detainendcap_after_->Fill(detain);
894  }
895  }
896  if (!electron_sel[4] || flags_passed == NFLAGS) {
897  if (isBarrel) {
898  ecalisobarrel_after_->Fill(ecalisovar);
899  } else if (isEndcap) {
900  ecalisoendcap_after_->Fill(ecalisovar);
901  }
902  }
903  if (!electron_sel[5] || flags_passed == NFLAGS) {
904  if (isBarrel) {
905  hcalisobarrel_after_->Fill(hcalisovar);
906  } else if (isEndcap) {
907  hcalisoendcap_after_->Fill(hcalisovar);
908  }
909  }
910  if (!electron_sel[6] || flags_passed == NFLAGS) {
911  if (isBarrel) {
912  trkisobarrel_after_->Fill(trkisovar);
913  } else if (isEndcap) {
914  trkisoendcap_after_->Fill(trkisovar);
915  }
916  }
917  // if (!electron_sel[3] || flags_passed==NFLAGS)
918  // {
919  // detain_after_->Fill(detain);
920  // }
921  // if (!electron_sel[4] || flags_passed==NFLAGS)
922  // {
923  // ecaliso_after_->Fill(trackerHits);
924  // }
925  // if (!electron_sel[5] || flags_passed==NFLAGS)
926  // {
927  // tkelectr_after_->Fill(electr.isTrackerElectron());
928  // }
929  // if (!electron_sel[6] || flags_passed==NFLAGS)
930  // {
931  // iso_after_->Fill(isovar);
932  // }
933  /* if (!electron_sel[7] || flags_passed == NFLAGS) {
934  if (!hlt_hist_done) {
935  trig_after_->Fill(trigger_fired);
936  }
937  }*/
938  //hlt_hist_done = true;
939  if (!electron_sel[7] || flags_passed == NFLAGS) {
940  mt_after_->Fill(massT);
941  }
942  if (!electron_sel[8] || flags_passed == NFLAGS) {
943  if (!met_hist_done) {
944  met_after_->Fill(met_et);
945  }
946  }
947  met_hist_done = true;
948  // if (!muon_sel[10] || flags_passed==NFLAGS)
949  // acop_after_->Fill(acop);
950  // if (!muon_sel[11] || flags_passed==NFLAGS)
951  // if (!nz1_hist_done)
952  // nz1_after_->Fill(nmuonsForZ1);
953  // nz1_hist_done = true;
954  // if (!muon_sel[11] || flags_passed==NFLAGS)
955  // if (!nz2_hist_done)
956  // nz2_after_->Fill(nmuonsForZ2);
957  // nz2_hist_done = true;
958  if (!electron_sel[9] || flags_passed == NFLAGS) {
959  if (!njets_hist_done) {
960  njets_after_->Fill(njets);
961  if (jet_et > 10) // don't want low energy "jets"
962  {
963  jet_et_after_->Fill(jet_et);
964  jet_eta_after_->Fill(jet_eta);
965  }
966  }
967  }
968  njets_hist_done = true;
969 
970  } // end N-1 histos block
971 
972  } // end loop through electrons
973 
974  // inv mass = sqrt(m_1^2 + m_2^2 + 2*(E_1*E_2 - (px1*px2 + py1*py2 + pz1+pz2)
975  // ) )
976  double invMass = 0;
977 
978  nelectrons_before_->Fill(electronCollectionSize);
979  if (electronCollectionSize > 1) {
980  invMass = sqrt(electron[0][1] + electron[1][1] +
981  2 * (electron[0][2] * electron[1][2] -
982  (electron[0][3] * electron[1][3] +
983  electron[0][4] * electron[1][4] +
984  electron[0][5] * electron[1][5])));
985  invmass_before_->Fill(invMass);
986  invmassPU_before_->Fill(invMass, npvCount);
987  }
988 
990  if (nGoodElectrons > 1) {
991  invMass = sqrt(goodElectron[0][1] + goodElectron[1][1] +
992  2 * (goodElectron[0][2] * goodElectron[1][2] -
993  (goodElectron[0][3] * goodElectron[1][3] +
994  goodElectron[0][4] * goodElectron[1][4] +
995  goodElectron[0][5] * goodElectron[1][5])));
996  invmass_after_->Fill(invMass);
997  invmassPU_afterZ_->Fill(invMass, npvCount);
998  npvs_afterZ_->Fill(npvCount);
999  }
1000 
1001  // Collect final flags
1002  if (rec_sel) nrec++;
1003  if (eid_sel) neid++;
1004  if (iso_sel) niso++;
1005  // if (hlt_sel) nhlt++;
1006  // if (met_sel) nmet++;
1007 
1008  if (all_sel) {
1009  nsel++;
1010  LogTrace("") << ">>>> Event ACCEPTED";
1011  } else {
1012  LogTrace("") << ">>>> Event REJECTED";
1013  }
1014 
1015  return;
1016 }
1017 
1018 // This always returns only a positive deltaPhi
1019 double EwkElecDQM::calcDeltaPhi(double phi1, double phi2) {
1020 
1021  double deltaPhi = phi1 - phi2;
1022 
1023  if (deltaPhi < 0) deltaPhi = -deltaPhi;
1024 
1025  if (deltaPhi > 3.1415926) {
1026  deltaPhi = 2 * 3.1415926 - deltaPhi;
1027  }
1028 
1029  return deltaPhi;
1030 }
1031 
1032 // Local Variables:
1033 // show-trailing-whitespace: t
1034 // truncate-lines: t
1035 // End:
MonitorElement * ecalisoendcap_after_
Definition: EwkElecDQM.h:142
MonitorElement * jet_et_after_
Definition: EwkElecDQM.h:189
unsigned int nGoodElectrons
Definition: EwkElecDQM.h:106
MonitorElement * invmass_after_
Definition: EwkElecDQM.h:160
unsigned int nall
Definition: EwkElecDQM.h:97
MonitorElement * hcalisobarrel_after_
Definition: EwkElecDQM.h:145
double eta() const final
momentum pseudorapidity
unsigned int nsel
Definition: EwkElecDQM.h:103
double metMax_
Definition: EwkElecDQM.h:77
MonitorElement * nelectrons_before_
Definition: EwkElecDQM.h:168
double sieieCutBarrel_
Definition: EwkElecDQM.h:59
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
Definition: EwkElecDQM.h:51
MonitorElement * sieieendcap_before_
Definition: EwkElecDQM.h:117
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * sieieendcap_after_
Definition: EwkElecDQM.h:118
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:68
MonitorElement * ecalisobarrel_before_
Definition: EwkElecDQM.h:138
edm::InputTag jetTag_
Definition: EwkElecDQM.h:45
bool isBarrel(GeomDetEnumerators::SubDetector m)
double px() const final
x coordinate of momentum vector
MonitorElement * sieiebarrel_before_
Definition: EwkElecDQM.h:114
MonitorElement * hcalisobarrel_before_
Definition: EwkElecDQM.h:144
float dr04TkSumPt() const
Definition: GsfElectron.h:564
double pt() const final
transverse momentum
MonitorElement * detainbarrel_after_
Definition: EwkElecDQM.h:121
MonitorElement * ecalisobarrel_after_
Definition: EwkElecDQM.h:139
bool ev
MonitorElement * detainendcap_before_
Definition: EwkElecDQM.h:123
MonitorElement * sieiebarrel_after_
Definition: EwkElecDQM.h:115
MonitorElement * detainbarrel_before_
Definition: EwkElecDQM.h:120
MonitorElement * mt_before_
Definition: EwkElecDQM.h:171
MonitorElement * nelectrons_after_
Definition: EwkElecDQM.h:169
MonitorElement * hcalisoendcap_before_
Definition: EwkElecDQM.h:147
MonitorElement * npvs_afterZ_
Definition: EwkElecDQM.h:166
void Fill(long long x)
unsigned int niso
Definition: EwkElecDQM.h:100
double calcDeltaPhi(double phi1, double phi2)
Definition: EwkElecDQM.cc:1019
MonitorElement * mt_after_
Definition: EwkElecDQM.h:172
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:253
double ecalIsoCutEndcap_
Definition: EwkElecDQM.h:69
float sigmaIetaIeta() const
Definition: GsfElectron.h:440
MonitorElement * jet_et_before_
Definition: EwkElecDQM.h:188
double detainCutEndcap_
Definition: EwkElecDQM.h:62
MonitorElement * njets_after_
Definition: EwkElecDQM.h:187
MonitorElement * pt_before_
Definition: EwkElecDQM.h:108
MonitorElement * pt_after_
Definition: EwkElecDQM.h:109
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecTag_
Definition: EwkElecDQM.h:47
double metMin_
Definition: EwkElecDQM.h:76
double trkIsoCutEndcap_
Definition: EwkElecDQM.h:73
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
unsigned int PUBinCount_
Definition: EwkElecDQM.h:92
Definition: Jet.py:1
double et() const final
transverse energy
double pz() const final
z coordinate of momentum vector
Definition: MET.h:42
T sqrt(T t)
Definition: SSEVec.h:18
unsigned int nrec
Definition: EwkElecDQM.h:98
MonitorElement * hcalisoendcap_after_
Definition: EwkElecDQM.h:148
int nJetMax_
Definition: EwkElecDQM.h:89
double energy() const final
energy
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
EwkElecDQM(const edm::ParameterSet &)
Definition: EwkElecDQM.cc:37
double ecalIsoCutBarrel_
Definition: EwkElecDQM.h:68
double trkIsoCutBarrel_
Definition: EwkElecDQM.h:72
edm::InputTag metTag_
Definition: EwkElecDQM.h:44
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
Definition: EwkElecDQM.h:49
MonitorElement * invmass_before_
Definition: EwkElecDQM.h:159
MonitorElement * ecalisoendcap_before_
Definition: EwkElecDQM.h:141
unsigned int PUMax_
Definition: EwkElecDQM.h:92
MonitorElement * jet_eta_after_
Definition: EwkElecDQM.h:191
bool isEndcap(GeomDetEnumerators::SubDetector m)
#define LogTrace(id)
MonitorElement * jet_eta_before_
Definition: EwkElecDQM.h:190
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup)
unsigned int neid
Definition: EwkElecDQM.h:99
double etaCut_
Definition: EwkElecDQM.h:57
double hcalIsoCutBarrel_
Definition: EwkElecDQM.h:70
bool isValidHltConfig_
Definition: EwkElecDQM.h:94
void endRun(const edm::Run &, const edm::EventSetup &) override
Definition: EwkElecDQM.cc:267
MonitorElement * detainendcap_after_
Definition: EwkElecDQM.h:124
MonitorElement * njets_before_
Definition: EwkElecDQM.h:186
MonitorElement * invmassPU_afterZ_
Definition: EwkElecDQM.h:162
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * trkisobarrel_before_
Definition: EwkElecDQM.h:150
met
===> hadronic RAZOR
double sieieCutEndcap_
Definition: EwkElecDQM.h:60
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexTag_
Definition: EwkElecDQM.h:50
MonitorElement * met_before_
Definition: EwkElecDQM.h:174
MonitorElement * trkisoendcap_before_
Definition: EwkElecDQM.h:153
double py() const final
y coordinate of momentum vector
double massSqr() const final
mass squared
tuple msg
Definition: mps_check.py:285
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: EwkElecDQM.h:48
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:554
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: EwkElecDQM.cc:127
std::string const & label() const
Definition: InputTag.h:36
fixed size matrix
HLT enums.
MonitorElement * met_after_
Definition: EwkElecDQM.h:175
double eJetMin_
Definition: EwkElecDQM.h:88
void HERE(const char *msg)
Definition: EwkElecDQM.cc:378
MonitorElement * trkisobarrel_after_
Definition: EwkElecDQM.h:151
double mtMax_
Definition: EwkElecDQM.h:75
MonitorElement * eta_after_
Definition: EwkElecDQM.h:112
double detainCutBarrel_
Definition: EwkElecDQM.h:61
MonitorElement * npvs_before_
Definition: EwkElecDQM.h:164
MonitorElement * trkisoendcap_after_
Definition: EwkElecDQM.h:154
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:557
HLTPrescaleProvider hltPrescaleProvider_
Definition: EwkElecDQM.h:95
double hcalIsoCutEndcap_
Definition: EwkElecDQM.h:71
double phi() const final
momentum azimuthal angle
MonitorElement * eta_before_
Definition: EwkElecDQM.h:111
MonitorElement * invmassPU_before_
Definition: EwkElecDQM.h:161
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
Definition: Run.h:45
double mtMin_
Definition: EwkElecDQM.h:74
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EwkElecDQM.cc:147
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EwkElecDQM.cc:380
double ptCut_
Definition: EwkElecDQM.h:56