CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetMETHLTOfflineSource.cc
Go to the documentation of this file.
1 /*
2  JetMETHLTOffline DQM code
3  Migrated to use DQMEDAnalyzer by: Jyothsna Rani Komaragiri, Oct 2014
4 */
5 
7 
16 
23 
25 
27 
28 #include "TMath.h"
29 #include "TH1F.h"
30 #include "TH2F.h"
31 #include "TProfile.h"
32 #include "TPRegexp.h"
33 
34 #include <cmath>
35 
36 using namespace edm;
37 using namespace reco;
38 using namespace std;
39 using namespace trigger;
40 
42  isSetup_(false)
43 {
44  LogDebug("JetMETHLTOfflineSource") << "constructor....";
45 
46  //
47  dirname_ = iConfig.getUntrackedParameter("dirname",std::string("HLT/JetMET/"));
48  processname_ = iConfig.getParameter<std::string>("processname");
49  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
50  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
51  triggerSummaryToken = consumes <trigger::TriggerEvent> (triggerSummaryLabel_);
52  triggerResultsToken = consumes <edm::TriggerResults> (triggerResultsLabel_);
53  triggerSummaryFUToken= consumes <trigger::TriggerEvent> (edm::InputTag(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(),std::string("FU")));
54  triggerResultsFUToken= consumes <edm::TriggerResults> (edm::InputTag(triggerResultsLabel_.label(),triggerResultsLabel_.instance(),std::string("FU")));
55  //
56  verbose_ = iConfig.getUntrackedParameter< bool >("verbose", false);
57  runStandalone_ = iConfig.getUntrackedParameter< bool >("runStandalone", false);
58  //
59  plotAll_ = iConfig.getUntrackedParameter< bool >("plotAll", true);
60  plotEff_ = iConfig.getUntrackedParameter< bool >("plotEff", true);
61  nameForEff_ = iConfig.getUntrackedParameter< bool >("nameForEff", true);
62  MuonTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMuon");
63  MBTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMB");
64  //CaloJet, CaloMET
65  caloJetsToken = consumes<reco::CaloJetCollection> (iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel"));
66  caloMetToken = consumes<reco::CaloMETCollection> (iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel"));
67  //PFJet, PFMET
68  pfJetsToken = consumes<reco::PFJetCollection> (iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel"));
69  pfMetToken = consumes<reco::PFMETCollection> (iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel"));
70  //pfmhtTag_ = iConfig.getParameter<edm::InputTag>("PFMHTCollectionLabel");
71  //Vertex info
72  vertexToken = consumes<reco::VertexCollection> (std::string("offlinePrimaryVertices"));
73  //
74  CaloJetCorToken_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("CaloJetCorLabel"));
75  PFJetCorToken_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("PFJetCorLabel"));
76  //JetID
78  _fEMF = iConfig.getUntrackedParameter< double >("fEMF", 0.01);
79  _feta = iConfig.getUntrackedParameter< double >("feta", 2.60);
80  _fHPD = iConfig.getUntrackedParameter< double >("fHPD", 0.98);
81  _n90Hits = iConfig.getUntrackedParameter< double >("n90Hits", 1.0);
82  _min_NHEF = iConfig.getUntrackedParameter< double >("minNHEF",0.);
83  _max_NHEF = iConfig.getUntrackedParameter< double >("maxNHEF",0.99);
84  _min_CHEF = iConfig.getUntrackedParameter< double >("minCHEF",0.);
85  _max_CHEF = iConfig.getUntrackedParameter< double >("maxCHEF",1.);
86  _min_NEMF = iConfig.getUntrackedParameter< double >("minNEMF",0.);
87  _max_NEMF = iConfig.getUntrackedParameter< double >("maxNEMF",0.99);
88  _min_CEMF = iConfig.getUntrackedParameter< double >("minCEMF",0.);
89  _max_CEMF = iConfig.getUntrackedParameter< double >("maxCEMF",0.99);
90  //Paths
91  pathFilter_ = iConfig.getUntrackedParameter<vector<std::string> >("pathFilter");
92  pathRejectKeyword_ = iConfig.getUntrackedParameter<vector<std::string> >("pathRejectKeyword");
93  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet> >("pathPairs");
94  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
95  custompathnamepairs_.push_back(make_pair(
96  pathconf->getParameter<std::string>("pathname"),
97  pathconf->getParameter<std::string>("denompathname")
98  ));
99  }
100 }
101 
102 //------------------------------------------------------------------------//
104 {
105  //
106  // do anything here that needs to be done at desctruction time
107  // (e.g. close files, deallocate resources etc.)
108  delete jetID;
109 }
110 
111 //------------------------------------------------------------------------//
112 void
114 {
115  //---------- triggerResults ----------
117  if(!triggerResults_.isValid()) {
119  if(!triggerResults_.isValid()) {
120  edm::LogInfo("JetMETHLTOfflineSource") << "TriggerResults not found, "
121  "skipping event";
122  return;
123  }
124  }
125 
126  //---------- triggerResults ----------
128 
129  //---------- triggerSummary ----------
131  if(!triggerObj_.isValid()) {
133  if(!triggerObj_.isValid()) {
134  edm::LogInfo("JetMETHLTOfflineSource") << "TriggerEvent not found, "
135  "skipping event";
136  return;
137  }
138  }
139 
140  //------------ Offline Objects -------
142  if(!calojetColl_.isValid()) return;
143  calojet = *calojetColl_;
144  //std::stable_sort( calojet.begin(), calojet.end(), PtSorter() );
145 
147  if(!pfjetColl_.isValid()) return;
148  pfjet = *pfjetColl_;
149  //std::stable_sort( pfjet.begin(), pfjet.end(), PtSorter() );
150 
152  if(!calometColl_.isValid()) return;
153 
155  if(!pfmetColl_.isValid()) return;
156 
157  //---------- Event counting (DEBUG) ----------
158  if(verbose_ && iEvent.id().event()%10000==0)
159  cout<<"Run = "<<iEvent.id().run()<<", LS = "<<iEvent.luminosityBlock()<<", Event = "<<iEvent.id().event()<<endl;
160 
161  //Define on-the-fly correction Jet
162  for(int i=0; i<2; i++){
163  CaloJetPx[i] = 0.;
164  CaloJetPy[i] = 0.;
165  CaloJetPt[i] = 0.;
166  CaloJetEta[i] = 0.;
167  CaloJetPhi[i] = 0.;
168  CaloJetEMF[i] = 0.;
169  CaloJetfHPD[i] = 0.;
170  CaloJetn90[i] = 0.;
171  PFJetPx[i] = 0.;
172  PFJetPy[i] = 0.;
173  PFJetPt[i] = 0.;
174  PFJetEta[i] = 0.;
175  PFJetPhi[i] = 0.;
176  PFJetNHEF[i] = 0.;
177  PFJetCHEF[i] = 0.;
178  PFJetNEMF[i] = 0.;
179  PFJetCEMF[i] = 0.;
180  }
181 
182  //---------- CaloJet Correction (on-the-fly) ----------
183  edm::Handle<reco::JetCorrector> calocorrector;
184  iEvent.getByToken(CaloJetCorToken_, calocorrector);
185  CaloJetCollection::const_iterator calojet_ = calojet.begin();
186  for(; calojet_ != calojet.end(); ++calojet_){
187  double scale = calocorrector->correction(*calojet_);
188  jetID->calculate(iEvent, *calojet_);
189 
190  if(scale*calojet_->pt()>CaloJetPt[0]){
191  CaloJetPt[1] = CaloJetPt[0];
192  CaloJetPx[1] = CaloJetPx[0];
193  CaloJetPy[1] = CaloJetPy[0];
194  CaloJetEta[1] = CaloJetEta[0];
195  CaloJetPhi[1] = CaloJetPhi[0];
196  CaloJetEMF[1] = CaloJetEMF[0];
197  CaloJetfHPD[1] = CaloJetfHPD[0];
198  CaloJetn90[1] = CaloJetn90[0];
199  //
200  CaloJetPt[0] = scale*calojet_->pt();
201  CaloJetPx[0] = scale*calojet_->px();
202  CaloJetPy[0] = scale*calojet_->py();
203  CaloJetEta[0] = calojet_->eta();
204  CaloJetPhi[0] = calojet_->phi();
205  CaloJetEMF[0] = calojet_->emEnergyFraction();
206  CaloJetfHPD[0] = jetID->fHPD();
207  CaloJetn90[0] = jetID->n90Hits();
208  }
209  else if(scale*calojet_->pt()<CaloJetPt[0] && scale*calojet_->pt()>CaloJetPt[1] ){
210  CaloJetPt[1] = scale*calojet_->pt();
211  CaloJetPx[1] = scale*calojet_->px();
212  CaloJetPy[1] = scale*calojet_->py();
213  CaloJetEta[1] = calojet_->eta();
214  CaloJetPhi[1] = calojet_->phi();
215  CaloJetEMF[1] = calojet_->emEnergyFraction();
216  CaloJetfHPD[1] = jetID->fHPD();
217  CaloJetn90[1] = jetID->n90Hits();
218  }
219  else{}
220  }
221 
222  //---------- PFJet Correction (on-the-fly) ----------
223  pfMHTx_All = 0.;
224  pfMHTy_All = 0.;
226  iEvent.getByToken(PFJetCorToken_, pfcorrector);
227  PFJetCollection::const_iterator pfjet_ = pfjet.begin();
228  for(; pfjet_ != pfjet.end(); ++pfjet_){
229  double scale = pfcorrector->correction(*pfjet_);
230  pfMHTx_All = pfMHTx_All + scale*pfjet_->px();
231  pfMHTy_All = pfMHTy_All + scale*pfjet_->py();
232  if(scale*pfjet_->pt()>PFJetPt[0]){
233  PFJetPt[1] = PFJetPt[0];
234  PFJetPx[1] = PFJetPx[0];
235  PFJetPy[1] = PFJetPy[0];
236  PFJetEta[1] = PFJetEta[0];
237  PFJetPhi[1] = PFJetPhi[0];
238  PFJetNHEF[1] = PFJetNHEF[0];
239  PFJetCHEF[1] = PFJetCHEF[0];
240  PFJetNEMF[1] = PFJetNEMF[0];
241  PFJetCEMF[1] = PFJetCEMF[0];
242  //
243  PFJetPt[0] = scale*pfjet_->pt();
244  PFJetPx[0] = scale*pfjet_->px();
245  PFJetPy[0] = scale*pfjet_->py();
246  PFJetEta[0] = pfjet_->eta();
247  PFJetPhi[0] = pfjet_->phi();
248  PFJetNHEF[0] = pfjet_->neutralHadronEnergyFraction();
249  PFJetCHEF[0] = pfjet_->chargedHadronEnergyFraction();
250  PFJetNEMF[0] = pfjet_->neutralEmEnergyFraction();
251  PFJetCEMF[0] = pfjet_->chargedEmEnergyFraction();
252  }
253  else if(scale*pfjet_->pt()<PFJetPt[0] && scale*pfjet_->pt()>PFJetPt[1] ){
254  PFJetPt[1] = scale*pfjet_->pt();
255  PFJetPx[1] = scale*pfjet_->px();
256  PFJetPy[1] = scale*pfjet_->py();
257  PFJetEta[1] = pfjet_->eta();
258  PFJetPhi[1] = pfjet_->phi();
259  PFJetNHEF[1] = pfjet_->neutralHadronEnergyFraction();
260  PFJetCHEF[1] = pfjet_->chargedHadronEnergyFraction();
261  PFJetNEMF[1] = pfjet_->neutralEmEnergyFraction();
262  PFJetCEMF[1] = pfjet_->chargedEmEnergyFraction();
263  }
264  else{}
265  }
266 
267  if(verbose_){
268  for(int i = 0; i<2; i++){
269  cout<<"CaloJet-0: "<<CaloJetPt[i]<<", Eta = "<<CaloJetEta[i]<<", Phi = "<<CaloJetPhi[i]<<endl;
270  cout<<"fHPD = "<<CaloJetfHPD[0]<<", n90 = "<<CaloJetn90[0]<<endl;
271  }
272  for(int i = 0; i<2; i++){
273  cout<<"PFJet-0: "<<PFJetPt[i]<<", Eta = "<<PFJetEta[i]<<", Phi = "<<PFJetPhi[i]<<endl;
274  }
275  }
276 
277  //---------- RUN ----------
278  fillMEforMonTriggerSummary(iEvent, iSetup);
279  if(plotAll_) fillMEforMonAllTrigger(iEvent, iSetup);
280  if(plotEff_) fillMEforEffAllTrigger(iEvent,iSetup);
282 }
283 
284 //------------------------------------------------------------------------//
285 // Trigger summary for all paths
286 void
288 {
289  bool muTrig = false;
290 
291  for(size_t i=0;i<MuonTrigPaths_.size();++i){
292  const unsigned int nPath(hltConfig_.size());
293  for (unsigned int j=0; j!=nPath; ++j) {
295  if(pathname.find(MuonTrigPaths_[i]) != std::string::npos){
296  if(isHLTPathAccepted(pathname)){
297  muTrig = true;
298  if(verbose_) cout<<"fillMEforMonTriggerSummary: Muon Match"<<endl;
299  }
300  }
301  if(muTrig) break;
302  }
303  if(muTrig) break;
304  }
305 
306  bool mbTrig = false;
307  for(size_t i=0;i<MBTrigPaths_.size();++i){
308  const unsigned int nPath(hltConfig_.size());
309  for (unsigned int j=0; j!=nPath; ++j) {
311  if(pathname.find(MBTrigPaths_[i]) != std::string::npos){
312  if(isHLTPathAccepted(pathname)){
313  mbTrig = true;
314  if(verbose_) cout<<"fillMEforMonTriggerSummary: MinBias Match"<<endl;
315  }
316  }
317  if(mbTrig) break;
318  }
319  if(mbTrig) break;
320  }
321 
322  PathInfoCollection::iterator v = hltPathsAll_.begin();
323  for(; v!= hltPathsAll_.end(); ++v ){
324  bool trigFirst= false;
325  double binV = TriggerPosition(v->getPath());
326  if(isHLTPathAccepted(v->getPath())) trigFirst = true;
327  if(!trigFirst)continue;
328  if(trigFirst){
329  rate_All->Fill(binV);
330  correlation_All->Fill(binV,binV);
331  if(muTrig && runStandalone_){
332  rate_AllWrtMu->Fill(binV);
333  correlation_AllWrtMu->Fill(binV,binV);
334  }
335  if(mbTrig && runStandalone_){
336  rate_AllWrtMB->Fill(binV);
337  correlation_AllWrtMB->Fill(binV,binV);
338  }
339  }
340  for(PathInfoCollection::iterator w = v+1; w!= hltPathsAll_.end(); ++w ){
341  bool trigSec = false;
342  double binW = TriggerPosition(w->getPath());
343  if(isHLTPathAccepted(w->getPath()))trigSec = true;
344  if(trigSec && trigFirst){
345  correlation_All->Fill(binV,binW);
346  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binV,binW);
347  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binV,binW);
348  }
349  if(!trigSec && trigFirst){
350  correlation_All->Fill(binW,binV);
351  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binW,binV);
352  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binW,binV);
353  }
354  }
355  }
356 
357  //Vertex
359  iEvent.getByToken (vertexToken,Vtx);
360  int vtxcnt=0;
361  for (VertexCollection::const_iterator itv=Vtx->begin(); itv!=Vtx->end(); itv++){
362  //if(vtxcnt>=20) break;
363  PVZ->Fill(itv->z());
364  //chi2vtx[vtxcnt] = itv->chi2();
365  //ndofvtx[vtxcnt] = itv->ndof();
366  //ntrkvtx[vtxcnt] = itv->tracksSize();
367  vtxcnt++;
368  }
369  NVertices->Fill(vtxcnt);
370 }
371 
372 //------------------------------------------------------------------------//
373 void
375 {
376  if(!triggerResults_.isValid()) return;
377 
378  //
379  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
380  unsigned index = triggerNames_.triggerIndex(v->getPath());
381  if (index < triggerNames_.size() ){
382  v->getMEhisto_TriggerSummary()->Fill(0.);
383  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
384  const int l1Index = triggerObj_->filterIndex(l1Tag);
385  bool l1found = false;
386  if(l1Index < triggerObj_->sizeFilters() ) l1found = true;
387  if(!l1found)v->getMEhisto_TriggerSummary()->Fill(1.);
388  if(!l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(2.);
389  if(!l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(3.);
390  if(l1found)v->getMEhisto_TriggerSummary()->Fill(4.);
391  if(l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(5.);
392  if(l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(6.);
393  if(!(triggerResults_->accept(index)) && l1found){
394  //cout<<v->getTriggerType()<<endl;
395  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && (calojetColl_.isValid()) && calojet.size()){
396  CaloJetCollection::const_iterator jet = calojet.begin();
397  v->getMEhisto_JetPt()->Fill(jet->pt());
398  v->getMEhisto_EtavsPt()->Fill(jet->eta(),jet->pt());
399  v->getMEhisto_PhivsPt()->Fill(jet->phi(),jet->pt());
400  }
401  // single jet trigger is not fired
402 
403  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojetColl_.isValid() && calojet.size()){
404  v->getMEhisto_JetSize()->Fill(calojet.size());
405  if (calojet.size()>=2){
406  CaloJetCollection::const_iterator jet = calojet.begin();
407  CaloJetCollection::const_iterator jet2= calojet.begin(); jet2++;
408  double jet3pt = 0.;
409  if(calojet.size()>2){
410  CaloJetCollection::const_iterator jet3 = jet2++;
411  jet3pt = jet3->pt();
412  }
413  v->getMEhisto_Pt12()->Fill((jet->pt()+jet2->pt())/2.);
414  v->getMEhisto_Eta12()->Fill((jet->eta()+jet2->eta())/2.);
415  v->getMEhisto_Phi12()->Fill(deltaPhi(jet->phi(),jet2->phi()));
416  v->getMEhisto_Pt3()->Fill(jet3pt);
417  v->getMEhisto_Pt12Pt3()->Fill((jet->pt()+jet2->pt())/2., jet3pt);
418  v->getMEhisto_Pt12Phi12()->Fill((jet->pt()+jet2->pt())/2., deltaPhi(jet->phi(),jet2->phi()));
419  }
420  }// di jet trigger is not fired
421 
422  if(((v->getTriggerType().compare("MET_Trigger") == 0)|| (v->getTriggerType().compare("TET_Trigger") == 0)) && calometColl_.isValid() ){
423  const CaloMETCollection *calometcol = calometColl_.product();
424  const CaloMET met = calometcol->front();
425  v->getMEhisto_JetPt()->Fill(met.pt());
426  }//MET trigger is not fired
427  } // L1 is fired
428  }//
429  }// trigger not fired
430 }
431 
432 //------------------------------------------------------------------------//
433 void
435 {
436  if(!triggerResults_.isValid()) return;
437 
438  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
439  PathInfoCollection::iterator v = hltPathsAll_.begin();
440  for(; v!= hltPathsAll_.end(); ++v ){
441  if(isHLTPathAccepted(v->getPath())==false) continue;
442 
443  //New jet collection (after apply JEC)
444  std::vector<double>jetPtVec;
445  std::vector<double>jetPhiVec;
446  std::vector<double>jetEtaVec;
447  std::vector<double>jetPxVec;
448  std::vector<double>jetPyVec;
449  std::vector<double>hltPtVec;
450  std::vector<double>hltPhiVec;
451  std::vector<double>hltEtaVec;
452  std::vector<double>hltPxVec;
453  std::vector<double>hltPyVec;
454 
455  //This will be used to find out punch through trigger
456  //bool fillL1HLT = false;
457 
458  //L1 and HLT indices
459  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
460  const int l1Index = triggerObj_->filterIndex(l1Tag);
461  edm::InputTag hltTag(v->getLabel(),"",processname_);
462  const int hltIndex = triggerObj_->filterIndex(hltTag);
463  //bool l1TrigBool = false;
464  bool hltTrigBool = false;
465  bool diJetFire = false;
466  int jetsize = 0;
467 
468  if ( l1Index >= triggerObj_->sizeFilters() ) {
469  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
470  }
471  else {
472  //l1TrigBool = true;
473  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
474  //
475  if(v->getObjectType() == trigger::TriggerJet
476  && v->getTriggerType().compare("SingleJet_Trigger") == 0)
477  v->getMEhisto_N_L1()->Fill(kl1.size());
478  //
479  trigger::Keys::const_iterator ki = kl1.begin();
480  for(; ki != kl1.end(); ++ki){
481  double l1TrigEta = -100;
482  double l1TrigPhi = -100;
483  //
484  if(v->getObjectType() == trigger::TriggerJet){
485  l1TrigEta = toc[*ki].eta();
486  l1TrigPhi = toc[*ki].phi();
487  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
488  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
489  if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
490  if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
491  if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
492  v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
493  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
494  v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
495  }
496  }
497  if(v->getObjectType() == trigger::TriggerMET ||
498  v->getObjectType() == trigger::TriggerTET){
499  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
500  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
501  }
502 
503  //-----------------------------------------------
504  if ( hltIndex >= triggerObj_->sizeFilters() ) {
505  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
506  }
507  else {
508  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
509  if(v->getObjectType() == trigger::TriggerJet
510  && ki == kl1.begin()
511  && v->getTriggerType().compare("SingleJet_Trigger") == 0)
512  v->getMEhisto_N_HLT()->Fill(khlt.size());
513  //
514  trigger::Keys::const_iterator kj = khlt.begin();
515  //Define hltTrigBool
516  for(;kj != khlt.end(); ++kj){
517  if(v->getObjectType() == trigger::TriggerJet){
518  double hltTrigEta = -100;
519  double hltTrigPhi = -100;
520  hltTrigEta = toc[*kj].eta();
521  hltTrigPhi = toc[*kj].phi();
522  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4
523  && (v->getTriggerType().compare("DiJet_Trigger") == 0))
524  hltTrigBool = true;
525  }
526  }
527  //
528  kj = khlt.begin();
529  for(;kj != khlt.end(); ++kj){
530  double hltTrigEta = -100.;
531  double hltTrigPhi = -100.;
532  //fillL1HLT = true;
533  //MET Triggers
534  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
535  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
536  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
537  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
538  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
539  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
540  v->getMEhisto_PhiResolution_L1HLT()->Fill(toc[*ki].phi()-toc[*kj].phi());
541  }
542  //Jet Triggers
543  if(v->getObjectType() == trigger::TriggerJet){
544  hltTrigEta = toc[*kj].eta();
545  hltTrigPhi = toc[*kj].phi();
546  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4){
547  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
548  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
549  v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
550  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
551  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
552  v->getMEhisto_EtaResolution_L1HLT()->Fill(toc[*ki].eta()-toc[*kj].eta());
553  v->getMEhisto_PhiResolution_L1HLT()->Fill(toc[*ki].phi()-toc[*kj].phi());
554  }
555  }
556  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 )
557  || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)) && !diJetFire){
558  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
559  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
560  if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
561  if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
562  if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
563  v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
564  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
565  v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
566  }
567 
568  //Calojet
569  if(calojetColl_.isValid()
570  && (v->getObjectType() == trigger::TriggerJet)
571  && (v->getPath().compare("PFJet") == 0)){
572  //CaloJetCollection::const_iterator jet = calojet.begin();
573  //for(; jet != calojet.end(); ++jet) {
574  for(int iCalo=0; iCalo<2; iCalo++){
575  if(deltaR(hltTrigEta, hltTrigPhi, CaloJetEta[iCalo], CaloJetPhi[iCalo]) < 0.4){
576  jetsize++;
577  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
578  v->getMEhisto_Pt()->Fill(CaloJetPt[iCalo]);
579  if (isBarrel(CaloJetEta[iCalo])) v->getMEhisto_PtBarrel()->Fill(CaloJetPt[iCalo]);
580  if (isEndCap(CaloJetEta[iCalo])) v->getMEhisto_PtEndcap()->Fill(CaloJetPt[iCalo]);
581  if (isForward(CaloJetEta[iCalo])) v->getMEhisto_PtForward()->Fill(CaloJetPt[iCalo]);
582  //
583  v->getMEhisto_Eta()->Fill(CaloJetEta[iCalo]);
584  v->getMEhisto_Phi()->Fill(CaloJetPhi[iCalo]);
585  v->getMEhisto_EtaPhi()->Fill(CaloJetEta[iCalo],CaloJetPhi[iCalo]);
586  //
587  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),CaloJetPt[iCalo]);
588  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),CaloJetEta[iCalo]);
589  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),CaloJetPhi[iCalo]);
590  //
591  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-CaloJetPt[iCalo])/(toc[*kj].pt()));
592  v->getMEhisto_EtaResolution_HLTRecObj()->Fill(toc[*kj].eta()-CaloJetEta[iCalo]);
593  v->getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-CaloJetPhi[iCalo]);
594  }
595 
596  //-------------------------------------------------------
597  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
598  jetPhiVec.push_back(CaloJetPhi[iCalo]);
599  jetPtVec.push_back(CaloJetPt[iCalo]);
600  jetEtaVec.push_back(CaloJetEta[iCalo]);
601  jetPxVec.push_back(CaloJetPx[iCalo]);
602  jetPyVec.push_back(CaloJetPy[iCalo]);
603  //
604  hltPhiVec.push_back(toc[*kj].phi());
605  hltPtVec.push_back(toc[*kj].pt());
606  hltEtaVec.push_back(toc[*kj].eta());
607  hltPxVec.push_back(toc[*kj].px());
608  hltPyVec.push_back(toc[*kj].py());
609  }
610  }// matching jet
611  }// Jet Loop
612  }// valid calojet collection, with calojet trigger
613 
614  //PFJet trigger
615  if(pfjetColl_.isValid()
616  && (v->getObjectType() == trigger::TriggerJet)
617  && (v->getPath().compare("PFJet") != 0)){
618  //PFJetCollection::const_iterator jet = pfjet.begin();
619  //for(; jet != pfjet.end(); ++jet){
620  for(int iPF=0; iPF<2; iPF++){
621  if(deltaR(hltTrigEta, hltTrigPhi, PFJetEta[iPF], PFJetPhi[iPF]) < 0.4){
622  jetsize++;
623  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
624  v->getMEhisto_Pt()->Fill(PFJetPt[iPF]);
625  if (isBarrel(PFJetEta[iPF])) v->getMEhisto_PtBarrel()->Fill(PFJetPt[iPF]);
626  if (isEndCap(PFJetEta[iPF])) v->getMEhisto_PtEndcap()->Fill(PFJetPt[iPF]);
627  if (isForward(PFJetEta[iPF])) v->getMEhisto_PtForward()->Fill(PFJetPt[iPF]);
628  //
629  v->getMEhisto_Eta()->Fill(PFJetEta[iPF]);
630  v->getMEhisto_Phi()->Fill(PFJetPhi[iPF]);
631  v->getMEhisto_EtaPhi()->Fill(PFJetEta[iPF],PFJetPhi[iPF]);
632  //
633  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),PFJetPt[iPF]);
634  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),PFJetEta[iPF]);
635  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),PFJetPhi[iPF]);
636  //
637  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-PFJetPt[iPF])/(toc[*kj].pt()));
638  v->getMEhisto_EtaResolution_HLTRecObj()->Fill(toc[*kj].eta()-PFJetEta[iPF]);
639  v->getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-PFJetPhi[iPF]);
640  }
641 
642  //-------------------------------------------------------
643  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
644  jetPhiVec.push_back(PFJetPhi[iPF]);
645  jetPtVec.push_back(PFJetPt[iPF]);
646  jetEtaVec.push_back(PFJetEta[iPF]);
647  jetPxVec.push_back(PFJetPx[iPF]);
648  jetPyVec.push_back(PFJetPy[iPF]);
649  //
650  hltPhiVec.push_back(toc[*kj].phi());
651  hltPtVec.push_back(toc[*kj].pt());
652  hltEtaVec.push_back(toc[*kj].eta());
653  hltPxVec.push_back(toc[*kj].px());
654  hltPyVec.push_back(toc[*kj].py());
655  }
656  }// matching jet
657  }//PFJet loop
658  }//valid pfjet collection, with pfjet trigger
659  //
660  }// hlt matching with l1
661  }// jet trigger
662 
663  //------------------------------------------------------
664  if(calometColl_.isValid()
665  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
666  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
667  const CaloMETCollection *calometcol = calometColl_.product();
668  const CaloMET met = calometcol->front();
669  //
670  v->getMEhisto_Pt()->Fill(met.et());
671  v->getMEhisto_Phi()->Fill(met.phi());
672  //
673  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),met.et());
674  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
675  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-met.et())/(toc[*kj].et()));
676  v->getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-met.phi());
677  }
678 
679  //--------------------------------------------------------
680  if(pfmetColl_.isValid()
681  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
682  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
683  const PFMETCollection *pfmetcol = pfmetColl_.product();
684  const PFMET pfmet = pfmetcol->front();
685  //
686  v->getMEhisto_Pt()->Fill(pfmet.et());
687  v->getMEhisto_Phi()->Fill(pfmet.phi());
688  //
689  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),pfmet.et());
690  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),pfmet.phi());
691  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-pfmet.et())/(toc[*kj].et()));
692  v->getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-pfmet.phi());
693  }
694  }//Loop over HLT trigger candidates
695  if((v->getTriggerType().compare("DiJet_Trigger") == 0)) diJetFire = true;
696  }// Valid hlt trigger object
697  }// Loop over L1 objects
698  }// Valid L1 trigger object
699  v->getMEhisto_N()->Fill(jetsize);
700 
701  //--------------------------------------------------------
702  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1){
703  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
704  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
705  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
706  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
707  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
708  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
709  v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
710  v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
711  v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
712  //
713  v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
714  v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
715  v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
716  }
717 
718  }
719 }
720 
721 //------------------------------------------------------------------------//
722 void
724 {
725  if (!triggerResults_.isValid()) return;
726 
727  int num = -1;
728  int denom = -1;
729  bool denompassed = false;
730  bool numpassed = false;
731  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
732 
733  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
734  num++;
735  denom++;
736  denompassed = false;
737  numpassed = false;
738 
739  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
740  unsigned indexDenom = triggerNames_.triggerIndex(v->getDenomPath());
741 
742  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum)) numpassed = true;
743  if(indexDenom < triggerNames_.size() && triggerResults_->accept(indexDenom)) denompassed = true;
744 
745  if(denompassed==false) continue;
746 
747  //if(numpassed==true){
748  edm::InputTag hltTag(v->getLabel(),"",processname_);
749  const int hltIndex = triggerObj_->filterIndex(hltTag);
750  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
751  const int l1Index = triggerObj_->filterIndex(l1Tag);
752  //}
753 
754  //----------------------------------------------------------------------
755  //double pTcut = 0;
756  double trigLowpTcut = 0;
757  double trigMedpTcut = 0;
758  double trigHighpTcut = 0;
759  double trigLowpTcutFwd = 0;
760  double trigMedpTcutFwd = 0;
761  double trigHighpTcutFwd = 0;
762  //
763  //double pTPFcut = 0 ;
764  double trigLowpTPFcut = 0;
765  double trigMedpTPFcut = 0;
766  double trigHighpTPFcut = 0;
767  double trigLowpTPFcutFwd = 0;
768  double trigMedpTPFcutFwd = 0;
769  double trigHighpTPFcutFwd = 0;
770  //
771  //cout<<"pre-path" << v->getPath()<<endl;
772  size_t jetstrfound = v->getPath().find("Jet");
773  //size_t censtrfound = v->getPath().find("Central"); //shoouldn't be needed?
774  string tpath = v->getPath();
775  string jetTrigVal;
776  float jetVal = 0.;
777  //
778  if(jetstrfound != string::npos){// && ustrfound != string::npos ){
779  //cout<<v->getPath()<<endl;
780  for(int trig = int(jetstrfound)+3; trig < int(jetstrfound)+7; trig++){// int(ustrfound); trig++){
781  if(!isdigit(tpath[trig])) break;
782  jetTrigVal+=tpath[trig];
783  }
784  char *cjetTrigVal = (char*)jetTrigVal.c_str();
785  jetVal=atof(cjetTrigVal);
786  //
787  if(jetVal>0.){
788  if(jetVal<50.){
789  //pTcut = jetVal / 2.;
790  trigMedpTcut = jetVal + 5.;
791  trigHighpTcut = jetVal + 10.;
792  //
793  trigLowpTcutFwd = jetVal + 9.;
794  trigMedpTcutFwd = jetVal + 15.;
795  trigHighpTcutFwd = jetVal + 21.;
796  }
797  else{
798  //pTcut = jetVal - 20. ;
799  trigMedpTcut = jetVal + 2.;
800  trigHighpTcut = jetVal + 60.;
801  //
802  trigLowpTcutFwd = jetVal + 22.;
803  trigMedpTcutFwd = jetVal + 25.;
804  trigHighpTcutFwd = jetVal + 110.;
805  }
806  trigLowpTcut = jetVal;
807  }
808  //
809  if(jetVal>0.){
810  if(jetVal<50.){
811  //pTPFcut = jetVal ;
812  trigMedpTPFcut = jetVal + 20.;
813  trigHighpTPFcut = jetVal + 40.;
814  //
815  trigLowpTPFcutFwd = jetVal + 60.;
816  trigMedpTPFcutFwd = jetVal + 80.;
817  trigHighpTPFcutFwd = jetVal + 100.;
818  }
819  else{
820  //pTPFcut = jetVal ;
821  trigMedpTPFcut = jetVal + 40.;
822  trigHighpTPFcut = jetVal + 140.;
823  //
824  trigLowpTPFcutFwd = jetVal + 110.;
825  trigMedpTPFcutFwd = jetVal + 130.;
826  trigHighpTPFcutFwd = jetVal + 190.;
827  }
828  trigLowpTPFcut = jetVal;
829  }
830  }
831  //----------------------------------------------------------------------
832 
833  //CaloJet paths
834  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloJet -------------------" << std::endl;
835  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
836  //cout<<" - CaloJet "<<endl;
837  //&& (v->getPath().find("HLT_PFJet")==std::string::npos)
838  //&& (v->getPath().find("HLT_DiPFJet")==std::string::npos)){
839  bool jetIDbool = false;
840  double leadjpt = CaloJetPt[0];
841  double leadjeta = CaloJetEta[0];
842  double leadjphi = CaloJetPhi[0];
843  //double ljemf = CaloJetEMF[0];
844  double ljfhpd = CaloJetfHPD[0];
845  double ljn90 = CaloJetn90[0];
846  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size()){ //this line stops the central jets
847  if( (ljfhpd < _fHPD) && (ljn90 > _n90Hits )){
848  if(verbose_) cout<<"Passed CaloJet ID -------------------" << endl;
849  jetIDbool = true;
850  //Denominator fill
851  v->getMEhisto_DenominatorPt()->Fill(leadjpt);
852  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPtBarrel()->Fill(leadjpt);
853  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPtEndcap()->Fill(leadjpt);
854  if (isForward(leadjeta)) v->getMEhisto_DenominatorPtForward()->Fill(leadjpt);
855  v->getMEhisto_DenominatorEta()->Fill(leadjeta);
856  v->getMEhisto_DenominatorPhi()->Fill(leadjphi);
857  v->getMEhisto_DenominatorEtaPhi()->Fill(leadjeta,leadjphi);
858  if (isBarrel(leadjeta)){
859  v->getMEhisto_DenominatorEtaBarrel()->Fill(leadjeta);
860  v->getMEhisto_DenominatorPhiBarrel()->Fill(leadjphi);
861  }
862  if (isEndCap(leadjeta)){
863  v->getMEhisto_DenominatorEtaEndcap()->Fill(leadjeta);
864  v->getMEhisto_DenominatorPhiEndcap()->Fill(leadjphi);
865  }
866  if (isForward(leadjeta)){
867  v->getMEhisto_DenominatorEtaForward()->Fill(leadjeta);
868  v->getMEhisto_DenominatorPhiForward()->Fill(leadjphi);
869  }
870  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
871  v->getMEhisto_DenominatorEta_LowpTcut()->Fill(leadjeta);
872  v->getMEhisto_DenominatorPhi_LowpTcut()->Fill(leadjphi);
873  v->getMEhisto_DenominatorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
874  }
875  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
876  v->getMEhisto_DenominatorEta_MedpTcut()->Fill(leadjeta);
877  v->getMEhisto_DenominatorPhi_MedpTcut()->Fill(leadjphi);
878  v->getMEhisto_DenominatorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
879  }
880  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
881  v->getMEhisto_DenominatorEta_HighpTcut()->Fill(leadjeta);
882  v->getMEhisto_DenominatorPhi_HighpTcut()->Fill(leadjphi);
883  v->getMEhisto_DenominatorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
884  }
885 
886  //Numerator fill
887  if(numpassed){
888  //
889  double dRmin = 99999.;
890  double dPhimin = 9999.;
891  if(v->getPath().find("L1") != std::string::npos){
892  if ( l1Index >= triggerObj_->sizeFilters() ) {
893  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
894  }
895  else {
896  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
897  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
898  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
899  if(dR < dRmin){
900  dRmin = dR;
901  }
902  }
903  }
904  }
905  else{
906  if ( hltIndex >= triggerObj_->sizeFilters() ) {
907  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
908  }
909  else {
910  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
911  trigger::Keys::const_iterator kj = khlt.begin();
912  for(;kj != khlt.end(); ++kj){
913  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(),
914  leadjeta, leadjphi);
915  if(dR < dRmin){
916  dRmin = dR;
917  }
918  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
919  if(dPhi < dPhimin){
920  dPhimin = dPhi;
921  }
922  }
923  //v->getMEhisto_DeltaPhi()->Fill(dPhimin);
924  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
925  v->getMEhisto_DeltaR()->Fill(dRmin);
926  }
927  }
928  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
929  v->getMEhisto_NumeratorPt()->Fill(leadjpt);
930  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPtBarrel()->Fill(leadjpt);
931  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPtEndcap()->Fill(leadjpt);
932  if (isForward(leadjeta)) v->getMEhisto_NumeratorPtForward()->Fill(leadjpt);
933  v->getMEhisto_NumeratorEta()->Fill(leadjeta);
934  v->getMEhisto_NumeratorPhi()->Fill(leadjphi);
935  v->getMEhisto_NumeratorEtaPhi()->Fill(leadjeta,leadjphi);
936  if (isBarrel(leadjeta)){
937  v->getMEhisto_NumeratorEtaBarrel()->Fill(leadjeta);
938  v->getMEhisto_NumeratorPhiBarrel()->Fill(leadjphi);
939  }
940  if (isEndCap(leadjeta)){
941  v->getMEhisto_NumeratorEtaEndcap()->Fill(leadjeta);
942  v->getMEhisto_NumeratorPhiEndcap()->Fill(leadjphi);
943  }
944  if (isForward(leadjeta)){
945  v->getMEhisto_NumeratorEtaForward()->Fill(leadjeta);
946  v->getMEhisto_NumeratorPhiForward()->Fill(leadjphi);
947  }
948  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
949  v->getMEhisto_NumeratorEta_LowpTcut()->Fill(leadjeta);
950  v->getMEhisto_NumeratorPhi_LowpTcut()->Fill(leadjphi);
951  v->getMEhisto_NumeratorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
952  }
953  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
954  v->getMEhisto_NumeratorEta_MedpTcut()->Fill(leadjeta);
955  v->getMEhisto_NumeratorPhi_MedpTcut()->Fill(leadjphi);
956  v->getMEhisto_NumeratorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
957  }
958  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
959  v->getMEhisto_NumeratorEta_HighpTcut()->Fill(leadjeta);
960  v->getMEhisto_NumeratorPhi_HighpTcut()->Fill(leadjphi);
961  v->getMEhisto_NumeratorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
962  }
963  }
964  }//numpassed
965  }//CalojetID filter
966  }
967 
968  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1){
969  if(((CaloJetEMF[1] > _fEMF || std::abs(CaloJetEta[1]) > _feta) &&
970  CaloJetfHPD[0] < _fHPD && CaloJetn90[0] > _n90Hits)){
971  v->getMEhisto_DenominatorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
972  v->getMEhisto_DenominatorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
973  if(numpassed==true){
974  v->getMEhisto_NumeratorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
975  v->getMEhisto_NumeratorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
976  }
977  }
978  }
979  }// Jet trigger and valid jet collection
980 
981  //PFJet paths
982  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFJet -------------------" << std::endl;
983  if(pfjetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
984  //cout<<" - PFJet "<<endl;
985  //&& (v->getPath().find("HLT_PFJet")!=std::string::npos)
986  //&& (v->getPath().find("HLT_DiPFJet")!=std::string::npos)){
987  bool jetIDbool = false;
988  double leadjpt = PFJetPt[0];
989  double leadjeta = PFJetEta[0];
990  double leadjphi = PFJetPhi[0];
991  double ljNHEF = PFJetNHEF[0];
992  double ljCHEF = PFJetCHEF[0];
993  double ljNEMF = PFJetNEMF[0];
994  double ljCEMF = PFJetCEMF[0];
995  //double sleadjpt = PFJetPt[1];
996  //double sleadjeta = PFJetEta[1];
997  //double sleadjphi = PFJetPhi[1];
998  double sljNHEF = PFJetNHEF[1];
999  double sljCHEF = PFJetCHEF[1];
1000  double sljNEMF = PFJetNEMF[1];
1001  double sljCEMF = PFJetCEMF[1];
1002  //
1003  double pfMHTx = pfMHTx_All;
1004  double pfMHTy = pfMHTy_All;
1005  //
1006  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && pfjet.size()){ //this line stops the central jets
1007 
1008  //======get pfmht
1009  _pfMHT = sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
1010  v->getMEhisto_DenominatorPFMHT()->Fill(_pfMHT);
1011 
1012  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1013  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1014  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1015  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF){
1016  if(verbose_) cout<<"Passed PFJet ID -------------------" << endl;
1017  jetIDbool = true;
1018  v->getMEhisto_DenominatorPFPt()->Fill(leadjpt);
1019  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPFPtBarrel()->Fill(leadjpt);
1020  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPFPtEndcap()->Fill(leadjpt);
1021  if (isForward(leadjeta)) v->getMEhisto_DenominatorPFPtForward()->Fill(leadjpt);
1022  v->getMEhisto_DenominatorPFEta()->Fill(leadjeta);
1023  v->getMEhisto_DenominatorPFPhi()->Fill(leadjphi);
1024  v->getMEhisto_DenominatorPFEtaPhi()->Fill(leadjeta,leadjphi);
1025  if(isBarrel(leadjeta)){
1026  v->getMEhisto_DenominatorPFEtaBarrel()->Fill(leadjeta);
1027  v->getMEhisto_DenominatorPFPhiBarrel()->Fill(leadjphi);
1028  }
1029  if (isEndCap(leadjeta)){
1030  v->getMEhisto_DenominatorPFEtaEndcap()->Fill(leadjeta);
1031  v->getMEhisto_DenominatorPFPhiEndcap()->Fill(leadjphi);
1032  }
1033  if (isForward(leadjeta)){
1034  v->getMEhisto_DenominatorPFEtaForward()->Fill(leadjeta);
1035  v->getMEhisto_DenominatorPFPhiForward()->Fill(leadjphi);
1036  }
1037  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta)) || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1038  v->getMEhisto_DenominatorPFEta_LowpTcut()->Fill(leadjeta);
1039  v->getMEhisto_DenominatorPFPhi_LowpTcut()->Fill(leadjphi);
1040  v->getMEhisto_DenominatorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1041  }
1042  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta)) || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1043  v->getMEhisto_DenominatorPFEta_MedpTcut()->Fill(leadjeta);
1044  v->getMEhisto_DenominatorPFPhi_MedpTcut()->Fill(leadjphi);
1045  v->getMEhisto_DenominatorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1046  }
1047  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta)) || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1048  v->getMEhisto_DenominatorPFEta_HighpTcut()->Fill(leadjeta);
1049  v->getMEhisto_DenominatorPFPhi_HighpTcut()->Fill(leadjphi);
1050  v->getMEhisto_DenominatorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1051  }
1052 
1053  //Numerator fill
1054  if(numpassed){
1055  double dRmin = 99999.;
1056  double dPhimin = 9999.;
1057  if(v->getPath().find("L1") != std::string::npos){
1058  if ( l1Index >= triggerObj_->sizeFilters() ) {
1059  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1060  }
1061  else{
1062  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1063  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
1064  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
1065  if(dR < dRmin){
1066  dRmin = dR;
1067  }
1068  }
1069  }
1070  }
1071  else{
1072  if ( hltIndex >= triggerObj_->sizeFilters() ) {
1073  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1074  }
1075  else{
1076  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1077  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1078  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(), leadjeta, leadjphi);
1079  if(dR < dRmin){
1080  dRmin = dR;
1081  }
1082  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
1083  if(dPhi < dPhimin){
1084  dPhimin = dPhi;
1085  }
1086  }
1087  v->getMEhisto_PFDeltaPhi()->Fill(dPhimin);
1088  v->getMEhisto_PFDeltaR()->Fill(dRmin);
1089  }
1090  }
1091  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
1092  v->getMEhisto_NumeratorPFPt()->Fill(leadjpt);
1093  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPFPtBarrel()->Fill(leadjpt);
1094  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPFPtEndcap()->Fill(leadjpt);
1095  if (isForward(leadjeta)) v->getMEhisto_NumeratorPFPtForward()->Fill(leadjpt);
1096  v->getMEhisto_NumeratorPFEta()->Fill(leadjeta);
1097  v->getMEhisto_NumeratorPFPhi()->Fill(leadjphi);
1098  v->getMEhisto_NumeratorPFEtaPhi()->Fill(leadjeta,leadjphi);
1099  if (isBarrel(leadjeta)){
1100  v->getMEhisto_NumeratorPFEtaBarrel()->Fill(leadjeta);
1101  v->getMEhisto_NumeratorPFPhiBarrel()->Fill(leadjphi);
1102  }
1103  if (isEndCap(leadjeta)){
1104  v->getMEhisto_NumeratorPFEtaEndcap()->Fill(leadjeta);
1105  v->getMEhisto_NumeratorPFPhiEndcap()->Fill(leadjphi);
1106  }
1107  if (isForward(leadjeta)){
1108  v->getMEhisto_NumeratorPFEtaForward()->Fill(leadjeta);
1109  v->getMEhisto_NumeratorPFPhiForward()->Fill(leadjphi);
1110  }
1111  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta))
1112  || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1113  v->getMEhisto_NumeratorPFEta_LowpTcut()->Fill(leadjeta);
1114  v->getMEhisto_NumeratorPFPhi_LowpTcut()->Fill(leadjphi);
1115  v->getMEhisto_NumeratorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1116  }
1117  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta))
1118  || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1119  v->getMEhisto_NumeratorPFEta_MedpTcut()->Fill(leadjeta);
1120  v->getMEhisto_NumeratorPFPhi_MedpTcut()->Fill(leadjphi);
1121  v->getMEhisto_NumeratorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1122  }
1123  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta))
1124  || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1125  v->getMEhisto_NumeratorPFEta_HighpTcut()->Fill(leadjeta);
1126  v->getMEhisto_NumeratorPFPhi_HighpTcut()->Fill(leadjphi);
1127  v->getMEhisto_NumeratorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1128  }
1129  }
1130  }
1131  }
1132  }
1133  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && pfjet.size()>1){
1134  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1135  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1136  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1137  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF
1138  && sljNHEF >= _min_NHEF && sljNHEF <= _max_NHEF
1139  && sljCHEF >= _min_CHEF && sljCHEF <= _max_CHEF
1140  && sljNEMF >= _min_NEMF && sljNEMF <= _max_NEMF
1141  && sljCEMF >= _min_CEMF && sljCEMF <= _max_CEMF ){
1142  v->getMEhisto_DenominatorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1143  v->getMEhisto_DenominatorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1144  if(numpassed){
1145  v->getMEhisto_NumeratorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1146  v->getMEhisto_NumeratorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1147  }
1148  }
1149  }
1150  }// PF Jet trigger and valid jet collection
1151 
1152  //CaloMET path
1153  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloMET -------------------" << std::endl;
1154  if(calometColl_.isValid()
1155  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1156  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
1157  const CaloMETCollection *calometcol = calometColl_.product();
1158  const CaloMET met = calometcol->front();
1159  v->getMEhisto_DenominatorPt()->Fill(met.et());
1160  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1161  if(numpassed){
1162  v->getMEhisto_NumeratorPt()->Fill(met.et());
1163  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1164  if(hltIndex >= triggerObj_->sizeFilters()){
1165  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1166  }
1167  else{
1168  double dPhimin = 9999.;//
1169  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1170  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1171  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
1172  if(dPhi < dPhimin){
1173  dPhimin = dPhi;
1174  }
1175  }
1176  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1177  }
1178  }
1179  }
1180 
1181  //PFMET
1182  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFMET -------------------" << std::endl;
1183  if(pfmetColl_.isValid()
1184  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1185  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
1186  const PFMETCollection *pfmetcol = pfmetColl_.product();
1187  const PFMET met = pfmetcol->front();
1188  v->getMEhisto_DenominatorPt()->Fill(met.et());
1189  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1190  if(numpassed){
1191  v->getMEhisto_NumeratorPt()->Fill(met.et());
1192  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1193  if(hltIndex >= triggerObj_->sizeFilters()){
1194  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1195  }
1196  else{
1197  double dPhimin = 9999.;//
1198  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1199  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1200  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
1201  if(dPhi < dPhimin){
1202  dPhimin = dPhi;
1203  }
1204  }
1205  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1206  }
1207  }
1208  }
1209 
1210  /*
1211  if(pfmhtColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
1212  const PFMHTCollection *pfmhtcol = pfmhtColl_.product();
1213  const PFMHT met = pfmhtcol->front();
1214  v->getMEhisto_DenominatorPFPt()->Fill(met.pt());
1215  v->getMEhisto_DenominatorPFPhi()->Fill(met.phi());
1216  }// PFMHT trigger and valid MET collection
1217  */
1218  }// trigger under study
1219 }
1220 
1221 //------------------------------------------------------------------------//
1222 //This method is called before the booking action in the DQMStore is triggered.
1223 void
1225 {
1226 
1227  if(!isSetup_){
1228 
1229  //--- htlConfig_
1230  bool changed(true);
1231  if (!hltConfig_.init(run, c, processname_, changed)) {
1232  LogDebug("HLTJetMETDQMSource") << "HLTConfigProvider failed to initialize.";
1233  }
1234 
1235  /*
1236  Here we select the Single Jet, DiJet, MET trigger. SingleJet and DiJet trigger are saved under same object type "TriggerJet".
1237  We can easily separate out single and di jet trigger later. For the first trigger in the list, denominator trigger is dummy
1238  (empty) whereas for other triggers denom is previous trigger of same type. e.g. SingleJet50 has singleJet30 as denominator.
1239  */
1240 
1241  const unsigned int n(hltConfig_.size());
1242  int singleJet = 0;
1243  int diJet = 0;
1244  int met = 0;
1245  int tet = 0;
1246  for (unsigned int i=0; i!=n; ++i) {
1247  bool denomFound = false;
1248  bool numFound = false;
1249  bool checkPath = false;
1250 
1251  //Look for paths if "path name fraction" is found in the pathname
1253  //Filter only paths JetMET triggers are interested in
1254  std::vector<std::string>::const_iterator controlPathname = pathFilter_.begin();
1255  for(;controlPathname!=pathFilter_.end(); ++controlPathname){
1256  if(pathname.find((*controlPathname)) != std::string::npos){
1257  checkPath = true;
1258  break;
1259  }
1260  }
1261  if(checkPath==false) continue;
1262 
1263  //Reject if keyword(s) is found in the pathname
1264  std::vector<std::string>::const_iterator rejectPathname = pathRejectKeyword_.begin();
1265  for(; rejectPathname!=pathRejectKeyword_.end();++rejectPathname){
1266  if(pathname.find((*rejectPathname)) != std::string::npos){
1267  checkPath = false;
1268  break;
1269  }
1270  }
1271  if(checkPath==false) continue;
1272 
1273  //
1274  if(verbose_) cout<<"==pathname=="<<pathname<<endl;
1275  std::string dpathname = MuonTrigPaths_[0];
1276  std::string l1pathname = "dummy";
1277  std::string denompathname = "";
1278  unsigned int usedPrescale = 1;
1279  unsigned int objectType = 0;
1280  std::string triggerType = "";
1281  std::string filtername("dummy");
1282  std::string Denomfiltername("denomdummy");
1283 
1284  if(pathname.find("Jet") != std::string::npos
1285  && !(pathname.find("DoubleJet") != std::string::npos)
1286  && !(pathname.find("DiJet") != std::string::npos)
1287  && !(pathname.find("DiPFJet") != std::string::npos)
1288  && !(pathname.find("BTag") != std::string::npos)
1289  && !(pathname.find("Mu") != std::string::npos)
1290  && !(pathname.find("Fwd") != std::string::npos)){
1291  triggerType = "SingleJet_Trigger";
1292  objectType = trigger::TriggerJet;
1293  }
1294  if(pathname.find("DiJet") != std::string::npos
1295  || pathname.find("DiPFJet") != std::string::npos
1296  || pathname.find("DoubleJet") != std::string::npos){
1297  triggerType = "DiJet_Trigger";
1298  objectType = trigger::TriggerJet;
1299  }
1300  if(pathname.find("MET") != std::string::npos){
1301  triggerType = "MET_Trigger";
1302  objectType = trigger::TriggerMET;
1303  }
1304  if(pathname.find("HT") != std::string::npos) {
1305  triggerType = "TET_Trigger";
1306  objectType = trigger::TriggerTET;
1307  }
1308 
1309  //
1310  if(objectType == trigger::TriggerJet
1311  && !(pathname.find("DiJet") != std::string::npos)
1312  && !(pathname.find("DiPFJet") != std::string::npos)
1313  && !(pathname.find("DoubleJet") != std::string::npos)){
1314  singleJet++;
1315  if(singleJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1316  if(singleJet == 1) dpathname = MuonTrigPaths_[0];
1317  }
1318  if(objectType == trigger::TriggerJet
1319  && ((pathname.find("DiJet") != std::string::npos)
1320  || (pathname.find("DiPFJet") != std::string::npos))){
1321  diJet++;
1322  if(diJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1323  if(diJet == 1) dpathname = MuonTrigPaths_[0];
1324  }
1325  if(objectType == trigger::TriggerMET ){
1326  met++;
1327  if(met > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1328  if(met == 1) dpathname = MuonTrigPaths_[0];
1329  }
1330  if(objectType == trigger::TriggerTET ){
1331  tet++;
1332  if(tet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1333  if(tet == 1) dpathname = MuonTrigPaths_[0];
1334  }
1335 
1336  // find L1 condition for numpath with numpath objecttype
1337  // find PSet for L1 global seed for numpath,sss
1338  // list module labels for numpath
1339 
1340  // Checking if the trigger exist in HLT table or not
1341  for (unsigned int i=0; i!=n; ++i){
1342  std::string HLTname = hltConfig_.triggerName(i);
1343  if(HLTname == pathname) numFound = true;
1344  if(HLTname == dpathname) denomFound = true;
1345  }
1346 
1347  if(numFound){ //make trigger exist in the menu
1348  //ml needs change l1pathname
1349  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
1350  //ml added
1351  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1352  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1353  edm::InputTag testTag(*numpathmodule,"",processname_);
1354  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
1355  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
1356  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
1357  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
1358  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET")
1359  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
1360  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler"))
1361  filtername = *numpathmodule;
1362  }
1363  }
1364 
1365  if(objectType != 0 && denomFound){
1366  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1367  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1368  edm::InputTag testTag(*numpathmodule,"",processname_);
1369  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
1370  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
1371  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
1372  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
1373  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
1374  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
1375  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
1376  Denomfiltername = *numpathmodule;
1377  }
1378  }
1379 
1380  if(objectType != 0 && numFound){
1381  if(verbose_)
1382  cout<<"=Pathname= "<<pathname
1383  <<" | =Denompath= "<<dpathname
1384  <<" | =Filtername= "<<filtername
1385  <<" | =Denomfiltername= "<<Denomfiltername
1386  <<" | =L1pathname= "<<l1pathname
1387  <<" | =ObjectType= "<<objectType<<endl;
1388  if(!((pathname.find("HT") != std::string::npos) || (pathname.find("Quad") != std::string::npos))){
1389  hltPathsAll_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1390  if(!nameForEff_ && denomFound) hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1391  filtername, Denomfiltername, processname_, objectType, triggerType));
1392  }
1393  hltPathsAllTriggerSummary_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1394  filtername, Denomfiltername, processname_, objectType, triggerType));
1395  }
1396  } //Loop over paths
1397 
1398  if (verbose_) cout << "get names for efficicncy------------------"<< endl;
1399  //---------bool to pick trigger names pair from config file-------------
1400  if(nameForEff_){
1401  std::string l1pathname = "dummy";
1402  std::string denompathname = "";
1403  unsigned int usedPrescale = 1;
1404  unsigned int objectType = 0;
1405  std::string triggerType = "";
1406  std::string filtername("dummy");
1407  std::string Denomfiltername("denomdummy");
1408  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin();
1409  custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair){
1410  std::string pathname = custompathnamepair->first;
1411  std::string dpathname = custompathnamepair->second;
1412  bool numFound = false;
1413  bool denomFound = false;
1414  // Checking if the trigger exist in HLT table or not
1415  for (unsigned int i=0; i!=n; ++i) {
1416  std::string HLTname = hltConfig_.triggerName(i);
1417  if(HLTname.find(pathname)!=std::string::npos){numFound = true; pathname = HLTname;} //changed to get versions
1418  if(HLTname.find(dpathname)!=std::string::npos){denomFound = true; dpathname = HLTname;}
1419  }
1420  if(numFound && denomFound){
1421  if (pathname.find("Jet") != std::string::npos
1422  && !(pathname.find("DiJet") != std::string::npos)
1423  && !(pathname.find("DiPFJet") != std::string::npos)
1424  && !(pathname.find("DoubleJet") != std::string::npos)
1425  && !(pathname.find("BTag") != std::string::npos)
1426  && !(pathname.find("Mu") != std::string::npos)
1427  && !(pathname.find("Fwd") != std::string::npos)){
1428  triggerType = "SingleJet_Trigger";
1429  objectType = trigger::TriggerJet;
1430  }
1431  if (pathname.find("DiJet") != std::string::npos
1432  || pathname.find("DiPFJet") != std::string::npos
1433  || pathname.find("DoubleJet") != std::string::npos ){
1434  triggerType = "DiJet_Trigger";
1435  objectType = trigger::TriggerJet;
1436  }
1437  if (pathname.find("MET") != std::string::npos ){
1438  triggerType = "MET_Trigger";
1439  objectType = trigger::TriggerMET;
1440  }
1441  if (pathname.find("TET") != std::string::npos ){
1442  triggerType = "TET_Trigger";
1443  objectType = trigger::TriggerTET;
1444  }
1445 
1446  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
1447  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1448  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1449  edm::InputTag testTag(*numpathmodule,"",processname_);
1450  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
1451  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
1452  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
1453  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
1454  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
1455  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
1456  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
1457  filtername = *numpathmodule;
1458  }
1459 
1460  if(objectType != 0){
1461  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1462  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1463  edm::InputTag testTag(*numpathmodule,"",processname_);
1464  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
1465  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
1466  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
1467  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
1468  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
1469  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
1470  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
1471  Denomfiltername = *numpathmodule;
1472  }
1473 
1474  if(verbose_)cout<<"==pathname=="<<pathname
1475  <<"==denompath=="<<dpathname
1476  <<"==filtername=="<<filtername
1477  <<"==denomfiltername=="<<Denomfiltername
1478  <<"==l1pathname=="<<l1pathname
1479  <<"==objectType=="<<objectType<<endl;
1480  hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1481  filtername, Denomfiltername, processname_, objectType, triggerType));
1482  }
1483  }
1484  }
1485  }
1486 
1487  if(verbose_)cout<<"== end hltPathsEff_.push_back ======" << endl;
1488 
1489  }
1490 }
1491 
1492 //------------------------------------------------------------------------//
1493 void
1495 {
1496 
1497  if(!isSetup_){
1498 
1499  iBooker.setCurrentFolder(dirname_);
1500 
1501  //-----------------------------------------------------------------
1502  //---book trigger summary histos
1503  if(!isSetup_){
1504  std::string foldernm = "/TriggerSummary/";
1505  iBooker.setCurrentFolder(dirname_ + foldernm);
1506 
1507  int TrigBins_ = hltPathsAllTriggerSummary_.size();
1508  double TrigMin_ = -0.5;
1509  double TrigMax_ = hltPathsAllTriggerSummary_.size()-0.5;
1510 
1511  std::string histonm="JetMET_TriggerRate";
1512  std::string histot="JetMET TriggerRate Summary";
1513  rate_All = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1514 
1515  histonm = "JetMET_TriggerRate_Correlation";
1516  histot = "JetMET TriggerRate Correlation Summary;y&&!x;x&&y";
1517  correlation_All = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1518 
1519  histonm = "JetMET_NVertices";
1520  histot = "No. of vertices";
1521  NVertices = iBooker.book1D(histonm.c_str(),histot.c_str(),100,0,50);
1522 
1523  histonm = "JetMET_PVZ";
1524  histot = "Primary Vertex Z pos";
1525  PVZ = iBooker.book1D(histonm.c_str(),histot.c_str(),100,-50.,50.);
1526 
1527  if(runStandalone_){
1528  histonm="JetMET_TriggerRate_WrtMuTrigger";
1529  histot="JetMET TriggerRate Summary Wrt Muon Trigger ";
1530  rate_AllWrtMu = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1531 
1532  histonm="JetMET_TriggerRate_Correlation_WrtMuTrigger";
1533  histot="JetMET TriggerRate Correlation Summary Wrt Muon Trigger;y&&!x;x&&y";
1534  correlation_AllWrtMu = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1535 
1536  histonm="JetMET_TriggerRate_WrtMBTrigger";
1537  histot="JetMET TriggerRate Summary Wrt MB Trigger";
1538  rate_AllWrtMB = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1539 
1540  histonm="JetMET_TriggerRate_Correlation_WrtMBTrigger";
1541  histot="JetMET TriggerRate Correlation Wrt MB Trigger;y&&!x;x&&y";
1542  correlation_AllWrtMB = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1543  }
1544  isSetup_ = true;
1545  }
1546  //---Set bin label
1547 
1548  for(PathInfoCollection::iterator v = hltPathsAllTriggerSummary_.begin(); v!= hltPathsAllTriggerSummary_.end(); ++v ){
1549  std::string labelnm("dummy");
1550  labelnm = v->getPath();
1551  int nbins = rate_All->getTH1()->GetNbinsX();
1552  for(int ibin=1; ibin<nbins+1; ibin++){
1553  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
1554  std::string binLabel_str = string(binLabel);
1555  if(binLabel_str.compare(labelnm)==0)break;
1556  if(binLabel[0]=='\0'){
1557  rate_All->setBinLabel(ibin,labelnm);
1558  correlation_All->setBinLabel(ibin,labelnm,1);
1559  correlation_All->setBinLabel(ibin,labelnm,2);
1560  if(runStandalone_){
1561  rate_AllWrtMu->setBinLabel(ibin,labelnm);
1562  rate_AllWrtMB->setBinLabel(ibin,labelnm);
1563  correlation_AllWrtMu->setBinLabel(ibin,labelnm,1);
1564  correlation_AllWrtMB->setBinLabel(ibin,labelnm,1);
1565  correlation_AllWrtMu->setBinLabel(ibin,labelnm,2);
1566  correlation_AllWrtMB->setBinLabel(ibin,labelnm,2);
1567  }
1568  break;
1569  }
1570  }
1571  }
1572 
1573  // Now define histos for All triggers
1574  if(plotAll_){
1575  //
1576  int Nbins_ = 10;
1577  double Nmin_ = -0.5;
1578  double Nmax_ = 9.5;
1579  //
1580  int Ptbins_ = 100;
1581  if(runStandalone_) Ptbins_ = 1000;
1582  double PtMin_ = 0.;
1583  double PtMax_ = 1000.;
1584  //
1585  int Etabins_ = 50;
1586  if(runStandalone_) Etabins_ = 100;
1587  double EtaMin_ = -5.;
1588  double EtaMax_ = 5.;
1589  //
1590  int Phibins_ = 35;
1591  double PhiMin_ = -3.5;
1592  double PhiMax_ = 3.5;
1593 
1594  int Resbins_ = 30;
1595  double ResMin_ = -1.5;
1596  double ResMax_ = 1.5;
1597  //
1598  std::string dirName = dirname_ + "/MonitorAllTriggers/";
1599  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
1600  //
1601  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
1602  std::string subdirName = dirName + trgPathName;
1603  std::string trigPath = "("+trgPathName+")";
1604  iBooker.setCurrentFolder(subdirName);
1605 
1606  std::string labelname("ME");
1607  std::string histoname(labelname+"");
1608  std::string title(labelname+"");
1609 
1610  MonitorElement *dummy;
1611  dummy = iBooker.bookFloat("dummy");
1612 
1613  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("SingleJet_Trigger") == 0){
1614 
1615  histoname = labelname+"_recObjN";
1616  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
1617  MonitorElement * N = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1618  N->getTH1();
1619 
1620  histoname = labelname+"_recObjPt";
1621  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
1622  MonitorElement * Pt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1623  Pt->getTH1();
1624 
1625  histoname = labelname+"_recObjPtBarrel";
1626  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
1627  MonitorElement * PtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1628  PtBarrel->getTH1();
1629 
1630  histoname = labelname+"_recObjPtEndcap";
1631  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
1632  MonitorElement * PtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1633  PtEndcap->getTH1();
1634 
1635  histoname = labelname+"_recObjPtForward";
1636  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
1637  MonitorElement * PtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1638  PtForward->getTH1();
1639 
1640  histoname = labelname+"_recObjEta";
1641  title = labelname+"_recObjEta;Reco #eta"+trigPath;
1642  MonitorElement * Eta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1643  Eta->getTH1();
1644 
1645  histoname = labelname+"_recObjPhi";
1646  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
1647  MonitorElement * Phi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1648  Phi->getTH1();
1649 
1650  histoname = labelname+"_recObjEtaPhi";
1651  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
1652  MonitorElement * EtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1653  EtaPhi->getTH1();
1654 
1655  histoname = labelname+"_l1ObjPt";
1656  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
1657  MonitorElement * Pt_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1658  Pt_L1->getTH1();
1659 
1660  histoname = labelname+"_l1ObjEta";
1661  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
1662  MonitorElement * Eta_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1663  Eta_L1->getTH1();
1664 
1665  histoname = labelname+"_l1ObjPhi";
1666  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
1667  MonitorElement * Phi_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1668  Phi_L1->getTH1();
1669 
1670  histoname = labelname+"_l1ObjEtaPhi";
1671  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
1672  MonitorElement * EtaPhi_L1 = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1673  EtaPhi_L1->getTH1();
1674 
1675  histoname = labelname+"_l1ObjN";
1676  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
1677  MonitorElement * N_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1678  N_L1->getTH1();
1679 
1680  histoname = labelname+"_l1ObjPtBarrel";
1681  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
1682  MonitorElement * PtBarrel_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1683  PtBarrel_L1->getTH1();
1684 
1685  histoname = labelname+"_l1ObjPtEndcap";
1686  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
1687  MonitorElement * PtEndcap_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1688  PtEndcap_L1->getTH1();
1689 
1690  histoname = labelname+"_l1ObjPtForward";
1691  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
1692  MonitorElement * PtForward_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1693  PtForward_L1->getTH1();
1694 
1695  histoname = labelname+"_hltObjN";
1696  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
1697  MonitorElement * N_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1698  N_HLT->getTH1();
1699 
1700  histoname = labelname+"_hltObjPtBarrel";
1701  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
1702  MonitorElement * PtBarrel_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1703  PtBarrel_HLT->getTH1();
1704 
1705  histoname = labelname+"_hltObjPtEndcap";
1706  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
1707  MonitorElement * PtEndcap_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1708  PtEndcap_HLT->getTH1();
1709 
1710  histoname = labelname+"_hltObjPtForward";
1711  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
1712  MonitorElement * PtForward_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1713  PtForward_HLT->getTH1();
1714 
1715  histoname = labelname+"_hltObjPt";
1716  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
1717  MonitorElement * Pt_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1718  Pt_HLT->getTH1();
1719 
1720  histoname = labelname+"_hltObjEta";
1721  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
1722  MonitorElement * Eta_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1723  Eta_HLT->getTH1();
1724 
1725  histoname = labelname+"_hltObjPhi";
1726  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
1727  MonitorElement * Phi_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1728  Phi_HLT->getTH1();
1729 
1730  histoname = labelname+"_hltObjEtaPhi";
1731  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
1732  MonitorElement * EtaPhi_HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1733  EtaPhi_HLT->getTH1();
1734 
1735  histoname = labelname+"_l1HLTPtResolution";
1736  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
1737  MonitorElement * PtResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1738  PtResolution_L1HLT->getTH1();
1739 
1740  histoname = labelname+"_l1HLTEtaResolution";
1741  title = labelname+"_l1HLTEtaResolution;#eta(L1)-#eta(HLT)"+trigPath;
1742  MonitorElement * EtaResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1743  EtaResolution_L1HLT->getTH1();
1744 
1745  histoname = labelname+"_l1HLTPhiResolution";
1746  title = labelname+"_l1HLTPhiResolution;#Phi(L1)-#Phi(HLT)"+trigPath;
1747  MonitorElement * PhiResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1748  PhiResolution_L1HLT->getTH1();
1749 
1750  histoname = labelname+"_l1HLTPtCorrelation";
1751  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
1752  MonitorElement * PtCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1753  PtCorrelation_L1HLT->getTH1();
1754 
1755  histoname = labelname+"_l1HLTEtaCorrelation";
1756  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
1757  MonitorElement * EtaCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1758  EtaCorrelation_L1HLT->getTH1();
1759 
1760  histoname = labelname+"_l1HLTPhiCorrelation";
1761  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
1762  MonitorElement * PhiCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1763  PhiCorrelation_L1HLT->getTH1();
1764 
1765  histoname = labelname+"_hltRecObjPtResolution";
1766  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
1767  MonitorElement * PtResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1768  PtResolution_HLTRecObj->getTH1();
1769 
1770  histoname = labelname+"_hltRecObjEtaResolution";
1771  title = labelname+"_hltRecObjEtaResolution;#eta(HLT)-#eta(Reco)"+trigPath;
1772  MonitorElement * EtaResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1773  EtaResolution_HLTRecObj->getTH1();
1774 
1775  histoname = labelname+"_hltRecObjPhiResolution";
1776  title = labelname+"_hltRecObjPhiResolution;#Phi(HLT)-#Phi(Reco)"+trigPath;
1777  MonitorElement * PhiResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1778  PhiResolution_HLTRecObj->getTH1();
1779 
1780  histoname = labelname+"_hltRecObjPtCorrelation";
1781  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
1782  MonitorElement * PtCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1783  PtCorrelation_HLTRecObj->getTH1();
1784 
1785  histoname = labelname+"_hltRecObjEtaCorrelation";
1786  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
1787  MonitorElement * EtaCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1788  EtaCorrelation_HLTRecObj->getTH1();
1789 
1790  histoname = labelname+"_hltRecObjPhiCorrelation";
1791  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
1792  MonitorElement * PhiCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1793  PhiCorrelation_HLTRecObj->getTH1();
1794 
1795  v->setHistos(N,
1796  Pt,
1797  PtBarrel,
1798  PtEndcap,
1799  PtForward,
1800  Eta,
1801  Phi,
1802  EtaPhi,
1803  N_L1,
1804  Pt_L1,
1805  PtBarrel_L1,
1806  PtEndcap_L1,
1807  PtForward_L1,
1808  Eta_L1,
1809  Phi_L1,
1810  EtaPhi_L1,
1811  N_HLT,
1812  Pt_HLT,
1813  PtBarrel_HLT,
1814  PtEndcap_HLT,
1815  PtForward_HLT,
1816  Eta_HLT,
1817  Phi_HLT,
1818  EtaPhi_HLT,
1819  PtResolution_L1HLT,
1820  EtaResolution_L1HLT,
1821  PhiResolution_L1HLT,
1822  PtResolution_HLTRecObj,
1823  EtaResolution_HLTRecObj,
1824  PhiResolution_HLTRecObj,
1825  PtCorrelation_L1HLT,
1826  EtaCorrelation_L1HLT,
1827  PhiCorrelation_L1HLT,
1828  PtCorrelation_HLTRecObj,
1829  EtaCorrelation_HLTRecObj,
1830  PhiCorrelation_HLTRecObj,
1831  dummy,
1832  dummy,
1833  dummy,
1834  dummy,
1835  dummy,
1836  dummy,
1837  dummy,
1838  dummy,
1839  dummy
1840  );
1841  }// histos for SingleJet Triggers
1842 
1843  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("DiJet_Trigger") == 0){
1844 
1845  histoname = labelname+"_RecObjAveragePt";
1846  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
1847  MonitorElement * jetAveragePt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1848  jetAveragePt->getTH1();
1849 
1850  histoname = labelname+"_RecObjAverageEta";
1851  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
1852  MonitorElement * jetAverageEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1853  jetAverageEta->getTH1();
1854 
1855  histoname = labelname+"_RecObjPhiDifference";
1856  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
1857  MonitorElement * jetPhiDifference = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1858  jetPhiDifference->getTH1();
1859 
1860  histoname = labelname+"_hltObjAveragePt";
1861  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
1862  MonitorElement * hltAveragePt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1863  hltAveragePt->getTH1();
1864 
1865  histoname = labelname+"_hltObjAverageEta";
1866  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
1867  MonitorElement * hltAverageEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1868  hltAverageEta->getTH1();
1869 
1870  histoname = labelname+"_hltObjPhiDifference";
1871  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
1872  MonitorElement * hltPhiDifference = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1873  hltPhiDifference->getTH1();
1874 
1875  v->setHistos(dummy,
1876  dummy,
1877  dummy,
1878  dummy,
1879  dummy,
1880  dummy,
1881  dummy,
1882  dummy,
1883  dummy,
1884  dummy,
1885  dummy,
1886  dummy,
1887  dummy,
1888  dummy,
1889  dummy,
1890  dummy,
1891  dummy,
1892  dummy,
1893  dummy,
1894  dummy,
1895  dummy,
1896  dummy,
1897  dummy,
1898  dummy,
1899  dummy,
1900  dummy,
1901  dummy,
1902  dummy,
1903  dummy,
1904  dummy,
1905  dummy,
1906  dummy,
1907  dummy,
1908  dummy,
1909  dummy,
1910  dummy,
1911  jetAveragePt,
1912  jetAverageEta,
1913  jetPhiDifference,
1914  hltAveragePt,
1915  hltAverageEta,
1916  hltPhiDifference,
1917  dummy,
1918  dummy,
1919  dummy
1920  );
1921  }// histos for DiJet Triggers
1922 
1923  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
1924 
1925  histoname = labelname+"_recObjPt";
1926  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
1927  MonitorElement * Pt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1928  Pt->getTH1();
1929 
1930  histoname = labelname+"_recObjPhi";
1931  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
1932  MonitorElement * Phi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1933  Phi->getTH1();
1934 
1935  histoname = labelname+"_l1ObjPt";
1936  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
1937  MonitorElement * Pt_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1938  Pt_L1->getTH1();
1939 
1940  histoname = labelname+"_l1ObjPhi";
1941  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
1942  MonitorElement * Phi_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1943  Phi_L1->getTH1();
1944 
1945  histoname = labelname+"_hltObjPt";
1946  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
1947  MonitorElement * Pt_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1948  Pt_HLT->getTH1();
1949 
1950  histoname = labelname+"_hltObjPhi";
1951  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
1952  MonitorElement * Phi_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1953  Phi_HLT->getTH1();
1954 
1955  histoname = labelname+"_l1HLTPtResolution";
1956  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
1957  MonitorElement * PtResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1958  PtResolution_L1HLT->getTH1();
1959 
1960  histoname = labelname+"_l1HLTPhiResolution";
1961  title = labelname+"_l1HLTPhiResolution;#Phi(L1)-#Phi(HLT)"+trigPath;
1962  MonitorElement * PhiResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1963  PhiResolution_L1HLT->getTH1();
1964 
1965  histoname = labelname+"_l1HLTPtCorrelation";
1966  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
1967  MonitorElement * PtCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1968  PtCorrelation_L1HLT->getTH1();
1969 
1970  histoname = labelname+"_l1HLTPhiCorrelation";
1971  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
1972  MonitorElement * PhiCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1973  PhiCorrelation_L1HLT->getTH1();
1974 
1975  histoname = labelname+"_hltRecObjPtResolution";
1976  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
1977  MonitorElement * PtResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1978  PtResolution_HLTRecObj->getTH1();
1979 
1980  histoname = labelname+"_hltRecObjPhiResolution";
1981  title = labelname+"_hltRecObjPhiResolution;#Phi(HLT)-#Phi(Reco)"+trigPath;
1982  MonitorElement * PhiResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1983  PhiResolution_HLTRecObj->getTH1();
1984 
1985  histoname = labelname+"_hltRecObjPtCorrelation";
1986  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
1987  MonitorElement * PtCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1988  PtCorrelation_HLTRecObj->getTH1();
1989 
1990  histoname = labelname+"_hltRecObjPhiCorrelation";
1991  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
1992  MonitorElement * PhiCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1993  PhiCorrelation_HLTRecObj->getTH1();
1994 
1995  v->setHistos(dummy,
1996  Pt,
1997  dummy,
1998  dummy,
1999  dummy,
2000  dummy,
2001  Phi,
2002  dummy,
2003  dummy,
2004  Pt_L1,
2005  dummy,
2006  dummy,
2007  dummy,
2008  dummy,
2009  Phi_L1,
2010  dummy,
2011  dummy,
2012  Pt_HLT,
2013  dummy,
2014  dummy,
2015  dummy,
2016  dummy,
2017  Phi_HLT,
2018  dummy,
2019  PtResolution_L1HLT,
2020  dummy,
2021  PhiResolution_L1HLT,
2022  PtResolution_HLTRecObj,
2023  dummy,
2024  PhiResolution_HLTRecObj,
2025  PtCorrelation_L1HLT,
2026  dummy,
2027  PhiCorrelation_L1HLT,
2028  PtCorrelation_HLTRecObj,
2029  dummy,
2030  PhiCorrelation_HLTRecObj,
2031  dummy,
2032  dummy,
2033  dummy,
2034  dummy,
2035  dummy,
2036  dummy,
2037  dummy,
2038  dummy,
2039  dummy
2040  );
2041  }// histos for MET Triggers
2042  }
2043  }//plotAll_
2044 
2045  //-------Now Efficiency histos--------
2046  if(plotEff_){
2047  int Ptbins_ = 100;
2048  if(runStandalone_) Ptbins_ = 1000;
2049  double PtMin_ = 0.;
2050  double PtMax_ = 1000.;
2051  //
2052  int Etabins_ = 50;
2053  double EtaMin_ = -5.;
2054  double EtaMax_ = 5.;
2055  //
2056  int Phibins_ = 35;
2057  double PhiMin_ = -3.5;
2058  double PhiMax_ = 3.5;
2059  // Now define histos wrt lower threshold trigger
2060  std::string dirName1 = dirname_ + "/RelativeTriggerEff/";
2061  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
2062  //
2063  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
2064  std::string trgPathNameD = HLTConfigProvider::removeVersion(v->getDenomPath());
2065  //
2066  std::string labelname("ME") ;
2067  std::string subdirName = dirName1 + trgPathName + "_wrt_" + trgPathNameD;
2068  iBooker.setCurrentFolder(subdirName);
2069  //
2070  std::string histoname(labelname+"");
2071  std::string title(labelname+"");
2072 
2073  MonitorElement *dummy;
2074  dummy = iBooker.bookFloat("dummy");
2075 
2076  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0)){
2077 
2078  histoname = labelname+"_NumeratorPt";
2079  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2080  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2081  NumeratorPt->getTH1();
2082 
2083  histoname = labelname+"_NumeratorPtBarrel";
2084  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c] ";
2085  MonitorElement * NumeratorPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2086  NumeratorPtBarrel->getTH1();
2087 
2088  histoname = labelname+"_NumeratorPtEndcap";
2089  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
2090  MonitorElement * NumeratorPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2091  NumeratorPtEndcap->getTH1();
2092 
2093  histoname = labelname+"_NumeratorPtForward";
2094  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
2095  MonitorElement * NumeratorPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2096  NumeratorPtForward->getTH1();
2097 
2098  histoname = labelname+"_NumeratorEta";
2099  title = labelname+"NumeratorEta;Calo #eta ";
2100  MonitorElement * NumeratorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2101  NumeratorEta->getTH1();
2102 
2103  histoname = labelname+"_NumeratorPhi";
2104  title = labelname+"NumeratorPhi;Calo #Phi";
2105  MonitorElement * NumeratorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2106  NumeratorPhi->getTH1();
2107 
2108  histoname = labelname+"_NumeratorEtaPhi";
2109  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
2110  MonitorElement * NumeratorEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2111  NumeratorEtaPhi->getTH1();
2112 
2113  histoname = labelname+"_NumeratorEtaBarrel";
2114  title = labelname+"NumeratorEtaBarrel;Calo #eta ";
2115  MonitorElement * NumeratorEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2116  NumeratorEtaBarrel->getTH1();
2117 
2118  histoname = labelname+"_NumeratorPhiBarrel";
2119  title = labelname+"NumeratorPhiBarrel;Calo #Phi";
2120  MonitorElement * NumeratorPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2121  NumeratorPhiBarrel->getTH1();
2122 
2123  histoname = labelname+"_NumeratorEtaEndcap";
2124  title = labelname+"NumeratorEtaEndcap;Calo #eta ";
2125  MonitorElement * NumeratorEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2126  NumeratorEtaEndcap->getTH1();
2127 
2128  histoname = labelname+"_NumeratorPhiEndcap";
2129  title = labelname+"NumeratorPhiEndcap;Calo #Phi";
2130  MonitorElement * NumeratorPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2131  NumeratorPhiEndcap->getTH1();
2132 
2133  histoname = labelname+"_NumeratorEtaForward";
2134  title = labelname+"NumeratorEtaForward;Calo #eta ";
2135  MonitorElement * NumeratorEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2136  NumeratorEtaForward->getTH1();
2137 
2138  histoname = labelname+"_NumeratorPhiForward";
2139  title = labelname+"NumeratorPhiForward;Calo #Phi";
2140  MonitorElement * NumeratorPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2141  NumeratorPhiForward->getTH1();
2142 
2143  histoname = labelname+"_NumeratorEta_LowpTcut";
2144  title = labelname+"NumeratorEta_LowpTcut;Calo #eta ";
2145  MonitorElement * NumeratorEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2146  NumeratorEta_LowpTcut->getTH1();
2147 
2148  histoname = labelname+"_NumeratorPhi_LowpTcut";
2149  title = labelname+"NumeratorPhi_LowpTcut;Calo #Phi";
2150  MonitorElement * NumeratorPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2151  NumeratorPhi_LowpTcut->getTH1();
2152 
2153  histoname = labelname+"_NumeratorEtaPhi_LowpTcut";
2154  title = labelname+"NumeratorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
2155  MonitorElement * NumeratorEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2156  NumeratorEtaPhi_LowpTcut->getTH1();
2157 
2158  histoname = labelname+"_NumeratorEta_MedpTcut";
2159  title = labelname+"NumeratorEta_MedpTcut;Calo #eta ";
2160  MonitorElement * NumeratorEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2161  NumeratorEta_MedpTcut->getTH1();
2162 
2163  histoname = labelname+"_NumeratorPhi_MedpTcut";
2164  title = labelname+"NumeratorPhi_MedpTcut;Calo #Phi";
2165  MonitorElement * NumeratorPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2166  NumeratorPhi_MedpTcut->getTH1();
2167 
2168  histoname = labelname+"_NumeratorEtaPhi_MedpTcut";
2169  title = labelname+"NumeratorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
2170  MonitorElement * NumeratorEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2171  NumeratorEtaPhi_MedpTcut->getTH1();
2172 
2173  histoname = labelname+"_NumeratorEta_HighpTcut";
2174  title = labelname+"NumeratorEta_HighpTcut;Calo #eta ";
2175  MonitorElement * NumeratorEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2176  NumeratorEta_HighpTcut->getTH1();
2177 
2178  histoname = labelname+"_NumeratorPhi_HighpTcut";
2179  title = labelname+"NumeratorPhi_HighpTcut;Calo #Phi";
2180  MonitorElement * NumeratorPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2181  NumeratorPhi_HighpTcut->getTH1();
2182 
2183  histoname = labelname+"_NumeratorEtaPhi_HighpTcut";
2184  title = labelname+"NumeratorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
2185  MonitorElement * NumeratorEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2186  NumeratorEtaPhi_HighpTcut->getTH1();
2187 
2188  histoname = labelname+"_DenominatorPt";
2189  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2190  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2191  DenominatorPt->getTH1();
2192 
2193  histoname = labelname+"_DenominatorPtBarrel";
2194  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
2195  MonitorElement * DenominatorPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2196  DenominatorPtBarrel->getTH1();
2197 
2198  histoname = labelname+"_DenominatorPtEndcap";
2199  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
2200  MonitorElement * DenominatorPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2201  DenominatorPtEndcap->getTH1();
2202 
2203  histoname = labelname+"_DenominatorPtForward";
2204  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
2205  MonitorElement * DenominatorPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2206  DenominatorPtForward->getTH1();
2207 
2208  histoname = labelname+"_DenominatorEta";
2209  title = labelname+"DenominatorEta;Calo #eta ";
2210  MonitorElement * DenominatorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2211  DenominatorEta->getTH1();
2212 
2213  histoname = labelname+"_DenominatorPhi";
2214  title = labelname+"DenominatorPhi;Calo #Phi";
2215  MonitorElement * DenominatorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2216  DenominatorPhi->getTH1();
2217 
2218  histoname = labelname+"_DenominatorEtaPhi";
2219  title = labelname+"DenominatorEtaPhi;Calo #eta; Calo #Phi";
2220  MonitorElement * DenominatorEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2221  DenominatorEtaPhi->getTH1();
2222 
2223  histoname = labelname+"_DenominatorEtaBarrel";
2224  title = labelname+"DenominatorEtaBarrel;Calo #eta ";
2225  MonitorElement * DenominatorEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2226  DenominatorEtaBarrel->getTH1();
2227 
2228  histoname = labelname+"_DenominatorPhiBarrel";
2229  title = labelname+"DenominatorPhiBarrel;Calo #Phi";
2230  MonitorElement * DenominatorPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2231  DenominatorPhiBarrel->getTH1();
2232 
2233  histoname = labelname+"_DenominatorEtaEndcap";
2234  title = labelname+"DenominatorEtaEndcap;Calo #eta ";
2235  MonitorElement * DenominatorEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2236  DenominatorEtaEndcap->getTH1();
2237 
2238  histoname = labelname+"_DenominatorPhiEndcap";
2239  title = labelname+"DenominatorPhiEndcap;Calo #Phi";
2240  MonitorElement * DenominatorPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2241  DenominatorPhiEndcap->getTH1();
2242 
2243  histoname = labelname+"_DenominatorEtaForward";
2244  title = labelname+"DenominatorEtaForward;Calo #eta ";
2245  MonitorElement * DenominatorEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2246  DenominatorEtaForward->getTH1();
2247 
2248  histoname = labelname+"_DenominatorPhiForward";
2249  title = labelname+"DenominatorPhiForward;Calo #Phi";
2250  MonitorElement * DenominatorPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2251  DenominatorPhiForward->getTH1();
2252 
2253  histoname = labelname+"_DenominatorEta_LowpTcut";
2254  title = labelname+"DenominatorEta_LowpTcut;Calo #eta ";
2255  MonitorElement * DenominatorEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2256  DenominatorEta_LowpTcut->getTH1();
2257 
2258  histoname = labelname+"_DenominatorPhi_LowpTcut";
2259  title = labelname+"DenominatorPhi_LowpTcut;Calo #Phi";
2260  MonitorElement * DenominatorPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2261  DenominatorPhi_LowpTcut->getTH1();
2262 
2263  histoname = labelname+"_DenominatorEtaPhi_LowpTcut";
2264  title = labelname+"DenominatorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
2265  MonitorElement * DenominatorEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2266  DenominatorEtaPhi_LowpTcut->getTH1();
2267 
2268  histoname = labelname+"_DenominatorEta_MedpTcut";
2269  title = labelname+"DenominatorEta_MedpTcut;Calo #eta ";
2270  MonitorElement * DenominatorEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2271  DenominatorEta_MedpTcut->getTH1();
2272 
2273  histoname = labelname+"_DenominatorPhi_MedpTcut";
2274  title = labelname+"DenominatorPhi_MedpTcut;Calo #Phi";
2275  MonitorElement * DenominatorPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2276  DenominatorPhi_MedpTcut->getTH1();
2277 
2278  histoname = labelname+"_DenominatorEtaPhi_MedpTcut";
2279  title = labelname+"DenominatorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
2280  MonitorElement * DenominatorEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2281  DenominatorEtaPhi_MedpTcut->getTH1();
2282 
2283  histoname = labelname+"_DenominatorEta_HighpTcut";
2284  title = labelname+"DenominatorEta_HighpTcut;Calo #eta ";
2285  MonitorElement * DenominatorEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2286  DenominatorEta_HighpTcut->getTH1();
2287 
2288  histoname = labelname+"_DenominatorPhi_HighpTcut";
2289  title = labelname+"DenominatorPhi_HighpTcut;Calo #Phi";
2290  MonitorElement * DenominatorPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2291  DenominatorPhi_HighpTcut->getTH1();
2292 
2293  histoname = labelname+"_DenominatorEtaPhi_HighpTcut";
2294  title = labelname+"DenominatorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
2295  MonitorElement * DenominatorEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2296  DenominatorEtaPhi_HighpTcut->getTH1();
2297 
2298  histoname = labelname+"_DeltaR";
2299  title = labelname+"DeltaR;";
2300  MonitorElement * DeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2301  DeltaR->getTH1();
2302 
2303  histoname = labelname+"_DeltaPhi";
2304  title = labelname+"DeltaPhi;";
2305  MonitorElement * DeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
2306  DeltaPhi->getTH1();
2307 
2308  histoname = labelname+"_NumeratorPFMHT";
2309  title = labelname+"NumeratorPFMHT;PFMHT[GeV/c]";
2310  MonitorElement * NumeratorPFMHT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2311  NumeratorPFMHT->getTH1();
2312 
2313  histoname = labelname+"_NumeratorPFPt";
2314  title = labelname+"NumeratorPFPt;PF Pt[GeV/c]";
2315  MonitorElement * NumeratorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2316  NumeratorPFPt->getTH1();
2317 
2318  histoname = labelname+"_NumeratorPFPtBarrel";
2319  title = labelname+"NumeratorPFPtBarrel;PF Pt[GeV/c] ";
2320  MonitorElement * NumeratorPFPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2321  NumeratorPFPtBarrel->getTH1();
2322 
2323  histoname = labelname+"_NumeratorPFPtEndcap";
2324  title = labelname+"NumeratorPFPtEndcap;PF Pt[GeV/c]";
2325  MonitorElement * NumeratorPFPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2326  NumeratorPFPtEndcap->getTH1();
2327 
2328  histoname = labelname+"_NumeratorPFPtForward";
2329  title = labelname+"NumeratorPFPtForward;PF Pt[GeV/c]";
2330  MonitorElement * NumeratorPFPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2331  NumeratorPFPtForward->getTH1();
2332 
2333  histoname = labelname+"_NumeratorPFEta";
2334  title = labelname+"NumeratorPFEta;PF #eta ";
2335  MonitorElement * NumeratorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2336  NumeratorPFEta->getTH1();
2337 
2338  histoname = labelname+"_NumeratorPFPhi";
2339  title = labelname+"NumeratorPFPhi;Calo #Phi";
2340  MonitorElement * NumeratorPFPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2341  NumeratorPFPhi->getTH1();
2342 
2343  histoname = labelname+"_NumeratorPFEtaPhi";
2344  title = labelname+"NumeratorPFEtaPhi;PF #eta;Calo #Phi";
2345  MonitorElement * NumeratorPFEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2346  NumeratorPFEtaPhi->getTH1();
2347 
2348  histoname = labelname+"_NumeratorPFEtaBarrel";
2349  title = labelname+"NumeratorPFEtaBarrel;PF #eta ";
2350  MonitorElement * NumeratorPFEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2351  NumeratorPFEtaBarrel->getTH1();
2352 
2353  histoname = labelname+"_NumeratorPFPhiBarrel";
2354  title = labelname+"NumeratorPFPhiBarrel;PF #Phi";
2355  MonitorElement * NumeratorPFPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2356  NumeratorPFPhiBarrel->getTH1();
2357 
2358  histoname = labelname+"_NumeratorPFEtaEndcap";
2359  title = labelname+"NumeratorPFEtaEndcap;Calo #eta ";
2360  MonitorElement * NumeratorPFEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2361  NumeratorPFEtaEndcap->getTH1();
2362 
2363  histoname = labelname+"_NumeratorPFPhiEndcap";
2364  title = labelname+"NumeratorPFPhiEndcap;PF #Phi";
2365  MonitorElement * NumeratorPFPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2366  NumeratorPFPhiEndcap->getTH1();
2367 
2368  histoname = labelname+"_NumeratorPFEtaForward";
2369  title = labelname+"NumeratorPFEtaForward;Calo #eta ";
2370  MonitorElement * NumeratorPFEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2371  NumeratorPFEtaForward->getTH1();
2372 
2373  histoname = labelname+"_NumeratorPFPhiForward";
2374  title = labelname+"NumeratorPFPhiForward;PF #Phi";
2375  MonitorElement * NumeratorPFPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2376  NumeratorPFPhiForward->getTH1();
2377 
2378  histoname = labelname+"_NumeratorPFEta_LowpTcut";
2379  title = labelname+"NumeratorPFEta_LowpTcut;PF #eta ";
2380  MonitorElement * NumeratorPFEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2381  NumeratorPFEta_LowpTcut->getTH1();
2382 
2383  histoname = labelname+"_NumeratorPFPhi_LowpTcut";
2384  title = labelname+"NumeratorPFPhi_LowpTcut;PF #Phi";
2385  MonitorElement * NumeratorPFPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2386  NumeratorPFPhi_LowpTcut->getTH1();
2387 
2388  histoname = labelname+"_NumeratorPFEtaPhi_LowpTcut";
2389  title = labelname+"NumeratorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
2390  MonitorElement * NumeratorPFEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2391  NumeratorPFEtaPhi_LowpTcut->getTH1();
2392 
2393  histoname = labelname+"_NumeratorPFEta_MedpTcut";
2394  title = labelname+"NumeratorPFEta_MedpTcut;PF #eta ";
2395  MonitorElement * NumeratorPFEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2396  NumeratorPFEta_MedpTcut->getTH1();
2397 
2398  histoname = labelname+"_NumeratorPFPhi_MedpTcut";
2399  title = labelname+"NumeratorPFPhi_MedpTcut;PF #Phi";
2400  MonitorElement * NumeratorPFPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2401  NumeratorPFPhi_MedpTcut->getTH1();
2402 
2403  histoname = labelname+"_NumeratorPFEtaPhi_MedpTcut";
2404  title = labelname+"NumeratorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
2405  MonitorElement * NumeratorPFEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2406  NumeratorPFEtaPhi_MedpTcut->getTH1();
2407 
2408  histoname = labelname+"_NumeratorPFEta_HighpTcut";
2409  title = labelname+"NumeratorPFEta_HighpTcut;Calo #eta ";
2410  MonitorElement * NumeratorPFEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2411  NumeratorPFEta_HighpTcut->getTH1();
2412 
2413  histoname = labelname+"_NumeratorPFPhi_HighpTcut";
2414  title = labelname+"NumeratorPFPhi_HighpTcut;PF #Phi";
2415  MonitorElement * NumeratorPFPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2416  NumeratorPFPhi_HighpTcut->getTH1();
2417 
2418  histoname = labelname+"_NumeratorPFEtaPhi_HighpTcut";
2419  title = labelname+"NumeratorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
2420  MonitorElement * NumeratorPFEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2421  NumeratorPFEtaPhi_HighpTcut->getTH1();
2422 
2423  histoname = labelname+"_DenominatorPFMHT";
2424  title = labelname+"DenominatorPFMHT;PF Pt[GeV/c]";
2425  MonitorElement * DenominatorPFMHT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2426  DenominatorPFMHT->getTH1();
2427 
2428  histoname = labelname+"_DenominatorPFPt";
2429  title = labelname+"DenominatorPFPt;PF Pt[GeV/c]";
2430  MonitorElement * DenominatorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2431  DenominatorPFPt->getTH1();
2432 
2433  histoname = labelname+"_DenominatorPFPtBarrel";
2434  title = labelname+"DenominatorPFPtBarrel;Calo Pt[GeV/c]";
2435  MonitorElement * DenominatorPFPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2436  DenominatorPFPtBarrel->getTH1();
2437 
2438  histoname = labelname+"_DenominatorPFPtEndcap";
2439  title = labelname+"DenominatorPFPtEndcap;PF Pt[GeV/c]";
2440  MonitorElement * DenominatorPFPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2441  DenominatorPFPtEndcap->getTH1();
2442 
2443  histoname = labelname+"_DenominatorPFPtForward";
2444  title = labelname+"DenominatorPFPtForward;PF Pt[GeV/c] ";
2445  MonitorElement * DenominatorPFPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2446  DenominatorPFPtForward->getTH1();
2447 
2448  histoname = labelname+"_DenominatorPFEta";
2449  title = labelname+"DenominatorPFEta;PF #eta ";
2450  MonitorElement * DenominatorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2451  DenominatorPFEta->getTH1();
2452 
2453  histoname = labelname+"_DenominatorPFPhi";
2454  title = labelname+"DenominatorPFPhi;PF #Phi";
2455  MonitorElement * DenominatorPFPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2456  DenominatorPFPhi->getTH1();
2457 
2458  histoname = labelname+"_DenominatorPFEtaPhi";
2459  title = labelname+"DenominatorPFEtaPhi;PF #eta; Calo #Phi";
2460  MonitorElement * DenominatorPFEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2461  DenominatorPFEtaPhi->getTH1();
2462 
2463  histoname = labelname+"_DenominatorPFEtaBarrel";
2464  title = labelname+"DenominatorPFEtaBarrel;Calo #eta ";
2465  MonitorElement * DenominatorPFEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2466  DenominatorPFEtaBarrel->getTH1();
2467 
2468  histoname = labelname+"_DenominatorPFPhiBarrel";
2469  title = labelname+"DenominatorPFPhiBarrel;PF #Phi";
2470  MonitorElement * DenominatorPFPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2471  DenominatorPFPhiBarrel->getTH1();
2472 
2473  histoname = labelname+"_DenominatorPFEtaEndcap";
2474  title = labelname+"DenominatorPFEtaEndcap;PF #eta ";
2475  MonitorElement * DenominatorPFEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2476  DenominatorPFEtaEndcap->getTH1();
2477 
2478  histoname = labelname+"_DenominatorPFPhiEndcap";
2479  title = labelname+"DenominatorPFPhiEndcap;Calo #Phi";
2480  MonitorElement * DenominatorPFPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2481  DenominatorPFPhiEndcap->getTH1();
2482 
2483  histoname = labelname+"_DenominatorPFEtaForward";
2484  title = labelname+"DenominatorPFEtaForward;PF #eta ";
2485  MonitorElement * DenominatorPFEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2486  DenominatorPFEtaForward->getTH1();
2487 
2488  histoname = labelname+"_DenominatorPFPhiForward";
2489  title = labelname+"DenominatorPFPhiForward;PF #Phi";
2490  MonitorElement * DenominatorPFPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2491  DenominatorPFPhiForward->getTH1();
2492 
2493  histoname = labelname+"_DenominatorPFEta_LowpTcut";
2494  title = labelname+"DenominatorPFEta_LowpTcut;PF #eta ";
2495  MonitorElement * DenominatorPFEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2496  DenominatorPFEta_LowpTcut->getTH1();
2497 
2498  histoname = labelname+"_DenominatorPFPhi_LowpTcut";
2499  title = labelname+"DenominatorPFPhi_LowpTcut;PF #Phi";
2500  MonitorElement * DenominatorPFPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2501  DenominatorPFPhi_LowpTcut->getTH1();
2502 
2503  histoname = labelname+"_DenominatorPFEtaPhi_LowpTcut";
2504  title = labelname+"DenominatorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
2505  MonitorElement * DenominatorPFEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2506  DenominatorPFEtaPhi_LowpTcut->getTH1();
2507 
2508  histoname = labelname+"_DenominatorPFEta_MedpTcut";
2509  title = labelname+"DenominatorPFEta_MedpTcut;PF #eta ";
2510  MonitorElement * DenominatorPFEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2511  DenominatorPFEta_MedpTcut->getTH1();
2512 
2513  histoname = labelname+"_DenominatorPFPhi_MedpTcut";
2514  title = labelname+"DenominatorPFPhi_MedpTcut;PF #Phi";
2515  MonitorElement * DenominatorPFPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2516  DenominatorPFPhi_MedpTcut->getTH1();
2517 
2518  histoname = labelname+"_DenominatorPFEtaPhi_MedpTcut";
2519  title = labelname+"DenominatorPFEtaPhi_MedpTcut;PF #eta;Calo #Phi";
2520  MonitorElement * DenominatorPFEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2521  DenominatorPFEtaPhi_MedpTcut->getTH1();
2522 
2523  histoname = labelname+"_DenominatorPFEta_HighpTcut";
2524  title = labelname+"DenominatorPFEta_HighpTcut;PF #eta ";
2525  MonitorElement * DenominatorPFEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2526  DenominatorPFEta_HighpTcut->getTH1();
2527 
2528  histoname = labelname+"_DenominatorPFPhi_HighpTcut";
2529  title = labelname+"DenominatorPFPhi_HighpTcut;PF #Phi";
2530  MonitorElement * DenominatorPFPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2531  DenominatorPFPhi_HighpTcut->getTH1();
2532 
2533  histoname = labelname+"_DenominatorPFEtaPhi_HighpTcut";
2534  title = labelname+"DenominatorPFEtaPhi_HighpTcut;PF #eta;Calo #Phi";
2535  MonitorElement * DenominatorPFEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2536  DenominatorPFEtaPhi_HighpTcut->getTH1();
2537 
2538  histoname = labelname+"_PFDeltaR";
2539  title = labelname+"PFDeltaR;";
2540  MonitorElement * PFDeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2541  PFDeltaR->getTH1();
2542 
2543  histoname = labelname+"_PFDeltaPhi";
2544  title = labelname+"PFDeltaPhi;";
2545  MonitorElement * PFDeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
2546  PFDeltaPhi->getTH1();
2547 
2548  v->setEffHistos(NumeratorPt,
2549  NumeratorPtBarrel,
2550  NumeratorPtEndcap,
2551  NumeratorPtForward,
2552  NumeratorEta,
2553  NumeratorPhi,
2554  NumeratorEtaPhi,
2555  //
2556  NumeratorEtaBarrel,
2557  NumeratorPhiBarrel,
2558  NumeratorEtaEndcap,
2559  NumeratorPhiEndcap,
2560  NumeratorEtaForward,
2561  NumeratorPhiForward,
2562  NumeratorEta_LowpTcut,
2563  NumeratorPhi_LowpTcut,
2564  NumeratorEtaPhi_LowpTcut,
2565  NumeratorEta_MedpTcut,
2566  NumeratorPhi_MedpTcut,
2567  NumeratorEtaPhi_MedpTcut,
2568  NumeratorEta_HighpTcut,
2569  NumeratorPhi_HighpTcut,
2570  NumeratorEtaPhi_HighpTcut,
2571  //
2572  DenominatorPt,
2573  DenominatorPtBarrel,
2574  DenominatorPtEndcap,
2575  DenominatorPtForward,
2576  DenominatorEta,
2577  DenominatorPhi,
2578  DenominatorEtaPhi,
2579  //
2580  DenominatorEtaBarrel,
2581  DenominatorPhiBarrel,
2582  DenominatorEtaEndcap,
2583  DenominatorPhiEndcap,
2584  DenominatorEtaForward,
2585  DenominatorPhiForward,
2586  DenominatorEta_LowpTcut,
2587  DenominatorPhi_LowpTcut,
2588  DenominatorEtaPhi_LowpTcut,
2589  DenominatorEta_MedpTcut,
2590  DenominatorPhi_MedpTcut,
2591  DenominatorEtaPhi_MedpTcut,
2592  DenominatorEta_HighpTcut,
2593  DenominatorPhi_HighpTcut,
2594  DenominatorEtaPhi_HighpTcut,
2595  DeltaR,
2596  DeltaPhi,
2597  //
2598  NumeratorPFPt,
2599  NumeratorPFMHT,
2600  NumeratorPFPtBarrel,
2601  NumeratorPFPtEndcap,
2602  NumeratorPFPtForward,
2603  NumeratorPFEta,
2604  NumeratorPFPhi,
2605  NumeratorPFEtaPhi,
2606  NumeratorPFEtaBarrel,
2607  NumeratorPFPhiBarrel,
2608  NumeratorPFEtaEndcap,
2609  NumeratorPFPhiEndcap,
2610  NumeratorPFEtaForward,
2611  NumeratorPFPhiForward,
2612  NumeratorPFEta_LowpTcut,
2613  NumeratorPFPhi_LowpTcut,
2614  NumeratorPFEtaPhi_LowpTcut,
2615  NumeratorPFEta_MedpTcut,
2616  NumeratorPFPhi_MedpTcut,
2617  NumeratorPFEtaPhi_MedpTcut,
2618  NumeratorPFEta_HighpTcut,
2619  NumeratorPFPhi_HighpTcut,
2620  NumeratorPFEtaPhi_HighpTcut,
2621  DenominatorPFPt,
2622  DenominatorPFMHT,
2623  DenominatorPFPtBarrel,
2624  DenominatorPFPtEndcap,
2625  DenominatorPFPtForward,
2626  DenominatorPFEta,
2627  DenominatorPFPhi,
2628  DenominatorPFEtaPhi,
2629  DenominatorPFEtaBarrel,
2630  DenominatorPFPhiBarrel,
2631  DenominatorPFEtaEndcap,
2632  DenominatorPFPhiEndcap,
2633  DenominatorPFEtaForward,
2634  DenominatorPFPhiForward,
2635  DenominatorPFEta_LowpTcut,
2636  DenominatorPFPhi_LowpTcut,
2637  DenominatorPFEtaPhi_LowpTcut,
2638  DenominatorPFEta_MedpTcut,
2639  DenominatorPFPhi_MedpTcut,
2640  DenominatorPFEtaPhi_MedpTcut,
2641  DenominatorPFEta_HighpTcut,
2642  DenominatorPFPhi_HighpTcut,
2643  DenominatorPFEtaPhi_HighpTcut,
2644  PFDeltaR,
2645  PFDeltaPhi
2646  );
2647 
2648  }// Loop over Jet Trigger
2649 
2650  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0)){
2651 
2652  histoname = labelname+"_NumeratorAvrgPt";
2653  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c]";
2654  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2655  NumeratorPt->getTH1();
2656 
2657  histoname = labelname+"_NumeratorAvrgEta";
2658  title = labelname+"NumeratorAvrgEta;Calo #eta";
2659  MonitorElement * NumeratorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2660  NumeratorEta->getTH1();
2661 
2662  histoname = labelname+"_DenominatorAvrgPt";
2663  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
2664  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2665  DenominatorPt->getTH1();
2666 
2667  histoname = labelname+"_DenominatorAvrgEta";
2668  title = labelname+"DenominatorAvrgEta;Calo #eta";
2669  MonitorElement * DenominatorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2670  DenominatorEta->getTH1();
2671 
2672  histoname = labelname+"_DeltaR";
2673  title = labelname+"DeltaR;";
2674  MonitorElement * DeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2675  DeltaR->getTH1();
2676 
2677  histoname = labelname+"_DeltaPhi";
2678  title = labelname+"DeltaPhi;";
2679  MonitorElement * DeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
2680  DeltaPhi->getTH1();
2681 
2682  //add PF histo: SJ
2683  histoname = labelname+"_NumeratorAvrgPFPt";
2684  title = labelname+"NumeratorAvrgPFPt;PF Pt[GeV/c]";
2685  MonitorElement * NumeratorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2686  NumeratorPFPt->getTH1();
2687 
2688  histoname = labelname+"_NumeratorAvrgPFEta";
2689  title = labelname+"NumeratorAvrgPFEta;PF #eta";
2690  MonitorElement * NumeratorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2691  NumeratorPFEta->getTH1();
2692 
2693  histoname = labelname+"_DenominatorAvrgPFPt";
2694  title = labelname+"DenominatorAvrgPFPt;PF Pt[GeV/c] ";
2695  MonitorElement * DenominatorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2696  DenominatorPFPt->getTH1();
2697 
2698  histoname = labelname+"_DenominatorAvrgPFEta";
2699  title = labelname+"DenominatorAvrgPFEta;PF #eta";
2700  MonitorElement * DenominatorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2701  DenominatorPFEta->getTH1();
2702 
2703  histoname = labelname+"_PFDeltaR";
2704  title = labelname+"PFDeltaR;";
2705  MonitorElement * PFDeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2706  PFDeltaR->getTH1();
2707 
2708  histoname = labelname+"_PFDeltaPhi";
2709  title = labelname+"PFDeltaPhi;";
2710  MonitorElement * PFDeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
2711  PFDeltaPhi->getTH1();
2712 
2713  v->setEffHistos( dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2714  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2715  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2716  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2717  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2718  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2719  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2720  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2721  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2722  dummy, dummy, dummy, dummy
2723  );
2724  }
2725 
2726  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
2727 
2728  histoname = labelname+"_NumeratorPt";
2729  if(v->getPath().find("HLT_PFMET")==std::string::npos)
2730  title = labelname+"NumeratorPt; CaloMET[GeV/c]";
2731  else
2732  title = labelname+"NumeratorPt; PFMET[GeV/c]";
2733  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2734  NumeratorPt->getTH1();
2735 
2736  histoname = labelname+"_NumeratorPhi";
2737  title = labelname+"NumeratorPhi; #Phi";
2738  MonitorElement * NumeratorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2739  NumeratorPhi->getTH1();
2740 
2741  histoname = labelname+"_DenominatorPt";
2742  if(v->getPath().find("HLT_PFMET")==std::string::npos)
2743  title = labelname+"DenominatorPt; CaloMET[GeV/c]";
2744  else
2745  title = labelname+"DenominatorPt; PFMET[GeV/c]";
2746  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2747  DenominatorPt->getTH1();
2748 
2749  histoname = labelname+"_DenominatorPhi";
2750  title = labelname+"DenominatorPhi; #Phi";
2751  MonitorElement * DenominatorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2752  DenominatorPhi->getTH1();
2753 
2754  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy, dummy, dummy, dummy,
2755  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2756  dummy, dummy, DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy, dummy,
2757  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2758  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2759  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2760  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2761  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2762  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2763  dummy, dummy, dummy, dummy
2764  );
2765  }// Loop over MET trigger
2766  }
2767  }//plotEff_
2768 
2769  if(runStandalone_){//runStandalone
2770  //--------Histos to see WHY trigger is NOT fired----------
2771  int Nbins_ = 10;
2772  int Nmin_ = 0;
2773  int Nmax_ = 10;
2774  int Ptbins_ = 1000;
2775  int Etabins_ = 40;
2776  int Phibins_ = 35;
2777  double PtMin_ = 0.;
2778  double PtMax_ = 1000.;
2779  double EtaMin_ = -5.;
2780  double EtaMax_ = 5.;
2781  double PhiMin_ = -3.14159;
2782  double PhiMax_ = 3.14159;
2783 
2784  std::string dirName4_ = dirname_ + "/TriggerNotFired/";
2785  // iBooker.setCurrentFolder(dirName4);
2786 
2787  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
2788 
2789  MonitorElement *dummy;
2790  dummy = iBooker.bookFloat("dummy");
2791 
2792  std::string labelname("ME") ;
2793  std::string histoname(labelname+"");
2794  std::string title(labelname+"");
2795  iBooker.setCurrentFolder(dirName4_ + v->getPath());
2796 
2797  histoname = labelname+"_TriggerSummary";
2798  title = labelname+"Summary of trigger levels";
2799  MonitorElement * TriggerSummary = iBooker.book1D(histoname.c_str(),title.c_str(),7, -0.5,6.5);
2800 
2801  std::vector<std::string> trigger;
2802  trigger.push_back("Nevt");
2803  trigger.push_back("L1 failed");
2804  trigger.push_back("L1 & HLT failed");
2805  trigger.push_back("L1 failed but not HLT");
2806  trigger.push_back("L1 passed");
2807  trigger.push_back("L1 & HLT passed");
2808  trigger.push_back("L1 passed but not HLT");
2809 
2810  for(unsigned int i =0; i < trigger.size(); i++)
2811  TriggerSummary->setBinLabel(i+1, trigger[i]);
2812 
2813  if((v->getTriggerType().compare("SingleJet_Trigger") == 0)){
2814  histoname = labelname+"_JetPt";
2815  title = labelname+"Leading jet pT;Pt[GeV/c]";
2816  MonitorElement * JetPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2817  JetPt->getTH1();
2818 
2819  histoname = labelname+"_JetEtaVsPt";
2820  title = labelname+"Leading jet #eta vs pT;#eta;Pt[GeV/c]";
2821  MonitorElement * JetEtaVsPt = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Ptbins_,PtMin_,PtMax_);
2822  JetEtaVsPt->getTH1();
2823 
2824  histoname = labelname+"_JetPhiVsPt";
2825  title = labelname+"Leading jet #Phi vs pT;#Phi;Pt[GeV/c]";
2826  MonitorElement * JetPhiVsPt = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Ptbins_,PtMin_,PtMax_);
2827  JetPhiVsPt->getTH1();
2828 
2829  v->setDgnsHistos( TriggerSummary, dummy, JetPt, JetEtaVsPt, JetPhiVsPt, dummy, dummy, dummy, dummy, dummy, dummy);
2830  }// single Jet trigger
2831 
2832  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
2833  histoname = labelname+"_JetSize";
2834  title = labelname+"Jet Size;multiplicity";
2835  MonitorElement * JetSize = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
2836  JetSize->getTH1();
2837 
2838  histoname = labelname+"_AvergPt";
2839  title = labelname+"Average Pt;Pt[GeV/c]";
2840  MonitorElement * Pt12 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2841  Pt12->getTH1();
2842 
2843  histoname = labelname+"_AvergEta";
2844  title = labelname+"Average Eta;#eta";
2845  MonitorElement * Eta12 = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2846  Eta12->getTH1();
2847 
2848  histoname = labelname+"_PhiDifference";
2849  title = labelname+"#Delta#Phi;#Delta#Phi";
2850  MonitorElement * Phi12 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2851  Phi12->getTH1();
2852 
2853  histoname = labelname+"_Pt3Jet";
2854  title = labelname+"Pt of 3rd Jet;Pt[GeV/c]";
2855  MonitorElement * Pt3 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2856  Pt3->getTH1();
2857 
2858  histoname = labelname+"_Pt12VsPt3Jet";
2859  title = labelname+"Pt of 3rd Jet vs Average Pt of leading jets;Avergage Pt[GeV/c]; Pt of 3rd Jet [GeV/c]";
2860  MonitorElement * Pt12Pt3 = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2861  Pt12Pt3->getTH1();
2862 
2863  histoname = labelname+"_Pt12VsPhi12";
2864  title = labelname+"Average Pt of leading jets vs #Delta#Phi between leading jets;Avergage Pt[GeV/c]; #Delta#Phi";
2865  MonitorElement * Pt12Phi12 = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Phibins_,PhiMin_,PhiMax_);
2866  Pt12Phi12->getTH1();
2867 
2868  v->setDgnsHistos( TriggerSummary, JetSize, dummy, dummy, dummy, Pt12, Eta12, Phi12, Pt3, Pt12Pt3, Pt12Phi12);
2869  }// Dijet Jet trigger
2870 
2871  if((v->getTriggerType().compare("MET_Trigger") == 0)){
2872  histoname = labelname+"_MET";
2873  title = labelname+"MET;Pt[GeV/c]";
2874  MonitorElement * MET = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2875  MET->getTH1();
2876 
2877  v->setDgnsHistos(TriggerSummary, dummy, MET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
2878  } // MET trigger
2879 
2880  if((v->getTriggerType().compare("TET_Trigger") == 0)){
2881  histoname = labelname+"_TET";
2882  title = labelname+"TET;Pt[GeV/c]";
2883  MonitorElement * TET = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2884  TET->getTH1();
2885 
2886  v->setDgnsHistos(TriggerSummary, dummy, TET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
2887  } // TET trigger
2888  }
2889  }//runStandalone
2890 
2891  }
2892 }
2893 //------------------------------------------------------------------------//
2895 {
2896 
2897  // find L1 condition for numpath with numpath objecttype
2898  // find PSet for L1 global seed for numpath,
2899  // list module labels for numpath
2900  std::string l1pathname = "dummy";
2901 
2902  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2903 
2904  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
2905  numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2906 
2907  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed") {
2908  l1pathname = *numpathmodule;
2909  break;
2910  }
2911  }
2912  return l1pathname;
2913 }
2914 
2915 //------------------------------------------------------------------------//
2917  bool output = false;
2918  if (fabs(eta)<=1.3) output=true;
2919  return output;
2920 }
2921 
2922 //------------------------------------------------------------------------//
2924  bool output = false;
2925  if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=true;
2926  return output;
2927 }
2928 
2929 //------------------------------------------------------------------------//
2931  bool output = false;
2932  if (fabs(eta)>3.0) output=true;
2933  return output;
2934 }
2935 
2936 //------------------------------------------------------------------------//
2938  // hltConfig_ has to be defined first before calling this method
2939  bool output=false;
2940  for (unsigned int j=0; j!=hltConfig_.size(); ++j) {
2941  if (hltConfig_.triggerName(j) == pathname )
2942  output=true;
2943  }
2944  return output;
2945 }
2946 
2947 //------------------------------------------------------------------------//
2949  // triggerResults_, triggerNames_ has to be defined first before calling this method
2950  bool output=false;
2951  if(triggerResults_.isValid()) {
2952  unsigned index = triggerNames_.triggerIndex(pathName);
2953  if(index < triggerNames_.size() && triggerResults_->accept(index)) output = true;
2954  }
2955  return output;
2956 }
2957 
2958 //------------------------------------------------------------------------//
2959 // This returns the position of trigger name defined in summary histograms
2961  int nbins = rate_All->getTH1()->GetNbinsX();
2962  double binVal = -100;
2963  for(int ibin=1; ibin<nbins+1; ibin++)
2964  {
2965  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
2966  if(binLabel[0]=='\0')continue;
2967  // std::string binLabel_str = string(binLabel);
2968  // if(binLabel_str.compare(trigName)!=0)continue;
2969  if(trigName.compare(binLabel)!=0)continue;
2970 
2971  if(trigName.compare(binLabel)==0){
2972  binVal = rate_All->getTH1()->GetBinCenter(ibin);
2973  break;
2974  }
2975  }
2976  return binVal;
2977 }
2978 
2979 //------------------------------------------------------------------------//
2981  // processname_, triggerObj_ has to be defined before calling this method
2982  bool output=false;
2983  edm::InputTag testTag(objectName,"",processname_);
2984  const int index = triggerObj_->filterIndex(testTag);
2985  if ( index >= triggerObj_->sizeFilters() ) {
2986  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< index << " of that name ";
2987  } else {
2988  const trigger::Keys & k = triggerObj_->filterKeys(index);
2989  if (k.size()) output=true;
2990  }
2991  return output;
2992 }
2993 //------------------------------------------------------------------------//
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
unsigned int size() const
number of trigger paths in trigger table
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
edm::EDGetTokenT< reco::VertexCollection > vertexToken
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken
const std::string moduleType(const std::string &module) const
C++ class name of module.
tuple checkPath
Definition: config.py:11
virtual bool isEndCap(double eta)
const std::string & triggerName(unsigned int triggerIndex) const
JetMETHLTOfflineSource(const edm::ParameterSet &)
const double w
Definition: UKUtility.cc:23
virtual double et() const
transverse energy
Definition: deltaR.h:79
edm::Handle< reco::PFJetCollection > pfjetColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
virtual double TriggerPosition(std::string trigName)
double fHPD() const
Definition: JetIDHelper.h:40
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)
edm::Handle< edm::TriggerResults > triggerResults_
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
reco::PFJetCollection pfjet
Strings::size_type size() const
Definition: TriggerNames.cc:39
T eta() const
edm::Handle< reco::PFMETCollection > pfmetColl_
PathInfoCollection hltPathsAllTriggerSummary_
virtual bool validPathHLT(std::string path)
virtual double pt() const
transverse momentum
static const std::string removeVersion(const std::string &trigger)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
virtual void fillMEforMonAllTrigger(const edm::Event &iEvent, const edm::EventSetup &)
void Fill(long long x)
Collection of Calo MET.
virtual bool isBarrel(double eta)
std::vector< std::string > pathFilter_
int iEvent
Definition: GenABIO.cc:230
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
edm::EDGetTokenT< reco::JetCorrector > CaloJetCorToken_
std::vector< std::string > MBTrigPaths_
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
virtual bool isTriggerObjectFound(std::string objectName)
Definition: MET.h:42
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:48
virtual bool isForward(double eta)
MonitorElement * correlation_AllWrtMu
std::vector< std::string > pathRejectKeyword_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
TH1 * getTH1(void) const
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
reco::CaloJetCollection calojet
std::vector< std::string > MuonTrigPaths_
bool isValid() const
Definition: HandleBase.h:75
virtual bool isHLTPathAccepted(std::string pathName)
edm::Handle< reco::CaloJetCollection > calojetColl_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
virtual void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
virtual void fillMEforMonTriggerSummary(const edm::Event &iEvent, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
#define N
Definition: blowfish.cc:9
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
T const * product() const
Definition: Handle.h:81
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken
std::vector< size_type > Keys
PathInfoCollection hltPathsAll_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::string getL1ConditionModuleName(const std::string &pathname)
edm::Handle< trigger::TriggerEvent > triggerObj_
MonitorElement * correlation_AllWrtMB
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken
std::string const & label() const
Definition: InputTag.h:42
edm::EventID id() const
Definition: EventBase.h:60
edm::Handle< reco::CaloMETCollection > calometColl_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
virtual void analyze(const edm::Event &, const edm::EventSetup &)
tuple cout
Definition: gather_cfg.py:121
virtual void fillMEforEffAllTrigger(const edm::Event &iEvent, const edm::EventSetup &)
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
volatile std::atomic< bool > shutdown_flag false
virtual double phi() const
momentum azimuthal angle
reco::helper::JetIDHelper * jetID
std::string const & instance() const
Definition: InputTag.h:43
edm::EDGetTokenT< reco::JetCorrector > PFJetCorToken_
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:98
Definition: Run.h:41
PathInfoCollection hltPathsEff_
Definition: DDAxes.h:10
Collection of PF MET.