CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FourVectorHLTOffline.cc
Go to the documentation of this file.
1 // $Id: FourVectorHLTOffline.cc,v 1.103 2011/09/13 12:13:16 bjk Exp $
2 // See header file for information.
3 #include "TMath.h"
6 
7 #include <map>
8 #include <utility>
9 
10 using namespace edm;
11 using namespace trigger;
12 using namespace std;
13 using namespace muon;
14 
16 {
17 
18  LogDebug("FourVectorHLTOffline") << "constructor...." ;
19 
20  useUM = false;
21  fIsSetup = false;
27  //fSelectedTaus = new reco::CaloTauCollection;
29 
31  if ( ! dbe_ ) {
32  LogInfo("FourVectorHLTOffline") << "unabel to get DQMStore service?";
33  }
34  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
35  dbe_->setVerbose(0);
36  }
37 
38  dirname_ = iConfig.getUntrackedParameter("dirname", std::string("HLT/FourVector/"));
39  //dirname_ += iConfig.getParameter<std::string>("@module_label");
40 
41  if (dbe_ != 0 ) {
43  }
44 
45 
46  doCombineRuns_ = iConfig.getUntrackedParameter<bool>("doCombineRuns", false);
47 
48  processname_ = iConfig.getParameter<std::string>("processname");
49  fCustomBXPath = iConfig.getUntrackedParameter<std::string>("customBXPath", std::string("HLT_MinBiasBSC"));
50 
51  referenceBX_ = iConfig.getUntrackedParameter<unsigned int>("referenceBX",51);
52  Nbx_ = iConfig.getUntrackedParameter<unsigned int>("Nbx",3564);
53 
54  // plotting paramters
55  ptMin_ = iConfig.getUntrackedParameter<double>("ptMin",0.);
56  ptMax_ = iConfig.getUntrackedParameter<double>("ptMax",1000.);
57  nBins_ = iConfig.getUntrackedParameter<unsigned int>("Nbins",20);
58  nBins2D_ = iConfig.getUntrackedParameter<unsigned int>("Nbins2D",40);
59  dRMax_ = iConfig.getUntrackedParameter<double>("dRMax",1.0);
60  nBinsDR_ = iConfig.getUntrackedParameter<unsigned int>("NbinsDR",10);
61  nBinsOneOverEt_ = iConfig.getUntrackedParameter<unsigned int>("NbinsOneOverEt",10000);
62  nLS_ = iConfig.getUntrackedParameter<unsigned int>("NLuminositySegments",10);
63  LSsize_ = iConfig.getUntrackedParameter<double>("LuminositySegmentSize",23);
64  thresholdFactor_ = iConfig.getUntrackedParameter<double>("thresholdFactor",1.5);
65 
66 
67  plotAll_ = iConfig.getUntrackedParameter<bool>("plotAll", false);
68  // this is the list of paths to look at.
69  std::vector<edm::ParameterSet> paths =
70  iConfig.getParameter<std::vector<edm::ParameterSet> >("paths");
71 
72  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
73 
74  //std::pair<std::string, std::string> custompathnamepair;
75  //custompathnamepair.first =pathconf->getParameter<std::string>("pathname");
76  //custompathnamepair.second = pathconf->getParameter<std::string>("denompathname");
77  //custompathnamepairs_.push_back(custompathnamepair);
78  custompathnamepairs_.push_back(
79  make_pair(
80  pathconf->getParameter<std::string>("pathname"),
81  pathconf->getParameter<std::string>("denompathname")
82  )
83  );
84 
85  }
86 
87  if (hltPaths_.size() > 0)
88  {
89  // book a histogram of scalers
90  scalersSelect = dbe_->book1D("selectedScalers","Selected Scalers", hltPaths_.size(), 0.0, (double)hltPaths_.size());
91 
92  }
93 
94  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
95  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
96  muonRecoCollectionName_ = iConfig.getUntrackedParameter("muonRecoCollectionName", std::string("muons"));
97 
98  electronEtaMax_ = iConfig.getUntrackedParameter<double>("electronEtaMax",2.5);
99  electronEtMin_ = iConfig.getUntrackedParameter<double>("electronEtMin",3.0);
100  electronDRMatch_ =iConfig.getUntrackedParameter<double>("electronDRMatch",0.3);
101  electronL1DRMatch_ =iConfig.getUntrackedParameter<double>("electronL1DRMatch",0.3);
102 
103  muonEtaMax_ = iConfig.getUntrackedParameter<double>("muonEtaMax",2.1);
104  muonEtMin_ = iConfig.getUntrackedParameter<double>("muonEtMin",3.0);
105  muonDRMatch_ =iConfig.getUntrackedParameter<double>("muonDRMatch",0.3);
106  muonL1DRMatch_ =iConfig.getUntrackedParameter<double>("muonL1DRMatch",0.3);
107 
108  tauEtaMax_ = iConfig.getUntrackedParameter<double>("tauEtaMax",2.5);
109  tauEtMin_ = iConfig.getUntrackedParameter<double>("tauEtMin",3.0);
110  tauDRMatch_ =iConfig.getUntrackedParameter<double>("tauDRMatch",0.3);
111  tauL1DRMatch_ =iConfig.getUntrackedParameter<double>("tauL1DRMatch",0.5);
112 
113  jetEtaMax_ = iConfig.getUntrackedParameter<double>("jetEtaMax",5.0);
114  jetEtMin_ = iConfig.getUntrackedParameter<double>("jetEtMin",10.0);
115  jetDRMatch_ =iConfig.getUntrackedParameter<double>("jetDRMatch",0.3);
116  jetL1DRMatch_ =iConfig.getUntrackedParameter<double>("jetL1DRMatch",0.5);
117 
118  bjetEtaMax_ = iConfig.getUntrackedParameter<double>("bjetEtaMax",2.5);
119  bjetEtMin_ = iConfig.getUntrackedParameter<double>("bjetEtMin",10.0);
120  bjetDRMatch_ =iConfig.getUntrackedParameter<double>("bjetDRMatch",0.3);
121  bjetL1DRMatch_ =iConfig.getUntrackedParameter<double>("bjetL1DRMatch",0.3);
122 
123  photonEtaMax_ = iConfig.getUntrackedParameter<double>("photonEtaMax",2.5);
124  photonEtMin_ = iConfig.getUntrackedParameter<double>("photonEtMin",3.0);
125  photonDRMatch_ =iConfig.getUntrackedParameter<double>("photonDRMatch",0.3);
126  photonL1DRMatch_ =iConfig.getUntrackedParameter<double>("photonL1DRMatch",0.3);
127 
128  trackEtaMax_ = iConfig.getUntrackedParameter<double>("trackEtaMax",2.5);
129  trackEtMin_ = iConfig.getUntrackedParameter<double>("trackEtMin",3.0);
130  trackDRMatch_ =iConfig.getUntrackedParameter<double>("trackDRMatch",0.3);
131  trackL1DRMatch_ =iConfig.getUntrackedParameter<double>("trackL1DRMatch",0.3);
132 
133  metEtaMax_ = iConfig.getUntrackedParameter<double>("metEtaMax",5);
134  metMin_ = iConfig.getUntrackedParameter<double>("metMin",10.0);
135  metDRMatch_ =iConfig.getUntrackedParameter<double>("metDRMatch",0.5);
136  metL1DRMatch_ =iConfig.getUntrackedParameter<double>("metL1DRMatch",0.5);
137 
138  htEtaMax_ = iConfig.getUntrackedParameter<double>("htEtaMax",5);
139  htMin_ = iConfig.getUntrackedParameter<double>("htMin",10.0);
140  htDRMatch_ =iConfig.getUntrackedParameter<double>("htDRMatch",0.5);
141  htL1DRMatch_ =iConfig.getUntrackedParameter<double>("htL1DRMatch",0.5);
142 
143  sumEtMin_ = iConfig.getUntrackedParameter<double>("sumEtMin",10.0);
144 
145  // Muon quality cuts
147  dxyCut_ = iConfig.getUntrackedParameter<double>("DxyCut", 0.2); // dxy < 0.2 cm
148  normalizedChi2Cut_ = iConfig.getUntrackedParameter<double>("NormalizedChi2Cut", 10.); // chi2/ndof (of global fit) <10.0
149  trackerHitsCut_ = iConfig.getUntrackedParameter<int>("TrackerHitsCut", 11); // Tracker Hits >10
150  pixelHitsCut_ = iConfig.getUntrackedParameter<int>("PixelHitsCut", 1); // Pixel Hits >0
151  muonHitsCut_ = iConfig.getUntrackedParameter<int>("MuonHitsCut", 1); // Valid Muon Hits >0
152  isAlsoTrackerMuon_ = iConfig.getUntrackedParameter<bool>("IsAlsoTrackerMuon", true);
153  nMatchesCut_ = iConfig.getUntrackedParameter<int>("NMatchesCut", 2); // At least 2 Chambers with matches
154 
155  // Electron quality cuts
157  eleMaxOver3x3_ = iConfig.getUntrackedParameter<double>("eleMaxOver3x3", 0.9);
158  // Ecal Barrel
159  dr03TkSumPtEB_ = iConfig.getUntrackedParameter<double>("dr03TkSumPtEB", 3.0);
160  dr04EcalRecHitSumEtEB_ = iConfig.getUntrackedParameter<double>("dr04EcalRecHitSumEtEB", 4.0);
161  dr04HcalTowerSumEtEB_ = iConfig.getUntrackedParameter<double>("dr04HcalTowerSumEtEB", 5.0);
162  hadronicOverEmEB_ = iConfig.getUntrackedParameter<double>("hadronicOverEmEB", 0.05);
163  deltaPhiSuperClusterTrackAtVtxEB_ = iConfig.getUntrackedParameter<double>("deltaPhiSuperClusterTrackAtVtxEB", 0.2);
164  deltaEtaSuperClusterTrackAtVtxEB_ = iConfig.getUntrackedParameter<double>("deltaEtaSuperClusterTrackAtVtxEB", 0.006);
165  sigmaIetaIetaEB_ = iConfig.getUntrackedParameter<double>("sigmaIetaIetaEB", 0.01);
166  //spikes
167  sigmaIetaIetaSpikesEB_ = iConfig.getUntrackedParameter<double>("sigmaIetaIetaSpikesEB", 0.002);
168 
169  // Ecal Endcap
170  dr03TkSumPtEC_ = iConfig.getUntrackedParameter<double>("dr03TkSumPtEC", 1.5);
171  dr04EcalRecHitSumEtEC_ = iConfig.getUntrackedParameter<double>("dr04EcalRecHitSumEtEC", 2.5);
172  dr04HcalTowerSumEtEC_ = iConfig.getUntrackedParameter<double>("dr04HcalTowerSumEtEC", 0.7);
173  hadronicOverEmEC_ = iConfig.getUntrackedParameter<double>("hadronicOverEmEC", 0.025);
174  deltaPhiSuperClusterTrackAtVtxEC_ = iConfig.getUntrackedParameter<double>("deltaPhiSuperClusterTrackAtVtxEC", 0.2);
175  deltaEtaSuperClusterTrackAtVtxEC_ = iConfig.getUntrackedParameter<double>("deltaEtaSuperClusterTrackAtVtxEC", 0.006);
176  sigmaIetaIetaEC_ = iConfig.getUntrackedParameter<double>("sigmaIetaIetaEC", 0.03);
177  //spikes
178  sigmaIetaIetaSpikesEC_ = iConfig.getUntrackedParameter<double>("sigmaIetaIetaSpikesEC", 0.002);
179 
180  // Jet ID cuts
182  emEnergyFractionJet_ = iConfig.getUntrackedParameter<double>("emEnergyFractionJet",0.01);
183  fHPDJet_ = iConfig.getUntrackedParameter<double>("fHPDJet",0.98);
184  n90Jet_ = iConfig.getUntrackedParameter<int>("n90Jet",2);
185 
186  // Tau discriminators
188  tauDscrmtrLabel1_ = iConfig.getUntrackedParameter("tauDscrmtrLabel1", std::string("shrinkingConePFTauDiscriminationByLeadingTrackFinding"));
189  tauDscrmtrLabel2_ = iConfig.getUntrackedParameter("tauDscrmtrLabel2", std::string("shrinkingConePFTauDiscriminationByLeadingTrackPtCut"));
190  tauDscrmtrLabel3_ = iConfig.getUntrackedParameter("tauDscrmtrLabel3", std::string("shrinkingConePFTauDiscriminationByIsolation"));
191 
192  specialPaths_ = iConfig.getParameter<std::vector<std::string > >("SpecialPaths");
193 
194  pathsSummaryFolder_ = iConfig.getUntrackedParameter ("pathsSummaryFolder",std::string("HLT/FourVector/PathsSummary/"));
195  pathsSummaryHLTCorrelationsFolder_ = iConfig.getUntrackedParameter ("hltCorrelationsFolder",std::string("HLT/FourVector/PathsSummary/HLT Correlations/"));
196  pathsSummaryFilterCountsFolder_ = iConfig.getUntrackedParameter ("filterCountsFolder",std::string("HLT/FourVector/PathsSummary/Filters Counts/"));
197 
198  pathsSummaryHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("pathsPerLSFolder",std::string("HLT/FourVector/PathsSummary/HLT LS/"));
199  // pathsIndividualHLTPathsPerLSFolder_ = iConfig.getUntrackedParameter ("individualPathsPerLSFolder",std::string("HLT/FourVector/PathsSummary/HLT LS/Paths/"));
200  // pathsSummaryHLTPathsPerBXFolder_ = iConfig.getUntrackedParameter ("individualPathsPerBXFolder",std::string("HLT/FourVector/PathsSummary/HLT BX/"));
201 
202  fLumiFlag = true;
203  ME_HLTAll_LS = NULL;
204  ME_HLT_BX = NULL;
206 
207  jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"));
208 
209  recHitsEBTag_ = iConfig.getUntrackedParameter<edm::InputTag>("RecHitsEBTag",edm::InputTag("reducedEcalRecHitsEB"));
210  recHitsEETag_ = iConfig.getUntrackedParameter<edm::InputTag>("RecHitsEETag",edm::InputTag("reducedEcalRecHitsEE"));
211 
212 
213 }
214 
215 
217 {
218 
219  // do anything here that needs to be done at desctruction time
220  // (e.g. close files, deallocate resources etc.)
221  delete fSelectedMuons;
222  delete fSelectedElectrons;
223  delete fSelectedPhotons;
224  delete fSelectedJets;
225  delete fSelectedMet;
226  delete fSelectedTaus;
227 
228 }
229 
230 
231 //
232 // member functions
233 //
234 
235 // ------------ method called to for each event ------------
236 void
238 {
239 
240  //if(! fLumiFlag ) return;
241 
242  using namespace edm;
243  using namespace trigger;
244  ++nev_;
245  LogDebug("FourVectorHLTOffline")<< " analyze...." ;
246 
247 
248 
249  /*
250  Handle<GenParticleCollection> genParticles;
251  iEvent.getByLabel("genParticles", genParticles);
252  if(!genParticles.isValid()) {
253  edm::LogInfo("FourVectorHLTOffline") << "genParticles not found, "
254  "skipping event";
255  return;
256  }
257 
258  Handle<GenJetCollection> genJets;
259  iEvent.getByLabel("iterativeCone5GenJets",genJets);
260  if(!genJets.isValid()) {
261  edm::LogInfo("FourVectorHLTOffline") << "genJets not found, "
262  "skipping event";
263  return;
264  }
265 
266  Handle<GenMETCollection> genMets;
267  iEvent.getByLabel("genMetTrue",genMets);
268  if(!genMets.isValid()) {
269  edm::LogInfo("FourVectorHLTOffline") << "genMets not found, "
270  "skipping event";
271  return;
272  }
273  */
274 
275  edm::Handle<TriggerResults> triggerResults;
276  iEvent.getByLabel(triggerResultsLabel_,triggerResults);
277  if(!triggerResults.isValid()) {
278  edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
279  iEvent.getByLabel(triggerResultsLabelFU,triggerResults);
280  if(!triggerResults.isValid()) {
281  edm::LogInfo("FourVectorHLTOffline") << "TriggerResults not found, "
282  "skipping event";
283  return;
284  }
285  }
286  fTriggerResults = triggerResults;
287  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
288  int npath = triggerResults->size();
289 
291  if(!fTriggerObj.isValid()) {
292 
293  edm::InputTag triggerSummaryLabelFU(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(), "FU");
294  iEvent.getByLabel(triggerSummaryLabelFU,fTriggerObj);
295 
296  if(!fTriggerObj.isValid()) {
297 
298  edm::LogInfo("FourVectorHLTOffline") << "TriggerEvent not found, " "skipping event";
299  return;
300 
301  }
302 
303  }
304 
305  // Beam spot
306  if (!iEvent.getByLabel(InputTag("offlineBeamSpot"), fBeamSpotHandle)) {
307  edm::LogInfo("") << ">>> No beam spot found !!!";
308  }
309 
311  iEvent.getByLabel(muonRecoCollectionName_,muonHandle);
312  if(!muonHandle.isValid())
313  edm::LogInfo("FourVectorHLTOffline") << "muonHandle not found, ";
314  selectMuons(muonHandle);
315 
317  iEvent.getByLabel("gsfElectrons",gsfElectrons);
318  if(!gsfElectrons.isValid())
319  edm::LogInfo("FourVectorHLTOffline") << "gsfElectrons not found, ";
320  selectElectrons(iEvent, iSetup, gsfElectrons);
321 
322  //edm::Handle<reco::CaloTauCollection> tauHandle;
324  iEvent.getByLabel("caloRecoTauProducer",tauHandle);
325  if(!tauHandle.isValid())
326  edm::LogInfo("FourVectorHLTOffline") << "tauHandle not found, ";
327  //selectTaus(tauHandle);
328  selectTaus(iEvent);
329 
331  iEvent.getByLabel("iterativeCone5CaloJets",jetHandle);
332  if(!jetHandle.isValid())
333  edm::LogInfo("FourVectorHLTOffline") << "jetHandle not found, ";
334  selectJets(iEvent,jetHandle);
335 
336  // Get b tag information
338  iEvent.getByLabel("jetProbabilityBJetTags", bTagIPHandle);
339  if (!bTagIPHandle.isValid())
340  edm::LogInfo("FourVectorHLTOffline") << "mTagIPHandle trackCountingHighEffJetTags not found, ";
341 
342  // Get b tag information
344  iEvent.getByLabel("softMuonBJetTags", bTagMuHandle);
345  if (!bTagMuHandle.isValid())
346  edm::LogInfo("FourVectorHLTOffline") << "bTagMuHandle not found, ";
347 
349  iEvent.getByLabel("met",metHandle);
350  if(!metHandle.isValid())
351  edm::LogInfo("FourVectorHLTOffline") << "metHandle not found, ";
352  selectMet(metHandle);
353 
355  iEvent.getByLabel("photons",photonHandle);
356  if(!photonHandle.isValid())
357  edm::LogInfo("FourVectorHLTOffline") << "photonHandle not found, ";
358  selectPhotons(photonHandle);
359 
361  iEvent.getByLabel("pixelTracks",trackHandle);
362  if(!trackHandle.isValid())
363  edm::LogInfo("FourVectorHLTOffline") << "trackHandle not found, ";
364 
365 
366  // ---------------------
367  // Monitors
368  // ---------------------
369 
370  // electron Monitor
372  //eleMon.setReco(gsfElectrons);
374  eleMon.setRecoEle(fSelElectronsHandle);
376 
377  eleMon.pushTriggerType(TriggerElectron);
378  eleMon.pushTriggerType(TriggerL1NoIsoEG);
379  eleMon.pushTriggerType(TriggerL1IsoEG);
380 
381  eleMon.pushL1TriggerType(TriggerL1NoIsoEG);
382  eleMon.pushL1TriggerType(TriggerL1IsoEG);
383 
384  // muon Monitor
386  //muoMon.setReco(muonHandle);
387  muoMon.setReco(fSelMuonsHandle);
388  muoMon.setRecoMu(fSelMuonsHandle);
390 
391  muoMon.pushTriggerType(TriggerMuon);
392  muoMon.pushTriggerType(TriggerL1Mu);
393 
394  muoMon.pushL1TriggerType(TriggerL1Mu);
395 
396  // tau Monitor
397  //objMonData<reco::CaloTauCollection> tauMon;
399  //tauMon.setReco(tauHandle);
400  tauMon.setReco(fSelTausHandle);
402 
403  tauMon.pushTriggerType(TriggerTau);
404  tauMon.pushTriggerType(TriggerL1TauJet);
405 
406  tauMon.pushL1TriggerType(TriggerL1TauJet);
407  tauMon.pushL1TriggerType(TriggerL1ForJet);
408 
409  // photon Monitor
410  //objMonData<reco::PhotonCollection> phoMon;
411  //phoMon.setReco(photonHandle);
412  //phoMon.setReco(fSelPhotonsHandle);
413  // -----------------------------------------------
414  // Use RECO Electrons instead of RECO Photons
415  // to measure HLT_Photon efficiency
416  // -----------------------------------------------
419  phoMon.setRecoEle(fSelElectronsHandle);
420 
421 
423 
424  phoMon.pushTriggerType(TriggerPhoton);
425 
426  phoMon.pushL1TriggerType(TriggerL1NoIsoEG);
427  phoMon.pushL1TriggerType(TriggerL1IsoEG);
428 
429  // jet Monitor - NOTICE: we use genJets for MC
431  //jetMon.setReco(jetHandle);
432  jetMon.setReco(fSelJetsHandle);
434 
435  jetMon.pushTriggerType(TriggerJet);
436  jetMon.pushTriggerType(TriggerL1CenJet);
437  jetMon.pushTriggerType(TriggerL1ForJet);
438 
439  jetMon.pushL1TriggerType(TriggerL1CenJet);
440  jetMon.pushL1TriggerType(TriggerL1ForJet);
441  jetMon.pushL1TriggerType(TriggerL1TauJet);
442 
443  // bjet Monitor - NOTICE: we use genJets for MC
444  objMonData<reco::CaloJetCollection> btagIPMon; // CaloJet will not be used, this is only place holder
445  //btagIPMon.setReco(jetHandle);
446  btagIPMon.setRecoB(bTagIPHandle);
447  btagIPMon.setBJetsFlag(true);
449 
450  btagIPMon.pushTriggerType(TriggerBJet);
451  btagIPMon.pushTriggerType(TriggerJet);
452 
453  btagIPMon.pushL1TriggerType(TriggerL1CenJet);
454  btagIPMon.pushL1TriggerType(TriggerL1ForJet);
455  btagIPMon.pushL1TriggerType(TriggerL1TauJet);
456 
457  objMonData<reco::CaloJetCollection> btagMuMon; // CaloJet will not be used, this is only place holder
458  //btagMuMon.setReco(jetHandle);
459  btagMuMon.setRecoB(bTagMuHandle);
460  btagMuMon.setBJetsFlag(true);
462 
463  btagMuMon.pushTriggerType(TriggerBJet);
464  btagMuMon.pushTriggerType(TriggerJet);
465 
466  btagMuMon.pushL1TriggerType(TriggerL1CenJet);
467  btagMuMon.pushL1TriggerType(TriggerL1ForJet);
468  btagMuMon.pushL1TriggerType(TriggerL1TauJet);
469 
470 
471  objMonData<reco::CaloJetCollection> btagMon; // Generic btagMon
472 
473  // met Monitor
475  //metMon.setReco(metHandle);
476  metMon.setReco(fSelMetHandle);
478 
479  metMon.pushTriggerType(TriggerMET);
480 
481  metMon.pushL1TriggerType(TriggerL1ETM);
482 
483  // tet Monitor
485  //tetMon.setReco(metHandle);
486  tetMon.setReco(fSelMetHandle);
487  //tetMon.setLimits(tetEtaMax_=999., tetEtMin_=10, tetDRMatch_=999);
488  tetMon.setLimits(999., 10., 999., 999., dRMax_, thresholdFactor_);
489 
490  tetMon.pushTriggerType(TriggerTET);
491 
492  tetMon.pushL1TriggerType(TriggerL1ETT);
493 
494  // default Monitor
495  //objMonData<trigger::TriggerEvent> defMon;
497  defMon.setLimits(999., 3., 999., 999., dRMax_, thresholdFactor_);
498 
499  // vector to hold monitors
500  // interface is through virtual class BaseMonitor
501  std::vector<BaseMonitor*> monitors;
502 
503  //monitors.push_back(&jetMon);
504 
505  monitors.push_back(&muoMon);
506  monitors.push_back(&eleMon);
507  monitors.push_back(&tauMon);
508  monitors.push_back(&phoMon);
509  monitors.push_back(&jetMon);
510  monitors.push_back(&btagMon);
511  monitors.push_back(&metMon);
512  monitors.push_back(&tetMon);
513  /*
514  */
515 
516  // int bx = iEvent.bunchCrossing();
517  /*
518  // Fill HLTPassed_Correlation Matrix bin (i,j) = (Any,Any)
519  // --------------------------------------------------------
520  int anyBinNumber = ME_HLTPassPass_->getTH2F()->GetXaxis()->FindBin("HLT_Any");
521  // any triger accepted
522  if(triggerResults->accept()){
523 
524  ME_HLTPassPass_->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
525 
526  }
527  */
528 
529  fillHltMatrix(triggerNames);
530 
531 
532  // Loop over paths
533  // --------------------
534  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
535 
536  LogTrace("FourVectorHLTOffline") << " unique path " << v->getPath() << endl;
537 
538  unsigned int pathByIndex = triggerNames.triggerIndex(v->getPath());
539 
540  // path must be in the menu
541  if(pathByIndex >= fTriggerResults->size() ) continue;
542 
543 
544  // Fill HLTPassed Matrix and HLTPassFail Matrix
545  // --------------------------------------------------------
546 
547 // if(triggerResults->accept(pathByIndex)){
548 
549 // int pathBinNumber = ME_HLT_BX->getTH2F()->GetYaxis()->FindBin(v->getPath().c_str());
550 // ME_HLT_BX->Fill(bx,pathBinNumber-1);
551 
552 // //if(hasHLTPassed(fCustomBXPath,triggerNames)) {
553 
554 // //ME_HLT_CUSTOM_BX->Fill(bx,pathBinNumber-1);
555 
556 // //}
557 
558 // } // end if accept
559 
560  // Fill histogram of filter ocupancy for each HLT path
561  // ---------------------------------
562  unsigned int lastModule = triggerResults->index(pathByIndex);
563 
564  //check if hlt passed
565  bool hltPathPassed = triggerResults->accept(pathByIndex);
566 
567  //go through the list of filters
568  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
569 
570  int binNumber = v->getFiltersHisto()->getTH1()->GetXaxis()->FindBin(v->filtersAndIndices[filt].first.c_str());
571 
572  // if hlt path passed, then all the modules passed
573  // otherwise the module that issued the decision is the first fail
574  // this means that all modules before it passed
575  if(hltPathPassed) {
576 
577  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
578  }
579  else if(v->filtersAndIndices[filt].second < lastModule){
580  v->getFiltersHisto()->Fill(binNumber-1);//binNumber1 = 0 = first filter
581  }
582 
583  } // end for filt
584 
585  } // end for diag paths
586 
587  // Main loop over paths
588  // --------------------
589  for(PathInfoCollection::iterator v = hltPaths_.begin(); v!= hltPaths_.end(); ++v ) {
590 
591  LogTrace("FourVectorHLTOffline") << " path " << v->getPath() << endl;
592 
593  if (v->getPath().find("BTagIP") != std::string::npos ) btagMon = btagIPMon;
594  else btagMon = btagMuMon;
595 
596  // set flag for muon monitor if L2-muon or L1-muon type path
597  if (v->getPath().find("L2Mu") != std::string::npos || v->getPath().find("L1Mu") != std::string::npos ) muoMon.setL2MuFlag(true);
598  else muoMon.setL2MuFlag(false);
599 
600  //if (v->getPath().find("HLT_Jet15U") == std::string::npos ) continue;
601  //if(*v != "HLT_L1Jet6U") continue;
602 
603  unsigned int pathByIndex = triggerNames.triggerIndex(v->getPath());
604 
605  if(pathByIndex >= fTriggerResults->size() ) continue;
606 
607  // did we pass the denomPath?
608  bool denompassed = false;
609 
610  for(int i = 0; i < npath; ++i) {
611 
612  if (triggerResults->accept(i) && triggerNames.triggerName(i).find(v->getDenomPath()) != std::string::npos && triggerNames.triggerName(i).find("HLT_Mult") == std::string::npos )
613  {
614  denompassed = true;
615  break;
616  }
617  }
618 
619  if (denompassed)
620  {
621 
622  //LogTrace("FourVectorHLTOffline") << " denominator path " << v->getPath() << endl;
623 
624 
625  // Get the righe monitor for this path
626  // -----------------------------------
627  BaseMonitor* mon = NULL;
628 
629  for(std::vector<BaseMonitor*>::iterator mit = monitors.begin(); mit!= monitors.end(); ++mit ) {
630 
631  if((*mit)->isTriggerType(v->getObjectType())) {
632 
633  mon = *mit;
634  break;
635 
636  }
637 
638  }
639 
640  // if cannot find moniotor for the path, go to next path
641  //if(!mon) continue;
642 
643  // if cannot find moniotor for the path, assign the default
644  if(!mon) mon = &defMon;
645 
646  // attach this path to mon
647  mon->setPath(v);
648 
649  // clear sets of matched objects
650  mon->clearSets();
651 
652  int triggertype = 0;
653  triggertype = v->getObjectType();
654 
655  // monitor offline (RECO objects)
657  mon->monitorOffline();
658 
659  // monitor L1 (only if L1 passed and can find GTSeed)
661  bool l1accept = false;
662  edm::InputTag l1testTag(v->getl1Path(),"",processname_);
663  const int l1Index = fTriggerObj->filterIndex(l1testTag);
664 
665  if ( l1Index >= fTriggerObj->sizeFilters() ) {
666 
667  LogTrace("FourVectorHLTOffline") << "Cannot find L1GTSeed of the path " << v->getPath() << endl;
668  LogTrace("FourVectorHLTOffline") << "\t L1GTSeed name = " << v->getl1Path() << endl;
669  LogTrace("FourVectorHLTOffline") << "\t tried with tag " << l1testTag << endl;
670  LogTrace("FourVectorHLTOffline") <<"\t module index = "<< l1Index << endl;
671 
672  }
673 
674  // monitor L1 object
675  mon->monitorL1(l1Index, this);
676 
677  // fill matching b/w Offline and L1 objects
678  mon->fillL1Match(this);
679 
680  // monitor Online (only if HLT passed)
682  bool numpassed = false;
683 
684  // did we pass the numerator path, i.e. HLT path?
685  for(int i = 0; i < npath; ++i) {
686 
687  if ( triggerResults->accept(i) && triggerNames.triggerName(i) == v->getPath() ) numpassed = true;
688 
689  }
690 
691  if (!numpassed) continue;
692 
693  if (!l1accept) {
694 
695  LogDebug("FourVectorHLTOffline")
696  << "This should not happen. HLT passed, but L1 Seed not passed for hlt path "<< endl
697  << "HLT path: " << v->getPath() << "\t HLTLevel1GTSeed: " << v->getl1Path();
698 
699  }
700 
701  // fill scaler histograms
702  edm::InputTag filterTag = v->getTag();
703 
704  // loop through indices and see if the filter is
705  // on the list of filters used by this path
706  //----------------------------------------------
707  if (v->getLabel() == "dummy"){
708  const vector<string> filterLabels = hltConfig_.moduleLabels(v->getPath());
709 
710  //loop over labels
711  for (vector<string>::const_iterator labelIter= filterLabels.begin(); labelIter!=filterLabels.end(); labelIter++) {
712 
713  edm::InputTag testTag(*labelIter,"",processname_);
714 
715  int testindex = fTriggerObj->filterIndex(testTag);
716 
717  // last match wins...
718  if ( !(testindex >= fTriggerObj->sizeFilters()) ) {
719 
720  filterTag = testTag;
721  v->setLabel(*labelIter);}
722 
723  }
724 
725  } // end for
726 
727  const int hltIndex = fTriggerObj->filterIndex(filterTag);
728  if ( hltIndex >= fTriggerObj->sizeFilters() ) {
729 
730  LogTrace("FourVectorHLTOffline") << "WTF no index "<< hltIndex << " of that name " << filterTag << endl;
731  continue; // not in this event
732 
733  }
734 
735  mon->monitorOnline(hltIndex, l1Index, this);
736 
737  mon->fillOnlineMatch(l1Index, this);
738 
739  } //denompassed
740 
741 
742  } //pathinfo loop
743 
744 }
745 
746 
747 
748 // -- method called once each job just before starting event loop --------
749 void
751 {
752  nev_ = 0;
753  DQMStore *dbe = 0;
754  dbe = Service<DQMStore>().operator->();
755 
756  if (dbe) {
758  dbe->rmdir(dirname_);
759  }
760 
761 
762  if (dbe) {
764  }
765 }
766 
767 // - method called once each job just after ending the event loop ------------
768 void
770 {
771  LogInfo("FourVectorHLTOffline") << "analyzed " << nev_ << " events";
772  return;
773 }
774 
775 
776 // BeginRun
778 {
779 
780  LogDebug("FourVectorHLTOffline") << "beginRun, run " << run.id();
781 
782  if(fIsSetup) return;
783 
784  // HLT config does not change within runs!
785  bool changed=false;
786 
787  if (!hltConfig_.init(run, c, processname_, changed)) {
788 
789  processname_ = "FU";
790 
791  if (!hltConfig_.init(run, c, processname_, changed)){
792 
793  LogDebug("FourVectorHLTOffline") << "HLTConfigProvider failed to initialize.";
794 
795  }
796 
797  // check if trigger name in (new) config
798  // cout << "Available TriggerNames are: " << endl;
799  // hltConfig_.dump("Triggers");
800  }
801 
802  if (1) {
803 
804  DQMStore *dbe = 0;
805  dbe = Service<DQMStore>().operator->();
806 
807  if (dbe) {
809  }
810 
811  const unsigned int n(hltConfig_.size());
812 
813  if (plotAll_){
814 
815  for (unsigned int j=0; j!=n; ++j) {
816 
817  std::string pathname = hltConfig_.triggerName(j);
818 
819  string l1pathname = getL1ConditionModuleName(pathname);
820 
821  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
822 
823  int objectType = getTriggerTypeParsePathName(pathname);
824 
825  for (unsigned int i=0; i!=n; ++i) {
826 
827  std::string denompathname = hltConfig_.triggerName(i);
828  int denomobjectType = getTriggerTypeParsePathName(denompathname);
829 
830 
831 
832  std::string filtername("dummy");
833  float ptMin = 0.0;
834  float ptMax = 100.0;
835  if (plotAll_ && denomobjectType == objectType && objectType != 0) {
836 
837  int hltThreshold = getHltThresholdFromName(pathname);
838  int l1Threshold = getHltThresholdFromName(l1pathname);
839  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
840 
841  }
842 
843  }
844  }
845 
846  } // end if plotAll
847  else {
848 
849  // plot all diagonal combinations plus any other specified pairs
850  for (unsigned int i=0; i!=n; ++i) {
851 
852  std::string denompathname = "";
853  std::string pathname = hltConfig_.triggerName(i);
854  //parse pathname to guess object type
855  int objectType = getTriggerTypeParsePathName(pathname);
856 
857  string l1pathname = getL1ConditionModuleName(pathname);
858  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
859 
860  std::string filtername("dummy");
861  float ptMin = 0.0;
862  float ptMax = 100.0;
863 
864  if (objectType == trigger::TriggerPhoton) ptMax = 400.0;
865  if (objectType == trigger::TriggerElectron) ptMax = 300.0;
866  if (objectType == trigger::TriggerMuon) ptMax = 300.0;
867  if (objectType == trigger::TriggerTau) ptMax = 300.0;
868  if (objectType == trigger::TriggerJet) ptMax = 700.0;
869  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
870  if (objectType == trigger::TriggerMET) ptMax = 500.0;
871  if (objectType == trigger::TriggerTET) ptMax = 1000.0;
872  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
873 
874  // keep track of all paths, except for FinalPath
875  if (objectType != -1 && pathname.find("FinalPath") == std::string::npos){
876 
877  int hltThreshold = getHltThresholdFromName(pathname);
878  int l1Threshold = getHltThresholdFromName(l1pathname);
879 
880  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
881 
882  hltPathsDiagonal_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
883 
884  }
885 
886  } // end for i
887 
888  // now loop over denom/num path pairs specified in cfg,
889  // recording the off-diagonal ones
890  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin(); custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair) {
891 
892  std::string numpathname = custompathnamepair->first;
893  std::string denompathname = custompathnamepair->second;
894 
895  if (numpathname != denompathname) {
896 
897  // check that denominator exists
898  bool founddenominator = false;
899  for (unsigned int k=0; k!=n; ++k) {
900 
901  string n_pathname = hltConfig_.triggerName(k);
902 
903  if (n_pathname.find(denompathname) != std::string::npos) {
904 
905  LogDebug("FourVectorHLTOffline") << "denompathname is selected to be = " << n_pathname << endl;;
906  founddenominator = true;
907 
908  break;
909 
910  }
911  }
912 
913  if (!founddenominator) {
914 
915  edm::LogInfo("FourVectorHLTOffline") << "denompathname not found, go to the next pair numearator-denominator" << endl;
916 
917  // go to the next pair
918  continue;
919 
920  }
921 
922  // check that numerator exists
923  for (unsigned int j=0; j!=n; ++j) {
924  bool foundnumerator = false;
925 
926  string pathname = hltConfig_.triggerName(j);
927 
928  LogDebug("FourVectorHLTOffline") << "check if path " << pathname << " is numpathname = " << numpathname << endl;
929  if (hltConfig_.triggerName(j).find(numpathname)!= std::string::npos) {
930 
931  LogDebug("FourVectorHLTOffline") << "pathname is selected to be = " << denompathname << endl;;
932  foundnumerator = true;
933 
934  }
935 
936 
937  if (!foundnumerator) {
938 
939  edm::LogInfo("FourVectorHLTOffline") << "pathname not found, ignoring " << pathname;
940  continue;
941 
942  }
943 
944  string l1pathname = getL1ConditionModuleName(pathname);
945  int l1ModuleIndex = hltConfig_.moduleIndex(pathname, l1pathname);
946  int objectType = getTriggerTypeParsePathName(pathname);
947 
948  std::string filtername("dummy");
949  float ptMin = 0.0;
950  float ptMax = 100.0;
951 
952  if (objectType == trigger::TriggerPhoton) ptMax = 400.0;
953  if (objectType == trigger::TriggerElectron) ptMax = 300.0;
954  if (objectType == trigger::TriggerMuon) ptMax = 300.0;
955  if (objectType == trigger::TriggerTau) ptMax = 300.0;
956  if (objectType == trigger::TriggerJet) ptMax = 700.0;
957  if (objectType == trigger::TriggerBJet) ptMax = 300.0;
958  if (objectType == trigger::TriggerMET) ptMax = 500.0;
959  if (objectType == trigger::TriggerTET) ptMax = 1000.0;
960  if (objectType == trigger::TriggerTrack) ptMax = 100.0;
961 
962  // monitor regardless of the objectType of the path
963  if (objectType != 0) {
964  int hltThreshold = getHltThresholdFromName(pathname);
965  int l1Threshold = getHltThresholdFromName(l1pathname);
966  hltPaths_.push_back(PathInfo(denompathname, pathname, l1pathname, l1ModuleIndex, filtername, processname_, objectType, ptMin, ptMax, hltThreshold, l1Threshold));
967 
968  }
969 
970  } // end for j, loop over paths
971 
972  } // end if not same num and denominator
973 
974  } // end for pair
975 
976  } // end else
977 
978 
979  vector<string> allPaths;
980  // fill vectors of Muon, Egamma, JetMet, Rest, and Special paths
981 
982  int vi = 0;
983 
984  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
985 
986  std::string pathName = removeVersions(v->getPath());
987  //int objectType = v->getObjectType();
988 
989  vector<int> tempCount(5,0);
990 
991  fPathTempCountPair.push_back(make_pair(pathName,0));
992  fPathBxTempCountPair.push_back(make_pair(pathName,tempCount));
993 
994  allPaths.push_back(pathName);
995 
996  }
997 
998  fPathTempCountPair.push_back(make_pair("HLT_Any",0));
999 
1000  fGroupName.push_back("All");
1001 
1002  for(unsigned int g=0; g<fGroupName.size(); g++) {
1003 
1004  //fGroupTempCountPair.push_back(make_pair(fGroupName[g],0));
1005  //fGroupL1TempCountPair.push_back(make_pair(fGroupName[g],0));
1006 
1007  }
1008 
1010 
1011  fGroupNamePathsPair.push_back(make_pair("All",allPaths));
1012 
1014  vector<string> datasetNames = hltConfig_.datasetNames() ;
1015  for (unsigned int i=0;i<datasetNames.size();i++) {
1016 
1017  vector<string> datasetPaths = hltConfig_.datasetContent(datasetNames[i]);
1018  fGroupNamePathsPair.push_back(make_pair(datasetNames[i],datasetPaths));
1019 
1020  }
1021 
1022 
1023  for (unsigned int g=0;g<fGroupNamePathsPair.size();g++) {
1024 
1025  fGroupTempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
1026  fGroupL1TempCountPair.push_back(make_pair(fGroupNamePathsPair[g].first,0));
1028 
1029  }
1030 
1031  // setupHltLsPlots();
1032  // setupHltBxPlots();
1033 
1034  vi = 0;
1035 
1036  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
1037  vi++;
1038 
1039  // -------------------------
1040  //
1041  // Filters for each path
1042  //
1043  // -------------------------
1044 
1045  // get all modules in this HLT path
1046  std::string pathName = removeVersions(v->getPath());
1047  vector<string> moduleNames = hltConfig_.moduleLabels(v->getPath());
1048 
1049  int numModule = 0;
1050  string moduleName, moduleType, moduleEDMType;
1051  unsigned int moduleIndex;
1052 
1053  //print module name
1054  vector<string>::const_iterator iDumpModName;
1055  for (iDumpModName = moduleNames.begin();iDumpModName != moduleNames.end();iDumpModName++) {
1056 
1057  moduleName = *iDumpModName;
1058  moduleType = hltConfig_.moduleType(moduleName);
1059  moduleEDMType = hltConfig_.moduleEDMType(moduleName);
1060  moduleIndex = hltConfig_.moduleIndex(v->getPath(), moduleName);
1061 
1062  LogTrace ("FourVectorHLTOffline") << "Module " << numModule
1063  << " is called " << moduleName
1064  << " , type = " << moduleType
1065  << " , EDMtype = " << moduleEDMType
1066  << " , index = " << moduleIndex
1067  << endl;
1068 
1069  numModule++;
1070 
1071  if((moduleType.find("Filter") != string::npos && moduleType.find("HLTTriggerTypeFilter") == string::npos ) ||
1072  (moduleType.find("Associator") != string::npos) ||
1073  (moduleType.find("HLTLevel1GTSeed") != string::npos) ||
1074  (moduleType.find("HLTGlobalSumsCaloMET") != string::npos) ||
1075  (moduleType.find("HLTPrescaler") != string::npos) ||
1076  (moduleEDMType.find("EDFilter") != string::npos) ) {
1077 
1078  //std::pair<std::string, int> filterIndexPair;
1079  //filterIndexPair.first = moduleName;
1080  //filterIndexPair.second = moduleIndex;
1081  //v->filtersAndIndices.push_back(filterIndexPair);
1082  v->filtersAndIndices.push_back(make_pair(moduleName,moduleIndex));
1083 
1084  }
1085 
1086 
1087  }//end for modulesName
1088 
1090 
1091  //int nbin_sub = 5;
1092  int nbin_sub = v->filtersAndIndices.size()+2;
1093 
1094 
1095  //TString thisPath = v->getPath();
1096 
1097  // count plots for subfilter
1098  MonitorElement* filters = dbe_->book1D("Filters_" + pathName,
1099  "Filters_" + pathName,
1100  nbin_sub+1, -0.5, 0.5+(double)nbin_sub);
1101 
1102  for(unsigned int filt = 0; filt < v->filtersAndIndices.size(); filt++){
1103 
1104  if (filters)
1105  filters->setBinLabel(filt+1, (v->filtersAndIndices[filt]).first);
1106 
1107  }
1108 
1109  // bjk here
1110 // // book Count vs LS
1111 // dbe_->setCurrentFolder(pathsIndividualHLTPathsPerLSFolder_.c_str());
1112 // MonitorElement* tempME = dbe_->book1D(v->getPath() + "_count_per_LS",
1113 // pathName + " count per LS",
1114 // nLS_, 0,nLS_);
1115 // tempME->setAxisTitle("Luminosity Section");
1116 
1117  v->setFilterHistos(filters);
1118 
1119  } // end for paths
1120 
1121  // now set up all of the histos for each path-denom
1122  for(PathInfoCollection::iterator v = hltPaths_.begin(); v!= hltPaths_.end(); ++v ) {
1123 
1124  MonitorElement *NOn=0;
1125  MonitorElement *onEtOn=0;
1126  MonitorElement *onOneOverEtOn=0;
1127  MonitorElement *onEtavsonPhiOn=0;
1128  MonitorElement *NOff=0;
1129  MonitorElement *offEtOff=0;
1130  MonitorElement *offEtavsoffPhiOff=0;
1131  MonitorElement *NL1=0;
1132  MonitorElement *l1EtL1=0;
1133  MonitorElement *l1Etavsl1PhiL1=0;
1134  MonitorElement *NL1On=0;
1135  MonitorElement *l1EtL1On=0;
1136  MonitorElement *l1Etavsl1PhiL1On=0;
1137  MonitorElement *NL1Off=0;
1138  MonitorElement *offEtL1Off=0;
1139  MonitorElement *offEtavsoffPhiL1Off=0;
1140  MonitorElement *NOnOff=0;
1141  MonitorElement *offEtOnOff=0;
1142  MonitorElement *offEtavsoffPhiOnOff=0;
1143  MonitorElement *NL1OnUM=0;
1144  MonitorElement *l1EtL1OnUM=0;
1145  MonitorElement *l1Etavsl1PhiL1OnUM=0;
1146  MonitorElement *NL1OffUM=0;
1147  MonitorElement *offEtL1OffUM=0;
1148  MonitorElement *offEtavsoffPhiL1OffUM=0;
1149  MonitorElement *NOnOffUM=0;
1150  MonitorElement *offEtOnOffUM=0;
1151  MonitorElement *offEtavsoffPhiOnOffUM=0;
1152  MonitorElement *offDRL1Off=0;
1153  MonitorElement *offDROnOff=0;
1154  MonitorElement *l1DRL1On=0;
1155 
1156  std::string pathName = removeVersions(v->getPath());
1157  std::string labelname("dummy");
1158  labelname = pathName + "_wrt_" + v->getDenomPath();
1159 
1160  std::string histoname(labelname+"_NOn");
1161  std::string title(labelname+" N online");
1162  double histEtaMax = 2.5;
1163 
1164  if (v->getObjectType() == trigger::TriggerMuon || v->getObjectType() == trigger::TriggerL1Mu) {
1165 
1166  histEtaMax = muonEtaMax_;
1167 
1168  }
1169  else if (v->getObjectType() == trigger::TriggerElectron || v->getObjectType() == trigger::TriggerL1NoIsoEG || v->getObjectType() == trigger::TriggerL1IsoEG )
1170  {
1171  histEtaMax = electronEtaMax_;
1172  }
1173  else if (v->getObjectType() == trigger::TriggerTau || v->getObjectType() == trigger::TriggerL1TauJet )
1174  {
1175  histEtaMax = tauEtaMax_;
1176  }
1177  else if (v->getObjectType() == trigger::TriggerJet || v->getObjectType() == trigger::TriggerL1CenJet || v->getObjectType() == trigger::TriggerL1ForJet )
1178  {
1179  histEtaMax = jetEtaMax_;
1180  }
1181  else if (v->getObjectType() == trigger::TriggerBJet)
1182  {
1183  histEtaMax = bjetEtaMax_;
1184  }
1185  else if (v->getObjectType() == trigger::TriggerMET || v->getObjectType() == trigger::TriggerL1ETM )
1186  {
1187  histEtaMax = metEtaMax_;
1188  }
1189  else if (v->getObjectType() == trigger::TriggerPhoton)
1190  {
1191  histEtaMax = photonEtaMax_;
1192  }
1193  else if (v->getObjectType() == trigger::TriggerTrack)
1194  {
1195  histEtaMax = trackEtaMax_;
1196  }
1197 
1198  TString pathfolder = dirname_ + TString("/") + pathName;
1199  dbe_->setCurrentFolder(pathfolder.Data());
1200 
1201  NOn = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1202 
1203 
1204  histoname = labelname+"_NOff";
1205  title = labelname+" N Off";
1206  NOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1207 
1208  histoname = labelname+"_NL1";
1209  title = labelname+" N L1";
1210  NL1 = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1211 
1212  histoname = labelname+"_NL1On";
1213  title = labelname+" N L1On";
1214  NL1On = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1215 
1216  histoname = labelname+"_NL1Off";
1217  title = labelname+" N L1Off";
1218  NL1Off = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1219 
1220  histoname = labelname+"_NOnOff";
1221  title = labelname+" N OnOff";
1222  NOnOff = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1223 
1224  histoname = labelname+"_onEtOn";
1225  title = labelname+" onE_t online";
1226  onEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1227 
1228  histoname = labelname+"_onOneOverEtOn";
1229  title = labelname+" 1 / onE_t online";
1230  onOneOverEtOn = dbe->book1D(histoname.c_str(), title.c_str(),nBinsOneOverEt_, 0, 0.1);
1231  onOneOverEtOn->setAxisTitle("HLT 1/Et [1/GeV]");
1232 
1233  histoname = labelname+"_offEtOff";
1234  title = labelname+" offE_t offline";
1235  offEtOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1236 
1237  histoname = labelname+"_l1EtL1";
1238  title = labelname+" l1E_t L1";
1239  l1EtL1 = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1240 
1241  histoname = labelname+"_onEtaonPhiOn";
1242  title = labelname+" on#eta vs on#phi online";
1243  onEtavsonPhiOn = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1244 
1245  histoname = labelname+"_offEtaoffPhiOff";
1246  title = labelname+" off#eta vs off#phi offline";
1247  offEtavsoffPhiOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1248 
1249  histoname = labelname+"_l1Etal1PhiL1";
1250  title = labelname+" l1#eta vs l1#phi L1";
1251  l1Etavsl1PhiL1 = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1252 
1253  histoname = labelname+"_l1EtL1On";
1254  title = labelname+" l1E_t L1+online";
1255  l1EtL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1256 
1257  histoname = labelname+"_offEtL1Off";
1258  title = labelname+" offE_t L1+offline";
1259  offEtL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1260 
1261  histoname = labelname+"_offEtOnOff";
1262  title = labelname+" offE_t online+offline";
1263  offEtOnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1264 
1265  histoname = labelname+"_l1Etal1PhiL1On";
1266  title = labelname+" l1#eta vs l1#phi L1+online";
1267  l1Etavsl1PhiL1On = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1268 
1269  histoname = labelname+"_offEtaoffPhiL1Off";
1270  title = labelname+" off#eta vs off#phi L1+offline";
1271  offEtavsoffPhiL1Off = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1272 
1273  histoname = labelname+"_offEtaoffPhiOnOff";
1274  title = labelname+" off#eta vs off#phi online+offline";
1275  offEtavsoffPhiOnOff = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1276 
1277  if (useUM) {
1278 
1279  histoname = labelname+"_NL1OnUM";
1280  title = labelname+" N L1OnUM";
1281  NL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1282 
1283  histoname = labelname+"_NL1OffUM";
1284  title = labelname+" N L1OffUM";
1285  NL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1286 
1287  histoname = labelname+"_NOnOffUM";
1288  title = labelname+" N OnOffUM";
1289  NOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),10, 0.5, 10.5);
1290 
1291  histoname = labelname+"_l1EtL1OnUM";
1292  title = labelname+" l1E_t L1+onlineUM";
1293  l1EtL1OnUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1294 
1295  histoname = labelname+"_offEtL1OffUM";
1296  title = labelname+" offE_t L1+offlineUM";
1297  offEtL1OffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1298 
1299  histoname = labelname+"_offEtOnOffUM";
1300  title = labelname+" offE_t online+offlineUM";
1301  offEtOnOffUM = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, v->getPtMin(), v->getPtMax());
1302 
1303  histoname = labelname+"_l1Etal1PhiL1OnUM";
1304  title = labelname+" l1#eta vs l1#phi L1+onlineUM";
1305  l1Etavsl1PhiL1OnUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1306 
1307  histoname = labelname+"_offEtaoffPhiL1OffUM";
1308  title = labelname+" off#eta vs off#phi L1+offlineUM";
1309  offEtavsoffPhiL1OffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1310 
1311  histoname = labelname+"_offEtaoffPhiOnOffUM";
1312  title = labelname+" off#eta vs off#phi online+offlineUM";
1313  offEtavsoffPhiOnOffUM = dbe->book2D(histoname.c_str(), title.c_str(), nBins2D_,-histEtaMax,histEtaMax, nBins2D_,-TMath::Pi(), TMath::Pi());
1314 
1315  }
1316 
1317  histoname = labelname+"_l1DRL1On";
1318  title = labelname+" l1DR L1+online";
1319  l1DRL1On = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, dRMax_);
1320 
1321  histoname = labelname+"_offDRL1Off";
1322  title = labelname+" offDR L1+offline";
1323  offDRL1Off = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, dRMax_);
1324 
1325  histoname = labelname+"_offDROnOff";
1326  title = labelname+" offDR online+offline";
1327  offDROnOff = dbe->book1D(histoname.c_str(), title.c_str(),nBins_, 0, dRMax_);
1328 
1329 
1330  v->setHistos( NOn, onEtOn, onOneOverEtOn, onEtavsonPhiOn, NOff, offEtOff, offEtavsoffPhiOff, NL1, l1EtL1, l1Etavsl1PhiL1, NL1On, l1EtL1On, l1Etavsl1PhiL1On, NL1Off, offEtL1Off, offEtavsoffPhiL1Off, NOnOff, offEtOnOff, offEtavsoffPhiOnOff, NL1OnUM, l1EtL1OnUM, l1Etavsl1PhiL1OnUM, NL1OffUM, offEtL1OffUM, offEtavsoffPhiL1OffUM, NOnOffUM, offEtOnOffUM, offEtavsoffPhiOnOffUM, offDRL1Off, offDROnOff, l1DRL1On
1331 );
1332 
1333  } // end for hltPath
1334 
1335  // bjk here
1336 // // HLT_Any
1337 // // book Count vs LS
1338 // dbe_->setCurrentFolder(pathsIndividualHLTPathsPerLSFolder_.c_str());
1339 // MonitorElement* tempME = dbe_->book1D("HLT_Any_count_per_LS",
1340 // "HLT_Any count per LS",
1341 // nLS_, 0,nLS_);
1342 // tempME->setAxisTitle("Luminosity Section");
1343 
1344  } // end if(1) dummy
1345 
1346  if(!doCombineRuns_) fIsSetup = true;
1347 
1348  return;
1349 
1350 }
1351 
1354 {
1355 
1356  LogDebug("FourVectorHLTOffline") << "endRun, run " << run.id();
1357 
1358 }
1359 
1362 {
1363 
1364  LogDebug("FourVectorHLTOffline") << "cleanDRMatchSet(mmset& tempSet) " << "size of the set (before CLEANING) = " << tempSet.size() << " maps." << endl;
1365 
1366  if(tempSet.size() < 2) return;
1367 
1368  if(tempSet.size() > 10) {
1369 
1370  LogDebug("FourVectorHLTOffline") << "size of the set is too large. It will be truncated to 10." << endl;
1371  mmset::iterator it = tempSet.begin();
1372  for (int i=0;i<10;i++) { it++; }
1373  tempSet.erase( it, tempSet.end());
1374  LogDebug("FourVectorHLTOffline") << "size of the set is now = " << tempSet.size() << " maps." << endl;
1375 
1376  }
1377 
1378  bool cleanedOneMap = false;
1379 
1380  // cleaning needed if the set has at least two maps
1381 
1382  while(! cleanedOneMap && tempSet.size() > 1) {
1383 
1384  cleanedOneMap=false;
1385 
1386  //LogTrace("FourVectorHLTOffline") << "cleaning: size of the set = " << tempSet.size() << " maps." << endl;
1387 
1388  int imap = 0;
1389  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ ) {
1390 
1391  fimmap tempMap_j = *setIter_i;
1392 
1393  //LogTrace("FourVectorHLTOffline") << " map " << imap << endl;
1394  //LogTrace("FourVectorHLTOffline") << " --------" << endl;
1395 
1396  for (fimmap::iterator it = tempMap_j.begin(); it != tempMap_j.end(); ++it) {
1397 
1398  //LogTrace("FourVectorHLTOffline") << " " << (*it).first << " : " << (*it).second << endl;
1399 
1400  }
1401 
1402  imap++;
1403 
1404  }
1405 
1406  // loop i
1407  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ ) {
1408 
1409  fimmap tempMap_i = *setIter_i;
1410  fimmap::iterator it = tempMap_i.begin();
1411  int topValue = (*it).second;
1412  //LogTrace("FourVectorHLTOffline") << " topValue = " << topValue << endl;
1413 
1414 
1415  mmset::iterator tempIter_i = setIter_i;
1416 
1417  // from all the other maps, clean entries that have mapped value "topValue"
1418  // loop j
1419  mmset::iterator setIter_j = ++tempIter_i;
1420  while ( setIter_j != tempSet.end( ) ) {
1421 
1422  fimmap tempMap_j = *setIter_j;
1423  //LogTrace("FourVectorHLTOffline") << " size of the map = " << tempMap_j.size() << endl;
1424 
1425  fimmap::iterator it = tempMap_j.begin();
1426  while ( it != tempMap_j.end() ) {
1427 
1428  if(topValue == (*it).second) {
1429 
1430  //LogTrace("FourVectorHLTOffline") << " Ridding map of a doubly-matched object." << endl;
1431  fimmap::iterator tempIt = it;
1432  ++it; //no longer points to item that is going away
1433  tempMap_j.erase(tempIt);
1434  cleanedOneMap = true;
1435 
1436  } else {
1437  ++it;
1438  } // end if
1439 
1440  } //end while
1441 
1442  if(cleanedOneMap) {
1443 
1444  //remove the old map from the set
1445  mmset::iterator tempIt = setIter_j;
1446  ++setIter_j; //no longer points to item that is going away
1447  tempSet.erase(tempIt);
1448 
1449  // insert in the set the new map if it is not an empty map
1450  if(! tempMap_j.empty()) tempSet.insert(tempMap_j);
1451 
1452  break; // break from loop j
1453 
1454  } else {
1455  ++setIter_j;
1456  } // end if
1457 
1458 
1459  }// end while j
1460 
1461  if(cleanedOneMap) break; // break from loop i
1462 
1463  } // end loop i
1464 
1465  if(cleanedOneMap) {
1466 
1467  // continue cleaning (in while loop)
1468  // but reset flag first
1469  cleanedOneMap=false;
1470  continue;
1471 
1472  }
1473  else {
1474 
1475  // finished cleaing (break from while loop)
1476  break;
1477 
1478  }
1479 
1480  } // end while
1481 
1482  //LogTrace("FourVectorHLTOffline") << "cleaned: size of the set = " << tempSet.size() << " maps." << endl;
1483  int jmap = 0;
1484 
1485  for ( mmset::iterator setIter_i = tempSet.begin( ); setIter_i != tempSet.end( ); setIter_i++ )
1486  {
1487 
1488  fimmap tempMap_j = *setIter_i;
1489 
1490  //LogTrace("FourVectorHLTOffline") << " map " << jmap << endl;
1491  //LogTrace("FourVectorHLTOffline") << " --------" << endl;
1492 
1493  for (fimmap::iterator it = tempMap_j.begin(); it != tempMap_j.end(); ++it) {
1494 
1495  //LogTrace("FourVectorHLTOffline") << " " << (*it).first << " : " << (*it).second << endl;
1496 
1497  }
1498 
1499  jmap++;
1500 
1501  } // end for
1502 
1503  return;
1504 
1505 }
1506 
1507 void FourVectorHLTOffline::setupHltMatrix(const std::string& label, vector<std::string>& paths) {
1508 
1509  //string groupLabelAny = "HLT_"+label+"_Any";
1510  //paths.push_back(groupLabelAny.c_str());
1511  paths.push_back("HLT_"+label+"_L1_Any");
1512  paths.push_back("HLT_"+label+"_Any");
1513  paths.push_back("HLT_Any");
1514 
1515  string h_name;
1516  string h_title;
1517 
1519 
1520  MonitorElement* ME = 0;
1521  MonitorElement* ME_Any = 0;
1522  MonitorElement* ME_Normalized = 0;
1523  MonitorElement* ME_Normalized_Any = 0;
1524 
1525  if (label != "OfflineMonitor" && label != "OnlineHltMonitor" && label != "OnlineMonitor") {
1526  h_name= "HLT_"+label+"_PassPass";
1527  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass)";
1528  ME = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1529  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1530 
1531  h_name= "HLT_"+label+"_Pass_Any";
1532  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1533  ME_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1534  paths.size(), -0.5, paths.size()-0.5);
1535 
1537  h_name= "HLT_"+label+"_PassPass_Normalized";
1538  h_title = "HLT_"+label+"_PassPass (x=Pass, y=Pass) normalized to xBin=Pass";
1539  ME_Normalized = dbe_->book2D(h_name.c_str(), h_title.c_str(),
1540  paths.size(), -0.5, paths.size()-0.5, paths.size(), -0.5, paths.size()-0.5);
1541  h_name= "HLT_"+label+"_Pass_Normalized_Any";
1542  h_title = "HLT_"+label+"_Pass (x=Pass, Any=Pass) normalized to HLT_Any Pass";
1543  ME_Normalized_Any = dbe_->book1D(h_name.c_str(), h_title.c_str(),
1544  paths.size(), -0.5, paths.size()-0.5);
1545  }
1546 
1547  if (label != "All" && label != "OfflineMonitor" && label != "OnlineHltMonitor" && label != "OnlineMonitor")
1548  {
1550  h_name= "HLT_"+label+"_Total_LS";
1551  h_title = label+" HLT paths total count combined per LS ";
1552  MonitorElement* ME_Total_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
1553  ME_Total_LS->setAxisTitle("LS");
1554 
1555 // for(std::vector<std::string>::iterator i = paths.begin(), e=paths.end(); i!=e; ++i)
1556 // {
1557 // h_name= "HLT_"+removeVersions(*i)+"_LS";
1558 // h_title = removeVersions(*i) + " inside " + label + " HLT paths count per LS ";
1559 // MonitorElement* ME_Group_LS = dbe_->book1D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_);
1560 // ME_Group_LS->setAxisTitle("LS");
1561 // /// add this path to the vector of 2D LS paths
1562 // v_ME_HLTAll_LS.push_back(ME_Group_LS);
1563 // }
1564 
1565  }
1566 
1567 
1568 // dbe_->setCurrentFolder(pathsSummaryHLTPathsPerBXFolder_.c_str());
1569 // h_name= "HLT_"+label+"_BX_LS";
1570 // h_title = label+" HLT paths total count combined per BX ";
1571 // MonitorElement* ME_Total_BX = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, 5, -2.5, 2.5);
1572 // ME_Total_BX->setAxisTitle("LS",1);
1573 // v_ME_Total_BX.push_back(ME_Total_BX);
1574 
1575 // h_name= "HLT_"+label+"_BX_LS_Norm";
1576 // h_title = label+" HLT paths total count combined per BX Normalized to LS";
1577 // MonitorElement* ME_Total_BX_Norm = dbe_->book2D(h_name.c_str(), h_title.c_str(), nLS_, 0, nLS_, 5, -2.5, 2.5);
1578 // ME_Total_BX_Norm->setAxisTitle("LS",1);
1579 // v_ME_Total_BX_Norm.push_back(ME_Total_BX_Norm);
1580 
1581 // bjk: These are OK
1582  if (label != "OfflineMonitor" && label != "OnlineHltMonitor" && label != "OnlineMonitor") {
1583  for(unsigned int i = 0; i < paths.size(); i++){
1584 
1585  if (ME) {
1586  ME->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1587  ME->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1588  }
1589  // ME_Group_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1590  if (ME_Normalized){
1591  ME_Normalized->getTH2F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1592  ME_Normalized->getTH2F()->GetYaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1593  }
1594  if (ME_Normalized_Any)
1595  ME_Normalized_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1596 
1597  if (ME_Any)
1598  ME_Any->getTH1F()->GetXaxis()->SetBinLabel(i+1, (paths[i]).c_str());
1599  }
1600  }
1601 
1602 }
1603 
1605 
1606 
1607  string fullPathToME;
1608 
1609  //for (unsigned int mi=0;mi<fGroupName.size();mi++) {
1610  for (unsigned int mi=0;mi<fGroupNamePathsPair.size();mi++) {
1611 
1612 
1613  fullPathToME = "HLT/FourVector/PathsSummary/HLT_"+fGroupNamePathsPair[mi].first+"_PassPass";
1614  MonitorElement* ME_2d = dbe_->get(fullPathToME);
1615  fullPathToME = "HLT/FourVector/PathsSummary/HLT_"+fGroupNamePathsPair[mi].first+"_Pass_Any";
1616  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1617  if(!ME_2d || !ME_1d) {
1618 
1619  LogTrace("FourVectorHLTOffline") << " ME not valid although I gave full path" << endl;
1620  continue;
1621 
1622  }
1623 
1624  TH2F * hist_2d = ME_2d->getTH2F();
1625  TH1F * hist_1d = ME_1d->getTH1F();
1626 
1627  // Fill HLTPassed Matrix bin (i,j) = (Any,Any)
1628  // --------------------------------------------------------
1629  int anyBinNumber = hist_2d->GetXaxis()->FindBin("HLT_Any");
1630 
1631  string groupBinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_Any";
1632  int groupBinNumber = hist_2d->GetXaxis()->FindBin(groupBinLabel.c_str());
1633 
1634  // any trigger accepted
1635  if(fTriggerResults->accept()){
1636 
1637  hist_2d->Fill(anyBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1638  hist_1d->Fill(anyBinNumber-1);//binNumber1 = 0 = first filter
1639 
1640  }
1641 
1642  bool groupPassed = false;
1643  bool groupL1Passed = false;
1644 
1645  // Main loop over paths
1646  // --------------------
1647 
1648  //for (int i=1; i< hist_2d->GetNbinsX();i++)
1649  for (unsigned int i=0; i< fGroupNamePathsPair[mi].second.size(); i++)
1650  {
1651 
1652  //string hltPathName = hist_2d->GetXaxis()->GetBinLabel(i);
1653  string hltPathName = fGroupNamePathsPair[mi].second[i];
1654 
1655  // check if this is hlt path name
1656  //unsigned int pathByIndex = triggerNames.triggerIndex(hltPathName);
1657  unsigned int pathByIndex = triggerNames.triggerIndex(fGroupNamePathsPair[mi].second[i]);
1658  if(pathByIndex >= fTriggerResults->size() ) continue;
1659 
1660  // check if its L1 passed
1661  // comment out below but set groupL1Passed to true always
1662  //if(hasL1Passed(hltPathName,triggerNames)) groupL1Passed = true;
1663  //groupL1Passed = true;
1664 
1665  // Fill HLTPassed Matrix and HLTPassFail Matrix
1666  // --------------------------------------------------------
1667 
1668  if(fTriggerResults->accept(pathByIndex)){
1669 
1670  groupPassed = true;
1671  groupL1Passed = true;
1672 
1673  hist_2d->Fill(i,anyBinNumber-1);//binNumber1 = 0 = first filter
1674  hist_2d->Fill(anyBinNumber-1,i);//binNumber1 = 0 = first filter
1675 
1676  hist_2d->Fill(i,groupBinNumber-1);//binNumber1 = 0 = first filter
1677  hist_2d->Fill(groupBinNumber-1,i);//binNumber1 = 0 = first filter
1678 
1679  hist_1d->Fill(i);//binNumber1 = 0 = first filter
1680 
1681 
1682  //for (int j=1; j< hist_2d->GetNbinsY();j++)
1683  for (unsigned int j=0; j< fGroupNamePathsPair[mi].second.size(); j++)
1684  {
1685 
1686  string crossHltPathName = fGroupNamePathsPair[mi].second[j];
1687 
1688  //unsigned int crosspathByIndex = triggerNames.triggerIndex(hist_2d->GetXaxis()->GetBinLabel(j));
1689  //unsigned int crosspathByIndex = triggerNames.triggerIndex(crossHltPathName);
1690  unsigned int crosspathByIndex = triggerNames.triggerIndex(fGroupNamePathsPair[mi].second[j]);
1691 
1692  if(crosspathByIndex >= fTriggerResults->size() ) continue;
1693 
1694  if(fTriggerResults->accept(crosspathByIndex)){
1695 
1696  hist_2d->Fill(i,j);//binNumber1 = 0 = first filter
1697 
1698  } // end if j path passed
1699 
1700  } // end for j
1701 
1702  } // end if i passed
1703 
1704 
1705  } // end for i
1706 
1707  if(groupPassed) {
1708 
1709  hist_1d->Fill(groupBinNumber-1);//binNumber1 = 0 = first filter
1710  hist_1d->Fill(groupBinNumber-2);//binNumber1 = 0 = first filter -> Fill L1group as well
1711  hist_2d->Fill(groupBinNumber-1,groupBinNumber-1);//binNumber1 = 0 = first filter
1712  hist_2d->Fill(anyBinNumber-1,groupBinNumber-1);//binNumber1 = 0 = first filter
1713  hist_2d->Fill(groupBinNumber-1,anyBinNumber-1);//binNumber1 = 0 = first filter
1714 
1715  }
1716 
1717  /*
1718  string groupL1BinLabel = "HLT_"+fGroupNamePathsPair[mi].first+"_L1_Any";
1719  int groupL1BinNumber = hist_2d->GetXaxis()->FindBin(groupL1BinLabel.c_str());
1720 
1721  if(groupL1Passed) hist_1d->Fill(groupL1BinNumber-1);//binNumber1 = 0 = first filter
1722  */
1723  } // end for mi
1724 
1725 }
1726 
1728 {
1729 
1730  //pathsSummaryFolder_ = TString("HLT/FourVector/PathsSummary/");
1731  //dbe_->setCurrentFolder(pathsSummaryFolder_.c_str());
1733 
1734  // setup HLT bx plot
1735  unsigned int npaths = hltPathsDiagonal_.size();
1736 
1737  ME_HLT_BX = dbe_->book2D("HLT_bx",
1738  "HLT counts vs Event bx",
1739  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1740  /*
1741  ME_HLT_CUSTOM_BX = dbe_->book2D("HLT_Custom_bx",
1742  "HLT counts vs Event bx",
1743  Nbx_+1, -0.5, Nbx_+1-0.5, npaths, -0.5, npaths-0.5);
1744  */
1745  ME_HLT_BX->setAxisTitle("Bunch Crossing");
1746  //ME_HLT_CUSTOM_BX->setAxisTitle("Bunch Crossing");
1747 
1748 
1749  // Set up bin labels on Y axis continuing to cover all npaths
1750  for(unsigned int i = 0; i < npaths; i++){
1751 
1752  if (ME_HLT_BX)
1753  ME_HLT_BX->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1754  //ME_HLT_CUSTOM_BX->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1755 
1756  }
1757 
1758 
1759 }
1760 
1762 {
1763 
1764  unsigned int npaths = hltPathsDiagonal_.size();
1765 
1766  //pathsSummaryHLTPathsPerLSFolder_ = TString("HLT/FourVector/PathsSummary/HLT LS/");
1767  //dbe_->setCurrentFolder(pathsSummaryHLTPathsPerLSFolder_.c_str());
1769 
1770  ME_HLTAll_LS = dbe_->book2D("All_count_LS",
1771  "All paths per LS ",
1772  nLS_, 0, nLS_, npaths+1, -0.5, npaths+1-0.5);
1773  ME_HLTAll_LS->setAxisTitle("Luminosity Section");
1774 
1775  // Set up bin labels on Y axis continuing to cover all npaths
1776  for(unsigned int i = 0; i < npaths; i++){
1777  if (ME_HLTAll_LS)
1778  ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, (hltPathsDiagonal_[i]).getPath().c_str());
1779 
1780  }
1781 
1782  unsigned int i = npaths;
1783 
1784  if (ME_HLTAll_LS)
1785  ME_HLTAll_LS->getTH2F()->GetYaxis()->SetBinLabel(i+1, "HLT_Any");
1786 
1787 
1788 }
1789 
1790 
1792 
1793  //int lumi = int(lumiSeg.id().luminosityBlock());
1794  //if(lumi < 74 || lumi > 77) fLumiFlag = false;
1795  //else fLumiFlag = true;
1796 
1797 }
1798 
1800 {
1801 
1802  int lumi = int(lumiSeg.id().luminosityBlock());
1803  LogTrace("FourVectorHLTOffline") << " end lumiSection number " << lumi << endl;
1804 
1805  // countHLTPathHitsEndLumiBlock(lumi);
1808 
1809  // countHLTGroupBXHitsEndLumiBlock(lumi);
1810 
1811 }
1812 
1813 // bjk: we have commented this out
1815 {
1816 
1817  LogTrace("FourVectorHLTOffline") << " countHLTGroupBXHitsEndLumiBlock() lumiSection number " << lumi << endl;
1818 
1819  TH2F * hist_2d_bx = ME_HLT_BX->getTH2F();
1820 
1821  for (std::vector<std::pair<std::string, vector<int> > >::iterator ip = fPathBxTempCountPair.begin(); ip != fPathBxTempCountPair.end(); ++ip) {
1822 
1823  // get the path and its previous count
1824  std::string pathname = ip->first;
1825  vector<int> prevCount = ip->second;
1826 
1827  // vector of 5 zeros
1828  vector<int> currCount (5,0);
1829  vector<int> diffCount (5,0);
1830 
1831  // get the current count of path up to now
1832  int pathBin = hist_2d_bx->GetYaxis()->FindBin(pathname.c_str());
1833 
1834  if(pathBin > hist_2d_bx->GetNbinsY()) {
1835 
1836  LogTrace("FourVectorHLTOffline") << " Cannot find the bin for path " << pathname << endl;
1837  continue;
1838 
1839  }
1840 
1841  for (unsigned int b =0;b<currCount.size();b++) {
1842 
1843  int bxOffset = b-2;
1844  int bunch = referenceBX_+bxOffset;
1845  if(bunch < 1) bunch += Nbx_ ;
1846  int bxBin = bunch +1; // add one to get the right bin
1847 
1848 
1849  currCount[b] = int(hist_2d_bx->GetBinContent(bxBin, pathBin)); // add one to get the right bin
1850 
1851  LogTrace("FourVectorHLTOffline") << "currCount = " << currCount[b] << endl;
1852 
1853  // count due to prev lumi sec is a difference bw current and previous
1854  diffCount[b] = currCount[b] - prevCount[b];
1855 
1856  LogTrace("FourVectorHLTOffline") << " lumi = " << lumi << " path " << pathname << "bxOffset = " << bxOffset << " count = " << diffCount[b] << endl;
1857 
1858  } // end for bx b
1859 
1860  // set the counter in the pair to current count
1861  ip->second = currCount;
1862 
1864  // fill the 2D Group paths' BX count per LS, using currCount
1866  LogTrace("FourVectorHLTOffline") << "Find " << pathname << endl;
1867 
1868  //check if the path is in this group
1869  for (unsigned int j=0;j<fGroupNamePathsPair.size();j++) {
1870 
1871  bool isMember = false;
1872 
1873  LogTrace("FourVectorHLTOffline") << " ---- Group " << fGroupNamePathsPair[j].first << endl;
1874 
1875  // decide if pathname is member of this group
1876  for (unsigned int k = 0; k<(fGroupNamePathsPair[j].second).size();k++) {
1877 
1878  LogTrace("FourVectorHLTOffline") << " comparing to " << fGroupNamePathsPair[j].second[k] << endl;
1879 
1880  if(fGroupNamePathsPair[j].second[k] == pathname) {
1881 
1882  isMember = true;
1883  break;
1884 
1885  }
1886 
1887  } // end for k
1888 
1889  if(!isMember) {
1890 
1891  LogTrace("FourVectorHLTOffline") << "Could not find a group to which the path belongs, path = " << pathname << " group = " << fGroupNamePathsPair[j].first << endl;
1892  continue;
1893 
1894  }
1895 
1896  MonitorElement* ME_2d = v_ME_Total_BX[j];
1897 
1898  if (! ME_2d) {
1899 
1900  LogDebug("FourVectorHLTOffline") << " cannot find ME_2d for group " << fGroupNamePathsPair[j].first << endl;
1901  continue;
1902 
1903  }
1904 
1905  vector<int> updatedLumiCount(5,0);
1906 
1907  float entireBXWindowUpdatedLumiCount = 0;
1908 
1909  TH2F* hist_All = ME_2d->getTH2F();
1910 
1911  for (unsigned int b = 0; b<diffCount.size();b++) {
1912 
1913  // find the bin
1914  int binNumber = b+1; // add one to get right bin
1915 
1916  // update the bin content (must do that since events don't ncessarily come in the order
1917  int currentLumiCount = int(hist_All->GetBinContent(lumi+1,binNumber));
1918  updatedLumiCount[b] = currentLumiCount + diffCount[b];
1919  hist_All->SetBinContent(lumi+1,binNumber,updatedLumiCount[b]);
1920 
1921  entireBXWindowUpdatedLumiCount += updatedLumiCount[b];
1922 
1923  } // end for bx b
1924 
1925  MonitorElement* ME_2d_Norm = v_ME_Total_BX_Norm[j];
1926 
1927  if (! ME_2d_Norm) {
1928 
1929  LogDebug("FourVectorHLTOffline") << " cannot find ME_2d_Norm for group " << fGroupNamePathsPair[j].first << endl;
1930  continue;
1931 
1932  }
1933 
1934  TH2F* hist_All_Norm = ME_2d_Norm->getTH2F();
1935 
1936  for (unsigned int b = 0; b<diffCount.size();b++) {
1937 
1938  // find the bin
1939  int binNumber = b+1; // add one to get right bin
1940 
1941  // update the bin content but normalized to the whole columb (BX windw +/- 2)
1942  if(entireBXWindowUpdatedLumiCount != 0)
1943  hist_All_Norm->SetBinContent(lumi+1,binNumber,float(updatedLumiCount[b])/entireBXWindowUpdatedLumiCount);
1944 
1945  } // end for bx b
1946 
1947  } // end for group j
1948 
1949  } // end for ip
1950 
1951 }
1952 
1954 {
1955 
1956  LogTrace("FourVectorHLTOffline") << " countHLTGroupL1HitsEndLumiBlock() lumiSection number " << lumi << endl;
1957 
1958  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
1959 
1960  // get the count of path up to now
1961  string fullPathToME = "HLT/FourVector/PathsSummary/HLT_" + fGroupNamePathsPair[i].first+ "_Pass_Any";
1962  MonitorElement* ME_1d = dbe_->get(fullPathToME);
1963 
1964  if(! ME_1d) {
1965 
1966  LogTrace("FourVectorHLTOffline") << " could not find 1d matrix " << fullPathToME << endl;
1967 
1968  continue;
1969 
1970  }
1971 
1972  LogTrace("FourVectorHLTOffline") << " Looking in histogram " << fullPathToME << endl;
1973 
1974  TH1F * hist_1d = ME_1d->getTH1F();
1975 
1976  for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupL1TempCountPair.begin(); ip != fGroupL1TempCountPair.end(); ++ip) {
1977 
1978  // get the path and its previous count
1979  string pathname = ip->first;
1980  float prevCount = ip->second;
1981 
1982  string binLabel = "HLT_"+pathname+"_L1_Any";
1983 
1984  LogTrace("FourVectorHLTOffline") << " Looking for binLabel = " << binLabel << endl;
1985  // get the current count of path up to now
1986  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
1987 
1988  LogTrace("FourVectorHLTOffline") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
1989  if(pathBin == -1) {
1990 
1991  LogTrace("FourVectorHLTOffline") << " Cannot find the bin for path " << pathname << endl;
1992  continue;
1993 
1994  }
1995 
1996  float currCount = hist_1d->GetBinContent(pathBin)/LSsize_;
1997 
1998  // count due to prev lumi sec is a difference bw current and previous
1999  float diffCount = currCount - prevCount;
2000 
2001  LogTrace("FourVectorHLTOffline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << endl;
2002 
2003  // set the counter in the pair to current count
2004  ip->second = currCount;
2005 
2006 
2008  // fill the 1D individual path count per LS
2010  string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_L1_Total_LS";
2011  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
2012  if ( ME_1d) {
2013 
2014  // update the bin content (must do that since events don't ncessarily come in the order
2015  float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
2016  float updatedLumiCount = currentLumiCount + diffCount;
2017  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2018  }
2019  else {
2020 
2021  LogDebug("FourVectorHLTOffline") << " cannot find ME " << fullPathToME_count << endl;
2022 
2023  }
2024 
2025  } // end for ip
2026 
2027  } // end for i
2028 
2029 }
2030 
2031 
2033 {
2034 
2035  LogTrace("FourVectorHLTOffline") << " countHLTGroupHitsEndLumiBlock() lumiSection number " << lumi << endl;
2036  for(unsigned int i=0; i<fGroupNamePathsPair.size(); i++){
2037 
2038  // get the count of path up to now
2039  string fullPathToME = "HLT/FourVector/PathsSummary/HLT_" + fGroupNamePathsPair[i].first + "_Pass_Any";
2040  MonitorElement* ME_1d = dbe_->get(fullPathToME);
2041 
2042  if(! ME_1d) {
2043 
2044  LogTrace("FourVectorHLTOffline") << " could not find 1d matrix " << fullPathToME << endl;
2045 
2046  continue;
2047 
2048  }
2049 
2050  LogTrace("FourVectorHLTOffline") << " Looking in histogram " << fullPathToME << endl;
2051 
2052  TH1F * hist_1d = ME_1d->getTH1F();
2053 
2054  for (std::vector<std::pair<std::string, float> >::iterator ip = fGroupTempCountPair.begin(); ip != fGroupTempCountPair.end(); ++ip) {
2055 
2056  // get the path and its previous count
2057  string pathname = ip->first;
2058  float prevCount = ip->second;
2059 
2060  string binLabel = "HLT_"+pathname+"_Any";
2061 
2062  LogTrace("FourVectorHLTOffline") << " Looking for binLabel = " << binLabel << endl;
2063  // get the current count of path up to now
2064  int pathBin = hist_1d->GetXaxis()->FindBin(binLabel.c_str());
2065 
2066  LogTrace("FourVectorHLTOffline") << " pathBin = " << pathBin << " out of histogram total number of bins " << hist_1d->GetNbinsX() << endl;
2067  if(pathBin == -1) {
2068 
2069  LogTrace("FourVectorHLTOffline") << " Cannot find the bin for path " << pathname << endl;
2070  continue;
2071 
2072  }
2073 
2074  float currCount = hist_1d->GetBinContent(pathBin)/LSsize_;
2075 
2076  // count due to prev lumi sec is a difference bw current and previous
2077  float diffCount = currCount - prevCount;
2078 
2079  LogTrace("FourVectorHLTOffline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << endl;
2080 
2081  // set the counter in the pair to current count
2082  ip->second = currCount;
2083 
2084 
2086  // fill the 1D individual path count per LS
2088  string fullPathToME_count = pathsSummaryHLTPathsPerLSFolder_ +"HLT_" + pathname + "_Total_LS";
2089  MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
2090  if ( ME_1d) {
2091 
2092  // update the bin content (must do that since events don't ncessarily come in the order
2093  float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
2094  float updatedLumiCount = currentLumiCount + diffCount;
2095  ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2096 
2097  }
2098  else {
2099 
2100  LogDebug("FourVectorHLTOffline") << " cannot find ME " << fullPathToME_count << endl;
2101 
2102  }
2103 
2104  } // end for ip
2105 
2106  } // end for i
2107 
2108 }
2109 
2110 
2112 {
2113 
2114  LogTrace("FourVectorHLTOffline") << " countHLTPathHitsEndLumiBlock() lumiSection number " << lumi << endl;
2115  // get the count of path up to now
2116  string fullPathToME = "HLT/FourVector/PathsSummary/HLT_All_PassPass";
2117  MonitorElement* ME_2d = dbe_->get(fullPathToME);
2118 
2119  if(! ME_2d) {
2120 
2121  LogTrace("FourVectorHLTOffline") << " could not fine 2d matrix " << fullPathToME << endl;
2122 
2123  return;
2124 
2125  }
2126 
2127  TH2F * hist_2d = ME_2d->getTH2F();
2128 
2129  for (std::vector<std::pair<std::string, float> >::iterator ip = fPathTempCountPair.begin(); ip != fPathTempCountPair.end(); ++ip) {
2130 
2131  // get the path and its previous count
2132  std::string pathname = ip->first;
2133  float prevCount = ip->second;
2134 
2135  // get the current count of path up to now
2136  float pathBin = hist_2d->GetXaxis()->FindBin(pathname.c_str());
2137 
2138  if(pathBin > hist_2d->GetNbinsX()) {
2139 
2140  LogTrace("FourVectorHLTOffline") << " Cannot find the bin for path " << pathname << endl;
2141  continue;
2142 
2143  }
2144 
2145  float currCount = hist_2d->GetBinContent(pathBin, pathBin)/LSsize_;
2146 
2147  // count due to prev lumi sec is a difference bw current and previous
2148  float diffCount = currCount - prevCount;
2149 
2150  LogTrace("FourVectorHLTOffline") << " lumi = " << lumi << " path " << pathname << " count " << diffCount << endl;
2151 
2152  // set the counter in the pair to current count
2153  ip->second = currCount;
2154 
2156  // fill the 2D All paths' count per LS
2158  if ( ME_HLTAll_LS) {
2159 
2160  TH2F* hist_All = ME_HLTAll_LS->getTH2F();
2161 
2162  // find the bin
2163  int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2164 
2165  // update the bin content (must do that since events don't ncessarily come in the order
2166  float currentLumiCount = hist_All->GetBinContent(lumi+1,pathBinNumber);
2167  float updatedLumiCount = currentLumiCount + diffCount;
2168  hist_All->SetBinContent(lumi+1,pathBinNumber,updatedLumiCount);
2169 
2170  }
2171  else {
2172 
2173  LogDebug("FourVectorHLTOffline") << " cannot find ME_HLTAll_LS" << endl;
2174 
2175  }
2176 
2177 // for (unsigned int i=0 ; i< v_ME_HLTAll_LS.size(); i++) {
2178 
2179 // MonitorElement* tempME = v_ME_HLTAll_LS[i];
2180 
2181 // if (tempME && tempME->getName().find(pathname) != std::string::npos) {
2182 
2183 // TH1F* hist_All = tempME->getTH1F();
2184 
2185 // // // find the bin
2186 // // int pathBinNumber = hist_All->GetYaxis()->FindBin(pathname.c_str());
2187 // // // update the bin content (must do that since events don't ncessarily come in the order
2188 // float currentLumiCount = hist_All->GetBinContent(lumi+1);
2189 // float updatedLumiCount = currentLumiCount + diffCount;
2190 // hist_All->SetBinContent(lumi+1,updatedLumiCount);
2191 
2192 // }
2193 // else {
2194 
2195 // LogDebug("FourVectorHLTOffline") << " cannot find tempME " << endl;
2196 
2197 // }
2198 
2199 // }
2200 
2201 
2202  // bjk here
2203 // ///////////////////////////////////////////
2204 // // fill the 1D individual path count per LS
2205 // ///////////////////////////////////////////
2206 // string fullPathToME_count = pathsIndividualHLTPathsPerLSFolder_ + pathname + "_count_per_LS";
2207 // MonitorElement* ME_1d = dbe_->get(fullPathToME_count);
2208 // if ( ME_1d) {
2209 
2210 // // update the bin content (must do that since events don't ncessarily come in the order
2211 // float currentLumiCount = ME_1d->getTH1()->GetBinContent(lumi+1);
2212 // float updatedLumiCount = currentLumiCount + diffCount;
2213 // ME_1d->getTH1()->SetBinContent(lumi+1,updatedLumiCount);
2214 
2215 // }
2216 // else {
2217 
2218 // LogDebug("FourVectorHLTOffline") << " cannot find ME " << fullPathToME_count << endl;
2219 
2220 // }
2221 
2222  } // end for ip
2223 
2224 }
2225 
2227 {
2228 
2229  int objectType = 0;
2230 
2231  if (pathname.find("MET") != std::string::npos)
2232  objectType = trigger::TriggerMET;
2233  if (pathname.find("SumET") != std::string::npos || pathname.find("SumEt") != std::string::npos || pathname.find("ETT") != std::string::npos)
2234  objectType = trigger::TriggerTET;
2235  if (pathname.find("HT") != std::string::npos)
2236  objectType = trigger::TriggerTET;
2237  if (pathname.find("Jet") != std::string::npos)
2238  objectType = trigger::TriggerJet;
2239  if (pathname.find("Mu") != std::string::npos)
2240  objectType = trigger::TriggerMuon;
2241  if (pathname.find("Ele") != std::string::npos)
2242  objectType = trigger::TriggerElectron;
2243  if (pathname.find("Photon") != std::string::npos)
2244  objectType = trigger::TriggerPhoton;
2245  if (pathname.find("EG") != std::string::npos)
2246  objectType = trigger::TriggerPhoton;
2247  if (pathname.find("Tau") != std::string::npos)
2248  objectType = trigger::TriggerTau;
2249  if (pathname.find("IsoTrack") != std::string::npos)
2250  objectType = trigger::TriggerTrack;
2251  if (pathname.find("BTag") != std::string::npos)
2252  objectType = trigger::TriggerBJet;
2253 
2254  return objectType;
2255 }
2256 
2257 const string FourVectorHLTOffline::getL1ConditionModuleName(const string& pathname)
2258 {
2259 
2260  // find L1 condition for numpath with numpath objecttype
2261  // find PSet for L1 global seed for numpath,
2262  // list module labels for numpath
2263  string l1pathname = "dummy";
2264 
2265  vector<string> numpathmodules = hltConfig_.moduleLabels(pathname);
2266 
2267  for(vector<string>::iterator numpathmodule = numpathmodules.begin();
2268  numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2269 
2270  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed") {
2271 
2272  l1pathname = *numpathmodule;
2273  break;
2274 
2275  }
2276 
2277  } // end for
2278 
2279  return l1pathname;
2280 
2281 }
2282 
2283 
2284 bool FourVectorHLTOffline::hasL1Passed(const string& pathname, const edm::TriggerNames & triggerNames)
2285 {
2286 
2287  bool rc = false;
2288  int l1ModuleIndex = 999;
2289  // --------------------
2290  for(PathInfoCollection::iterator v = hltPathsDiagonal_.begin(); v!= hltPathsDiagonal_.end(); ++v ) {
2291 
2292  if(v->getPath() == pathname ) l1ModuleIndex = v->getL1ModuleIndex();
2293 
2294  }
2295 
2296  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
2297  if(pathByIndex >= fTriggerResults->size() ) return rc; // path is not in the menu
2298 
2299  // get index of the last module that issued the decision
2300  int lastModule = fTriggerResults->index(pathByIndex);
2301 
2302  // if L1 passed, then it must not be the module that
2303  // issued the last decision
2304  rc = (l1ModuleIndex < lastModule);
2305 
2306  return rc;
2307 
2308 }
2309 
2310 bool FourVectorHLTOffline::hasHLTPassed(const string& pathname, const edm::TriggerNames & triggerNames)
2311 {
2312 
2313  bool rc = false;
2314 
2315  unsigned int pathByIndex = triggerNames.triggerIndex(pathname);
2316  if(pathByIndex >= fTriggerResults->size() ) return rc; // path is not in the menu
2317 
2318  rc = fTriggerResults->accept(pathByIndex);
2319 
2320  return rc;
2321 
2322 }
2323 
2325 {
2326  // for every event, first clear vector of selected objects
2327  fSelectedMuons->clear();
2328 
2329  if(muonHandle.isValid()) {
2330 
2331  for( reco::MuonCollection::const_iterator iter = muonHandle->begin(), iend = muonHandle->end(); iter != iend; ++iter )
2332  {
2333 
2336  {
2337  if(isVBTFMuon(*iter)) fSelectedMuons->push_back(*iter);
2338  }
2339  } // end for
2340 
2341  edm::Handle<reco::MuonCollection> localSelMuonsHandle(fSelectedMuons,muonHandle.provenance());
2342  fSelMuonsHandle = localSelMuonsHandle;
2343 
2344  } // end if
2345 
2346 
2347 }
2348 
2350 {
2351 
2352  // for every event, first clear vector of selected objects
2353  fSelectedElectrons->clear();
2354 
2355 
2356 
2357 
2358  if(eleHandle.isValid()) {
2359 
2360  for( reco::GsfElectronCollection::const_iterator iter = eleHandle->begin(), iend = eleHandle->end(); iter != iend; ++iter )
2361  {
2362 
2364  iEvent.getByLabel( recHitsEBTag_, pEBRecHits );
2365 
2367  iEvent.getByLabel( recHitsEETag_, pEERecHits );
2368 
2369  if(pEBRecHits.isValid() && pEERecHits.isValid()) {
2370 
2371  EcalClusterLazyTools lazyTool(iEvent, iSetup, recHitsEBTag_, recHitsEETag_);
2372  const reco::CaloCluster* bc = iter->superCluster()->seed().get(); // get the basic cluster
2373 
2374  float eleMaxOver3x3 = ( lazyTool.eMax(*bc) / lazyTool.e3x3(*bc) );
2375 
2376  if(eleMaxOver3x3 > eleMaxOver3x3_) continue;
2377 
2378  }
2379 
2380  // Only ecalDriven electrons
2381  if(! iter->ecalDriven() ) continue;
2382 
2383 
2384  // Barrel
2385  if(iter->isEB()) {
2386 
2387  if (
2388  iter->dr03TkSumPt() < dr03TkSumPtEB_ &&
2389  iter->dr04EcalRecHitSumEt() < dr04EcalRecHitSumEtEB_ &&
2390  iter->dr04HcalTowerSumEt() < dr04HcalTowerSumEtEB_ &&
2391  iter->hadronicOverEm() < hadronicOverEmEB_ &&
2392  fabs(iter->deltaPhiSuperClusterTrackAtVtx()) < deltaPhiSuperClusterTrackAtVtxEB_ &&
2393  fabs(iter->deltaEtaSuperClusterTrackAtVtx()) < deltaEtaSuperClusterTrackAtVtxEB_ &&
2394  iter->sigmaIetaIeta() < sigmaIetaIetaEB_ &&
2395  //spikes
2396  iter->sigmaIetaIeta() > sigmaIetaIetaSpikesEB_
2397  ) {
2398 
2399  fSelectedElectrons->push_back(*iter);
2400 
2401  }
2402 
2403  } // end if
2404 
2405  // EndCap
2406  else if(iter->isEE()) {
2407  if (
2408  iter->dr03TkSumPt() < dr03TkSumPtEC_ &&
2409  iter->dr04EcalRecHitSumEt() < dr04EcalRecHitSumEtEC_ &&
2410  iter->dr04HcalTowerSumEt() < dr04HcalTowerSumEtEC_ &&
2411  iter->hadronicOverEm() < hadronicOverEmEC_ &&
2412  fabs(iter->deltaPhiSuperClusterTrackAtVtx()) < deltaPhiSuperClusterTrackAtVtxEC_ &&
2413  fabs(iter->deltaEtaSuperClusterTrackAtVtx()) < deltaEtaSuperClusterTrackAtVtxEC_ &&
2414  iter->sigmaIetaIeta() < sigmaIetaIetaEC_ &&
2415  //spikes
2416  iter->sigmaIetaIeta() > sigmaIetaIetaSpikesEC_
2417  ) {
2418 
2419  fSelectedElectrons->push_back(*iter);
2420 
2421  }
2422 
2423  } // end else if
2424 
2425 
2426  } // end for
2427 
2428  edm::Handle<reco::GsfElectronCollection> localSelElectronsHandle(fSelectedElectrons,eleHandle.provenance());
2429  fSelElectronsHandle = localSelElectronsHandle;
2430 
2431  } // end if
2432 
2433 
2434 }
2435 
2437 {
2438  // for every event, first clear vector of selected objects
2439  fSelectedPhotons->clear();
2440 
2441  if(phoHandle.isValid()) {
2442 
2443  for( reco::PhotonCollection::const_iterator iter = phoHandle->begin(), iend = phoHandle->end(); iter != iend; ++iter )
2444  {
2445 
2446  if(
2447 
2448  //spikes
2449  iter->sigmaIetaIeta() > 0.002 &&
2450  iter->maxEnergyXtal() / iter->e3x3() < 0.9
2451 
2452  ) {
2453 
2454  fSelectedPhotons->push_back(*iter);
2455 
2456  } // end if
2457 
2458  } // end for
2459 
2460  edm::Handle<reco::PhotonCollection> localSelPhotonsHandle(fSelectedPhotons,phoHandle.provenance());
2461  fSelPhotonsHandle = localSelPhotonsHandle;
2462 
2463  } // end if
2464 
2465 
2466 }
2467 
2469 {
2470  // for every event, first clear vector of selected objects
2471  fSelectedJets->clear();
2472 
2473  if(jetHandle.isValid()) {
2474 
2475  for( reco::CaloJetCollection::const_iterator iter = jetHandle->begin(), iend = jetHandle->end(); iter != iend; ++iter )
2476  {
2477 
2478  jetID->calculate(iEvent, *iter);
2479  if (iter->emEnergyFraction() > emEnergyFractionJet_ &&
2480  jetID->fHPD() < fHPDJet_ &&
2481  iter->n90() >= n90Jet_
2482  ){
2483 
2484  fSelectedJets->push_back(*iter);
2485 
2486  }
2487 
2488  } // end for
2489 
2490  edm::Handle<reco::CaloJetCollection> localSelJetsHandle(fSelectedJets,jetHandle.provenance());
2491  fSelJetsHandle = localSelJetsHandle;
2492 
2493  } // end if
2494 
2495 
2496 }
2497 
2499 {
2500  // for every event, first clear vector of selected objects
2501  fSelectedMet->clear();
2502 
2503  if(metHandle.isValid()) {
2504 
2505  for( reco::CaloMETCollection::const_iterator iter = metHandle->begin(), iend = metHandle->end(); iter != iend; ++iter )
2506  {
2507 
2508  fSelectedMet->push_back(*iter);
2509 
2510  } // end for
2511 
2512  edm::Handle<reco::CaloMETCollection> localSelMetHandle(fSelectedMet,metHandle.provenance());
2513  fSelMetHandle = localSelMetHandle;
2514 
2515  } // end if
2516 
2517 
2518 }
2519 
2520 
2522 {
2523  // for every event, first clear vector of selected objects
2524  fSelectedTaus->clear();
2525 
2526  //first read the tau collection
2528  iEvent.getByLabel("hpsPFTauProducer",tauHandle);
2529 
2530  //Now access a discriminator and see if it passed the tag
2532  iEvent.getByLabel(tauDscrmtrLabel1_,dscrmt1H);
2534  iEvent.getByLabel(tauDscrmtrLabel2_,dscrmt2H);
2536  iEvent.getByLabel(tauDscrmtrLabel3_,dscrmt3H);
2537 
2538  if(tauHandle.isValid() && dscrmt1H.isValid() && dscrmt2H.isValid() && dscrmt3H.isValid()) {
2539 
2540  for(unsigned int i=0;i<tauHandle->size();++i) {
2541 
2542  //create a ref to the PF Tau
2543  reco::PFTauRef pfTauRef(tauHandle,i);
2544 
2545  float outputDiscmnt1 = (*dscrmt1H)[pfTauRef]; // this should be >0.5 to pass
2546  float outputDiscmnt2 = (*dscrmt2H)[pfTauRef]; // this should be >0.5 to pass
2547  float outputDiscmnt3 = (*dscrmt3H)[pfTauRef]; // this should be >0.5 to pass
2548 
2549  if(outputDiscmnt1>0.5 && outputDiscmnt2>0.5 && outputDiscmnt3 >0.5) {
2550 
2551  fSelectedTaus->push_back((*tauHandle)[i]);
2552 
2553  }
2554 
2555  } // end for
2556 
2557 
2558  edm::Handle<reco::PFTauCollection> localSelTauHandle(fSelectedTaus,tauHandle.provenance());
2559  fSelTausHandle = localSelTauHandle;
2560 
2561  } // end if
2562 
2563 }
2564 
2565 
2567 {
2568 
2569  std::string pathname = name;
2570  //cout << "----------------------------------------------" << endl;
2571  //cout << pathname << endl;
2572 
2573  //remove "L1" substr
2574  if(pathname.find("L1") != std::string::npos) pathname.replace(pathname.find("L1"),2,"");
2575  //remove "L2" substr
2576  if(pathname.find("L2") != std::string::npos) pathname.replace(pathname.find("L2"),2,"");
2577  //remove "8E29" substr
2578  if(pathname.find("8E29") != std::string::npos) pathname.replace(pathname.find("8E29"),4,"");
2579 
2580  int digitLocation=0;
2581  for (unsigned int i=0; i < pathname.length(); i++)
2582  {
2583  if (isdigit(pathname.at(i))) {
2584 
2585  digitLocation = i;
2586  break;
2587 
2588  }
2589  }
2590 
2591  // get the string from the location of the first digit to the end
2592  string hltThresholdString = pathname.substr(digitLocation);
2593 
2594  int hltThreshold = 0;
2595 
2596  // get intiger at the begining of the string
2597  sscanf (hltThresholdString.c_str(),"%d%*s",&hltThreshold);
2598  //printf ("%s -> %s -> %d\n",pathname.c_str(), hltThresholdString.c_str(), hltThreshold);
2599 
2600  return hltThreshold;
2601 
2602 }
2603 
2605 {
2606 
2607  bool quality = 1;
2608 
2609  reco::TrackRef gm = muon.globalTrack();
2610  reco::TrackRef tk = muon.innerTrack();
2611 
2612  // Quality cuts
2613  // ------------
2614 
2615  // Must have BeamSpot for the 1st qualityCut
2616  if(!fBeamSpotHandle.isValid()) return 0;
2617 
2618  double dxy = gm->dxy(fBeamSpotHandle->position());
2619  double normalizedChi2 = gm->normalizedChi2();
2620  int trackerHits = tk->hitPattern().numberOfValidTrackerHits();
2621  int pixelHits = tk->hitPattern().numberOfValidPixelHits();
2622  int muonHits = gm->hitPattern().numberOfValidMuonHits();
2623  int nMatches = muon.numberOfMatches();
2624 
2625  if (fabs(dxy)>dxyCut_) {return 0; quality=0;}
2626  // if(plotHistograms_){ h1_["hNormChi2"]->Fill(normalizedChi2);}
2627  if (normalizedChi2>normalizedChi2Cut_) {return 0;quality=0;}
2628  // if(plotHistograms_){ h1_["hNHits"]->Fill(trackerHits);}
2629  if (trackerHits<trackerHitsCut_) {return 0;quality=0;}
2630  // if(plotHistograms_){ h1_["hNMuonHits"]->Fill(muonHits);}
2631  if (pixelHits<pixelHitsCut_) {return 0;quality=0;}
2632  // if(plotHistograms_){ h1_["hNPixelHits"]->Fill(pixelHits);}
2633  if (muonHits<muonHitsCut_) {return 0;quality=0;}
2634  // if(plotHistograms_){ h1_["hTracker"]->Fill(mu.isTrackerMuon());}
2635  if (!muon.isTrackerMuon()) {return 0;quality=0;}
2636  // if(plotHistograms_){ h1_["hNMatches"]->Fill(nMatches);}
2637  if (nMatches<nMatchesCut_) {return 0;quality=0;}
2638 
2639  return true;
2640 
2641 }
2642 
2643  string FourVectorHLTOffline::removeVersions(std::string histVersion) {
2644  for (int ii = 100; ii > 0; ii--) {
2645  string ver = "_v";
2646  string version ="";
2647  stringstream ss;
2648  ss << ver << ii;
2649  ss >> version;
2650 
2651  size_t pos = histVersion.find(version);
2652  if (pos != std::string::npos)
2653  histVersion.erase(pos,version.size());
2654 
2655  }
2656 
2657  return histVersion;
2658  }
2659 
#define LogDebug(id)
unsigned int size() const
number of trigger paths in trigger table
void setupHltMatrix(const std::string &label, std::vector< std::string > &paths)
reco::helper::JetIDHelper * jetID
LuminosityBlockID id() const
const double Pi
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
bool hasL1Passed(const std::string &pathname, const edm::TriggerNames &triggerNames)
virtual void fillL1Match(FourVectorHLTOffline *fv)=0
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
void selectPhotons(const edm::Handle< reco::PhotonCollection > &phoHandle)
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
RunID const & id() const
Definition: RunBase.h:43
const std::string moduleType(const std::string &module) const
C++ class name of module.
void countHLTPathHitsEndLumiBlock(const int &lumi)
virtual void monitorOnline(const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)=0
void countHLTGroupBXHitsEndLumiBlock(const int &lumi)
edm::Handle< reco::GsfElectronCollection > fSelElectronsHandle
edm::Handle< reco::CaloMETCollection > fSelMetHandle
const std::string & label
Definition: MVAComputer.cc:186
const std::string & triggerName(unsigned int triggerIndex) const
virtual void fillOnlineMatch(const int l1Index, FourVectorHLTOnline *fv)=0
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2311
reco::CaloMETCollection * fSelectedMet
PathInfoCollection hltPaths_
virtual TrackRef innerTrack() const
Definition: Muon.h:38
enum start value shifted to 81 so as to avoid clashes with PDG codes
reco::PFTauCollection * fSelectedTaus
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
tuple lumi
Definition: fjr2json.py:41
std::string pathsSummaryHLTPathsPerLSFolder_
bool isTrackerMuon() const
Definition: Muon.h:149
int getTriggerTypeParsePathName(const std::string &pathname)
void fillHltMatrix(const edm::TriggerNames &triggerNames)
std::vector< std::pair< std::string, std::vector< int > > > fPathBxTempCountPair
std::vector< std::string > specialPaths_
double fHPD() const
Definition: JetIDHelper.h:33
FourVectorHLTOffline(const edm::ParameterSet &)
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
float e3x3(const reco::BasicCluster &cluster)
std::multimap< float, int > fimmap
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
float eMax(const reco::BasicCluster &cluster)
edm::Handle< reco::MuonCollection > fSelMuonsHandle
#define NULL
Definition: scimark2.h:8
Strings::size_type size() const
Definition: TriggerNames.cc:39
edm::Handle< reco::BeamSpot > fBeamSpotHandle
virtual void monitorOffline(void)=0
edm::Handle< reco::PFTauCollection > fSelTausHandle
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< TPRegexp > filters
Definition: eve_filter.cc:25
edm::InputTag triggerSummaryLabel_
void countHLTGroupL1HitsEndLumiBlock(const int &lumi)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
void setRecoB(edm::Handle< reco::JetTagCollection > offCollB)
PathInfoCollection hltPathsDiagonal_
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
std::set< fimmap, std::less< fimmap > > mmset
edm::Handle< reco::PhotonCollection > fSelPhotonsHandle
reco::GsfElectronCollection * fSelectedElectrons
U second(std::pair< T, U > const &p)
const std::string * pathName() const
Definition: HLTadd.h:31
Definition: ME.h:11
const std::string getL1ConditionModuleName(const std::string &pathname)
int iEvent
Definition: GenABIO.cc:243
unsigned int moduleIndex(unsigned int trigger, const std::string &module) const
slot position of module on trigger path (0 to size-1)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
void setLimits(float etaMax, float etMin, float drMatch)
edm::Handle< edm::TriggerResults > fTriggerResults
void selectJets(const edm::Event &iEvent, const edm::Handle< reco::CaloJetCollection > &jetHandle)
std::vector< MonitorElement * > v_ME_Total_BX
std::vector< std::pair< std::string, float > > fPathTempCountPair
int j
Definition: DBlmapReader.cc:9
TH1 * getTH1(void) const
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
HLTConfigProvider hltConfig_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
reco::PhotonCollection * fSelectedPhotons
std::vector< MonitorElement * > v_ME_Total_BX_Norm
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
void selectTaus(const edm::Event &iEvent)
bool first
Definition: L1TdeRCT.cc:79
bool isValid() const
Definition: HandleBase.h:76
bool isVBTFMuon(const reco::Muon &muon)
MonitorElement * ME_HLT_BX
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
#define LogTrace(id)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
void selectElectrons(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::Handle< reco::GsfElectronCollection > &eleHandle)
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
Definition: Muon.cc:40
int k[5][pyjets_maxn]
reco::MuonCollection * fSelectedMuons
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
edm::InputTag triggerResultsLabel_
const std::vector< std::string > & datasetContent(unsigned int dataset) const
names of trigger paths in dataset with index i
virtual void clearSets(void)=0
DetId seed() const
return DetId of seed
Definition: CaloCluster.h:199
void beginRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
MonitorElement * ME_HLT_CUSTOM_BX
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
edm::Handle< reco::CaloJetCollection > fSelJetsHandle
TH1F * getTH1F(void) const
double b
Definition: hdecay.h:120
LuminosityBlockNumber_t luminosityBlock() const
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
std::vector< std::pair< std::string, float > > fGroupTempCountPair
std::vector< std::pair< std::string, std::vector< std::string > > > fGroupNamePathsPair
std::string removeVersions(std::string histVersion)
std::string const & label() const
Definition: InputTag.h:25
virtual void setPath(FourVectorHLTOnline::PathInfoCollection::iterator v)=0
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
std::string pathsSummaryHLTCorrelationsFolder_
std::string pathsSummaryFilterCountsFolder_
void selectMet(const edm::Handle< reco::CaloMETCollection > &metHandle)
MonitorElement * ME_HLTAll_LS
std::vector< std::string > fGroupName
void countHLTGroupHitsEndLumiBlock(const int &lumi)
virtual void monitorL1(const int l1Index, FourVectorHLTOnline *fv)=0
std::vector< std::pair< std::string, float > > fGroupL1TempCountPair
reco::CaloJetCollection * fSelectedJets
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
int getHltThresholdFromName(const std::string &pathname)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
edm::Handle< trigger::TriggerEvent > fTriggerObj
void setReco(edm::Handle< T > offColl)
std::string const & instance() const
Definition: InputTag.h:26
MonitorElement * scalersSelect
tuple size
Write out results.
mathSSE::Vec4< T > v
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
Definition: Run.h:32
const std::vector< std::string > & datasetNames() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
Provenance const * provenance() const
Definition: HandleBase.h:84
void selectMuons(const edm::Handle< reco::MuonCollection > &muonHandle)
bool hasHLTPassed(const std::string &pathname, const edm::TriggerNames &triggerNames)
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:44