CMS 3D CMS Logo

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