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  Responsible: Sunil Bansal, Shabnam Jabeen, Michael Luk, Phat Srimanobhas
4  Contact: Phat Srimanobhas (srimanob@mail.cern.ch)
5  Last modified: 31 July 2012
6 */
7 
9 
18 
25 
27 
29 
31 
32 #include "TMath.h"
33 #include "TH1F.h"
34 #include "TH2F.h"
35 #include "TProfile.h"
36 #include "TPRegexp.h"
37 
38 #include "math.h"
39 
40 using namespace edm;
41 using namespace reco;
42 using namespace std;
43 using namespace trigger;
44 
46  isSetup_(false)
47 {
48  LogDebug("JetMETHLTOfflineSource") << "constructor....";
49 
51  if ( ! dbe ) {
52  LogDebug("JetMETHLTOfflineSource") << "unabel to get DQMStore service?";
53  }
54  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
55  dbe->setVerbose(0);
56  }
57  //
58  dirname_ = iConfig.getUntrackedParameter("dirname",std::string("HLT/JetMET/"));
59  processname_ = iConfig.getParameter<std::string>("processname");
60  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
61  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
62  //
63  verbose_ = iConfig.getUntrackedParameter< bool >("verbose", false);
64  runStandalone_ = iConfig.getUntrackedParameter< bool >("runStandalone", false);
65  //
66  plotAll_ = iConfig.getUntrackedParameter< bool >("plotAll", true);
67  plotAllwrtMu_ = iConfig.getUntrackedParameter< bool >("plotAllwrtMu", false);
68  plotEff_ = iConfig.getUntrackedParameter< bool >("plotEff", true);
69  plotEffwrtMu_ = iConfig.getUntrackedParameter< bool >("plotEffwrtMu", false);
70  plotEffwrtMB_ = iConfig.getUntrackedParameter< bool >("plotEffwrtMB", false);
71  nameForEff_ = iConfig.getUntrackedParameter< bool >("nameForEff", true);
72  MuonTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMuon");
73  MBTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMB");
74  //CaloJet, CaloMET
75  caloJetsTag_ = iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel");
76  caloMETTag_ = iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel");
77  //PFJet, PFMET
78  pfJetsTag_ = iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel");
79  pfMETTag_ = iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel");
80  //pfmhtTag_ = iConfig.getParameter<edm::InputTag>("PFMHTCollectionLabel");
81  //
82  CaloJetCorService_ = iConfig.getParameter<std::string>("CaloJetCorService");
83  PFJetCorService_ = iConfig.getParameter<std::string>("PFJetCorService");
84  //JetID
85  jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"));
86  _fEMF = iConfig.getUntrackedParameter< double >("fEMF", 0.01);
87  _feta = iConfig.getUntrackedParameter< double >("feta", 2.60);
88  _fHPD = iConfig.getUntrackedParameter< double >("fHPD", 0.98);
89  _n90Hits = iConfig.getUntrackedParameter< double >("n90Hits", 1.0);
90  _min_NHEF = iConfig.getUntrackedParameter< double >("minNHEF",0.);
91  _max_NHEF = iConfig.getUntrackedParameter< double >("maxNHEF",0.99);
92  _min_CHEF = iConfig.getUntrackedParameter< double >("minCHEF",0.);
93  _max_CHEF = iConfig.getUntrackedParameter< double >("maxCHEF",1.);
94  _min_NEMF = iConfig.getUntrackedParameter< double >("minNEMF",0.);
95  _max_NEMF = iConfig.getUntrackedParameter< double >("maxNEMF",0.99);
96  _min_CEMF = iConfig.getUntrackedParameter< double >("minCEMF",0.);
97  _max_CEMF = iConfig.getUntrackedParameter< double >("maxCEMF",0.99);
98  //Paths
99  pathFilter_ = iConfig.getUntrackedParameter<vector<std::string> >("pathFilter");
100  pathRejectKeyword_ = iConfig.getUntrackedParameter<vector<std::string> >("pathRejectKeyword");
101  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet> >("pathPairs");
102  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
103  custompathnamepairs_.push_back(make_pair(
104  pathconf->getParameter<std::string>("pathname"),
105  pathconf->getParameter<std::string>("denompathname")
106  ));
107  }
108 }
109 
110 
112 {
113  //
114  // do anything here that needs to be done at desctruction time
115  // (e.g. close files, deallocate resources etc.)
116 }
117 
118 
119 void
121 {
122  //---------- triggerResults ----------
124  if(!triggerResults_.isValid()) {
125  edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
126  iEvent.getByLabel(triggerResultsLabelFU,triggerResults_);
127  if(!triggerResults_.isValid()) {
128  edm::LogInfo("FourVectorHLTOffline") << "TriggerResults not found, "
129  "skipping event";
130  return;
131  }
132  }
133 
134  //---------- triggerResults ----------
135  //int npath;
136  if(&triggerResults_) {
137  // Check how many HLT triggers are in triggerResults
138  //npath = triggerResults_->size();
140  }
141  else {
142  edm::LogInfo("CaloMETHLTOfflineSource") << "TriggerResults::HLT not found, "
143  "automatically select events";
144  return;
145  }
146 
147  //---------- triggerSummary ----------
149  if(!triggerObj_.isValid()) {
150  edm::InputTag triggerSummaryLabelFU(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(), "FU");
151  iEvent.getByLabel(triggerSummaryLabelFU,triggerObj_);
152  if(!triggerObj_.isValid()) {
153  edm::LogInfo("FourVectorHLTOffline") << "TriggerEvent not found, "
154  "skipping event";
155  return;
156  }
157  }
158 
159  //------------ Offline Objects -------
160  bool ValidJetColl_ = iEvent.getByLabel(caloJetsTag_,calojetColl_);
161  if(!ValidJetColl_) return;
162  calojet = *calojetColl_;
163  //std::stable_sort( calojet.begin(), calojet.end(), PtSorter() );
164 
165  bool ValidPFJetColl_ = iEvent.getByLabel(pfJetsTag_,pfjetColl_);
166  if(!ValidPFJetColl_) return;
167  pfjet = *pfjetColl_;
168  //std::stable_sort( pfjet.begin(), pfjet.end(), PtSorter() );
169 
170  bool ValidMETColl_ = iEvent.getByLabel(caloMETTag_, calometColl_);
171  if(!ValidMETColl_) return;
172 
173  bool ValidPFMETColl_ = iEvent.getByLabel(pfMETTag_, pfmetColl_);
174  if(!ValidPFMETColl_) return;
175 
176  //---------- Event counting (DEBUG) ----------
177  if(verbose_ && iEvent.id().event()%10000==0)
178  cout<<"Run = "<<iEvent.id().run()<<", LS = "<<iEvent.luminosityBlock()<<", Event = "<<iEvent.id().event()<<endl;
179 
180  //Define on-the-fly correction Jet
181  for(int i=0; i<2; i++){
182  CaloJetPx[i] = 0.;
183  CaloJetPy[i] = 0.;
184  CaloJetPt[i] = 0.;
185  CaloJetEta[i] = 0.;
186  CaloJetPhi[i] = 0.;
187  CaloJetEMF[i] = 0.;
188  CaloJetfHPD[i] = 0.;
189  CaloJetn90[i] = 0.;
190  PFJetPx[i] = 0.;
191  PFJetPy[i] = 0.;
192  PFJetPt[i] = 0.;
193  PFJetEta[i] = 0.;
194  PFJetPhi[i] = 0.;
195  PFJetNHEF[i] = 0.;
196  PFJetCHEF[i] = 0.;
197  PFJetNEMF[i] = 0.;
198  PFJetCEMF[i] = 0.;
199  }
200 
201  //---------- CaloJet Correction (on-the-fly) ----------
202  const JetCorrector* calocorrector = JetCorrector::getJetCorrector(CaloJetCorService_,iSetup);
203  CaloJetCollection::const_iterator calojet_ = calojet.begin();
204  for(; calojet_ != calojet.end(); ++calojet_){
205  double scale = calocorrector->correction(*calojet_,iEvent, iSetup);
206  jetID->calculate(iEvent, *calojet_);
207 
208  if(scale*calojet_->pt()>CaloJetPt[0]){
209  CaloJetPt[1] = CaloJetPt[0];
210  CaloJetPx[1] = CaloJetPx[0];
211  CaloJetPy[1] = CaloJetPy[0];
212  CaloJetEta[1] = CaloJetEta[0];
213  CaloJetPhi[1] = CaloJetPhi[0];
214  CaloJetEMF[1] = CaloJetEMF[0];
215  CaloJetfHPD[1] = CaloJetfHPD[0];
216  CaloJetn90[1] = CaloJetn90[0];
217  //
218  CaloJetPt[0] = scale*calojet_->pt();
219  CaloJetPx[0] = scale*calojet_->px();
220  CaloJetPy[0] = scale*calojet_->py();
221  CaloJetEta[0] = calojet_->eta();
222  CaloJetPhi[0] = calojet_->phi();
223  CaloJetEMF[0] = calojet_->emEnergyFraction();
224  CaloJetfHPD[0] = jetID->fHPD();
225  CaloJetn90[0] = jetID->n90Hits();
226  }
227  else if(scale*calojet_->pt()<CaloJetPt[0] && scale*calojet_->pt()>CaloJetPt[1] ){
228  CaloJetPt[1] = scale*calojet_->pt();
229  CaloJetPx[1] = scale*calojet_->px();
230  CaloJetPy[1] = scale*calojet_->py();
231  CaloJetEta[1] = calojet_->eta();
232  CaloJetPhi[1] = calojet_->phi();
233  CaloJetEMF[1] = calojet_->emEnergyFraction();
234  CaloJetfHPD[1] = jetID->fHPD();
235  CaloJetn90[1] = jetID->n90Hits();
236  }
237  else{}
238  }
239 
240  //---------- PFJet Correction (on-the-fly) ----------
241  pfMHTx_All = 0.;
242  pfMHTy_All = 0.;
243  const JetCorrector* pfcorrector = JetCorrector::getJetCorrector(PFJetCorService_,iSetup);
244  PFJetCollection::const_iterator pfjet_ = pfjet.begin();
245  for(; pfjet_ != pfjet.end(); ++pfjet_){
246  double scale = pfcorrector->correction(*pfjet_,iEvent, iSetup);
247  pfMHTx_All = pfMHTx_All + scale*pfjet_->px();
248  pfMHTy_All = pfMHTy_All + scale*pfjet_->py();
249  if(scale*pfjet_->pt()>PFJetPt[0]){
250  PFJetPt[1] = PFJetPt[0];
251  PFJetPx[1] = PFJetPx[0];
252  PFJetPy[1] = PFJetPy[0];
253  PFJetEta[1] = PFJetEta[0];
254  PFJetPhi[1] = PFJetPhi[0];
255  PFJetNHEF[1] = PFJetNHEF[0];
256  PFJetCHEF[1] = PFJetCHEF[0];
257  PFJetNEMF[1] = PFJetNEMF[0];
258  PFJetCEMF[1] = PFJetCEMF[0];
259  //
260  PFJetPt[0] = scale*pfjet_->pt();
261  PFJetPx[0] = scale*pfjet_->px();
262  PFJetPy[0] = scale*pfjet_->py();
263  PFJetEta[0] = pfjet_->eta();
264  PFJetPhi[0] = pfjet_->phi();
265  PFJetNHEF[0] = pfjet_->neutralHadronEnergyFraction();
266  PFJetCHEF[0] = pfjet_->chargedHadronEnergyFraction();
267  PFJetNEMF[0] = pfjet_->neutralEmEnergyFraction();
268  PFJetCEMF[0] = pfjet_->chargedEmEnergyFraction();
269  }
270  else if(scale*pfjet_->pt()<PFJetPt[0] && scale*pfjet_->pt()>PFJetPt[1] ){
271  PFJetPt[1] = scale*pfjet_->pt();
272  PFJetPx[1] = scale*pfjet_->px();
273  PFJetPy[1] = scale*pfjet_->py();
274  PFJetEta[1] = pfjet_->eta();
275  PFJetPhi[1] = pfjet_->phi();
276  PFJetNHEF[1] = pfjet_->neutralHadronEnergyFraction();
277  PFJetCHEF[1] = pfjet_->chargedHadronEnergyFraction();
278  PFJetNEMF[1] = pfjet_->neutralEmEnergyFraction();
279  PFJetCEMF[1] = pfjet_->chargedEmEnergyFraction();
280  }
281  else{}
282  }
283 
284  if(verbose_){
285  for(int i = 0; i<2; i++){
286  cout<<"CaloJet-0: "<<CaloJetPt[i]<<", Eta = "<<CaloJetEta[i]<<", Phi = "<<CaloJetPhi[i]<<endl;
287  cout<<"fHPD = "<<CaloJetfHPD[0]<<", n90 = "<<CaloJetn90[0]<<endl;
288  }
289  for(int i = 0; i<2; i++){
290  cout<<"PFJet-0: "<<PFJetPt[i]<<", Eta = "<<PFJetEta[i]<<", Phi = "<<PFJetPhi[i]<<endl;
291  }
292  }
293 
294  //---------- RUN ----------
295  fillMEforMonTriggerSummary(iEvent, iSetup);
296  if(plotAll_) fillMEforMonAllTrigger(iEvent, iSetup);
298  if(plotEff_) fillMEforEffAllTrigger(iEvent,iSetup);
299  if(plotEff_ && plotEffwrtMu_) fillMEforEffWrtMuTrigger(iEvent,iSetup);
300  if(plotEff_ && plotEffwrtMB_) fillMEforEffWrtMBTrigger(iEvent,iSetup);
302 }
303 
304 // Trigger summary for all paths
305 void
307 {
308  bool muTrig = false;
309 
310  for(size_t i=0;i<MuonTrigPaths_.size();++i){
311  const unsigned int nPath(hltConfig_.size());
312  for (unsigned int j=0; j!=nPath; ++j) {
314  if(pathname.find(MuonTrigPaths_[i]) != std::string::npos){
315  if(isHLTPathAccepted(pathname)){
316  muTrig = true;
317  if(verbose_) cout<<"fillMEforMonTriggerSummary: Muon Match"<<endl;
318  }
319  }
320  if(muTrig) break;
321  }
322  if(muTrig) break;
323  }
324 
325  bool mbTrig = false;
326  for(size_t i=0;i<MBTrigPaths_.size();++i){
327  const unsigned int nPath(hltConfig_.size());
328  for (unsigned int j=0; j!=nPath; ++j) {
330  if(pathname.find(MBTrigPaths_[i]) != std::string::npos){
331  if(isHLTPathAccepted(pathname)){
332  mbTrig = true;
333  if(verbose_) cout<<"fillMEforMonTriggerSummary: MinBias Match"<<endl;
334  }
335  }
336  if(mbTrig) break;
337  }
338  if(mbTrig) break;
339  }
340 
341  PathInfoCollection::iterator v = hltPathsAll_.begin();
342  for(; v!= hltPathsAll_.end(); ++v ){
343  bool trigFirst= false;
344  double binV = TriggerPosition(v->getPath());
345  if(isHLTPathAccepted(v->getPath())) trigFirst = true;
346  if(!trigFirst)continue;
347  if(trigFirst){
348  rate_All->Fill(binV);
349  correlation_All->Fill(binV,binV);
350  if(muTrig && runStandalone_){
351  rate_AllWrtMu->Fill(binV);
352  correlation_AllWrtMu->Fill(binV,binV);
353  }
354  if(mbTrig && runStandalone_){
355  rate_AllWrtMB->Fill(binV);
356  correlation_AllWrtMB->Fill(binV,binV);
357  }
358  }
359  for(PathInfoCollection::iterator w = v+1; w!= hltPathsAll_.end(); ++w ){
360  bool trigSec = false;
361  double binW = TriggerPosition(w->getPath());
362  if(isHLTPathAccepted(w->getPath()))trigSec = true;
363  if(trigSec && trigFirst){
364  correlation_All->Fill(binV,binW);
365  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binV,binW);
366  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binV,binW);
367  }
368  if(!trigSec && trigFirst){
369  correlation_All->Fill(binW,binV);
370  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binW,binV);
371  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binW,binV);
372  }
373  }
374  }
375 
376  //Vertex
378  iEvent.getByLabel ("offlinePrimaryVertices",Vtx);
379  int vtxcnt=0;
380  for (VertexCollection::const_iterator itv=Vtx->begin(); itv!=Vtx->end(); itv++){
381  //if(vtxcnt>=20) break;
382  PVZ->Fill(itv->z());
383  //chi2vtx[vtxcnt] = itv->chi2();
384  //ndofvtx[vtxcnt] = itv->ndof();
385  //ntrkvtx[vtxcnt] = itv->tracksSize();
386  vtxcnt++;
387  }
388  NVertices->Fill(vtxcnt);
389 }
390 
391 void
393 {
394  //int npath;
395  if(&triggerResults_) { /*npath = triggerResults_->size();*/ }
396  else { return; }
397 
398  //
399  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
400  unsigned index = triggerNames_.triggerIndex(v->getPath());
401  if (index < triggerNames_.size() ){
402  v->getMEhisto_TriggerSummary()->Fill(0.);
403  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
404  const int l1Index = triggerObj_->filterIndex(l1Tag);
405  bool l1found = false;
406  if(l1Index < triggerObj_->sizeFilters() ) l1found = true;
407  if(!l1found)v->getMEhisto_TriggerSummary()->Fill(1.);
408  if(!l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(2.);
409  if(!l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(3.);
410  if(l1found)v->getMEhisto_TriggerSummary()->Fill(4.);
411  if(l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(5.);
412  if(l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(6.);
413  if(!(triggerResults_->accept(index)) && l1found){
414  //cout<<v->getTriggerType()<<endl;
415  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && (calojetColl_.isValid()) && calojet.size()){
416  CaloJetCollection::const_iterator jet = calojet.begin();
417  v->getMEhisto_JetPt()->Fill(jet->pt());
418  v->getMEhisto_EtavsPt()->Fill(jet->eta(),jet->pt());
419  v->getMEhisto_PhivsPt()->Fill(jet->phi(),jet->pt());
420  }
421  // single jet trigger is not fired
422 
423  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojetColl_.isValid() && calojet.size()){
424  v->getMEhisto_JetSize()->Fill(calojet.size());
425  if (calojet.size()>=2){
426  CaloJetCollection::const_iterator jet = calojet.begin();
427  CaloJetCollection::const_iterator jet2= calojet.begin(); jet2++;
428  double jet3pt = 0.;
429  if(calojet.size()>2){
430  CaloJetCollection::const_iterator jet3 = jet2++;
431  jet3pt = jet3->pt();
432  }
433  v->getMEhisto_Pt12()->Fill((jet->pt()+jet2->pt())/2.);
434  v->getMEhisto_Eta12()->Fill((jet->eta()+jet2->eta())/2.);
435  v->getMEhisto_Phi12()->Fill(deltaPhi(jet->phi(),jet2->phi()));
436  v->getMEhisto_Pt3()->Fill(jet3pt);
437  v->getMEhisto_Pt12Pt3()->Fill((jet->pt()+jet2->pt())/2., jet3pt);
438  v->getMEhisto_Pt12Phi12()->Fill((jet->pt()+jet2->pt())/2., deltaPhi(jet->phi(),jet2->phi()));
439  }
440  }// di jet trigger is not fired
441 
442  if(((v->getTriggerType().compare("MET_Trigger") == 0)|| (v->getTriggerType().compare("TET_Trigger") == 0)) && calometColl_.isValid() ){
443  const CaloMETCollection *calometcol = calometColl_.product();
444  const CaloMET met = calometcol->front();
445  v->getMEhisto_JetPt()->Fill(met.pt());
446  }//MET trigger is not fired
447  } // L1 is fired
448  }//
449  }// trigger not fired
450 }
451 
452 void
454 {
455  //int npath;
456  if(&triggerResults_) { /*npath = triggerResults_->size();*/ }
457  else { return; }
458 
459  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
460  PathInfoCollection::iterator v = hltPathsAll_.begin();
461  for(; v!= hltPathsAll_.end(); ++v ){
462  if(isHLTPathAccepted(v->getPath())==false) continue;
463 
464  //New jet collection (after apply JEC)
465  std::vector<double>jetPtVec;
466  std::vector<double>jetPhiVec;
467  std::vector<double>jetEtaVec;
468  std::vector<double>jetPxVec;
469  std::vector<double>jetPyVec;
470  std::vector<double>hltPtVec;
471  std::vector<double>hltPhiVec;
472  std::vector<double>hltEtaVec;
473  std::vector<double>hltPxVec;
474  std::vector<double>hltPyVec;
475 
476  //This will be used to find out punch through trigger
477  //bool fillL1HLT = false;
478 
479  //L1 and HLT indices
480  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
481  const int l1Index = triggerObj_->filterIndex(l1Tag);
482  edm::InputTag hltTag(v->getLabel(),"",processname_);
483  const int hltIndex = triggerObj_->filterIndex(hltTag);
484  //bool l1TrigBool = false;
485  bool hltTrigBool = false;
486  bool diJetFire = false;
487  int jetsize = 0;
488 
489  if ( l1Index >= triggerObj_->sizeFilters() ) {
490  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
491  }
492  else {
493  //l1TrigBool = true;
494  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
495  //
496  if(v->getObjectType() == trigger::TriggerJet
497  && v->getTriggerType().compare("SingleJet_Trigger") == 0)
498  v->getMEhisto_N_L1()->Fill(kl1.size());
499  //
500  trigger::Keys::const_iterator ki = kl1.begin();
501  for(; ki != kl1.end(); ++ki){
502  double l1TrigEta = -100;
503  double l1TrigPhi = -100;
504  //
505  if(v->getObjectType() == trigger::TriggerJet){
506  l1TrigEta = toc[*ki].eta();
507  l1TrigPhi = toc[*ki].phi();
508  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
509  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
510  if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
511  if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
512  if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
513  v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
514  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
515  v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
516  }
517  }
518  if(v->getObjectType() == trigger::TriggerMET ||
519  v->getObjectType() == trigger::TriggerTET){
520  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
521  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
522  }
523 
524  //-----------------------------------------------
525  if ( hltIndex >= triggerObj_->sizeFilters() ) {
526  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
527  }
528  else {
529  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
530  if(v->getObjectType() == trigger::TriggerJet
531  && ki == kl1.begin()
532  && v->getTriggerType().compare("SingleJet_Trigger") == 0)
533  v->getMEhisto_N_HLT()->Fill(khlt.size());
534  //
535  trigger::Keys::const_iterator kj = khlt.begin();
536  //Define hltTrigBool
537  for(;kj != khlt.end(); ++kj){
538  if(v->getObjectType() == trigger::TriggerJet){
539  double hltTrigEta = -100;
540  double hltTrigPhi = -100;
541  hltTrigEta = toc[*kj].eta();
542  hltTrigPhi = toc[*kj].phi();
543  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4
544  && (v->getTriggerType().compare("DiJet_Trigger") == 0))
545  hltTrigBool = true;
546  }
547  }
548  //
549  kj = khlt.begin();
550  for(;kj != khlt.end(); ++kj){
551  double hltTrigEta = -100.;
552  double hltTrigPhi = -100.;
553  //fillL1HLT = true;
554  //MET Triggers
555  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
556  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
557  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
558  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
559  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
560  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
561  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
562  }
563  //Jet Triggers
564  if(v->getObjectType() == trigger::TriggerJet){
565  hltTrigEta = toc[*kj].eta();
566  hltTrigPhi = toc[*kj].phi();
567  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4){
568  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
569  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
570  v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
571  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
572  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
573  v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
574  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
575  }
576  }
577  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 )
578  || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)) && !diJetFire){
579  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
580  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
581  if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
582  if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
583  if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
584  v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
585  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
586  v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
587  }
588 
589  //Calojet
590  if(calojetColl_.isValid()
591  && (v->getObjectType() == trigger::TriggerJet)
592  && (v->getPath().compare("PFJet") == 0)){
593  //CaloJetCollection::const_iterator jet = calojet.begin();
594  //for(; jet != calojet.end(); ++jet) {
595  for(int iCalo=0; iCalo<2; iCalo++){
596  if(deltaR(hltTrigEta, hltTrigPhi, CaloJetEta[iCalo], CaloJetPhi[iCalo]) < 0.4){
597  jetsize++;
598  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
599  v->getMEhisto_Pt()->Fill(CaloJetPt[iCalo]);
600  if (isBarrel(CaloJetEta[iCalo])) v->getMEhisto_PtBarrel()->Fill(CaloJetPt[iCalo]);
601  if (isEndCap(CaloJetEta[iCalo])) v->getMEhisto_PtEndcap()->Fill(CaloJetPt[iCalo]);
602  if (isForward(CaloJetEta[iCalo])) v->getMEhisto_PtForward()->Fill(CaloJetPt[iCalo]);
603  //
604  v->getMEhisto_Eta()->Fill(CaloJetEta[iCalo]);
605  v->getMEhisto_Phi()->Fill(CaloJetPhi[iCalo]);
606  v->getMEhisto_EtaPhi()->Fill(CaloJetEta[iCalo],CaloJetPhi[iCalo]);
607  //
608  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),CaloJetPt[iCalo]);
609  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),CaloJetEta[iCalo]);
610  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),CaloJetPhi[iCalo]);
611  //
612  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-CaloJetPt[iCalo])/(toc[*kj].pt()));
613  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-CaloJetEta[iCalo])/(toc[*kj].eta()));
614  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-CaloJetPhi[iCalo])/(toc[*kj].phi()));
615  }
616 
617  //-------------------------------------------------------
618  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
619  jetPhiVec.push_back(CaloJetPhi[iCalo]);
620  jetPtVec.push_back(CaloJetPt[iCalo]);
621  jetEtaVec.push_back(CaloJetEta[iCalo]);
622  jetPxVec.push_back(CaloJetPx[iCalo]);
623  jetPyVec.push_back(CaloJetPy[iCalo]);
624  //
625  hltPhiVec.push_back(toc[*kj].phi());
626  hltPtVec.push_back(toc[*kj].pt());
627  hltEtaVec.push_back(toc[*kj].eta());
628  hltPxVec.push_back(toc[*kj].px());
629  hltPyVec.push_back(toc[*kj].py());
630  }
631  }// matching jet
632  }// Jet Loop
633  }// valid calojet collection, with calojet trigger
634 
635  //PFJet trigger
636  if(pfjetColl_.isValid()
637  && (v->getObjectType() == trigger::TriggerJet)
638  && (v->getPath().compare("PFJet") != 0)){
639  //PFJetCollection::const_iterator jet = pfjet.begin();
640  //for(; jet != pfjet.end(); ++jet){
641  for(int iPF=0; iPF<2; iPF++){
642  if(deltaR(hltTrigEta, hltTrigPhi, PFJetEta[iPF], PFJetPhi[iPF]) < 0.4){
643  jetsize++;
644  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
645  v->getMEhisto_Pt()->Fill(PFJetPt[iPF]);
646  if (isBarrel(PFJetEta[iPF])) v->getMEhisto_PtBarrel()->Fill(PFJetPt[iPF]);
647  if (isEndCap(PFJetEta[iPF])) v->getMEhisto_PtEndcap()->Fill(PFJetPt[iPF]);
648  if (isForward(PFJetEta[iPF])) v->getMEhisto_PtForward()->Fill(PFJetPt[iPF]);
649  //
650  v->getMEhisto_Eta()->Fill(PFJetEta[iPF]);
651  v->getMEhisto_Phi()->Fill(PFJetPhi[iPF]);
652  v->getMEhisto_EtaPhi()->Fill(PFJetEta[iPF],PFJetPhi[iPF]);
653  //
654  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),PFJetPt[iPF]);
655  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),PFJetEta[iPF]);
656  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),PFJetPhi[iPF]);
657  //
658  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-PFJetPt[iPF])/(toc[*kj].pt()));
659  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-PFJetEta[iPF])/(toc[*kj].eta()));
660  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-PFJetPhi[iPF])/(toc[*kj].phi()));
661  }
662 
663  //-------------------------------------------------------
664  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
665  jetPhiVec.push_back(PFJetPhi[iPF]);
666  jetPtVec.push_back(PFJetPt[iPF]);
667  jetEtaVec.push_back(PFJetEta[iPF]);
668  jetPxVec.push_back(PFJetPx[iPF]);
669  jetPyVec.push_back(PFJetPy[iPF]);
670  //
671  hltPhiVec.push_back(toc[*kj].phi());
672  hltPtVec.push_back(toc[*kj].pt());
673  hltEtaVec.push_back(toc[*kj].eta());
674  hltPxVec.push_back(toc[*kj].px());
675  hltPyVec.push_back(toc[*kj].py());
676  }
677  }// matching jet
678  }//PFJet loop
679  }//valid pfjet collection, with pfjet trigger
680  //
681  }// hlt matching with l1
682  }// jet trigger
683 
684  //------------------------------------------------------
685  if(calometColl_.isValid()
686  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
687  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
688  const CaloMETCollection *calometcol = calometColl_.product();
689  const CaloMET met = calometcol->front();
690  //
691  v->getMEhisto_Pt()->Fill(met.et());
692  v->getMEhisto_Phi()->Fill(met.phi());
693  //
694  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),met.et());
695  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
696  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-met.et())/(toc[*kj].et()));
697  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
698  }
699 
700  //--------------------------------------------------------
701  if(pfmetColl_.isValid()
702  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
703  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
704  const PFMETCollection *pfmetcol = pfmetColl_.product();
705  const PFMET pfmet = pfmetcol->front();
706  //
707  v->getMEhisto_Pt()->Fill(pfmet.et());
708  v->getMEhisto_Phi()->Fill(pfmet.phi());
709  //
710  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),pfmet.et());
711  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),pfmet.phi());
712  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-pfmet.et())/(toc[*kj].et()));
713  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-pfmet.phi())/(toc[*kj].phi()));
714  }
715  }//Loop over HLT trigger candidates
716  if((v->getTriggerType().compare("DiJet_Trigger") == 0)) diJetFire = true;
717  }// Valid hlt trigger object
718  }// Loop over L1 objects
719  }// Valid L1 trigger object
720  v->getMEhisto_N()->Fill(jetsize);
721 
722  //--------------------------------------------------------
723  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1){
724  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
725  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
726  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
727  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
728  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
729  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
730  v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
731  v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
732  v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
733  //
734  v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
735  v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
736  v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
737  }
738 
739  //-----------------------------------------------------
740  /*
741  if(v->getPath().find("L1") != std::string::npos && !fillL1HLT){
742  if ( l1Index >= triggerObj_->sizeFilters() ) {
743  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
744  }
745  else {
746  //l1TrigBool = true;
747  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
748  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki){
749  double l1TrigEta = toc[*ki].eta();
750  double l1TrigPhi = toc[*ki].phi();
751  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
752  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
753  double jetEta = jet->eta();
754  double jetPhi = jet->phi();
755  if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4){
756  jetsize++;
757  v->getMEhisto_Pt()->Fill(jet->pt());
758  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
759  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
760  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
761  //
762  v->getMEhisto_Eta()->Fill(jet->eta());
763  v->getMEhisto_Phi()->Fill(jet->phi());
764  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
765  //
766  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
767  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
768  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
769  //
770  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
771  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
772  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
773  }// matching jet
774 
775  }// Jet Loop
776  v->getMEhisto_N()->Fill(jetsize);
777  }// valid Jet collection
778 
779  if(calometColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
780  const CaloMETCollection *calometcol = calometColl_.product();
781  const CaloMET met = calometcol->front();
782  v->getMEhisto_Pt()->Fill(met.pt());
783  v->getMEhisto_Phi()->Fill(met.phi());
784  //
785  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
786  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
787  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
788  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
789  }// valid MET Collection
790  }// Loop over keys
791  }// valid object
792  }// L1 is fired but not HLT
793  */
794  }
795 }
796 
797 //-------------plots wrt Muon Trigger------------
798 void
800 {
801  //int npath;
802  if(&triggerResults_) { /*npath = triggerResults_->size();*/ }
803  else { return; }
804 
805  bool muTrig = false;
806  for(size_t i=0;i<MuonTrigPaths_.size();++i){
807  const unsigned int nPath(hltConfig_.size());
808  for (unsigned int j=0; j!=nPath; ++j) {
810  if(pathname.find(MuonTrigPaths_[i]) != std::string::npos){
811  if(isHLTPathAccepted(pathname)){
812  muTrig = true;
813  if(verbose_) cout<<"fillMEforMonAllTriggerwrtMuonTrigger: Muon Match"<<endl;
814  }
815  }
816  if(muTrig) break;
817  }
818  if(muTrig) break;
819  }
820 
821  if(muTrig){
822  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
823  PathInfoCollection::iterator v = hltPathsAllWrtMu_.begin();
824  for(; v!= hltPathsAllWrtMu_.end(); ++v ){
825  if(isHLTPathAccepted(v->getPath())==false) continue;
826 
827  //New jet collection (after apply JEC)
828  std::vector<double>jetPtVec;
829  std::vector<double>jetPhiVec;
830  std::vector<double>jetEtaVec;
831  std::vector<double>jetPxVec;
832  std::vector<double>jetPyVec;
833  std::vector<double>hltPtVec;
834  std::vector<double>hltPhiVec;
835  std::vector<double>hltEtaVec;
836  std::vector<double>hltPxVec;
837  std::vector<double>hltPyVec;
838 
839  //This will be used to find out punch throgh trigger
840  bool fillL1HLT = false;
841 
842  //L1 and HLT indices
843  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
844  const int l1Index = triggerObj_->filterIndex(l1Tag);
845  edm::InputTag hltTag(v->getLabel(),"",processname_);
846  const int hltIndex = triggerObj_->filterIndex(hltTag);
847  //bool l1TrigBool = false;
848  bool hltTrigBool = false;
849  bool diJetFire = false;
850  int jetsize = 0;
851 
852  if ( l1Index >= triggerObj_->sizeFilters() ) {
853  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
854  }
855  else {
856  //l1TrigBool = true;
857  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
858  if(v->getObjectType() == trigger::TriggerJet)v->getMEhisto_N_L1()->Fill(kl1.size());
859  trigger::Keys::const_iterator ki = kl1.begin();
860  for(; ki != kl1.end(); ++ki){
861  double l1TrigEta = -100;
862  double l1TrigPhi = -100;
863 
864  //-------------------------------------------
865  if(v->getObjectType() == trigger::TriggerJet){
866  l1TrigEta = toc[*ki].eta();
867  l1TrigPhi = toc[*ki].phi();
868  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
869  if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
870  if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
871  if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
872  v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
873  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
874  v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
875  }
876  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
877  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
878  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
879  }
880 
881  //-----------------------------------------------
882  if ( hltIndex >= triggerObj_->sizeFilters() ) {
883  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
884  }
885  else {
886  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
887  if((v->getObjectType() == trigger::TriggerJet) && (ki == kl1.begin()))
888  v->getMEhisto_N_HLT()->Fill(khlt.size());
889  trigger::Keys::const_iterator kj = khlt.begin();
890  //Define hltTrigBool
891  for(;kj != khlt.end(); ++kj){
892  if(v->getObjectType() == trigger::TriggerJet){
893  double hltTrigEta = -100;
894  double hltTrigPhi = -100;
895  hltTrigEta = toc[*kj].eta();
896  hltTrigPhi = toc[*kj].phi();
897  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4
898  && (v->getTriggerType().compare("DiJet_Trigger") == 0))
899  hltTrigBool = true;
900  }
901  }
902  //
903  kj = khlt.begin();
904  for(;kj != khlt.end(); ++kj){
905  double hltTrigEta = -100.;
906  double hltTrigPhi = -100.;
907  fillL1HLT = true;
908  //MET Triggers
909  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
910  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
911  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
912  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
913  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
914  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
915  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
916  }
917  //Jet Triggers
918  if(v->getObjectType() == trigger::TriggerJet){
919  hltTrigEta = toc[*kj].eta();
920  hltTrigPhi = toc[*kj].phi();
921  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4){
922  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
923  v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
924  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
925  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
926  v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
927  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
928  }
929  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 )
930  || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)) && !diJetFire){
931  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
932  if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
933  if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
934  if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
935  v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
936  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
937  v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
938 
939  //Calojet
940  if(calojetColl_.isValid()
941  && (v->getObjectType() == trigger::TriggerJet)
942  && (v->getPath().compare("PFJet") == 0)){
943  //CaloJetCollection::const_iterator jet = calojet.begin();
944  //for(; jet != calojet.end(); ++jet) {
945  for(int iCalo=0; iCalo<2; iCalo++){
946  if(deltaR(hltTrigEta, hltTrigPhi, CaloJetEta[iCalo], CaloJetPhi[iCalo]) < 0.4){
947  jetsize++;
948  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
949  v->getMEhisto_Pt()->Fill(CaloJetPt[iCalo]);
950  if (isBarrel(CaloJetEta[iCalo])) v->getMEhisto_PtBarrel()->Fill(CaloJetPt[iCalo]);
951  if (isEndCap(CaloJetEta[iCalo])) v->getMEhisto_PtEndcap()->Fill(CaloJetPt[iCalo]);
952  if (isForward(CaloJetEta[iCalo])) v->getMEhisto_PtForward()->Fill(CaloJetPt[iCalo]);
953  //
954  v->getMEhisto_Eta()->Fill(CaloJetEta[iCalo]);
955  v->getMEhisto_Phi()->Fill(CaloJetPhi[iCalo]);
956  v->getMEhisto_EtaPhi()->Fill(CaloJetEta[iCalo],CaloJetPhi[iCalo]);
957  //
958  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),CaloJetPt[iCalo]);
959  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),CaloJetEta[iCalo]);
960  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),CaloJetPhi[iCalo]);
961  //
962  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-CaloJetPt[iCalo])/(toc[*kj].pt()));
963  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-CaloJetEta[iCalo])/(toc[*kj].eta()));
964  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-CaloJetPhi[iCalo])/(toc[*kj].phi()));
965  }
966 
967  //-------------------------------------------------------
968  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
969  jetPhiVec.push_back(CaloJetPhi[iCalo]);
970  jetPtVec.push_back(CaloJetPt[iCalo]);
971  jetEtaVec.push_back(CaloJetEta[iCalo]);
972  jetPxVec.push_back(CaloJetPx[iCalo]);
973  jetPyVec.push_back(CaloJetPy[iCalo]);
974  //
975  hltPhiVec.push_back(toc[*kj].phi());
976  hltPtVec.push_back(toc[*kj].pt());
977  hltEtaVec.push_back(toc[*kj].eta());
978  hltPxVec.push_back(toc[*kj].px());
979  hltPyVec.push_back(toc[*kj].py());
980  }
981  }// matching jet
982  }// CaloJet Loop
983  }// valid calojet collection, with calojet trigger
984 
985  //PFJet trigger
986  if(pfjetColl_.isValid()
987  && (v->getObjectType() == trigger::TriggerJet)
988  && (v->getPath().compare("PFJet") != 0)){
989  //PFJetCollection::const_iterator jet = pfjet.begin();
990  //for(; jet != pfjet.end(); ++jet){
991  for(int iPF=0; iPF<2; iPF++){
992  if(deltaR(hltTrigEta, hltTrigPhi, PFJetEta[iPF], PFJetPhi[iPF]) < 0.4){
993  jetsize++;
994  if(v->getTriggerType().compare("SingleJet_Trigger") == 0){
995  v->getMEhisto_Pt()->Fill(PFJetPt[iPF]);
996  if (isBarrel(PFJetEta[iPF])) v->getMEhisto_PtBarrel()->Fill(PFJetPt[iPF]);
997  if (isEndCap(PFJetEta[iPF])) v->getMEhisto_PtEndcap()->Fill(PFJetPt[iPF]);
998  if (isForward(PFJetEta[iPF])) v->getMEhisto_PtForward()->Fill(PFJetPt[iPF]);
999  //
1000  v->getMEhisto_Eta()->Fill(PFJetEta[iPF]);
1001  v->getMEhisto_Phi()->Fill(PFJetPhi[iPF]);
1002  v->getMEhisto_EtaPhi()->Fill(PFJetEta[iPF],PFJetPhi[iPF]);
1003  //
1004  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),PFJetPt[iPF]);
1005  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),PFJetEta[iPF]);
1006  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),PFJetPhi[iPF]);
1007  //
1008  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-PFJetPt[iPF])/(toc[*kj].pt()));
1009  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-PFJetEta[iPF])/(toc[*kj].eta()));
1010  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-PFJetPhi[iPF])/(toc[*kj].phi()));
1011  }
1012 
1013  //-------------------------------------------------------
1014  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
1015  jetPhiVec.push_back(PFJetPhi[iPF]);
1016  jetPtVec.push_back(PFJetPt[iPF]);
1017  jetEtaVec.push_back(PFJetEta[iPF]);
1018  jetPxVec.push_back(PFJetPx[iPF]);
1019  jetPyVec.push_back(PFJetPy[iPF]);
1020  //
1021  hltPhiVec.push_back(toc[*kj].phi());
1022  hltPtVec.push_back(toc[*kj].pt());
1023  hltEtaVec.push_back(toc[*kj].eta());
1024  hltPxVec.push_back(toc[*kj].px());
1025  hltPyVec.push_back(toc[*kj].py());
1026  }
1027  }// matching jet
1028  }//PFJet loop
1029  }//valid pfjet collection, with pfjet trigger
1030  //
1031  }// hlt matching with l1
1032  }// jet trigger
1033 
1034  //------------------------------------------------------
1035  if(calometColl_.isValid()
1036  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1037  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
1038  const CaloMETCollection *calometcol = calometColl_.product();
1039  const CaloMET met = calometcol->front();
1040  //
1041  v->getMEhisto_Pt()->Fill(met.et());
1042  v->getMEhisto_Phi()->Fill(met.phi());
1043  //
1044  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),met.et());
1045  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
1046  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-met.et())/(toc[*kj].et()));
1047  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
1048  }
1049 
1050  //--------------------------------------------------------
1051  if(pfmetColl_.isValid()
1052  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1053  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
1054  const PFMETCollection *pfmetcol = pfmetColl_.product();
1055  const PFMET pfmet = pfmetcol->front();
1056  //
1057  v->getMEhisto_Pt()->Fill(pfmet.et());
1058  v->getMEhisto_Phi()->Fill(pfmet.phi());
1059  //
1060  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),pfmet.et());
1061  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),pfmet.phi());
1062  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-pfmet.et())/(toc[*kj].et()));
1063  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-pfmet.phi())/(toc[*kj].phi()));
1064  }
1065  }//Loop over HLT trigger candidates
1066  if((v->getTriggerType().compare("DiJet_Trigger") == 0)) diJetFire = true;
1067  }// Valid hlt trigger object
1068  }// Loop over L1 objects
1069  }// Valid L1 trigger object
1070  v->getMEhisto_N()->Fill(jetsize);
1071 
1072  //--------------------------------------------------------
1073  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1){
1074  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
1075  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
1076  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
1077  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
1078  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
1079  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
1080  v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
1081  v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
1082  v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
1083  //
1084  v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
1085  v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
1086  v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
1087  }
1088 
1089  //-----------------------------------------------------
1090  if(v->getPath().find("L1") != std::string::npos && !fillL1HLT){
1091  if ( l1Index >= triggerObj_->sizeFilters() ) {
1092  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
1093  }
1094  else {
1095  //l1TrigBool = true;
1096  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1097  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki){
1098  double l1TrigEta = toc[*ki].eta();
1099  double l1TrigPhi = toc[*ki].phi();
1100  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
1101  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
1102  double jetEta = jet->eta();
1103  double jetPhi = jet->phi();
1104  if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4){
1105  jetsize++;
1106  v->getMEhisto_Pt()->Fill(jet->pt());
1107  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
1108  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
1109  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
1110  //
1111  v->getMEhisto_Eta()->Fill(jet->eta());
1112  v->getMEhisto_Phi()->Fill(jet->phi());
1113  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
1114  //
1115  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
1116  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
1117  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
1118  //
1119  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
1120  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
1121  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
1122 
1123  }// matching jet
1124 
1125  }// Jet Loop
1126  v->getMEhisto_N()->Fill(jetsize);
1127  }// valid Jet collection
1128 
1129  if(calometColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
1130  const CaloMETCollection *calometcol = calometColl_.product();
1131  const CaloMET met = calometcol->front();
1132  v->getMEhisto_Pt()->Fill(met.pt());
1133  v->getMEhisto_Phi()->Fill(met.phi());
1134  //
1135  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
1136  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
1137  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
1138  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
1139  }// valid MET Collection
1140  }// Loop over keys
1141  }// valid object
1142  }// L1 is fired but not HLT
1143  }//Loop all paths
1144  }//if(muTrig)
1145 }
1146 
1147 void
1149 {
1150  //int npath;
1151  if(&triggerResults_){ /*npath = triggerResults_->size();*/ }
1152  else return;
1153 
1154  int num = -1;
1155  int denom = -1;
1156  bool denompassed = false;
1157  bool numpassed = false;
1158  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
1159 
1160  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
1161  num++;
1162  denom++;
1163  denompassed = false;
1164  numpassed = false;
1165 
1166  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
1167  unsigned indexDenom = triggerNames_.triggerIndex(v->getDenomPath());
1168 
1169  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum)) numpassed = true;
1170  if(indexDenom < triggerNames_.size() && triggerResults_->accept(indexDenom)) denompassed = true;
1171 
1172  if(denompassed==false) continue;
1173 
1174  //if(numpassed==true){
1175  edm::InputTag hltTag(v->getLabel(),"",processname_);
1176  const int hltIndex = triggerObj_->filterIndex(hltTag);
1177  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
1178  const int l1Index = triggerObj_->filterIndex(l1Tag);
1179  //}
1180 
1181  //----------------------------------------------------------------------
1182  //double pTcut = 0;
1183  double trigLowpTcut = 0;
1184  double trigMedpTcut = 0;
1185  double trigHighpTcut = 0;
1186  double trigLowpTcutFwd = 0;
1187  double trigMedpTcutFwd = 0;
1188  double trigHighpTcutFwd = 0;
1189  //
1190  //double pTPFcut = 0 ;
1191  double trigLowpTPFcut = 0;
1192  double trigMedpTPFcut = 0;
1193  double trigHighpTPFcut = 0;
1194  double trigLowpTPFcutFwd = 0;
1195  double trigMedpTPFcutFwd = 0;
1196  double trigHighpTPFcutFwd = 0;
1197  //
1198  //cout<<"pre-path" << v->getPath()<<endl;
1199  size_t jetstrfound = v->getPath().find("Jet");
1200  //size_t censtrfound = v->getPath().find("Central"); //shoouldn't be needed?
1201  string tpath = v->getPath();
1202  string jetTrigVal;
1203  float jetVal = 0.;
1204  //
1205  if(jetstrfound != string::npos){// && ustrfound != string::npos ){
1206  //cout<<v->getPath()<<endl;
1207  for(int trig = int(jetstrfound)+3; trig < int(jetstrfound)+7; trig++){// int(ustrfound); trig++){
1208  if(!isdigit(tpath[trig])) break;
1209  jetTrigVal+=tpath[trig];
1210  }
1211  char *cjetTrigVal = (char*)jetTrigVal.c_str();
1212  jetVal=atof(cjetTrigVal);
1213  //
1214  if(jetVal>0.){
1215  if(jetVal<50.){
1216  //pTcut = jetVal / 2.;
1217  trigMedpTcut = jetVal + 5.;
1218  trigHighpTcut = jetVal + 10.;
1219  //
1220  trigLowpTcutFwd = jetVal + 9.;
1221  trigMedpTcutFwd = jetVal + 15.;
1222  trigHighpTcutFwd = jetVal + 21.;
1223  }
1224  else{
1225  //pTcut = jetVal - 20. ;
1226  trigMedpTcut = jetVal + 2.;
1227  trigHighpTcut = jetVal + 60.;
1228  //
1229  trigLowpTcutFwd = jetVal + 22.;
1230  trigMedpTcutFwd = jetVal + 25.;
1231  trigHighpTcutFwd = jetVal + 110.;
1232  }
1233  trigLowpTcut = jetVal;
1234  }
1235  //
1236  if(jetVal>0.){
1237  if(jetVal<50.){
1238  //pTPFcut = jetVal ;
1239  trigMedpTPFcut = jetVal + 20.;
1240  trigHighpTPFcut = jetVal + 40.;
1241  //
1242  trigLowpTPFcutFwd = jetVal + 60.;
1243  trigMedpTPFcutFwd = jetVal + 80.;
1244  trigHighpTPFcutFwd = jetVal + 100.;
1245  }
1246  else{
1247  //pTPFcut = jetVal ;
1248  trigMedpTPFcut = jetVal + 40.;
1249  trigHighpTPFcut = jetVal + 140.;
1250  //
1251  trigLowpTPFcutFwd = jetVal + 110.;
1252  trigMedpTPFcutFwd = jetVal + 130.;
1253  trigHighpTPFcutFwd = jetVal + 190.;
1254  }
1255  trigLowpTPFcut = jetVal;
1256  }
1257  }
1258  //----------------------------------------------------------------------
1259 
1260  //CaloJet paths
1261  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloJet -------------------" << std::endl;
1262  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1263  //cout<<" - CaloJet "<<endl;
1264  //&& (v->getPath().find("HLT_PFJet")==std::string::npos)
1265  //&& (v->getPath().find("HLT_DiPFJet")==std::string::npos)){
1266  bool jetIDbool = false;
1267  double leadjpt = CaloJetPt[0];
1268  double leadjeta = CaloJetEta[0];
1269  double leadjphi = CaloJetPhi[0];
1270  //double ljemf = CaloJetEMF[0];
1271  double ljfhpd = CaloJetfHPD[0];
1272  double ljn90 = CaloJetn90[0];
1273  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size()){ //this line stops the central jets
1274  if( (ljfhpd < _fHPD) && (ljn90 > _n90Hits )){
1275  if(verbose_) cout<<"Passed CaloJet ID -------------------" << endl;
1276  jetIDbool = true;
1277  //Denominator fill
1278  v->getMEhisto_DenominatorPt()->Fill(leadjpt);
1279  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPtBarrel()->Fill(leadjpt);
1280  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPtEndcap()->Fill(leadjpt);
1281  if (isForward(leadjeta)) v->getMEhisto_DenominatorPtForward()->Fill(leadjpt);
1282  v->getMEhisto_DenominatorEta()->Fill(leadjeta);
1283  v->getMEhisto_DenominatorPhi()->Fill(leadjphi);
1284  v->getMEhisto_DenominatorEtaPhi()->Fill(leadjeta,leadjphi);
1285  if (isBarrel(leadjeta)){
1286  v->getMEhisto_DenominatorEtaBarrel()->Fill(leadjeta);
1287  v->getMEhisto_DenominatorPhiBarrel()->Fill(leadjphi);
1288  }
1289  if (isEndCap(leadjeta)){
1290  v->getMEhisto_DenominatorEtaEndcap()->Fill(leadjeta);
1291  v->getMEhisto_DenominatorPhiEndcap()->Fill(leadjphi);
1292  }
1293  if (isForward(leadjeta)){
1294  v->getMEhisto_DenominatorEtaForward()->Fill(leadjeta);
1295  v->getMEhisto_DenominatorPhiForward()->Fill(leadjphi);
1296  }
1297  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
1298  v->getMEhisto_DenominatorEta_LowpTcut()->Fill(leadjeta);
1299  v->getMEhisto_DenominatorPhi_LowpTcut()->Fill(leadjphi);
1300  v->getMEhisto_DenominatorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1301  }
1302  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
1303  v->getMEhisto_DenominatorEta_MedpTcut()->Fill(leadjeta);
1304  v->getMEhisto_DenominatorPhi_MedpTcut()->Fill(leadjphi);
1305  v->getMEhisto_DenominatorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1306  }
1307  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
1308  v->getMEhisto_DenominatorEta_HighpTcut()->Fill(leadjeta);
1309  v->getMEhisto_DenominatorPhi_HighpTcut()->Fill(leadjphi);
1310  v->getMEhisto_DenominatorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1311  }
1312 
1313  //Numerator fill
1314  if(numpassed){
1315  //
1316  double dRmin = 99999.;
1317  double dPhimin = 9999.;
1318  if(v->getPath().find("L1") != std::string::npos){
1319  if ( l1Index >= triggerObj_->sizeFilters() ) {
1320  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1321  }
1322  else {
1323  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1324  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
1325  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
1326  if(dR < dRmin){
1327  dRmin = dR;
1328  }
1329  }
1330  }
1331  }
1332  else{
1333  if ( hltIndex >= triggerObj_->sizeFilters() ) {
1334  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1335  }
1336  else {
1337  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1338  trigger::Keys::const_iterator kj = khlt.begin();
1339  for(;kj != khlt.end(); ++kj){
1340  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(),
1341  leadjeta, leadjphi);
1342  if(dR < dRmin){
1343  dRmin = dR;
1344  }
1345  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
1346  if(dPhi < dPhimin){
1347  dPhimin = dPhi;
1348  }
1349  }
1350  //v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1351  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1352  v->getMEhisto_DeltaR()->Fill(dRmin);
1353  }
1354  }
1355  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
1356  v->getMEhisto_NumeratorPt()->Fill(leadjpt);
1357  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPtBarrel()->Fill(leadjpt);
1358  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPtEndcap()->Fill(leadjpt);
1359  if (isForward(leadjeta)) v->getMEhisto_NumeratorPtForward()->Fill(leadjpt);
1360  v->getMEhisto_NumeratorEta()->Fill(leadjeta);
1361  v->getMEhisto_NumeratorPhi()->Fill(leadjphi);
1362  v->getMEhisto_NumeratorEtaPhi()->Fill(leadjeta,leadjphi);
1363  if (isBarrel(leadjeta)){
1364  v->getMEhisto_NumeratorEtaBarrel()->Fill(leadjeta);
1365  v->getMEhisto_NumeratorPhiBarrel()->Fill(leadjphi);
1366  }
1367  if (isEndCap(leadjeta)){
1368  v->getMEhisto_NumeratorEtaEndcap()->Fill(leadjeta);
1369  v->getMEhisto_NumeratorPhiEndcap()->Fill(leadjphi);
1370  }
1371  if (isForward(leadjeta)){
1372  v->getMEhisto_NumeratorEtaForward()->Fill(leadjeta);
1373  v->getMEhisto_NumeratorPhiForward()->Fill(leadjphi);
1374  }
1375  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
1376  v->getMEhisto_NumeratorEta_LowpTcut()->Fill(leadjeta);
1377  v->getMEhisto_NumeratorPhi_LowpTcut()->Fill(leadjphi);
1378  v->getMEhisto_NumeratorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1379  }
1380  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
1381  v->getMEhisto_NumeratorEta_MedpTcut()->Fill(leadjeta);
1382  v->getMEhisto_NumeratorPhi_MedpTcut()->Fill(leadjphi);
1383  v->getMEhisto_NumeratorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1384  }
1385  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
1386  v->getMEhisto_NumeratorEta_HighpTcut()->Fill(leadjeta);
1387  v->getMEhisto_NumeratorPhi_HighpTcut()->Fill(leadjphi);
1388  v->getMEhisto_NumeratorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1389  }
1390  }
1391  }//numpassed
1392  }//CalojetID filter
1393  }
1394 
1395  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1){
1396  if(((CaloJetEMF[1] > _fEMF || std::abs(CaloJetEta[1]) > _feta) &&
1397  CaloJetfHPD[0] < _fHPD && CaloJetn90[0] > _n90Hits)){
1398  v->getMEhisto_DenominatorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1399  v->getMEhisto_DenominatorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1400  if(numpassed==true){
1401  v->getMEhisto_NumeratorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1402  v->getMEhisto_NumeratorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1403  }
1404  }
1405  }
1406  }// Jet trigger and valid jet collection
1407 
1408  //PFJet paths
1409  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFJet -------------------" << std::endl;
1410  if(pfjetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1411  //cout<<" - PFJet "<<endl;
1412  //&& (v->getPath().find("HLT_PFJet")!=std::string::npos)
1413  //&& (v->getPath().find("HLT_DiPFJet")!=std::string::npos)){
1414  bool jetIDbool = false;
1415  double leadjpt = PFJetPt[0];
1416  double leadjeta = PFJetEta[0];
1417  double leadjphi = PFJetPhi[0];
1418  double ljNHEF = PFJetNHEF[0];
1419  double ljCHEF = PFJetCHEF[0];
1420  double ljNEMF = PFJetNEMF[0];
1421  double ljCEMF = PFJetCEMF[0];
1422  //double sleadjpt = PFJetPt[1];
1423  //double sleadjeta = PFJetEta[1];
1424  //double sleadjphi = PFJetPhi[1];
1425  double sljNHEF = PFJetNHEF[1];
1426  double sljCHEF = PFJetCHEF[1];
1427  double sljNEMF = PFJetNEMF[1];
1428  double sljCEMF = PFJetCEMF[1];
1429  //
1430  double pfMHTx = pfMHTx_All;
1431  double pfMHTy = pfMHTy_All;
1432  //
1433  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && pfjet.size()){ //this line stops the central jets
1434 
1435  //======get pfmht
1436  _pfMHT = sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
1437  v->getMEhisto_DenominatorPFMHT()->Fill(_pfMHT);
1438 
1439  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1440  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1441  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1442  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF){
1443  if(verbose_) cout<<"Passed PFJet ID -------------------" << endl;
1444  jetIDbool = true;
1445  v->getMEhisto_DenominatorPFPt()->Fill(leadjpt);
1446  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPFPtBarrel()->Fill(leadjpt);
1447  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPFPtEndcap()->Fill(leadjpt);
1448  if (isForward(leadjeta)) v->getMEhisto_DenominatorPFPtForward()->Fill(leadjpt);
1449  v->getMEhisto_DenominatorPFEta()->Fill(leadjeta);
1450  v->getMEhisto_DenominatorPFPhi()->Fill(leadjphi);
1451  v->getMEhisto_DenominatorPFEtaPhi()->Fill(leadjeta,leadjphi);
1452  if(isBarrel(leadjeta)){
1453  v->getMEhisto_DenominatorPFEtaBarrel()->Fill(leadjeta);
1454  v->getMEhisto_DenominatorPFPhiBarrel()->Fill(leadjphi);
1455  }
1456  if (isEndCap(leadjeta)){
1457  v->getMEhisto_DenominatorPFEtaEndcap()->Fill(leadjeta);
1458  v->getMEhisto_DenominatorPFPhiEndcap()->Fill(leadjphi);
1459  }
1460  if (isForward(leadjeta)){
1461  v->getMEhisto_DenominatorPFEtaForward()->Fill(leadjeta);
1462  v->getMEhisto_DenominatorPFPhiForward()->Fill(leadjphi);
1463  }
1464  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta)) || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1465  v->getMEhisto_DenominatorPFEta_LowpTcut()->Fill(leadjeta);
1466  v->getMEhisto_DenominatorPFPhi_LowpTcut()->Fill(leadjphi);
1467  v->getMEhisto_DenominatorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1468  }
1469  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta)) || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1470  v->getMEhisto_DenominatorPFEta_MedpTcut()->Fill(leadjeta);
1471  v->getMEhisto_DenominatorPFPhi_MedpTcut()->Fill(leadjphi);
1472  v->getMEhisto_DenominatorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1473  }
1474  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta)) || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1475  v->getMEhisto_DenominatorPFEta_HighpTcut()->Fill(leadjeta);
1476  v->getMEhisto_DenominatorPFPhi_HighpTcut()->Fill(leadjphi);
1477  v->getMEhisto_DenominatorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1478  }
1479 
1480  //Numerator fill
1481  if(numpassed){
1482  double dRmin = 99999.;
1483  double dPhimin = 9999.;
1484  if(v->getPath().find("L1") != std::string::npos){
1485  if ( l1Index >= triggerObj_->sizeFilters() ) {
1486  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1487  }
1488  else{
1489  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1490  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
1491  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
1492  if(dR < dRmin){
1493  dRmin = dR;
1494  }
1495  }
1496  }
1497  }
1498  else{
1499  if ( hltIndex >= triggerObj_->sizeFilters() ) {
1500  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1501  }
1502  else{
1503  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1504  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1505  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(), leadjeta, leadjphi);
1506  if(dR < dRmin){
1507  dRmin = dR;
1508  }
1509  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
1510  if(dPhi < dPhimin){
1511  dPhimin = dPhi;
1512  }
1513  }
1514  v->getMEhisto_PFDeltaPhi()->Fill(dPhimin);
1515  v->getMEhisto_PFDeltaR()->Fill(dRmin);
1516  }
1517  }
1518  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
1519  v->getMEhisto_NumeratorPFPt()->Fill(leadjpt);
1520  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPFPtBarrel()->Fill(leadjpt);
1521  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPFPtEndcap()->Fill(leadjpt);
1522  if (isForward(leadjeta)) v->getMEhisto_NumeratorPFPtForward()->Fill(leadjpt);
1523  v->getMEhisto_NumeratorPFEta()->Fill(leadjeta);
1524  v->getMEhisto_NumeratorPFPhi()->Fill(leadjphi);
1525  v->getMEhisto_NumeratorPFEtaPhi()->Fill(leadjeta,leadjphi);
1526  if (isBarrel(leadjeta)){
1527  v->getMEhisto_NumeratorPFEtaBarrel()->Fill(leadjeta);
1528  v->getMEhisto_NumeratorPFPhiBarrel()->Fill(leadjphi);
1529  }
1530  if (isEndCap(leadjeta)){
1531  v->getMEhisto_NumeratorPFEtaEndcap()->Fill(leadjeta);
1532  v->getMEhisto_NumeratorPFPhiEndcap()->Fill(leadjphi);
1533  }
1534  if (isForward(leadjeta)){
1535  v->getMEhisto_NumeratorPFEtaForward()->Fill(leadjeta);
1536  v->getMEhisto_NumeratorPFPhiForward()->Fill(leadjphi);
1537  }
1538  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta))
1539  || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1540  v->getMEhisto_NumeratorPFEta_LowpTcut()->Fill(leadjeta);
1541  v->getMEhisto_NumeratorPFPhi_LowpTcut()->Fill(leadjphi);
1542  v->getMEhisto_NumeratorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1543  }
1544  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta))
1545  || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1546  v->getMEhisto_NumeratorPFEta_MedpTcut()->Fill(leadjeta);
1547  v->getMEhisto_NumeratorPFPhi_MedpTcut()->Fill(leadjphi);
1548  v->getMEhisto_NumeratorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1549  }
1550  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta))
1551  || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1552  v->getMEhisto_NumeratorPFEta_HighpTcut()->Fill(leadjeta);
1553  v->getMEhisto_NumeratorPFPhi_HighpTcut()->Fill(leadjphi);
1554  v->getMEhisto_NumeratorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1555  }
1556  }
1557  }
1558  }
1559  }
1560  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && pfjet.size()>1){
1561  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1562  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1563  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1564  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF
1565  && sljNHEF >= _min_NHEF && sljNHEF <= _max_NHEF
1566  && sljCHEF >= _min_CHEF && sljCHEF <= _max_CHEF
1567  && sljNEMF >= _min_NEMF && sljNEMF <= _max_NEMF
1568  && sljCEMF >= _min_CEMF && sljCEMF <= _max_CEMF ){
1569  v->getMEhisto_DenominatorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1570  v->getMEhisto_DenominatorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1571  if(numpassed){
1572  v->getMEhisto_NumeratorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1573  v->getMEhisto_NumeratorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1574  }
1575  }
1576  }
1577  }// PF Jet trigger and valid jet collection
1578 
1579  //CaloMET path
1580  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloMET -------------------" << std::endl;
1581  if(calometColl_.isValid()
1582  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1583  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
1584  const CaloMETCollection *calometcol = calometColl_.product();
1585  const CaloMET met = calometcol->front();
1586  v->getMEhisto_DenominatorPt()->Fill(met.et());
1587  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1588  if(numpassed){
1589  v->getMEhisto_NumeratorPt()->Fill(met.et());
1590  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1591  if(hltIndex >= triggerObj_->sizeFilters()){
1592  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1593  }
1594  else{
1595  double dPhimin = 9999.;//
1596  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1597  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1598  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
1599  if(dPhi < dPhimin){
1600  dPhimin = dPhi;
1601  }
1602  }
1603  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1604  }
1605  }
1606  }
1607 
1608  //PFMET
1609  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFMET -------------------" << std::endl;
1610  if(pfmetColl_.isValid()
1611  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
1612  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
1613  const PFMETCollection *pfmetcol = pfmetColl_.product();
1614  const PFMET met = pfmetcol->front();
1615  v->getMEhisto_DenominatorPt()->Fill(met.et());
1616  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1617  if(numpassed){
1618  v->getMEhisto_NumeratorPt()->Fill(met.et());
1619  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1620  if(hltIndex >= triggerObj_->sizeFilters()){
1621  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1622  }
1623  else{
1624  double dPhimin = 9999.;//
1625  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1626  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
1627  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
1628  if(dPhi < dPhimin){
1629  dPhimin = dPhi;
1630  }
1631  }
1632  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1633  }
1634  }
1635  }
1636 
1637  /*
1638  if(pfmhtColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
1639  const PFMHTCollection *pfmhtcol = pfmhtColl_.product();
1640  const PFMHT met = pfmhtcol->front();
1641  v->getMEhisto_DenominatorPFPt()->Fill(met.pt());
1642  v->getMEhisto_DenominatorPFPhi()->Fill(met.phi());
1643  }// PFMHT trigger and valid MET collection
1644  */
1645  }// trigger under study
1646 }
1647 
1648 void
1650 {
1651  //int npath;
1652  if(&triggerResults_){ /*npath = triggerResults_->size();*/ }
1653  else{ return; }
1654 
1655  bool muTrig = false;
1656  bool numpassed = false;
1657  //bool denompassed = false;
1658  for(size_t i=0;i<MuonTrigPaths_.size();++i){
1659  const unsigned int nPath(hltConfig_.size());
1660  for (unsigned int j=0; j!=nPath; ++j) {
1662  if(pathname.find(MuonTrigPaths_[i]) != std::string::npos){
1663  if(isHLTPathAccepted(pathname)){
1664  muTrig = true;
1665  if(verbose_) cout<<"fillMEforEffWrtMuTrigger: Muon Match"<<endl;
1666  }
1667  }
1668  if(muTrig) break;
1669  }
1670  if(muTrig) break;
1671  }
1672 
1673  if(muTrig){
1674  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
1675  PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin();
1676  for(; v!= hltPathsEffWrtMu_.end(); ++v ){
1677  numpassed = false;
1678 
1679  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
1680  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum)) numpassed = true;
1681  //if(numpassed==true){
1682  edm::InputTag hltTag(v->getLabel(),"",processname_);
1683  const int hltIndex = triggerObj_->filterIndex(hltTag);
1684  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
1685  const int l1Index = triggerObj_->filterIndex(l1Tag);
1686  //}
1687 
1688  //----------------------------------------------------------------------
1689  //double pTcut = 0;
1690  double trigLowpTcut = 0;
1691  double trigMedpTcut = 0;
1692  double trigHighpTcut = 0;
1693  double trigLowpTcutFwd = 0;
1694  double trigMedpTcutFwd = 0;
1695  double trigHighpTcutFwd = 0;
1696  //
1697  //double pTPFcut = 0 ;
1698  double trigLowpTPFcut = 0;
1699  double trigMedpTPFcut = 0;
1700  double trigHighpTPFcut = 0;
1701  double trigLowpTPFcutFwd = 0;
1702  double trigMedpTPFcutFwd = 0;
1703  double trigHighpTPFcutFwd = 0;
1704  //
1705  //cout<<"pre-path" << v->getPath()<<endl;
1706  size_t jetstrfound = v->getPath().find("Jet");
1707  //size_t censtrfound = v->getPath().find("Central"); //shoouldn't be needed?
1708  string tpath = v->getPath();
1709  string jetTrigVal;
1710  float jetVal = 0.;
1711  //
1712  if(jetstrfound != string::npos){// && ustrfound != string::npos ){
1713  //cout<<v->getPath()<<endl;
1714  for(int trig = int(jetstrfound)+3; trig < int(jetstrfound)+7; trig++){// int(ustrfound); trig++){
1715  if(!isdigit(tpath[trig])) break;
1716  jetTrigVal+=tpath[trig];
1717  }
1718  char *cjetTrigVal = (char*)jetTrigVal.c_str();
1719  jetVal=atof(cjetTrigVal);
1720  //cout<<jetVal<<endl;
1721  //
1722  if(jetVal>0.){
1723  if(jetVal<50.){
1724  //pTcut = jetVal / 2.;
1725  trigMedpTcut = jetVal + 5.;
1726  trigHighpTcut = jetVal + 10.;
1727  //
1728  trigLowpTcutFwd = jetVal + 9.;
1729  trigMedpTcutFwd = jetVal + 15.;
1730  trigHighpTcutFwd = jetVal + 21.;
1731  }
1732  else{
1733  //pTcut = jetVal - 20. ;
1734  trigMedpTcut = jetVal + 2.;
1735  trigHighpTcut = jetVal + 60.;
1736  //
1737  trigLowpTcutFwd = jetVal + 22.;
1738  trigMedpTcutFwd = jetVal + 25.;
1739  trigHighpTcutFwd = jetVal + 110.;
1740  }
1741  trigLowpTcut = jetVal;
1742  }
1743  //
1744  if(jetVal>0.){
1745  if(jetVal<50.){
1746  //pTPFcut = jetVal ;
1747  trigMedpTPFcut = jetVal + 20.;
1748  trigHighpTPFcut = jetVal + 40.;
1749  //
1750  trigLowpTPFcutFwd = jetVal + 60.;
1751  trigMedpTPFcutFwd = jetVal + 80.;
1752  trigHighpTPFcutFwd = jetVal + 100.;
1753  }
1754  else{
1755  //pTPFcut = jetVal ;
1756  trigMedpTPFcut = jetVal + 40.;
1757  trigHighpTPFcut = jetVal + 140.;
1758  //
1759  trigLowpTPFcutFwd = jetVal + 110.;
1760  trigMedpTPFcutFwd = jetVal + 130.;
1761  trigHighpTPFcutFwd = jetVal + 190.;
1762  }
1763  trigLowpTPFcut = jetVal;
1764  }
1765  }
1766  //----------------------------------------------------------------------
1767 
1768  //CaloJet paths
1769  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: CaloJet -------------------" << std::endl;
1770  if(calojetColl_.isValid()
1771  && (v->getObjectType() == trigger::TriggerJet)){
1772  //cout<<" - CaloJet "<<endl;
1773  //&& (v->getPath().find("HLT_PFJet")==std::string::npos)
1774  //&& (v->getPath().find("HLT_DiPFJet")==std::string::npos)){
1775  bool jetIDbool = false;
1776  double leadjpt = CaloJetPt[0];
1777  double leadjeta = CaloJetEta[0];
1778  double leadjphi = CaloJetPhi[0];
1779  //double ljemf = CaloJetEMF[0];
1780  double ljfhpd = CaloJetfHPD[0];
1781  double ljn90 = CaloJetn90[0];
1782  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size()){ //this line stops the central jets
1783  if( (ljfhpd < _fHPD) && (ljn90 > _n90Hits )){
1784  if(verbose_) cout<<"passed CaloJet ID -------------------" << endl;
1785  jetIDbool = true;
1786 
1787  //Denominator fill
1788  v->getMEhisto_DenominatorPt()->Fill(leadjpt);
1789  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPtBarrel()->Fill(leadjpt);
1790  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPtEndcap()->Fill(leadjpt);
1791  if (isForward(leadjeta)) v->getMEhisto_DenominatorPtForward()->Fill(leadjpt);
1792  v->getMEhisto_DenominatorEta()->Fill(leadjeta);
1793  v->getMEhisto_DenominatorPhi()->Fill(leadjphi);
1794  v->getMEhisto_DenominatorEtaPhi()->Fill(leadjeta,leadjphi);
1795  if (isBarrel(leadjeta)){
1796  v->getMEhisto_DenominatorEtaBarrel()->Fill(leadjeta);
1797  v->getMEhisto_DenominatorPhiBarrel()->Fill(leadjphi);
1798  }
1799  if (isEndCap(leadjeta)){
1800  v->getMEhisto_DenominatorEtaEndcap()->Fill(leadjeta);
1801  v->getMEhisto_DenominatorPhiEndcap()->Fill(leadjphi);
1802  }
1803  if (isForward(leadjeta)){
1804  v->getMEhisto_DenominatorEtaForward()->Fill(leadjeta);
1805  v->getMEhisto_DenominatorPhiForward()->Fill(leadjphi);
1806  }
1807  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
1808  v->getMEhisto_DenominatorEta_LowpTcut()->Fill(leadjeta);
1809  v->getMEhisto_DenominatorPhi_LowpTcut()->Fill(leadjphi);
1810  v->getMEhisto_DenominatorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1811  }
1812  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
1813  v->getMEhisto_DenominatorEta_MedpTcut()->Fill(leadjeta);
1814  v->getMEhisto_DenominatorPhi_MedpTcut()->Fill(leadjphi);
1815  v->getMEhisto_DenominatorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1816  }
1817  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
1818  v->getMEhisto_DenominatorEta_HighpTcut()->Fill(leadjeta);
1819  v->getMEhisto_DenominatorPhi_HighpTcut()->Fill(leadjphi);
1820  v->getMEhisto_DenominatorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1821  }
1822 
1823  //Numerator fill
1824  if(numpassed){
1825  //
1826  double dRmin = 99999.;
1827  double dPhimin = 9999.;
1828  if(v->getPath().find("L1") != std::string::npos){
1829  if ( l1Index >= triggerObj_->sizeFilters() ) {
1830  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1831  }
1832  else {
1833  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1834  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
1835  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
1836  if(dR < dRmin){
1837  dRmin = dR;
1838  }
1839  }
1840  }
1841  }
1842  else{
1843  if ( hltIndex >= triggerObj_->sizeFilters() ) {
1844  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1845  }
1846  else {
1847  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1848  trigger::Keys::const_iterator kj = khlt.begin();
1849  for(;kj != khlt.end(); ++kj){
1850  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(),
1851  leadjeta, leadjphi);
1852  if(dR < dRmin){
1853  dRmin = dR;
1854  }
1855  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
1856  if(dPhi < dPhimin){
1857  dPhimin = dPhi;
1858  }
1859  }
1860  //v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1861  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
1862  v->getMEhisto_DeltaR()->Fill(dRmin);
1863  }
1864  }
1865  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
1866  v->getMEhisto_NumeratorPt()->Fill(leadjpt);
1867  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPtBarrel()->Fill(leadjpt);
1868  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPtEndcap()->Fill(leadjpt);
1869  if (isForward(leadjeta)) v->getMEhisto_NumeratorPtForward()->Fill(leadjpt);
1870  v->getMEhisto_NumeratorEta()->Fill(leadjeta);
1871  v->getMEhisto_NumeratorPhi()->Fill(leadjphi);
1872  v->getMEhisto_NumeratorEtaPhi()->Fill(leadjeta,leadjphi);
1873  if (isBarrel(leadjeta)){
1874  v->getMEhisto_NumeratorEtaBarrel()->Fill(leadjeta);
1875  v->getMEhisto_NumeratorPhiBarrel()->Fill(leadjphi);
1876  }
1877  if (isEndCap(leadjeta)){
1878  v->getMEhisto_NumeratorEtaEndcap()->Fill(leadjeta);
1879  v->getMEhisto_NumeratorPhiEndcap()->Fill(leadjphi);
1880  }
1881  if (isForward(leadjeta)){
1882  v->getMEhisto_NumeratorEtaForward()->Fill(leadjeta);
1883  v->getMEhisto_NumeratorPhiForward()->Fill(leadjphi);
1884  }
1885  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
1886  v->getMEhisto_NumeratorEta_LowpTcut()->Fill(leadjeta);
1887  v->getMEhisto_NumeratorPhi_LowpTcut()->Fill(leadjphi);
1888  v->getMEhisto_NumeratorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1889  }
1890  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
1891  v->getMEhisto_NumeratorEta_MedpTcut()->Fill(leadjeta);
1892  v->getMEhisto_NumeratorPhi_MedpTcut()->Fill(leadjphi);
1893  v->getMEhisto_NumeratorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1894  }
1895  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
1896  v->getMEhisto_NumeratorEta_HighpTcut()->Fill(leadjeta);
1897  v->getMEhisto_NumeratorPhi_HighpTcut()->Fill(leadjphi);
1898  v->getMEhisto_NumeratorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1899  }
1900  }
1901  }//numpassed
1902  }//CalojetID filter
1903  }
1904 
1905  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1){
1906  if(((CaloJetEMF[1] > _fEMF || std::abs(CaloJetEta[1]) > _feta) &&
1907  CaloJetfHPD[0] < _fHPD && CaloJetn90[0] > _n90Hits)){
1908  v->getMEhisto_DenominatorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1909  v->getMEhisto_DenominatorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1910  if(numpassed==true){
1911  v->getMEhisto_NumeratorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1912  v->getMEhisto_NumeratorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1913  }
1914  }
1915  }
1916  }// Jet trigger and valid jet collection
1917 
1918  //PFJet paths
1919  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: PFJet -------------------" << std::endl;
1920  if(pfjetColl_.isValid()
1921  && (v->getObjectType() == trigger::TriggerJet)){
1922  //cout<<" - PFJet "<<endl;
1923  //&& (v->getPath().find("HLT_PFJet")!=std::string::npos)
1924  //&& (v->getPath().find("HLT_DiPFJet")!=std::string::npos)){
1925  bool jetIDbool = false;
1926  double leadjpt = PFJetPt[0];
1927  double leadjeta = PFJetEta[0];
1928  double leadjphi = PFJetPhi[0];
1929  double ljNHEF = PFJetNHEF[0];
1930  double ljCHEF = PFJetCHEF[0];
1931  double ljNEMF = PFJetNEMF[0];
1932  double ljCEMF = PFJetCEMF[0];
1933  //double sleadjpt = PFJetPt[1];
1934  //double sleadjeta = PFJetEta[1];
1935  //double sleadjphi = PFJetPhi[1];
1936  double sljNHEF = PFJetNHEF[1];
1937  double sljCHEF = PFJetCHEF[1];
1938  double sljNEMF = PFJetNEMF[1];
1939  double sljCEMF = PFJetCEMF[1];
1940  //
1941  double pfMHTx = pfMHTx_All;
1942  double pfMHTy = pfMHTy_All;
1943  //
1944  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && pfjet.size()){ //this line stops the central jets
1945 
1946  //======get pfmht
1947  _pfMHT = sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
1948  v->getMEhisto_DenominatorPFMHT()->Fill(_pfMHT);
1949 
1950  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1951  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1952  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1953  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF){
1954  if(verbose_) cout<<"passed PFJet ID -------------------" << endl;
1955  jetIDbool = true;
1956  v->getMEhisto_DenominatorPFPt()->Fill(leadjpt);
1957  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPFPtBarrel()->Fill(leadjpt);
1958  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPFPtEndcap()->Fill(leadjpt);
1959  if (isForward(leadjeta)) v->getMEhisto_DenominatorPFPtForward()->Fill(leadjpt);
1960  v->getMEhisto_DenominatorPFEta()->Fill(leadjeta);
1961  v->getMEhisto_DenominatorPFPhi()->Fill(leadjphi);
1962  v->getMEhisto_DenominatorPFEtaPhi()->Fill(leadjeta,leadjphi);
1963  if(isBarrel(leadjeta)){
1964  v->getMEhisto_DenominatorPFEtaBarrel()->Fill(leadjeta);
1965  v->getMEhisto_DenominatorPFPhiBarrel()->Fill(leadjphi);
1966  }
1967  if (isEndCap(leadjeta)){
1968  v->getMEhisto_DenominatorPFEtaEndcap()->Fill(leadjeta);
1969  v->getMEhisto_DenominatorPFPhiEndcap()->Fill(leadjphi);
1970  }
1971  if (isForward(leadjeta)){
1972  v->getMEhisto_DenominatorPFEtaForward()->Fill(leadjeta);
1973  v->getMEhisto_DenominatorPFPhiForward()->Fill(leadjphi);
1974  }
1975  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta)) || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1976  v->getMEhisto_DenominatorPFEta_LowpTcut()->Fill(leadjeta);
1977  v->getMEhisto_DenominatorPFPhi_LowpTcut()->Fill(leadjphi);
1978  v->getMEhisto_DenominatorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1979  }
1980  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta)) || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1981  v->getMEhisto_DenominatorPFEta_MedpTcut()->Fill(leadjeta);
1982  v->getMEhisto_DenominatorPFPhi_MedpTcut()->Fill(leadjphi);
1983  v->getMEhisto_DenominatorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1984  }
1985  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta)) || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1986  v->getMEhisto_DenominatorPFEta_HighpTcut()->Fill(leadjeta);
1987  v->getMEhisto_DenominatorPFPhi_HighpTcut()->Fill(leadjphi);
1988  v->getMEhisto_DenominatorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1989  }
1990 
1991  //Numerator fill
1992  if(numpassed){
1993  double dRmin = 99999.;
1994  double dPhimin = 9999.;
1995  if(v->getPath().find("L1") != std::string::npos){
1996  if ( l1Index >= triggerObj_->sizeFilters() ) {
1997  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1998  }
1999  else{
2000  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
2001  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
2002  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
2003  if(dR < dRmin){
2004  dRmin = dR;
2005  }
2006  }
2007  }
2008  }
2009  else{
2010  if ( hltIndex >= triggerObj_->sizeFilters() ) {
2011  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2012  }
2013  else{
2014  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2015  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2016  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(), leadjeta, leadjphi);
2017  if(dR < dRmin){
2018  dRmin = dR;
2019  }
2020  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
2021  if(dPhi < dPhimin){
2022  dPhimin = dPhi;
2023  }
2024  }
2025  v->getMEhisto_PFDeltaPhi()->Fill(dPhimin);
2026  v->getMEhisto_PFDeltaR()->Fill(dRmin);
2027  }
2028  }
2029  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
2030  v->getMEhisto_NumeratorPFPt()->Fill(leadjpt);
2031  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPFPtBarrel()->Fill(leadjpt);
2032  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPFPtEndcap()->Fill(leadjpt);
2033  if (isForward(leadjeta)) v->getMEhisto_NumeratorPFPtForward()->Fill(leadjpt);
2034  v->getMEhisto_NumeratorPFEta()->Fill(leadjeta);
2035  v->getMEhisto_NumeratorPFPhi()->Fill(leadjphi);
2036  v->getMEhisto_NumeratorPFEtaPhi()->Fill(leadjeta,leadjphi);
2037  if (isBarrel(leadjeta)){
2038  v->getMEhisto_NumeratorPFEtaBarrel()->Fill(leadjeta);
2039  v->getMEhisto_NumeratorPFPhiBarrel()->Fill(leadjphi);
2040  }
2041  if (isEndCap(leadjeta)){
2042  v->getMEhisto_NumeratorPFEtaEndcap()->Fill(leadjeta);
2043  v->getMEhisto_NumeratorPFPhiEndcap()->Fill(leadjphi);
2044  }
2045  if (isForward(leadjeta)){
2046  v->getMEhisto_NumeratorPFEtaForward()->Fill(leadjeta);
2047  v->getMEhisto_NumeratorPFPhiForward()->Fill(leadjphi);
2048  }
2049  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta))
2050  || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
2051  v->getMEhisto_NumeratorPFEta_LowpTcut()->Fill(leadjeta);
2052  v->getMEhisto_NumeratorPFPhi_LowpTcut()->Fill(leadjphi);
2053  v->getMEhisto_NumeratorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
2054  }
2055  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta))
2056  || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
2057  v->getMEhisto_NumeratorPFEta_MedpTcut()->Fill(leadjeta);
2058  v->getMEhisto_NumeratorPFPhi_MedpTcut()->Fill(leadjphi);
2059  v->getMEhisto_NumeratorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
2060  }
2061  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta))
2062  || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
2063  v->getMEhisto_NumeratorPFEta_HighpTcut()->Fill(leadjeta);
2064  v->getMEhisto_NumeratorPFPhi_HighpTcut()->Fill(leadjphi);
2065  v->getMEhisto_NumeratorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
2066  }
2067  }
2068  }
2069  }
2070  }
2071  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && pfjet.size()>1){
2072  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
2073  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
2074  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
2075  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF
2076  && sljNHEF >= _min_NHEF && sljNHEF <= _max_NHEF
2077  && sljCHEF >= _min_CHEF && sljCHEF <= _max_CHEF
2078  && sljNEMF >= _min_NEMF && sljNEMF <= _max_NEMF
2079  && sljCEMF >= _min_CEMF && sljCEMF <= _max_CEMF ){
2080  v->getMEhisto_DenominatorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
2081  v->getMEhisto_DenominatorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
2082  if(numpassed){
2083  v->getMEhisto_NumeratorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
2084  v->getMEhisto_NumeratorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
2085  }
2086  }
2087  }
2088  }// PF Jet trigger and valid jet collection
2089 
2090  //CaloMET path
2091  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: CaloMET -------------------" << std::endl;
2092  if(calometColl_.isValid()
2093  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
2094  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
2095  //cout<<" - CaloMET "<<endl;
2096  const CaloMETCollection *calometcol = calometColl_.product();
2097  const CaloMET met = calometcol->front();
2098  v->getMEhisto_DenominatorPt()->Fill(met.et());
2099  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
2100  if(numpassed){
2101  v->getMEhisto_NumeratorPt()->Fill(met.et());
2102  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
2103  if(hltIndex >= triggerObj_->sizeFilters()){
2104  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2105  }
2106  else{
2107  double dPhimin = 9999.;//
2108  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2109  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2110  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
2111  if(dPhi < dPhimin){
2112  dPhimin = dPhi;
2113  }
2114  }
2115  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2116  }
2117  }
2118  }
2119 
2120  //PFMET
2121  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: PFMET -------------------" << std::endl;
2122  if(pfmetColl_.isValid()
2123  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
2124  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
2125  //cout<<" - PFMET "<<endl;
2126  const PFMETCollection *pfmetcol = pfmetColl_.product();
2127  const PFMET met = pfmetcol->front();
2128  v->getMEhisto_DenominatorPt()->Fill(met.et());
2129  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
2130  if(numpassed){
2131  v->getMEhisto_NumeratorPt()->Fill(met.et());
2132  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
2133  if(hltIndex >= triggerObj_->sizeFilters()){
2134  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2135  }
2136  else{
2137  double dPhimin = 9999.;//
2138  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2139  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2140  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
2141  if(dPhi < dPhimin){
2142  dPhimin = dPhi;
2143  }
2144  }
2145  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2146  }
2147  }
2148  }
2149 
2150  /*
2151  if(pfmhtColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
2152  const PFMHTCollection *pfmhtcol = pfmhtColl_.product();
2153  const PFMHT met = pfmhtcol->front();
2154  v->getMEhisto_DenominatorPFPt()->Fill(met.pt());
2155  v->getMEhisto_DenominatorPFPhi()->Fill(met.phi());
2156  }// PFMHT trigger and valid MET collection
2157  */
2158  }// trigger under study
2159  }
2160 }
2161 
2162 void
2164 {
2165  //int npath;
2166  if(&triggerResults_) { /*npath = triggerResults_->size();*/ }
2167  else { return; }
2168 
2169  bool mbTrig = false;
2170  bool numpassed = false;
2171  //bool denompassed = false;
2172  for(size_t i=0;i<MBTrigPaths_.size();++i){
2173  const unsigned int nPath(hltConfig_.size());
2174  for (unsigned int j=0; j!=nPath; ++j) {
2176  if(pathname.find(MBTrigPaths_[i]) != std::string::npos){
2177  if(isHLTPathAccepted(pathname)){
2178  mbTrig = true;
2179  if(verbose_) cout<<"fillMEforEffWrtMBTrigger: MinBias Match"<<endl;
2180  }
2181  }
2182  if(mbTrig) break;
2183  }
2184  if(mbTrig) break;
2185  }
2186 
2187  if(mbTrig){
2188  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
2189  PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin();
2190  for(; v!= hltPathsEffWrtMB_.end(); ++v ){
2191  numpassed = false;
2192 
2193  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
2194  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum)) numpassed = true;
2195  //if(numpassed==true){
2196  edm::InputTag hltTag(v->getLabel(),"",processname_);
2197  const int hltIndex = triggerObj_->filterIndex(hltTag);
2198  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
2199  const int l1Index = triggerObj_->filterIndex(l1Tag);
2200  //}
2201 
2202  //----------------------------------------------------------------------
2203  //double pTcut = 0;
2204  double trigLowpTcut = 0;
2205  double trigMedpTcut = 0;
2206  double trigHighpTcut = 0;
2207  double trigLowpTcutFwd = 0;
2208  double trigMedpTcutFwd = 0;
2209  double trigHighpTcutFwd = 0;
2210  //
2211  //double pTPFcut = 0 ;
2212  double trigLowpTPFcut = 0;
2213  double trigMedpTPFcut = 0;
2214  double trigHighpTPFcut = 0;
2215  double trigLowpTPFcutFwd = 0;
2216  double trigMedpTPFcutFwd = 0;
2217  double trigHighpTPFcutFwd = 0;
2218  //
2219  //cout<<"pre-path" << v->getPath()<<endl;
2220  size_t jetstrfound = v->getPath().find("Jet");
2221  //size_t censtrfound = v->getPath().find("Central"); //shoouldn't be needed?
2222  string tpath = v->getPath();
2223  string jetTrigVal;
2224  float jetVal = 0.;
2225  //
2226  if(jetstrfound != string::npos){// && ustrfound != string::npos ){
2227  //cout<<v->getPath()<<endl;
2228  for(int trig = int(jetstrfound)+3; trig < int(jetstrfound)+7; trig++){// int(ustrfound); trig++){
2229  if(!isdigit(tpath[trig])) break;
2230  jetTrigVal+=tpath[trig];
2231  }
2232  char *cjetTrigVal = (char*)jetTrigVal.c_str();
2233  jetVal=atof(cjetTrigVal);
2234  //cout<<jetVal<<endl;
2235  //
2236  if(jetVal>0.){
2237  if(jetVal<50.){
2238  //pTcut = jetVal / 2.;
2239  trigMedpTcut = jetVal + 5.;
2240  trigHighpTcut = jetVal + 10.;
2241  //
2242  trigLowpTcutFwd = jetVal + 9.;
2243  trigMedpTcutFwd = jetVal + 15.;
2244  trigHighpTcutFwd = jetVal + 21.;
2245  }
2246  else{
2247  //pTcut = jetVal - 20. ;
2248  trigMedpTcut = jetVal + 2.;
2249  trigHighpTcut = jetVal + 60.;
2250  //
2251  trigLowpTcutFwd = jetVal + 22.;
2252  trigMedpTcutFwd = jetVal + 25.;
2253  trigHighpTcutFwd = jetVal + 110.;
2254  }
2255  trigLowpTcut = jetVal;
2256  //cout<<pTcut<<" "<<trigLowpTcut<<" "<<trigMedptcut<<" "<<trigHighpTcut<<" "<<trigLowpTcutFwd<<" "<<trigMedptcutFwd<<" "<<trigHighpTcutFwd<<endl;
2257  }
2258  //
2259  if(jetVal>0.){
2260  if(jetVal<50.){
2261  //pTPFcut = jetVal ;
2262  trigMedpTPFcut = jetVal + 20.;
2263  trigHighpTPFcut = jetVal + 40.;
2264  //
2265  trigLowpTPFcutFwd = jetVal + 60.;
2266  trigMedpTPFcutFwd = jetVal + 80.;
2267  trigHighpTPFcutFwd = jetVal + 100.;
2268  }
2269  else{
2270  //pTPFcut = jetVal ;
2271  trigMedpTPFcut = jetVal + 40.;
2272  trigHighpTPFcut = jetVal + 140.;
2273  //
2274  trigLowpTPFcutFwd = jetVal + 110.;
2275  trigMedpTPFcutFwd = jetVal + 130.;
2276  trigHighpTPFcutFwd = jetVal + 190.;
2277  }
2278  trigLowpTPFcut = jetVal;
2279  //cout<<pTcut<<" "<<trigLowpTcut<<" "<<trigMedptcut<<" "<<trigHighpTcut<<" "<<trigLowpTcutFwd<<" "<<trigMedptcutFwd<<" "<<trigHighpTcutFwd<<endl;
2280  }
2281  }
2282  //----------------------------------------------------------------------
2283 
2284  //CaloJet paths
2285  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: CaloJet -------------------" << std::endl;
2286  if(calojetColl_.isValid()
2287  && (v->getObjectType() == trigger::TriggerJet)){
2288  //cout<<" - CaloJet "<<endl;
2289  //&& (v->getPath().find("HLT_PFJet")==std::string::npos)
2290  //&& (v->getPath().find("HLT_DiPFJet")==std::string::npos)){
2291  bool jetIDbool = false;
2292  double leadjpt = CaloJetPt[0];
2293  double leadjeta = CaloJetEta[0];
2294  double leadjphi = CaloJetPhi[0];
2295  //double ljemf = CaloJetEMF[0];
2296  double ljfhpd = CaloJetfHPD[0];
2297  double ljn90 = CaloJetn90[0];
2298  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size()){ //this line stops the central jets
2299  if( (ljfhpd < _fHPD) && (ljn90 > _n90Hits )){
2300  if(verbose_) cout<<"passed CaloJet ID -------------------" << endl;
2301  jetIDbool = true;
2302 
2303  //Denominator fill
2304  v->getMEhisto_DenominatorPt()->Fill(leadjpt);
2305  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPtBarrel()->Fill(leadjpt);
2306  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPtEndcap()->Fill(leadjpt);
2307  if (isForward(leadjeta)) v->getMEhisto_DenominatorPtForward()->Fill(leadjpt);
2308  v->getMEhisto_DenominatorEta()->Fill(leadjeta);
2309  v->getMEhisto_DenominatorPhi()->Fill(leadjphi);
2310  v->getMEhisto_DenominatorEtaPhi()->Fill(leadjeta,leadjphi);
2311  if (isBarrel(leadjeta)){
2312  v->getMEhisto_DenominatorEtaBarrel()->Fill(leadjeta);
2313  v->getMEhisto_DenominatorPhiBarrel()->Fill(leadjphi);
2314  }
2315  if (isEndCap(leadjeta)){
2316  v->getMEhisto_DenominatorEtaEndcap()->Fill(leadjeta);
2317  v->getMEhisto_DenominatorPhiEndcap()->Fill(leadjphi);
2318  }
2319  if (isForward(leadjeta)){
2320  v->getMEhisto_DenominatorEtaForward()->Fill(leadjeta);
2321  v->getMEhisto_DenominatorPhiForward()->Fill(leadjphi);
2322  }
2323  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
2324  v->getMEhisto_DenominatorEta_LowpTcut()->Fill(leadjeta);
2325  v->getMEhisto_DenominatorPhi_LowpTcut()->Fill(leadjphi);
2326  v->getMEhisto_DenominatorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
2327  }
2328  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
2329  v->getMEhisto_DenominatorEta_MedpTcut()->Fill(leadjeta);
2330  v->getMEhisto_DenominatorPhi_MedpTcut()->Fill(leadjphi);
2331  v->getMEhisto_DenominatorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
2332  }
2333  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
2334  v->getMEhisto_DenominatorEta_HighpTcut()->Fill(leadjeta);
2335  v->getMEhisto_DenominatorPhi_HighpTcut()->Fill(leadjphi);
2336  v->getMEhisto_DenominatorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
2337  }
2338 
2339  //Numerator fill
2340  if(numpassed){
2341  //
2342  double dRmin = 99999.;
2343  double dPhimin = 9999.;
2344  if(v->getPath().find("L1") != std::string::npos){
2345  if ( l1Index >= triggerObj_->sizeFilters() ) {
2346  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2347  }
2348  else {
2349  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
2350  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
2351  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
2352  if(dR < dRmin){
2353  dRmin = dR;
2354  }
2355  }
2356  }
2357  }
2358  else{
2359  if ( hltIndex >= triggerObj_->sizeFilters() ) {
2360  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2361  }
2362  else {
2363  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2364  trigger::Keys::const_iterator kj = khlt.begin();
2365  for(;kj != khlt.end(); ++kj){
2366  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(),
2367  leadjeta, leadjphi);
2368  if(dR < dRmin){
2369  dRmin = dR;
2370  }
2371  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
2372  if(dPhi < dPhimin){
2373  dPhimin = dPhi;
2374  }
2375  }
2376  //v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2377  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2378  v->getMEhisto_DeltaR()->Fill(dRmin);
2379  }
2380  }
2381  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
2382  v->getMEhisto_NumeratorPt()->Fill(leadjpt);
2383  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPtBarrel()->Fill(leadjpt);
2384  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPtEndcap()->Fill(leadjpt);
2385  if (isForward(leadjeta)) v->getMEhisto_NumeratorPtForward()->Fill(leadjpt);
2386  v->getMEhisto_NumeratorEta()->Fill(leadjeta);
2387  v->getMEhisto_NumeratorPhi()->Fill(leadjphi);
2388  v->getMEhisto_NumeratorEtaPhi()->Fill(leadjeta,leadjphi);
2389  if (isBarrel(leadjeta)){
2390  v->getMEhisto_NumeratorEtaBarrel()->Fill(leadjeta);
2391  v->getMEhisto_NumeratorPhiBarrel()->Fill(leadjphi);
2392  }
2393  if (isEndCap(leadjeta)){
2394  v->getMEhisto_NumeratorEtaEndcap()->Fill(leadjeta);
2395  v->getMEhisto_NumeratorPhiEndcap()->Fill(leadjphi);
2396  }
2397  if (isForward(leadjeta)){
2398  v->getMEhisto_NumeratorEtaForward()->Fill(leadjeta);
2399  v->getMEhisto_NumeratorPhiForward()->Fill(leadjphi);
2400  }
2401  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
2402  v->getMEhisto_NumeratorEta_LowpTcut()->Fill(leadjeta);
2403  v->getMEhisto_NumeratorPhi_LowpTcut()->Fill(leadjphi);
2404  v->getMEhisto_NumeratorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
2405  }
2406  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
2407  v->getMEhisto_NumeratorEta_MedpTcut()->Fill(leadjeta);
2408  v->getMEhisto_NumeratorPhi_MedpTcut()->Fill(leadjphi);
2409  v->getMEhisto_NumeratorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
2410  }
2411  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
2412  v->getMEhisto_NumeratorEta_HighpTcut()->Fill(leadjeta);
2413  v->getMEhisto_NumeratorPhi_HighpTcut()->Fill(leadjphi);
2414  v->getMEhisto_NumeratorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
2415  }
2416  }
2417  }//numpassed
2418  }//CalojetID filter
2419  }
2420 
2421  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1){
2422  if(((CaloJetEMF[1] > _fEMF || std::abs(CaloJetEta[1]) > _feta) &&
2423  CaloJetfHPD[0] < _fHPD && CaloJetn90[0] > _n90Hits)){
2424  v->getMEhisto_DenominatorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
2425  v->getMEhisto_DenominatorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
2426  if(numpassed==true){
2427  v->getMEhisto_NumeratorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
2428  v->getMEhisto_NumeratorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
2429  }
2430  }
2431  }
2432  }// Jet trigger and valid jet collection
2433 
2434  //PFJet paths
2435  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: PFJet -------------------" << std::endl;
2436  if(pfjetColl_.isValid()
2437  && (v->getObjectType() == trigger::TriggerJet)){
2438  //cout<<" - PFJet "<<endl;
2439  //&& (v->getPath().find("HLT_PFJet")!=std::string::npos)
2440  //&& (v->getPath().find("HLT_DiPFJet")!=std::string::npos)){
2441  bool jetIDbool = false;
2442  double leadjpt = PFJetPt[0];
2443  double leadjeta = PFJetEta[0];
2444  double leadjphi = PFJetPhi[0];
2445  double ljNHEF = PFJetNHEF[0];
2446  double ljCHEF = PFJetCHEF[0];
2447  double ljNEMF = PFJetNEMF[0];
2448  double ljCEMF = PFJetCEMF[0];
2449  //double sleadjpt = PFJetPt[1];
2450  //double sleadjeta = PFJetEta[1];
2451  //double sleadjphi = PFJetPhi[1];
2452  double sljNHEF = PFJetNHEF[1];
2453  double sljCHEF = PFJetCHEF[1];
2454  double sljNEMF = PFJetNEMF[1];
2455  double sljCEMF = PFJetCEMF[1];
2456  //
2457  double pfMHTx = pfMHTx_All;
2458  double pfMHTy = pfMHTy_All;
2459  //
2460  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && pfjet.size()){ //this line stops the central jets
2461 
2462  //======get pfmht
2463  _pfMHT = sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
2464  v->getMEhisto_DenominatorPFMHT()->Fill(_pfMHT);
2465 
2466  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
2467  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
2468  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
2469  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF){
2470  if(verbose_) cout<<"passed PFJet ID -------------------" << endl;
2471  jetIDbool = true;
2472  v->getMEhisto_DenominatorPFPt()->Fill(leadjpt);
2473  if (isBarrel(leadjeta)) v->getMEhisto_DenominatorPFPtBarrel()->Fill(leadjpt);
2474  if (isEndCap(leadjeta)) v->getMEhisto_DenominatorPFPtEndcap()->Fill(leadjpt);
2475  if (isForward(leadjeta)) v->getMEhisto_DenominatorPFPtForward()->Fill(leadjpt);
2476  v->getMEhisto_DenominatorPFEta()->Fill(leadjeta);
2477  v->getMEhisto_DenominatorPFPhi()->Fill(leadjphi);
2478  v->getMEhisto_DenominatorPFEtaPhi()->Fill(leadjeta,leadjphi);
2479  if(isBarrel(leadjeta)){
2480  v->getMEhisto_DenominatorPFEtaBarrel()->Fill(leadjeta);
2481  v->getMEhisto_DenominatorPFPhiBarrel()->Fill(leadjphi);
2482  }
2483  if (isEndCap(leadjeta)){
2484  v->getMEhisto_DenominatorPFEtaEndcap()->Fill(leadjeta);
2485  v->getMEhisto_DenominatorPFPhiEndcap()->Fill(leadjphi);
2486  }
2487  if (isForward(leadjeta)){
2488  v->getMEhisto_DenominatorPFEtaForward()->Fill(leadjeta);
2489  v->getMEhisto_DenominatorPFPhiForward()->Fill(leadjphi);
2490  }
2491  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta)) || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
2492  v->getMEhisto_DenominatorPFEta_LowpTcut()->Fill(leadjeta);
2493  v->getMEhisto_DenominatorPFPhi_LowpTcut()->Fill(leadjphi);
2494  v->getMEhisto_DenominatorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
2495  }
2496  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta)) || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
2497  v->getMEhisto_DenominatorPFEta_MedpTcut()->Fill(leadjeta);
2498  v->getMEhisto_DenominatorPFPhi_MedpTcut()->Fill(leadjphi);
2499  v->getMEhisto_DenominatorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
2500  }
2501  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta)) || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
2502  v->getMEhisto_DenominatorPFEta_HighpTcut()->Fill(leadjeta);
2503  v->getMEhisto_DenominatorPFPhi_HighpTcut()->Fill(leadjphi);
2504  v->getMEhisto_DenominatorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
2505  }
2506 
2507  //Numerator fill
2508  if(numpassed){
2509  double dRmin = 99999.;
2510  double dPhimin = 9999.;
2511  if(v->getPath().find("L1") != std::string::npos){
2512  if ( l1Index >= triggerObj_->sizeFilters() ) {
2513  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2514  }
2515  else{
2516  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
2517  for(trigger::Keys::const_iterator ki = kl1.begin();ki != kl1.end(); ++ki){
2518  double dR = deltaR(toc[*ki].eta(), toc[*ki].phi(), leadjeta, leadjphi);
2519  if(dR < dRmin){
2520  dRmin = dR;
2521  }
2522  }
2523  }
2524  }
2525  else{
2526  if ( hltIndex >= triggerObj_->sizeFilters() ) {
2527  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2528  }
2529  else{
2530  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2531  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2532  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(), leadjeta, leadjphi);
2533  if(dR < dRmin){
2534  dRmin = dR;
2535  }
2536  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
2537  if(dPhi < dPhimin){
2538  dPhimin = dPhi;
2539  }
2540  }
2541  v->getMEhisto_PFDeltaPhi()->Fill(dPhimin);
2542  v->getMEhisto_PFDeltaR()->Fill(dRmin);
2543  }
2544  }
2545  if(dRmin < 0.1 || (v->getPath().find("L1") != std::string::npos && dRmin < 0.4)){
2546  v->getMEhisto_NumeratorPFPt()->Fill(leadjpt);
2547  if (isBarrel(leadjeta)) v->getMEhisto_NumeratorPFPtBarrel()->Fill(leadjpt);
2548  if (isEndCap(leadjeta)) v->getMEhisto_NumeratorPFPtEndcap()->Fill(leadjpt);
2549  if (isForward(leadjeta)) v->getMEhisto_NumeratorPFPtForward()->Fill(leadjpt);
2550  v->getMEhisto_NumeratorPFEta()->Fill(leadjeta);
2551  v->getMEhisto_NumeratorPFPhi()->Fill(leadjphi);
2552  v->getMEhisto_NumeratorPFEtaPhi()->Fill(leadjeta,leadjphi);
2553  if (isBarrel(leadjeta)){
2554  v->getMEhisto_NumeratorPFEtaBarrel()->Fill(leadjeta);
2555  v->getMEhisto_NumeratorPFPhiBarrel()->Fill(leadjphi);
2556  }
2557  if (isEndCap(leadjeta)){
2558  v->getMEhisto_NumeratorPFEtaEndcap()->Fill(leadjeta);
2559  v->getMEhisto_NumeratorPFPhiEndcap()->Fill(leadjphi);
2560  }
2561  if (isForward(leadjeta)){
2562  v->getMEhisto_NumeratorPFEtaForward()->Fill(leadjeta);
2563  v->getMEhisto_NumeratorPFPhiForward()->Fill(leadjphi);
2564  }
2565  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta))
2566  || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
2567  v->getMEhisto_NumeratorPFEta_LowpTcut()->Fill(leadjeta);
2568  v->getMEhisto_NumeratorPFPhi_LowpTcut()->Fill(leadjphi);
2569  v->getMEhisto_NumeratorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
2570  }
2571  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta))
2572  || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
2573  v->getMEhisto_NumeratorPFEta_MedpTcut()->Fill(leadjeta);
2574  v->getMEhisto_NumeratorPFPhi_MedpTcut()->Fill(leadjphi);
2575  v->getMEhisto_NumeratorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
2576  }
2577  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta))
2578  || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
2579  v->getMEhisto_NumeratorPFEta_HighpTcut()->Fill(leadjeta);
2580  v->getMEhisto_NumeratorPFPhi_HighpTcut()->Fill(leadjphi);
2581  v->getMEhisto_NumeratorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
2582  }
2583  }
2584  }
2585  }
2586  }
2587  if(jetIDbool == true && (v->getTriggerType().compare("DiJet_Trigger") == 0) && pfjet.size()>1){
2588  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
2589  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
2590  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
2591  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF
2592  && sljNHEF >= _min_NHEF && sljNHEF <= _max_NHEF
2593  && sljCHEF >= _min_CHEF && sljCHEF <= _max_CHEF
2594  && sljNEMF >= _min_NEMF && sljNEMF <= _max_NEMF
2595  && sljCEMF >= _min_CEMF && sljCEMF <= _max_CEMF ){
2596  v->getMEhisto_DenominatorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
2597  v->getMEhisto_DenominatorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
2598  if(numpassed){
2599  v->getMEhisto_NumeratorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
2600  v->getMEhisto_NumeratorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
2601  }
2602  }
2603  }
2604  }// PF Jet trigger and valid jet collection
2605 
2606  //CaloMET path
2607  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: CaloMET -------------------" << std::endl;
2608  if(calometColl_.isValid()
2609  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
2610  && (v->getPath().find("HLT_PFMET")==std::string::npos)){
2611  //cout<<" - CaloMET "<<endl;
2612  const CaloMETCollection *calometcol = calometColl_.product();
2613  const CaloMET met = calometcol->front();
2614  v->getMEhisto_DenominatorPt()->Fill(met.et());
2615  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
2616  if(numpassed){
2617  v->getMEhisto_NumeratorPt()->Fill(met.et());
2618  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
2619  if(hltIndex >= triggerObj_->sizeFilters()){
2620  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2621  }
2622  else{
2623  double dPhimin = 9999.;//
2624  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2625  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2626  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
2627  if(dPhi < dPhimin){
2628  dPhimin = dPhi;
2629  }
2630  }
2631  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2632  }
2633  }
2634  }
2635 
2636  //PFMET
2637  if(verbose_) std::cout << "fillMEforEffWrtMuTrigger: PFMET -------------------" << std::endl;
2638  if(pfmetColl_.isValid()
2639  && ((v->getObjectType() == trigger::TriggerMET) || (v->getObjectType() == trigger::TriggerTET))
2640  && (v->getPath().find("HLT_PFMET")!=std::string::npos)){
2641  //cout<<" - PFMET "<<endl;
2642  const PFMETCollection *pfmetcol = pfmetColl_.product();
2643  const PFMET met = pfmetcol->front();
2644  v->getMEhisto_DenominatorPt()->Fill(met.et());
2645  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
2646  if(numpassed){
2647  v->getMEhisto_NumeratorPt()->Fill(met.et());
2648  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
2649  if(hltIndex >= triggerObj_->sizeFilters()){
2650  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
2651  }
2652  else{
2653  double dPhimin = 9999.;//
2654  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
2655  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj){
2656  double dPhi = deltaPhi(toc[*kj].phi(), met.phi());
2657  if(dPhi < dPhimin){
2658  dPhimin = dPhi;
2659  }
2660  }
2661  v->getMEhisto_DeltaPhi()->Fill(dPhimin);
2662  }
2663  }
2664  }
2665 
2666  /*
2667  if(pfmhtColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
2668  const PFMHTCollection *pfmhtcol = pfmhtColl_.product();
2669  const PFMHT met = pfmhtcol->front();
2670  v->getMEhisto_DenominatorPFPt()->Fill(met.pt());
2671  v->getMEhisto_DenominatorPFPhi()->Fill(met.phi());
2672  }// PFMHT trigger and valid MET collection
2673  */
2674  }// trigger under study
2675  }
2676 }
2677 
2678 
2679 
2680 // -- method called once each job just before starting event loop --------
2681 void
2683 {
2684 }
2685 
2686 // BeginRun
2687 void
2689 {
2690  if(!isSetup_){
2691  DQMStore *dbe = 0;
2692  dbe = Service<DQMStore>().operator->();
2693  if (dbe) {
2694  dbe->setCurrentFolder(dirname_);
2695  dbe->rmdir(dirname_);
2696  }
2697  if (dbe) {
2698  dbe->setCurrentFolder(dirname_);
2699  }
2700 
2701  //--- htlConfig_
2702  bool changed(true);
2703  if (!hltConfig_.init(run, c, processname_, changed)) {
2704  LogDebug("HLTJetMETDQMSource") << "HLTConfigProvider failed to initialize.";
2705  }
2706 
2707  /*
2708  Here we select the Single Jet, DiJet, MET trigger. SingleJet and DiJet trigger are saved under same object type "TriggerJet". We can easily separate out sing
2709  le and di jet trigger later. For the first trigger in the list, denominator trigger is dummy (empty) whereas for other triggers denom is previous trigger o
2710  f same type. e.g. SingleJet50 has singleJet30 as denominator.
2711  For defining histos wrt muon trigger, denominator is always set "MuonTrigger". This string later can be checked and condition can be applied on muon triggers
2712  .
2713  */
2714 
2715  const unsigned int n(hltConfig_.size());
2716  int singleJet = 0;
2717  int diJet = 0;
2718  int met = 0;
2719  int tet = 0;
2720  for (unsigned int i=0; i!=n; ++i) {
2721  bool denomFound = false;
2722  bool numFound = false;
2723  bool mbFound = false;
2724  bool muFound = false;
2725  bool checkPath = false;
2726 
2727  //Look for paths if "path name fraction" is found in the pathname
2729  //Filter only paths JetMET triggers are interested in
2730  std::vector<std::string>::const_iterator controlPathname = pathFilter_.begin();
2731  for(;controlPathname!=pathFilter_.end(); ++controlPathname){
2732  if(pathname.find((*controlPathname)) != std::string::npos){
2733  checkPath = true;
2734  break;
2735  }
2736  }
2737  if(checkPath==false) continue;
2738 
2739  //Reject if keyword(s) is found in the pathname
2740  std::vector<std::string>::const_iterator rejectPathname = pathRejectKeyword_.begin();
2741  for(; rejectPathname!=pathRejectKeyword_.end();++rejectPathname){
2742  if(pathname.find((*rejectPathname)) != std::string::npos){
2743  checkPath = false;
2744  break;
2745  }
2746  }
2747  if(checkPath==false) continue;
2748 
2749 
2750  //
2751  if(verbose_) cout<<"==pathname=="<<pathname<<endl;
2752  std::string dpathname = MuonTrigPaths_[0];
2753  std::string l1pathname = "dummy";
2754  std::string denompathname = "";
2755  unsigned int usedPrescale = 1;
2756  unsigned int objectType = 0;
2757  std::string triggerType = "";
2758  std::string filtername("dummy");
2759  std::string Denomfiltername("denomdummy");
2760 
2761  if(pathname.find("Jet") != std::string::npos
2762  && !(pathname.find("DoubleJet") != std::string::npos)
2763  && !(pathname.find("DiJet") != std::string::npos)
2764  && !(pathname.find("DiPFJet") != std::string::npos)
2765  && !(pathname.find("BTag") != std::string::npos)
2766  && !(pathname.find("Mu") != std::string::npos)
2767  && !(pathname.find("Fwd") != std::string::npos)){
2768  triggerType = "SingleJet_Trigger";
2769  objectType = trigger::TriggerJet;
2770  }
2771  if(pathname.find("DiJet") != std::string::npos
2772  || pathname.find("DiPFJet") != std::string::npos
2773  || pathname.find("DoubleJet") != std::string::npos){
2774  triggerType = "DiJet_Trigger";
2775  objectType = trigger::TriggerJet;
2776  }
2777  if(pathname.find("MET") != std::string::npos){
2778  triggerType = "MET_Trigger";
2779  objectType = trigger::TriggerMET;
2780  }
2781  if(pathname.find("HT") != std::string::npos) {
2782  triggerType = "TET_Trigger";
2783  objectType = trigger::TriggerTET;
2784  }
2785 
2786  //
2787  if(objectType == trigger::TriggerJet
2788  && !(pathname.find("DiJet") != std::string::npos)
2789  && !(pathname.find("DiPFJet") != std::string::npos)
2790  && !(pathname.find("DoubleJet") != std::string::npos)){
2791  singleJet++;
2792  if(singleJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
2793  if(singleJet == 1) dpathname = MuonTrigPaths_[0];
2794  }
2795  if(objectType == trigger::TriggerJet
2796  && ((pathname.find("DiJet") != std::string::npos)
2797  || (pathname.find("DiPFJet") != std::string::npos))){
2798  diJet++;
2799  if(diJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
2800  if(diJet == 1) dpathname = MuonTrigPaths_[0];
2801  }
2802  if(objectType == trigger::TriggerMET ){
2803  met++;
2804  if(met > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
2805  if(met == 1) dpathname = MuonTrigPaths_[0];
2806  }
2807  if(objectType == trigger::TriggerTET ){
2808  tet++;
2809  if(tet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
2810  if(tet == 1) dpathname = MuonTrigPaths_[0];
2811  }
2812 
2813  // find L1 condition for numpath with numpath objecttype
2814  // find PSet for L1 global seed for numpath,sss
2815  // list module labels for numpath
2816 
2817  // Checking if the trigger exist in HLT table or not
2818  for (unsigned int i=0; i!=n; ++i){
2819  std::string HLTname = hltConfig_.triggerName(i);
2820  if(HLTname == pathname) numFound = true;
2821  if(HLTname == dpathname) denomFound = true;
2822  if(HLTname.find(MBTrigPaths_[0]) != std::string::npos) mbFound = true;
2823  if(HLTname.find(MuonTrigPaths_[0]) != std::string::npos) muFound = true;
2824  //if(HLTname == MBTrigPaths_[0]) mbFound = true;
2825  //if(HLTname == MuonTrigPaths_[0]) muFound = true;
2826  }
2827 
2828  if(numFound){ //make trigger exist in the menu
2829  //ml needs change l1pathname
2830  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
2831  //ml added
2832  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2833  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2834  edm::InputTag testTag(*numpathmodule,"",processname_);
2835  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
2836  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
2837  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
2838  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
2839  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET")
2840  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
2841  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler"))
2842  filtername = *numpathmodule;
2843  }
2844  /*
2845  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2846  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2847  edm::InputTag testTag(*numpathmodule,"",processname_);
2848  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
2849  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
2850  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
2851  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler"))
2852  filtername = *numpathmodule;
2853  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed")l1pathname = *numpathmodule;
2854  }
2855  */
2856  }
2857 
2858  if(objectType != 0 && denomFound){
2859  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
2860  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2861  edm::InputTag testTag(*numpathmodule,"",processname_);
2862  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
2863  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
2864  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
2865  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
2866  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
2867  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
2868  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
2869  Denomfiltername = *numpathmodule;
2870  }
2871  }
2872 
2873  if(objectType != 0 && numFound){
2874  if(verbose_)
2875  cout<<"=Pathname= "<<pathname
2876  <<" | =Denompath= "<<dpathname
2877  <<" | =Filtername= "<<filtername
2878  <<" | =Denomfiltername= "<<Denomfiltername
2879  <<" | =L1pathname= "<<l1pathname
2880  <<" | =ObjectType= "<<objectType<<endl;
2881  if(!((pathname.find("HT") != std::string::npos) || (pathname.find("Quad") != std::string::npos))){
2882  hltPathsAll_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
2883  if(muFound)hltPathsAllWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2884  filtername, Denomfiltername, processname_, objectType, triggerType));
2885  if(muFound)hltPathsEffWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2886  filtername, Denomfiltername, processname_, objectType, triggerType));
2887  if(mbFound)hltPathsEffWrtMB_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2888  filtername, Denomfiltername, processname_, objectType, triggerType));
2889  if(!nameForEff_ && denomFound) hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2890  filtername, Denomfiltername, processname_, objectType, triggerType));
2891  }
2892  hltPathsAllTriggerSummary_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2893  filtername, Denomfiltername, processname_, objectType, triggerType));
2894  }
2895  } //Loop over paths
2896 
2897  if (verbose_) cout << "get names for efficicncy------------------"<< endl;
2898  //---------bool to pick trigger names pair from config file-------------
2899  if(nameForEff_){
2900  std::string l1pathname = "dummy";
2901  std::string denompathname = "";
2902  unsigned int usedPrescale = 1;
2903  unsigned int objectType = 0;
2904  std::string triggerType = "";
2905  std::string filtername("dummy");
2906  std::string Denomfiltername("denomdummy");
2907  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin();
2908  custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair){
2909  std::string pathname = custompathnamepair->first;
2910  std::string dpathname = custompathnamepair->second;
2911  bool numFound = false;
2912  bool denomFound = false;
2913  // Checking if the trigger exist in HLT table or not
2914  for (unsigned int i=0; i!=n; ++i) {
2915  std::string HLTname = hltConfig_.triggerName(i);
2916  if(HLTname.find(pathname)!=std::string::npos){numFound = true; pathname = HLTname;} //changed to get versions
2917  if(HLTname.find(dpathname)!=std::string::npos){denomFound = true; dpathname = HLTname;} //changed
2918  }
2919  if(numFound && denomFound){
2920  if (pathname.find("Jet") != std::string::npos
2921  && !(pathname.find("DiJet") != std::string::npos)
2922  && !(pathname.find("DiPFJet") != std::string::npos)
2923  && !(pathname.find("DoubleJet") != std::string::npos)
2924  && !(pathname.find("BTag") != std::string::npos)
2925  && !(pathname.find("Mu") != std::string::npos)
2926  && !(pathname.find("Fwd") != std::string::npos)){
2927  triggerType = "SingleJet_Trigger";
2928  objectType = trigger::TriggerJet;
2929  }
2930  if (pathname.find("DiJet") != std::string::npos
2931  || pathname.find("DiPFJet") != std::string::npos
2932  || pathname.find("DoubleJet") != std::string::npos ){
2933  triggerType = "DiJet_Trigger";
2934  objectType = trigger::TriggerJet;
2935  }
2936  if (pathname.find("MET") != std::string::npos ){
2937  triggerType = "MET_Trigger";
2938  objectType = trigger::TriggerMET;
2939  }
2940  if (pathname.find("TET") != std::string::npos ){
2941  triggerType = "TET_Trigger";
2942  objectType = trigger::TriggerTET;
2943  }
2944 
2945  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
2946  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2947  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2948  edm::InputTag testTag(*numpathmodule,"",processname_);
2949  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
2950  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
2951  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
2952  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
2953  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
2954  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
2955  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
2956  filtername = *numpathmodule;
2957  }
2958 
2959  if(objectType != 0){
2960  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
2961  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
2962  edm::InputTag testTag(*numpathmodule,"",processname_);
2963  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")
2964  || (hltConfig_.moduleType(*numpathmodule) == "HLT1PFJet")
2965  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter")
2966  || (hltConfig_.moduleType(*numpathmodule) == "HLTDiPFJetAveFilter")
2967  || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" )
2968  || (hltConfig_.moduleType(*numpathmodule) == "HLTMhtFilter")
2969  || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )
2970  Denomfiltername = *numpathmodule;
2971  }
2972 
2973  if(verbose_)cout<<"==pathname=="<<pathname
2974  <<"==denompath=="<<dpathname
2975  <<"==filtername=="<<filtername
2976  <<"==denomfiltername=="<<Denomfiltername
2977  <<"==l1pathname=="<<l1pathname
2978  <<"==objectType=="<<objectType<<endl;
2979  hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
2980  filtername, Denomfiltername, processname_, objectType, triggerType));
2981  }
2982  }
2983  }
2984  }
2985 
2986  if(verbose_)cout<<"== end hltPathsEff_.push_back ======" << endl;
2987 
2988  //-----------------------------------------------------------------
2989  //---book trigger summary histos
2990  if(!isSetup_){
2991  std::string foldernm = "/TriggerSummary/";
2992  if (dbe){
2993  dbe->setCurrentFolder(dirname_ + foldernm);
2994  }
2995  int TrigBins_ = hltPathsAllTriggerSummary_.size();
2996  double TrigMin_ = -0.5;
2997  double TrigMax_ = hltPathsAllTriggerSummary_.size()-0.5;
2998 
2999  std::string histonm="JetMET_TriggerRate";
3000  std::string histot="JetMET TriggerRate Summary";
3001  rate_All = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
3002 
3003  histonm = "JetMET_TriggerRate_Correlation";
3004  histot = "JetMET TriggerRate Correlation Summary;y&&!x;x&&y";
3005  correlation_All = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
3006 
3007  histonm = "JetMET_NVertices";
3008  histot = "No. of vertices";
3009  NVertices = dbe->book1D(histonm.c_str(),histot.c_str(),100,0,50);
3010 
3011  histonm = "JetMET_PVZ";
3012  histot = "Primary Vertex Z pos";
3013  PVZ = dbe->book1D(histonm.c_str(),histot.c_str(),100,-50.,50.);
3014 
3015  if(runStandalone_){
3016  histonm="JetMET_TriggerRate_WrtMuTrigger";
3017  histot="JetMET TriggerRate Summary Wrt Muon Trigger ";
3018  rate_AllWrtMu = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
3019 
3020  histonm="JetMET_TriggerRate_Correlation_WrtMuTrigger";
3021  histot="JetMET TriggerRate Correlation Summary Wrt Muon Trigger;y&&!x;x&&y";
3022  correlation_AllWrtMu = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
3023 
3024  histonm="JetMET_TriggerRate_WrtMBTrigger";
3025  histot="JetMET TriggerRate Summary Wrt MB Trigger";
3026  rate_AllWrtMB = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
3027 
3028  histonm="JetMET_TriggerRate_Correlation_WrtMBTrigger";
3029  histot="JetMET TriggerRate Correlation Wrt MB Trigger;y&&!x;x&&y";
3030  correlation_AllWrtMB = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
3031  }
3032  isSetup_ = true;
3033  }
3034  //---Set bin label
3035 
3036  for(PathInfoCollection::iterator v = hltPathsAllTriggerSummary_.begin(); v!= hltPathsAllTriggerSummary_.end(); ++v ){
3037  std::string labelnm("dummy");
3038  labelnm = v->getPath();
3039  int nbins = rate_All->getTH1()->GetNbinsX();
3040  for(int ibin=1; ibin<nbins+1; ibin++){
3041  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
3042  std::string binLabel_str = string(binLabel);
3043  if(binLabel_str.compare(labelnm)==0)break;
3044  if(binLabel[0]=='\0'){
3045  rate_All->setBinLabel(ibin,labelnm);
3046  correlation_All->setBinLabel(ibin,labelnm,1);
3047  correlation_All->setBinLabel(ibin,labelnm,2);
3048  if(runStandalone_){
3049  rate_AllWrtMu->setBinLabel(ibin,labelnm);
3050  rate_AllWrtMB->setBinLabel(ibin,labelnm);
3051  correlation_AllWrtMu->setBinLabel(ibin,labelnm,1);
3052  correlation_AllWrtMB->setBinLabel(ibin,labelnm,1);
3053  correlation_AllWrtMu->setBinLabel(ibin,labelnm,2);
3054  correlation_AllWrtMB->setBinLabel(ibin,labelnm,2);
3055  }
3056  break;
3057  }
3058  }
3059  }
3060 
3061  // Now define histos for All triggers
3062  if(plotAll_){
3063  //
3064  int Nbins_ = 10;
3065  int Nmin_ = -0.5;
3066  int Nmax_ = 9.5;
3067  //
3068  int Ptbins_ = 100;
3069  if(runStandalone_) Ptbins_ = 1000;
3070  double PtMin_ = 0.;
3071  double PtMax_ = 1000.;
3072  //
3073  int Etabins_ = 50;
3074  if(runStandalone_) Etabins_ = 100;
3075  double EtaMin_ = -5.;
3076  double EtaMax_ = 5.;
3077  //
3078  int Phibins_ = 35;
3079  double PhiMin_ = -3.5;
3080  double PhiMax_ = 3.5;
3081 
3082  int Resbins_ = 30;
3083  double ResMin_ = -1.5;
3084  double ResMax_ = 1.5;
3085  //
3086  std::string dirName = dirname_ + "/MonitorAllTriggers/";
3087  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
3088  //
3089  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
3090  std::string subdirName = dirName + trgPathName;
3091  std::string trigPath = "("+trgPathName+")";
3092  dbe->setCurrentFolder(subdirName);
3093 
3094  std::string labelname("ME");
3095  std::string histoname(labelname+"");
3096  std::string title(labelname+"");
3097 
3098  MonitorElement *dummy;
3099  dummy = dbe->bookFloat("dummy");
3100 
3101  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("SingleJet_Trigger") == 0){
3102 
3103  histoname = labelname+"_recObjN";
3104  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
3105  MonitorElement * N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3106  N->getTH1();
3107 
3108  histoname = labelname+"_recObjPt";
3109  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
3110  MonitorElement * Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3111  Pt->getTH1();
3112 
3113  histoname = labelname+"_recObjPtBarrel";
3114  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
3115  MonitorElement * PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3116  PtBarrel->getTH1();
3117 
3118  histoname = labelname+"_recObjPtEndcap";
3119  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
3120  MonitorElement * PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3121  PtEndcap->getTH1();
3122 
3123  histoname = labelname+"_recObjPtForward";
3124  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
3125  MonitorElement * PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3126  PtForward->getTH1();
3127 
3128  histoname = labelname+"_recObjEta";
3129  title = labelname+"_recObjEta;Reco #eta"+trigPath;
3130  MonitorElement * Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3131  Eta->getTH1();
3132 
3133  histoname = labelname+"_recObjPhi";
3134  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
3135  MonitorElement * Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3136  Phi->getTH1();
3137 
3138  histoname = labelname+"_recObjEtaPhi";
3139  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
3140  MonitorElement * EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3141  EtaPhi->getTH1();
3142 
3143  histoname = labelname+"_l1ObjPt";
3144  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
3145  MonitorElement * Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3146  Pt_L1->getTH1();
3147 
3148  histoname = labelname+"_l1ObjEta";
3149  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
3150  MonitorElement * Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3151  Eta_L1->getTH1();
3152 
3153  histoname = labelname+"_l1ObjPhi";
3154  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
3155  MonitorElement * Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3156  Phi_L1->getTH1();
3157 
3158  histoname = labelname+"_l1ObjEtaPhi";
3159  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
3160  MonitorElement * EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3161  EtaPhi_L1->getTH1();
3162 
3163  histoname = labelname+"_l1ObjN";
3164  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
3165  MonitorElement * N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3166  N_L1->getTH1();
3167 
3168  histoname = labelname+"_l1ObjPtBarrel";
3169  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
3170  MonitorElement * PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3171  PtBarrel_L1->getTH1();
3172 
3173  histoname = labelname+"_l1ObjPtEndcap";
3174  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
3175  MonitorElement * PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3176  PtEndcap_L1->getTH1();
3177 
3178  histoname = labelname+"_l1ObjPtForward";
3179  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
3180  MonitorElement * PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3181  PtForward_L1->getTH1();
3182 
3183  histoname = labelname+"_hltObjN";
3184  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
3185  MonitorElement * N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3186  N_HLT->getTH1();
3187 
3188  histoname = labelname+"_hltObjPtBarrel";
3189  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
3190  MonitorElement * PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3191  PtBarrel_HLT->getTH1();
3192 
3193  histoname = labelname+"_hltObjPtEndcap";
3194  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
3195  MonitorElement * PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3196  PtEndcap_HLT->getTH1();
3197 
3198  histoname = labelname+"_hltObjPtForward";
3199  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
3200  MonitorElement * PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3201  PtForward_HLT->getTH1();
3202 
3203  histoname = labelname+"_hltObjPt";
3204  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
3205  MonitorElement * Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3206  Pt_HLT->getTH1();
3207 
3208  histoname = labelname+"_hltObjEta";
3209  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
3210  MonitorElement * Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3211  Eta_HLT->getTH1();
3212 
3213  histoname = labelname+"_hltObjPhi";
3214  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
3215  MonitorElement * Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3216  Phi_HLT->getTH1();
3217 
3218  histoname = labelname+"_hltObjEtaPhi";
3219  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
3220  MonitorElement * EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3221  EtaPhi_HLT->getTH1();
3222 
3223  histoname = labelname+"_l1HLTPtResolution";
3224  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
3225  MonitorElement * PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3226  PtResolution_L1HLT->getTH1();
3227 
3228  histoname = labelname+"_l1HLTEtaResolution";
3229  title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
3230  MonitorElement * EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3231  EtaResolution_L1HLT->getTH1();
3232 
3233  histoname = labelname+"_l1HLTPhiResolution";
3234  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
3235  MonitorElement * PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3236  PhiResolution_L1HLT->getTH1();
3237 
3238  histoname = labelname+"_l1HLTPtCorrelation";
3239  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
3240  MonitorElement * PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3241  PtCorrelation_L1HLT->getTH1();
3242 
3243  histoname = labelname+"_l1HLTEtaCorrelation";
3244  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
3245  MonitorElement * EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
3246  EtaCorrelation_L1HLT->getTH1();
3247 
3248  histoname = labelname+"_l1HLTPhiCorrelation";
3249  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
3250  MonitorElement * PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3251  PhiCorrelation_L1HLT->getTH1();
3252 
3253  histoname = labelname+"_hltRecObjPtResolution";
3254  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
3255  MonitorElement * PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3256  PtResolution_HLTRecObj->getTH1();
3257 
3258  histoname = labelname+"_hltRecObjEtaResolution";
3259  title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
3260  MonitorElement * EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3261  EtaResolution_HLTRecObj->getTH1();
3262 
3263  histoname = labelname+"_hltRecObjPhiResolution";
3264  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
3265  MonitorElement * PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3266  PhiResolution_HLTRecObj->getTH1();
3267 
3268  histoname = labelname+"_hltRecObjPtCorrelation";
3269  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
3270  MonitorElement * PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3271  PtCorrelation_HLTRecObj->getTH1();
3272 
3273  histoname = labelname+"_hltRecObjEtaCorrelation";
3274  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
3275  MonitorElement * EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
3276  EtaCorrelation_HLTRecObj->getTH1();
3277 
3278  histoname = labelname+"_hltRecObjPhiCorrelation";
3279  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
3280  MonitorElement * PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3281  PhiCorrelation_HLTRecObj->getTH1();
3282 
3283  v->setHistos(N,
3284  Pt,
3285  PtBarrel,
3286  PtEndcap,
3287  PtForward,
3288  Eta,
3289  Phi,
3290  EtaPhi,
3291  N_L1,
3292  Pt_L1,
3293  PtBarrel_L1,
3294  PtEndcap_L1,
3295  PtForward_L1,
3296  Eta_L1,
3297  Phi_L1,
3298  EtaPhi_L1,
3299  N_HLT,
3300  Pt_HLT,
3301  PtBarrel_HLT,
3302  PtEndcap_HLT,
3303  PtForward_HLT,
3304  Eta_HLT,
3305  Phi_HLT,
3306  EtaPhi_HLT,
3307  PtResolution_L1HLT,
3308  EtaResolution_L1HLT,
3309  PhiResolution_L1HLT,
3310  PtResolution_HLTRecObj,
3311  EtaResolution_HLTRecObj,
3312  PhiResolution_HLTRecObj,
3313  PtCorrelation_L1HLT,
3314  EtaCorrelation_L1HLT,
3315  PhiCorrelation_L1HLT,
3316  PtCorrelation_HLTRecObj,
3317  EtaCorrelation_HLTRecObj,
3318  PhiCorrelation_HLTRecObj,
3319  dummy,
3320  dummy,
3321  dummy,
3322  dummy,
3323  dummy,
3324  dummy,
3325  dummy,
3326  dummy,
3327  dummy
3328  );
3329  }// histos for SingleJet Triggers
3330 
3331  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("DiJet_Trigger") == 0){
3332 
3333  histoname = labelname+"_RecObjAveragePt";
3334  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
3335  MonitorElement * jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3336  jetAveragePt->getTH1();
3337 
3338  histoname = labelname+"_RecObjAverageEta";
3339  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
3340  MonitorElement * jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3341  jetAverageEta->getTH1();
3342 
3343  histoname = labelname+"_RecObjPhiDifference";
3344  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
3345  MonitorElement * jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3346  jetPhiDifference->getTH1();
3347 
3348  histoname = labelname+"_hltObjAveragePt";
3349  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
3350  MonitorElement * hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3351  hltAveragePt->getTH1();
3352 
3353  histoname = labelname+"_hltObjAverageEta";
3354  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
3355  MonitorElement * hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3356  hltAverageEta->getTH1();
3357 
3358  histoname = labelname+"_hltObjPhiDifference";
3359  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
3360  MonitorElement * hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3361  hltPhiDifference->getTH1();
3362 
3363  v->setHistos(dummy,
3364  dummy,
3365  dummy,
3366  dummy,
3367  dummy,
3368  dummy,
3369  dummy,
3370  dummy,
3371  dummy,
3372  dummy,
3373  dummy,
3374  dummy,
3375  dummy,
3376  dummy,
3377  dummy,
3378  dummy,
3379  dummy,
3380  dummy,
3381  dummy,
3382  dummy,
3383  dummy,
3384  dummy,
3385  dummy,
3386  dummy,
3387  dummy,
3388  dummy,
3389  dummy,
3390  dummy,
3391  dummy,
3392  dummy,
3393  dummy,
3394  dummy,
3395  dummy,
3396  dummy,
3397  dummy,
3398  dummy,
3399  jetAveragePt,
3400  jetAverageEta,
3401  jetPhiDifference,
3402  hltAveragePt,
3403  hltAverageEta,
3404  hltPhiDifference,
3405  dummy,
3406  dummy,
3407  dummy
3408  );
3409  }// histos for DiJet Triggers
3410 
3411  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
3412 
3413  histoname = labelname+"_recObjPt";
3414  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
3415  MonitorElement * Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3416  Pt->getTH1();
3417 
3418  histoname = labelname+"_recObjPhi";
3419  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
3420  MonitorElement * Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3421  Phi->getTH1();
3422 
3423  histoname = labelname+"_l1ObjPt";
3424  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
3425  MonitorElement * Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3426  Pt_L1->getTH1();
3427 
3428  histoname = labelname+"_l1ObjPhi";
3429  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
3430  MonitorElement * Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3431  Phi_L1->getTH1();
3432 
3433  histoname = labelname+"_hltObjPt";
3434  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
3435  MonitorElement * Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3436  Pt_HLT->getTH1();
3437 
3438  histoname = labelname+"_hltObjPhi";
3439  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
3440  MonitorElement * Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3441  Phi_HLT->getTH1();
3442 
3443  histoname = labelname+"_l1HLTPtResolution";
3444  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
3445  MonitorElement * PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3446  PtResolution_L1HLT->getTH1();
3447 
3448  histoname = labelname+"_l1HLTPhiResolution";
3449  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
3450  MonitorElement * PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3451  PhiResolution_L1HLT->getTH1();
3452 
3453  histoname = labelname+"_l1HLTPtCorrelation";
3454  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
3455  MonitorElement * PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3456  PtCorrelation_L1HLT->getTH1();
3457 
3458  histoname = labelname+"_l1HLTPhiCorrelation";
3459  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
3460  MonitorElement * PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3461  PhiCorrelation_L1HLT->getTH1();
3462 
3463  histoname = labelname+"_hltRecObjPtResolution";
3464  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
3465  MonitorElement * PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3466  PtResolution_HLTRecObj->getTH1();
3467 
3468  histoname = labelname+"_hltRecObjPhiResolution";
3469  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
3470  MonitorElement * PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3471  PhiResolution_HLTRecObj->getTH1();
3472 
3473  histoname = labelname+"_hltRecObjPtCorrelation";
3474  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
3475  MonitorElement * PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3476  PtCorrelation_HLTRecObj->getTH1();
3477 
3478  histoname = labelname+"_hltRecObjPhiCorrelation";
3479  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
3480  MonitorElement * PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3481  PhiCorrelation_HLTRecObj->getTH1();
3482 
3483  v->setHistos(dummy,
3484  Pt,
3485  dummy,
3486  dummy,
3487  dummy,
3488  dummy,
3489  Phi,
3490  dummy,
3491  dummy,
3492  Pt_L1,
3493  dummy,
3494  dummy,
3495  dummy,
3496  dummy,
3497  Phi_L1,
3498  dummy,
3499  dummy,
3500  Pt_HLT,
3501  dummy,
3502  dummy,
3503  dummy,
3504  dummy,
3505  Phi_HLT,
3506  dummy,
3507  PtResolution_L1HLT,
3508  dummy,
3509  PhiResolution_L1HLT,
3510  PtResolution_HLTRecObj,
3511  dummy,
3512  PhiResolution_HLTRecObj,
3513  PtCorrelation_L1HLT,
3514  dummy,
3515  PhiCorrelation_L1HLT,
3516  PtCorrelation_HLTRecObj,
3517  dummy,
3518  PhiCorrelation_HLTRecObj,
3519  dummy,
3520  dummy,
3521  dummy,
3522  dummy,
3523  dummy,
3524  dummy,
3525  dummy,
3526  dummy,
3527  dummy
3528  );
3529  }// histos for MET Triggers
3530  }
3531  }
3532 
3533  if(plotAllwrtMu_){
3534  int Nbins_ = 10;
3535  int Nmin_ = -0.5;
3536  int Nmax_ = 9.5;
3537  //
3538  int Ptbins_ = 100;
3539  if(runStandalone_) Ptbins_ = 1000;
3540  double PtMin_ = 0.;
3541  double PtMax_ = 1000.;
3542  //
3543  int Etabins_ = 50;
3544  double EtaMin_ = -5.;
3545  double EtaMax_ = 5.;
3546  //
3547  int Phibins_ = 35;
3548  double PhiMin_ = -3.5;
3549  double PhiMax_ = 3.5;
3550  //
3551  int Resbins_ = 30;
3552  double ResMin_ = -1.5;
3553  double ResMax_ = 1.5;
3554 
3555  // Now define histos wrt Muon trigger
3556  std::string dirName = dirname_ + "/MonitorAllTriggersWrtMuonTrigger/";
3557  for(PathInfoCollection::iterator v = hltPathsAllWrtMu_.begin(); v!= hltPathsAllWrtMu_.end(); ++v ){
3558  //
3559  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
3560  std::string subdirName = dirName + trgPathName;
3561  std::string trigPath = "("+trgPathName+")";
3562  dbe->setCurrentFolder(subdirName);
3563  //
3564  MonitorElement * dummy;
3565  dummy = dbe->bookFloat("dummy");
3566  //
3567  std::string labelname("ME");
3568  std::string histoname(labelname+"");
3569  std::string title(labelname+"");
3570  //
3571  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("SingleJet_Trigger") == 0){
3572 
3573  histoname = labelname+"_recObjN";
3574  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
3575  MonitorElement * N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3576  N->getTH1();
3577 
3578  histoname = labelname+"_recObjPt";
3579  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
3580  MonitorElement * Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3581  Pt->getTH1();
3582 
3583  histoname = labelname+"_recObjPtBarrel";
3584  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
3585  MonitorElement * PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3586  PtBarrel->getTH1();
3587 
3588  histoname = labelname+"_recObjPtEndcap";
3589  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
3590  MonitorElement * PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3591  PtEndcap->getTH1();
3592 
3593  histoname = labelname+"_recObjPtForward";
3594  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
3595  MonitorElement * PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3596  PtForward->getTH1();
3597 
3598  histoname = labelname+"_recObjEta";
3599  title = labelname+"_recObjEta;Reco #eta"+trigPath;
3600  MonitorElement * Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3601  Eta->getTH1();
3602 
3603  histoname = labelname+"_recObjPhi";
3604  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
3605  MonitorElement * Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3606  Phi->getTH1();
3607 
3608  histoname = labelname+"_recObjEtaPhi";
3609  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
3610  MonitorElement * EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3611  EtaPhi->getTH1();
3612 
3613  histoname = labelname+"_l1ObjN";
3614  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
3615  MonitorElement * N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3616  N_L1->getTH1();
3617 
3618  histoname = labelname+"_l1ObjPt";
3619  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
3620  MonitorElement * Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3621  Pt_L1->getTH1();
3622 
3623  histoname = labelname+"_l1ObjPtBarrel";
3624  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
3625  MonitorElement * PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3626  PtBarrel_L1->getTH1();
3627 
3628  histoname = labelname+"_l1ObjPtEndcap";
3629  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
3630  MonitorElement * PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3631  PtEndcap_L1->getTH1();
3632 
3633  histoname = labelname+"_l1ObjPtForward";
3634  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
3635  MonitorElement * PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3636  PtForward_L1->getTH1();
3637 
3638  histoname = labelname+"_l1ObjEta";
3639  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
3640  MonitorElement * Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3641  Eta_L1->getTH1();
3642 
3643  histoname = labelname+"_l1ObjPhi";
3644  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
3645  MonitorElement * Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3646  Phi_L1->getTH1();
3647 
3648  histoname = labelname+"_l1ObjEtaPhi";
3649  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
3650  MonitorElement * EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3651  EtaPhi_L1->getTH1();
3652 
3653  histoname = labelname+"_hltObjN";
3654  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
3655  MonitorElement * N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3656  N_HLT->getTH1();
3657 
3658  histoname = labelname+"_hltObjPt";
3659  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
3660  MonitorElement * Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3661  Pt_HLT->getTH1();
3662 
3663  histoname = labelname+"_hltObjPtBarrel";
3664  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
3665  MonitorElement * PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3666  PtBarrel_HLT->getTH1();
3667 
3668  histoname = labelname+"_hltObjPtEndcap";
3669  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
3670  MonitorElement * PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3671  PtEndcap_HLT->getTH1();
3672 
3673  histoname = labelname+"_hltObjPtForward";
3674  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
3675  MonitorElement * PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3676  PtForward_HLT->getTH1();
3677 
3678  histoname = labelname+"_hltObjEta";
3679  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
3680  MonitorElement * Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3681  Eta_HLT->getTH1();
3682 
3683  histoname = labelname+"_hltObjPhi";
3684  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
3685  MonitorElement * Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3686  Phi_HLT->getTH1();
3687 
3688  histoname = labelname+"_hltObjEtaPhi";
3689  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
3690  MonitorElement * EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
3691  EtaPhi_HLT->getTH1();
3692 
3693  histoname = labelname+"_l1HLTPtResolution";
3694  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
3695  MonitorElement * PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3696  PtResolution_L1HLT->getTH1();
3697 
3698  histoname = labelname+"_l1HLTEtaResolution";
3699  title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
3700  MonitorElement * EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3701  EtaResolution_L1HLT->getTH1();
3702 
3703  histoname = labelname+"_l1HLTPhiResolution";
3704  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
3705  MonitorElement * PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3706  PhiResolution_L1HLT->getTH1();
3707 
3708  histoname = labelname+"_l1HLTPtCorrelation";
3709  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
3710  MonitorElement * PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3711  PtCorrelation_L1HLT->getTH1();
3712 
3713  histoname = labelname+"_l1HLTEtaCorrelation";
3714  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
3715  MonitorElement * EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
3716  EtaCorrelation_L1HLT->getTH1();
3717 
3718  histoname = labelname+"_l1HLTPhiCorrelation";
3719  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
3720  MonitorElement * PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3721  PhiCorrelation_L1HLT->getTH1();
3722 
3723  histoname = labelname+"_hltRecObjPtResolution";
3724  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
3725  MonitorElement * PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3726  PtResolution_HLTRecObj->getTH1();
3727 
3728  histoname = labelname+"_hltRecObjEtaResolution";
3729  title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
3730  MonitorElement * EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3731  EtaResolution_HLTRecObj->getTH1();
3732 
3733  histoname = labelname+"_hltRecObjPhiResolution";
3734  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
3735  MonitorElement * PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3736  PhiResolution_HLTRecObj->getTH1();
3737 
3738  histoname = labelname+"_hltRecObjPtCorrelation";
3739  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
3740  MonitorElement * PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3741  PtCorrelation_HLTRecObj->getTH1();
3742 
3743  histoname = labelname+"_hltRecObjEtaCorrelation";
3744  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
3745  MonitorElement * EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
3746  EtaCorrelation_HLTRecObj->getTH1();
3747 
3748  histoname = labelname+"_hltRecObjPhiCorrelation";
3749  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
3750  MonitorElement * PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3751  PhiCorrelation_HLTRecObj->getTH1();
3752 
3753  v->setHistos(N,
3754  Pt,
3755  PtBarrel,
3756  PtEndcap,
3757  PtForward,
3758  Eta,
3759  Phi,
3760  EtaPhi,
3761  N_L1,
3762  Pt_L1,
3763  PtBarrel_L1,
3764  PtEndcap_L1,
3765  PtForward_L1,
3766  Eta_L1,
3767  Phi_L1,
3768  EtaPhi_L1,
3769  N_HLT,
3770  Pt_HLT,
3771  PtBarrel_HLT,
3772  PtEndcap_HLT,
3773  PtForward_HLT,
3774  Eta_HLT,
3775  Phi_HLT,
3776  EtaPhi_HLT,
3777  PtResolution_L1HLT,
3778  EtaResolution_L1HLT,
3779  PhiResolution_L1HLT,
3780  PtResolution_HLTRecObj,
3781  EtaResolution_HLTRecObj,
3782  PhiResolution_HLTRecObj,
3783  PtCorrelation_L1HLT,
3784  EtaCorrelation_L1HLT,
3785  PhiCorrelation_L1HLT,
3786  PtCorrelation_HLTRecObj,
3787  EtaCorrelation_HLTRecObj,
3788  PhiCorrelation_HLTRecObj,
3789  dummy,
3790  dummy,
3791  dummy,
3792  dummy,
3793  dummy,
3794  dummy,
3795  dummy,
3796  dummy,
3797  dummy
3798  );
3799  }// histos for SingleJet Triggers
3800 
3801  if(v->getObjectType() == trigger::TriggerJet && v->getTriggerType().compare("DiJet_Trigger") == 0){
3802 
3803  histoname = labelname+"_RecObjAveragePt";
3804  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
3805  MonitorElement * jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3806  jetAveragePt->getTH1();
3807 
3808  histoname = labelname+"_RecObjAverageEta";
3809  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
3810  MonitorElement * jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3811  jetAverageEta->getTH1();
3812 
3813  histoname = labelname+"_RecObjPhiDifference";
3814  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
3815  MonitorElement * jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3816  jetPhiDifference->getTH1();
3817 
3818  histoname = labelname+"_hltObjAveragePt";
3819  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
3820  MonitorElement * hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3821  hltAveragePt->getTH1();
3822 
3823  histoname = labelname+"_hltObjAverageEta";
3824  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
3825  MonitorElement * hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3826  hltAverageEta->getTH1();
3827 
3828  histoname = labelname+"_hltObjPhiDifference";
3829  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
3830  MonitorElement * hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3831  hltPhiDifference->getTH1();
3832 
3833  v->setHistos(dummy,
3834  dummy,
3835  dummy,
3836  dummy,
3837  dummy,
3838  dummy,
3839  dummy,
3840  dummy,
3841  dummy,
3842  dummy,
3843  dummy,
3844  dummy,
3845  dummy,
3846  dummy,
3847  dummy,
3848  dummy,
3849  dummy,
3850  dummy,
3851  dummy,
3852  dummy,
3853  dummy,
3854  dummy,
3855  dummy,
3856  dummy,
3857  dummy,
3858  dummy,
3859  dummy,
3860  dummy,
3861  dummy,
3862  dummy,
3863  dummy,
3864  dummy,
3865  dummy,
3866  dummy,
3867  dummy,
3868  dummy,
3869  jetAveragePt,
3870  jetAverageEta,
3871  jetPhiDifference,
3872  hltAveragePt,
3873  hltAverageEta,
3874  hltPhiDifference,
3875  dummy,
3876  dummy,
3877  dummy
3878  );
3879  }// histos for DiJet Triggers
3880 
3881  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
3882 
3883  histoname = labelname+"_recObjPt";
3884  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
3885  MonitorElement * Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3886  Pt->getTH1();
3887 
3888  histoname = labelname+"_recObjPhi";
3889  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
3890  MonitorElement * Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3891  Phi->getTH1();
3892 
3893  histoname = labelname+"_l1ObjPt";
3894  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
3895  MonitorElement * Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3896  Pt_L1->getTH1();
3897 
3898  histoname = labelname+"_l1ObjPhi";
3899  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
3900  MonitorElement * Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3901  Phi_L1->getTH1();
3902 
3903  histoname = labelname+"_hltObjPt";
3904  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
3905  MonitorElement * Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3906  Pt_HLT->getTH1();
3907 
3908  histoname = labelname+"_hltObjPhi";
3909  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
3910  MonitorElement * Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3911  Phi_HLT->getTH1();
3912 
3913  histoname = labelname+"_l1HLTPtResolution";
3914  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
3915  MonitorElement * PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3916  PtResolution_L1HLT->getTH1();
3917 
3918  histoname = labelname+"_l1HLTPhiResolution";
3919  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
3920  MonitorElement * PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3921  PhiResolution_L1HLT->getTH1();
3922 
3923  histoname = labelname+"_l1HLTPtCorrelation";
3924  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
3925  MonitorElement * PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3926  PtCorrelation_L1HLT->getTH1();
3927 
3928  histoname = labelname+"_l1HLTPhiCorrelation";
3929  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
3930  MonitorElement * PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3931  PhiCorrelation_L1HLT->getTH1();
3932 
3933  histoname = labelname+"_hltRecObjPtResolution";
3934  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
3935  MonitorElement * PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3936  PtResolution_HLTRecObj->getTH1();
3937 
3938  histoname = labelname+"_hltRecObjPhiResolution";
3939  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
3940  MonitorElement * PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
3941  PhiResolution_HLTRecObj->getTH1();
3942 
3943  histoname = labelname+"_hltRecObjPtCorrelation";
3944  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
3945  MonitorElement * PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3946  PtCorrelation_HLTRecObj->getTH1();
3947 
3948  histoname = labelname+"_hltRecObjPhiCorrelation";
3949  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
3950  MonitorElement * PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
3951  PhiCorrelation_HLTRecObj->getTH1();
3952 
3953  v->setHistos(dummy,
3954  Pt,
3955  dummy,
3956  dummy,
3957  dummy,
3958  dummy,
3959  Phi,
3960  dummy,
3961  dummy,
3962  Pt_L1,
3963  dummy,
3964  dummy,
3965  dummy,
3966  dummy,
3967  Phi_L1,
3968  dummy,
3969  dummy,
3970  Pt_HLT,
3971  dummy,
3972  dummy,
3973  dummy,
3974  dummy,
3975  Phi_HLT,
3976  dummy,
3977  PtResolution_L1HLT,
3978  dummy,
3979  PhiResolution_L1HLT,
3980  PtResolution_HLTRecObj,
3981  dummy,
3982  PhiResolution_HLTRecObj,
3983  PtCorrelation_L1HLT,
3984  dummy,
3985  PhiCorrelation_L1HLT,
3986  PtCorrelation_HLTRecObj,
3987  dummy,
3988  PhiCorrelation_HLTRecObj,
3989  dummy,
3990  dummy,
3991  dummy,
3992  dummy,
3993  dummy,
3994  dummy,
3995  dummy,
3996  dummy,
3997  dummy
3998  );
3999  }// histos for MET Triggers
4000  }
4001  }
4002 
4003  //-------Now Efficiency histos--------
4004  if(plotEff_){
4005  int Ptbins_ = 100;
4006  if(runStandalone_) Ptbins_ = 1000;
4007  double PtMin_ = 0.;
4008  double PtMax_ = 1000.;
4009  //
4010  int Etabins_ = 50;
4011  double EtaMin_ = -5.;
4012  double EtaMax_ = 5.;
4013  //
4014  int Phibins_ = 35;
4015  double PhiMin_ = -3.5;
4016  double PhiMax_ = 3.5;
4017  // Now define histos wrt lower threshold trigger
4018  std::string dirName1 = dirname_ + "/RelativeTriggerEff/";
4019  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
4020  //
4021  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
4022  std::string trgPathNameD = HLTConfigProvider::removeVersion(v->getDenomPath());
4023  //
4024  std::string labelname("ME") ;
4025  std::string subdirName = dirName1 + trgPathName + "_wrt_" + trgPathNameD;
4026  dbe->setCurrentFolder(subdirName);
4027  std::string histoname(labelname+"");
4028  std::string title(labelname+"");
4029 
4030  MonitorElement *dummy;
4031  dummy = dbe->bookFloat("dummy");
4032 
4033  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0)){
4034 
4035  histoname = labelname+"_NumeratorPt";
4036  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
4037  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4038  NumeratorPt->getTH1();
4039 
4040  histoname = labelname+"_NumeratorPtBarrel";
4041  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c] ";
4042  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4043  NumeratorPtBarrel->getTH1();
4044 
4045  histoname = labelname+"_NumeratorPtEndcap";
4046  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
4047  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4048  NumeratorPtEndcap->getTH1();
4049 
4050  histoname = labelname+"_NumeratorPtForward";
4051  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
4052  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4053  NumeratorPtForward->getTH1();
4054 
4055  histoname = labelname+"_NumeratorEta";
4056  title = labelname+"NumeratorEta;Calo #eta ";
4057  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4058  NumeratorEta->getTH1();
4059 
4060  histoname = labelname+"_NumeratorPhi";
4061  title = labelname+"NumeratorPhi;Calo #Phi";
4062  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4063  NumeratorPhi->getTH1();
4064 
4065  histoname = labelname+"_NumeratorEtaPhi";
4066  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
4067  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4068  NumeratorEtaPhi->getTH1();
4069 
4070  histoname = labelname+"_NumeratorEtaBarrel";
4071  title = labelname+"NumeratorEtaBarrel;Calo #eta ";
4072  MonitorElement * NumeratorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4073  NumeratorEtaBarrel->getTH1();
4074 
4075  histoname = labelname+"_NumeratorPhiBarrel";
4076  title = labelname+"NumeratorPhiBarrel;Calo #Phi";
4077  MonitorElement * NumeratorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4078  NumeratorPhiBarrel->getTH1();
4079 
4080  histoname = labelname+"_NumeratorEtaEndcap";
4081  title = labelname+"NumeratorEtaEndcap;Calo #eta ";
4082  MonitorElement * NumeratorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4083  NumeratorEtaEndcap->getTH1();
4084 
4085  histoname = labelname+"_NumeratorPhiEndcap";
4086  title = labelname+"NumeratorPhiEndcap;Calo #Phi";
4087  MonitorElement * NumeratorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4088  NumeratorPhiEndcap->getTH1();
4089 
4090  histoname = labelname+"_NumeratorEtaForward";
4091  title = labelname+"NumeratorEtaForward;Calo #eta ";
4092  MonitorElement * NumeratorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4093  NumeratorEtaForward->getTH1();
4094 
4095  histoname = labelname+"_NumeratorPhiForward";
4096  title = labelname+"NumeratorPhiForward;Calo #Phi";
4097  MonitorElement * NumeratorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4098  NumeratorPhiForward->getTH1();
4099 
4100  histoname = labelname+"_NumeratorEta_LowpTcut";
4101  title = labelname+"NumeratorEta_LowpTcut;Calo #eta ";
4102  MonitorElement * NumeratorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4103  NumeratorEta_LowpTcut->getTH1();
4104 
4105  histoname = labelname+"_NumeratorPhi_LowpTcut";
4106  title = labelname+"NumeratorPhi_LowpTcut;Calo #Phi";
4107  MonitorElement * NumeratorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4108  NumeratorPhi_LowpTcut->getTH1();
4109 
4110  histoname = labelname+"_NumeratorEtaPhi_LowpTcut";
4111  title = labelname+"NumeratorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
4112  MonitorElement * NumeratorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4113  NumeratorEtaPhi_LowpTcut->getTH1();
4114 
4115  histoname = labelname+"_NumeratorEta_MedpTcut";
4116  title = labelname+"NumeratorEta_MedpTcut;Calo #eta ";
4117  MonitorElement * NumeratorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4118  NumeratorEta_MedpTcut->getTH1();
4119 
4120  histoname = labelname+"_NumeratorPhi_MedpTcut";
4121  title = labelname+"NumeratorPhi_MedpTcut;Calo #Phi";
4122  MonitorElement * NumeratorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4123  NumeratorPhi_MedpTcut->getTH1();
4124 
4125  histoname = labelname+"_NumeratorEtaPhi_MedpTcut";
4126  title = labelname+"NumeratorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
4127  MonitorElement * NumeratorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4128  NumeratorEtaPhi_MedpTcut->getTH1();
4129 
4130  histoname = labelname+"_NumeratorEta_HighpTcut";
4131  title = labelname+"NumeratorEta_HighpTcut;Calo #eta ";
4132  MonitorElement * NumeratorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4133  NumeratorEta_HighpTcut->getTH1();
4134 
4135  histoname = labelname+"_NumeratorPhi_HighpTcut";
4136  title = labelname+"NumeratorPhi_HighpTcut;Calo #Phi";
4137  MonitorElement * NumeratorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4138  NumeratorPhi_HighpTcut->getTH1();
4139 
4140  histoname = labelname+"_NumeratorEtaPhi_HighpTcut";
4141  title = labelname+"NumeratorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
4142  MonitorElement * NumeratorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4143  NumeratorEtaPhi_HighpTcut->getTH1();
4144 
4145  histoname = labelname+"_DenominatorPt";
4146  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
4147  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4148  DenominatorPt->getTH1();
4149 
4150  histoname = labelname+"_DenominatorPtBarrel";
4151  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
4152  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4153  DenominatorPtBarrel->getTH1();
4154 
4155  histoname = labelname+"_DenominatorPtEndcap";
4156  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
4157  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4158  DenominatorPtEndcap->getTH1();
4159 
4160  histoname = labelname+"_DenominatorPtForward";
4161  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
4162  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4163  DenominatorPtForward->getTH1();
4164 
4165  histoname = labelname+"_DenominatorEta";
4166  title = labelname+"DenominatorEta;Calo #eta ";
4167  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4168  DenominatorEta->getTH1();
4169 
4170  histoname = labelname+"_DenominatorPhi";
4171  title = labelname+"DenominatorPhi;Calo #Phi";
4172  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4173  DenominatorPhi->getTH1();
4174 
4175  histoname = labelname+"_DenominatorEtaPhi";
4176  title = labelname+"DenominatorEtaPhi;Calo #eta; Calo #Phi";
4177  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4178  DenominatorEtaPhi->getTH1();
4179 
4180  histoname = labelname+"_DenominatorEtaBarrel";
4181  title = labelname+"DenominatorEtaBarrel;Calo #eta ";
4182  MonitorElement * DenominatorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4183  DenominatorEtaBarrel->getTH1();
4184 
4185  histoname = labelname+"_DenominatorPhiBarrel";
4186  title = labelname+"DenominatorPhiBarrel;Calo #Phi";
4187  MonitorElement * DenominatorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4188  DenominatorPhiBarrel->getTH1();
4189 
4190  histoname = labelname+"_DenominatorEtaEndcap";
4191  title = labelname+"DenominatorEtaEndcap;Calo #eta ";
4192  MonitorElement * DenominatorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4193  DenominatorEtaEndcap->getTH1();
4194 
4195  histoname = labelname+"_DenominatorPhiEndcap";
4196  title = labelname+"DenominatorPhiEndcap;Calo #Phi";
4197  MonitorElement * DenominatorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4198  DenominatorPhiEndcap->getTH1();
4199 
4200  histoname = labelname+"_DenominatorEtaForward";
4201  title = labelname+"DenominatorEtaForward;Calo #eta ";
4202  MonitorElement * DenominatorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4203  DenominatorEtaForward->getTH1();
4204 
4205  histoname = labelname+"_DenominatorPhiForward";
4206  title = labelname+"DenominatorPhiForward;Calo #Phi";
4207  MonitorElement * DenominatorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4208  DenominatorPhiForward->getTH1();
4209 
4210  histoname = labelname+"_DenominatorEta_LowpTcut";
4211  title = labelname+"DenominatorEta_LowpTcut;Calo #eta ";
4212  MonitorElement * DenominatorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4213  DenominatorEta_LowpTcut->getTH1();
4214 
4215  histoname = labelname+"_DenominatorPhi_LowpTcut";
4216  title = labelname+"DenominatorPhi_LowpTcut;Calo #Phi";
4217  MonitorElement * DenominatorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4218  DenominatorPhi_LowpTcut->getTH1();
4219 
4220  histoname = labelname+"_DenominatorEtaPhi_LowpTcut";
4221  title = labelname+"DenominatorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
4222  MonitorElement * DenominatorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4223  DenominatorEtaPhi_LowpTcut->getTH1();
4224 
4225  histoname = labelname+"_DenominatorEta_MedpTcut";
4226  title = labelname+"DenominatorEta_MedpTcut;Calo #eta ";
4227  MonitorElement * DenominatorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4228  DenominatorEta_MedpTcut->getTH1();
4229 
4230  histoname = labelname+"_DenominatorPhi_MedpTcut";
4231  title = labelname+"DenominatorPhi_MedpTcut;Calo #Phi";
4232  MonitorElement * DenominatorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4233  DenominatorPhi_MedpTcut->getTH1();
4234 
4235  histoname = labelname+"_DenominatorEtaPhi_MedpTcut";
4236  title = labelname+"DenominatorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
4237  MonitorElement * DenominatorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4238  DenominatorEtaPhi_MedpTcut->getTH1();
4239 
4240  histoname = labelname+"_DenominatorEta_HighpTcut";
4241  title = labelname+"DenominatorEta_HighpTcut;Calo #eta ";
4242  MonitorElement * DenominatorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4243  DenominatorEta_HighpTcut->getTH1();
4244 
4245  histoname = labelname+"_DenominatorPhi_HighpTcut";
4246  title = labelname+"DenominatorPhi_HighpTcut;Calo #Phi";
4247  MonitorElement * DenominatorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4248  DenominatorPhi_HighpTcut->getTH1();
4249 
4250  histoname = labelname+"_DenominatorEtaPhi_HighpTcut";
4251  title = labelname+"DenominatorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
4252  MonitorElement * DenominatorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4253  DenominatorEtaPhi_HighpTcut->getTH1();
4254 
4255  histoname = labelname+"_DeltaR";
4256  title = labelname+"DeltaR;";
4257  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
4258  DeltaR->getTH1();
4259 
4260  histoname = labelname+"_DeltaPhi";
4261  title = labelname+"DeltaPhi;";
4262  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
4263  DeltaPhi->getTH1();
4264 
4265  histoname = labelname+"_NumeratorPFMHT";
4266  title = labelname+"NumeratorPFMHT;PFMHT[GeV/c]";
4267  MonitorElement * NumeratorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4268  NumeratorPFMHT->getTH1();
4269 
4270  histoname = labelname+"_NumeratorPFPt";
4271  title = labelname+"NumeratorPFPt;PF Pt[GeV/c]";
4272  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4273  NumeratorPFPt->getTH1();
4274 
4275  histoname = labelname+"_NumeratorPFPtBarrel";
4276  title = labelname+"NumeratorPFPtBarrel;PF Pt[GeV/c] ";
4277  MonitorElement * NumeratorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4278  NumeratorPFPtBarrel->getTH1();
4279 
4280  histoname = labelname+"_NumeratorPFPtEndcap";
4281  title = labelname+"NumeratorPFPtEndcap;PF Pt[GeV/c]";
4282  MonitorElement * NumeratorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4283  NumeratorPFPtEndcap->getTH1();
4284 
4285  histoname = labelname+"_NumeratorPFPtForward";
4286  title = labelname+"NumeratorPFPtForward;PF Pt[GeV/c]";
4287  MonitorElement * NumeratorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4288  NumeratorPFPtForward->getTH1();
4289 
4290  histoname = labelname+"_NumeratorPFEta";
4291  title = labelname+"NumeratorPFEta;PF #eta ";
4292  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4293  NumeratorPFEta->getTH1();
4294 
4295  histoname = labelname+"_NumeratorPFPhi";
4296  title = labelname+"NumeratorPFPhi;Calo #Phi";
4297  MonitorElement * NumeratorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4298  NumeratorPFPhi->getTH1();
4299 
4300  histoname = labelname+"_NumeratorPFEtaPhi";
4301  title = labelname+"NumeratorPFEtaPhi;PF #eta;Calo #Phi";
4302  MonitorElement * NumeratorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4303  NumeratorPFEtaPhi->getTH1();
4304 
4305  histoname = labelname+"_NumeratorPFEtaBarrel";
4306  title = labelname+"NumeratorPFEtaBarrel;PF #eta ";
4307  MonitorElement * NumeratorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4308  NumeratorPFEtaBarrel->getTH1();
4309 
4310  histoname = labelname+"_NumeratorPFPhiBarrel";
4311  title = labelname+"NumeratorPFPhiBarrel;PF #Phi";
4312  MonitorElement * NumeratorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4313  NumeratorPFPhiBarrel->getTH1();
4314 
4315  histoname = labelname+"_NumeratorPFEtaEndcap";
4316  title = labelname+"NumeratorPFEtaEndcap;Calo #eta ";
4317  MonitorElement * NumeratorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4318  NumeratorPFEtaEndcap->getTH1();
4319 
4320  histoname = labelname+"_NumeratorPFPhiEndcap";
4321  title = labelname+"NumeratorPFPhiEndcap;PF #Phi";
4322  MonitorElement * NumeratorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4323  NumeratorPFPhiEndcap->getTH1();
4324 
4325  histoname = labelname+"_NumeratorPFEtaForward";
4326  title = labelname+"NumeratorPFEtaForward;Calo #eta ";
4327  MonitorElement * NumeratorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4328  NumeratorPFEtaForward->getTH1();
4329 
4330  histoname = labelname+"_NumeratorPFPhiForward";
4331  title = labelname+"NumeratorPFPhiForward;PF #Phi";
4332  MonitorElement * NumeratorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4333  NumeratorPFPhiForward->getTH1();
4334 
4335  histoname = labelname+"_NumeratorPFEta_LowpTcut";
4336  title = labelname+"NumeratorPFEta_LowpTcut;PF #eta ";
4337  MonitorElement * NumeratorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4338  NumeratorPFEta_LowpTcut->getTH1();
4339 
4340  histoname = labelname+"_NumeratorPFPhi_LowpTcut";
4341  title = labelname+"NumeratorPFPhi_LowpTcut;PF #Phi";
4342  MonitorElement * NumeratorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4343  NumeratorPFPhi_LowpTcut->getTH1();
4344 
4345  histoname = labelname+"_NumeratorPFEtaPhi_LowpTcut";
4346  title = labelname+"NumeratorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
4347  MonitorElement * NumeratorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4348  NumeratorPFEtaPhi_LowpTcut->getTH1();
4349 
4350  histoname = labelname+"_NumeratorPFEta_MedpTcut";
4351  title = labelname+"NumeratorPFEta_MedpTcut;PF #eta ";
4352  MonitorElement * NumeratorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4353  NumeratorPFEta_MedpTcut->getTH1();
4354 
4355  histoname = labelname+"_NumeratorPFPhi_MedpTcut";
4356  title = labelname+"NumeratorPFPhi_MedpTcut;PF #Phi";
4357  MonitorElement * NumeratorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4358  NumeratorPFPhi_MedpTcut->getTH1();
4359 
4360  histoname = labelname+"_NumeratorPFEtaPhi_MedpTcut";
4361  title = labelname+"NumeratorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
4362  MonitorElement * NumeratorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4363  NumeratorPFEtaPhi_MedpTcut->getTH1();
4364 
4365  histoname = labelname+"_NumeratorPFEta_HighpTcut";
4366  title = labelname+"NumeratorPFEta_HighpTcut;Calo #eta ";
4367  MonitorElement * NumeratorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4368  NumeratorPFEta_HighpTcut->getTH1();
4369 
4370  histoname = labelname+"_NumeratorPFPhi_HighpTcut";
4371  title = labelname+"NumeratorPFPhi_HighpTcut;PF #Phi";
4372  MonitorElement * NumeratorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4373  NumeratorPFPhi_HighpTcut->getTH1();
4374 
4375  histoname = labelname+"_NumeratorPFEtaPhi_HighpTcut";
4376  title = labelname+"NumeratorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
4377  MonitorElement * NumeratorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4378  NumeratorPFEtaPhi_HighpTcut->getTH1();
4379 
4380  histoname = labelname+"_DenominatorPFMHT";
4381  title = labelname+"DenominatorPFMHT;PF Pt[GeV/c]";
4382  MonitorElement * DenominatorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4383  DenominatorPFMHT->getTH1();
4384 
4385  histoname = labelname+"_DenominatorPFPt";
4386  title = labelname+"DenominatorPFPt;PF Pt[GeV/c]";
4387  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4388  DenominatorPFPt->getTH1();
4389 
4390  histoname = labelname+"_DenominatorPFPtBarrel";
4391  title = labelname+"DenominatorPFPtBarrel;Calo Pt[GeV/c]";
4392  MonitorElement * DenominatorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4393  DenominatorPFPtBarrel->getTH1();
4394 
4395  histoname = labelname+"_DenominatorPFPtEndcap";
4396  title = labelname+"DenominatorPFPtEndcap;PF Pt[GeV/c]";
4397  MonitorElement * DenominatorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4398  DenominatorPFPtEndcap->getTH1();
4399 
4400  histoname = labelname+"_DenominatorPFPtForward";
4401  title = labelname+"DenominatorPFPtForward;PF Pt[GeV/c] ";
4402  MonitorElement * DenominatorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4403  DenominatorPFPtForward->getTH1();
4404 
4405  histoname = labelname+"_DenominatorPFEta";
4406  title = labelname+"DenominatorPFEta;PF #eta ";
4407  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4408  DenominatorPFEta->getTH1();
4409 
4410  histoname = labelname+"_DenominatorPFPhi";
4411  title = labelname+"DenominatorPFPhi;PF #Phi";
4412  MonitorElement * DenominatorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4413  DenominatorPFPhi->getTH1();
4414 
4415  histoname = labelname+"_DenominatorPFEtaPhi";
4416  title = labelname+"DenominatorPFEtaPhi;PF #eta; Calo #Phi";
4417  MonitorElement * DenominatorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4418  DenominatorPFEtaPhi->getTH1();
4419 
4420  histoname = labelname+"_DenominatorPFEtaBarrel";
4421  title = labelname+"DenominatorPFEtaBarrel;Calo #eta ";
4422  MonitorElement * DenominatorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4423  DenominatorPFEtaBarrel->getTH1();
4424 
4425  histoname = labelname+"_DenominatorPFPhiBarrel";
4426  title = labelname+"DenominatorPFPhiBarrel;PF #Phi";
4427  MonitorElement * DenominatorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4428  DenominatorPFPhiBarrel->getTH1();
4429 
4430  histoname = labelname+"_DenominatorPFEtaEndcap";
4431  title = labelname+"DenominatorPFEtaEndcap;PF #eta ";
4432  MonitorElement * DenominatorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4433  DenominatorPFEtaEndcap->getTH1();
4434 
4435  histoname = labelname+"_DenominatorPFPhiEndcap";
4436  title = labelname+"DenominatorPFPhiEndcap;Calo #Phi";
4437  MonitorElement * DenominatorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4438  DenominatorPFPhiEndcap->getTH1();
4439 
4440  histoname = labelname+"_DenominatorPFEtaForward";
4441  title = labelname+"DenominatorPFEtaForward;PF #eta ";
4442  MonitorElement * DenominatorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4443  DenominatorPFEtaForward->getTH1();
4444 
4445  histoname = labelname+"_DenominatorPFPhiForward";
4446  title = labelname+"DenominatorPFPhiForward;PF #Phi";
4447  MonitorElement * DenominatorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4448  DenominatorPFPhiForward->getTH1();
4449 
4450  histoname = labelname+"_DenominatorPFEta_LowpTcut";
4451  title = labelname+"DenominatorPFEta_LowpTcut;PF #eta ";
4452  MonitorElement * DenominatorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4453  DenominatorPFEta_LowpTcut->getTH1();
4454 
4455  histoname = labelname+"_DenominatorPFPhi_LowpTcut";
4456  title = labelname+"DenominatorPFPhi_LowpTcut;PF #Phi";
4457  MonitorElement * DenominatorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4458  DenominatorPFPhi_LowpTcut->getTH1();
4459 
4460  histoname = labelname+"_DenominatorPFEtaPhi_LowpTcut";
4461  title = labelname+"DenominatorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
4462  MonitorElement * DenominatorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4463  DenominatorPFEtaPhi_LowpTcut->getTH1();
4464 
4465  histoname = labelname+"_DenominatorPFEta_MedpTcut";
4466  title = labelname+"DenominatorPFEta_MedpTcut;PF #eta ";
4467  MonitorElement * DenominatorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4468  DenominatorPFEta_MedpTcut->getTH1();
4469 
4470  histoname = labelname+"_DenominatorPFPhi_MedpTcut";
4471  title = labelname+"DenominatorPFPhi_MedpTcut;PF #Phi";
4472  MonitorElement * DenominatorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4473  DenominatorPFPhi_MedpTcut->getTH1();
4474 
4475  histoname = labelname+"_DenominatorPFEtaPhi_MedpTcut";
4476  title = labelname+"DenominatorPFEtaPhi_MedpTcut;PF #eta;Calo #Phi";
4477  MonitorElement * DenominatorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4478  DenominatorPFEtaPhi_MedpTcut->getTH1();
4479 
4480  histoname = labelname+"_DenominatorPFEta_HighpTcut";
4481  title = labelname+"DenominatorPFEta_HighpTcut;PF #eta ";
4482  MonitorElement * DenominatorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4483  DenominatorPFEta_HighpTcut->getTH1();
4484 
4485  histoname = labelname+"_DenominatorPFPhi_HighpTcut";
4486  title = labelname+"DenominatorPFPhi_HighpTcut;PF #Phi";
4487  MonitorElement * DenominatorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4488  DenominatorPFPhi_HighpTcut->getTH1();
4489 
4490  histoname = labelname+"_DenominatorPFEtaPhi_HighpTcut";
4491  title = labelname+"DenominatorPFEtaPhi_HighpTcut;PF #eta;Calo #Phi";
4492  MonitorElement * DenominatorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4493  DenominatorPFEtaPhi_HighpTcut->getTH1();
4494 
4495  histoname = labelname+"_PFDeltaR";
4496  title = labelname+"PFDeltaR;";
4497  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
4498  PFDeltaR->getTH1();
4499 
4500  histoname = labelname+"_PFDeltaPhi";
4501  title = labelname+"PFDeltaPhi;";
4502  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
4503  PFDeltaPhi->getTH1();
4504 
4505  v->setEffHistos(NumeratorPt,
4506  NumeratorPtBarrel,
4507  NumeratorPtEndcap,
4508  NumeratorPtForward,
4509  NumeratorEta,
4510  NumeratorPhi,
4511  NumeratorEtaPhi,
4512  //
4513  NumeratorEtaBarrel,
4514  NumeratorPhiBarrel,
4515  NumeratorEtaEndcap,
4516  NumeratorPhiEndcap,
4517  NumeratorEtaForward,
4518  NumeratorPhiForward,
4519  NumeratorEta_LowpTcut,
4520  NumeratorPhi_LowpTcut,
4521  NumeratorEtaPhi_LowpTcut,
4522  NumeratorEta_MedpTcut,
4523  NumeratorPhi_MedpTcut,
4524  NumeratorEtaPhi_MedpTcut,
4525  NumeratorEta_HighpTcut,
4526  NumeratorPhi_HighpTcut,
4527  NumeratorEtaPhi_HighpTcut,
4528  //
4529  DenominatorPt,
4530  DenominatorPtBarrel,
4531  DenominatorPtEndcap,
4532  DenominatorPtForward,
4533  DenominatorEta,
4534  DenominatorPhi,
4535  DenominatorEtaPhi,
4536  //
4537  DenominatorEtaBarrel,
4538  DenominatorPhiBarrel,
4539  DenominatorEtaEndcap,
4540  DenominatorPhiEndcap,
4541  DenominatorEtaForward,
4542  DenominatorPhiForward,
4543  DenominatorEta_LowpTcut,
4544  DenominatorPhi_LowpTcut,
4545  DenominatorEtaPhi_LowpTcut,
4546  DenominatorEta_MedpTcut,
4547  DenominatorPhi_MedpTcut,
4548  DenominatorEtaPhi_MedpTcut,
4549  DenominatorEta_HighpTcut,
4550  DenominatorPhi_HighpTcut,
4551  DenominatorEtaPhi_HighpTcut,
4552  DeltaR,
4553  DeltaPhi,
4554  //
4555  NumeratorPFPt,
4556  NumeratorPFMHT,
4557  NumeratorPFPtBarrel,
4558  NumeratorPFPtEndcap,
4559  NumeratorPFPtForward,
4560  NumeratorPFEta,
4561  NumeratorPFPhi,
4562  NumeratorPFEtaPhi,
4563  NumeratorPFEtaBarrel,
4564  NumeratorPFPhiBarrel,
4565  NumeratorPFEtaEndcap,
4566  NumeratorPFPhiEndcap,
4567  NumeratorPFEtaForward,
4568  NumeratorPFPhiForward,
4569  NumeratorPFEta_LowpTcut,
4570  NumeratorPFPhi_LowpTcut,
4571  NumeratorPFEtaPhi_LowpTcut,
4572  NumeratorPFEta_MedpTcut,
4573  NumeratorPFPhi_MedpTcut,
4574  NumeratorPFEtaPhi_MedpTcut,
4575  NumeratorPFEta_HighpTcut,
4576  NumeratorPFPhi_HighpTcut,
4577  NumeratorPFEtaPhi_HighpTcut,
4578  DenominatorPFPt,
4579  DenominatorPFMHT,
4580  DenominatorPFPtBarrel,
4581  DenominatorPFPtEndcap,
4582  DenominatorPFPtForward,
4583  DenominatorPFEta,
4584  DenominatorPFPhi,
4585  DenominatorPFEtaPhi,
4586  DenominatorPFEtaBarrel,
4587  DenominatorPFPhiBarrel,
4588  DenominatorPFEtaEndcap,
4589  DenominatorPFPhiEndcap,
4590  DenominatorPFEtaForward,
4591  DenominatorPFPhiForward,
4592  DenominatorPFEta_LowpTcut,
4593  DenominatorPFPhi_LowpTcut,
4594  DenominatorPFEtaPhi_LowpTcut,
4595  DenominatorPFEta_MedpTcut,
4596  DenominatorPFPhi_MedpTcut,
4597  DenominatorPFEtaPhi_MedpTcut,
4598  DenominatorPFEta_HighpTcut,
4599  DenominatorPFPhi_HighpTcut,
4600  DenominatorPFEtaPhi_HighpTcut,
4601  PFDeltaR,
4602  PFDeltaPhi
4603  );
4604 
4605  }// Loop over Jet Trigger
4606 
4607  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0)){
4608 
4609  histoname = labelname+"_NumeratorAvrgPt";
4610  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c]";
4611  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4612  NumeratorPt->getTH1();
4613 
4614  histoname = labelname+"_NumeratorAvrgEta";
4615  title = labelname+"NumeratorAvrgEta;Calo #eta";
4616  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4617  NumeratorEta->getTH1();
4618 
4619  histoname = labelname+"_DenominatorAvrgPt";
4620  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
4621  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4622  DenominatorPt->getTH1();
4623 
4624  histoname = labelname+"_DenominatorAvrgEta";
4625  title = labelname+"DenominatorAvrgEta;Calo #eta";
4626  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4627  DenominatorEta->getTH1();
4628 
4629  histoname = labelname+"_DeltaR";
4630  title = labelname+"DeltaR;";
4631  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
4632  DeltaR->getTH1();
4633 
4634  histoname = labelname+"_DeltaPhi";
4635  title = labelname+"DeltaPhi;";
4636  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
4637  DeltaPhi->getTH1();
4638 
4639  //add PF histo: SJ
4640  histoname = labelname+"_NumeratorAvrgPFPt";
4641  title = labelname+"NumeratorAvrgPFPt;PF Pt[GeV/c]";
4642  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4643  NumeratorPFPt->getTH1();
4644 
4645  histoname = labelname+"_NumeratorAvrgPFEta";
4646  title = labelname+"NumeratorAvrgPFEta;PF #eta";
4647  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4648  NumeratorPFEta->getTH1();
4649 
4650  histoname = labelname+"_DenominatorAvrgPFPt";
4651  title = labelname+"DenominatorAvrgPFPt;PF Pt[GeV/c] ";
4652  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4653  DenominatorPFPt->getTH1();
4654 
4655  histoname = labelname+"_DenominatorAvrgPFEta";
4656  title = labelname+"DenominatorAvrgPFEta;PF #eta";
4657  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4658  DenominatorPFEta->getTH1();
4659 
4660  histoname = labelname+"_PFDeltaR";
4661  title = labelname+"PFDeltaR;";
4662  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
4663  PFDeltaR->getTH1();
4664 
4665  histoname = labelname+"_PFDeltaPhi";
4666  title = labelname+"PFDeltaPhi;";
4667  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
4668  PFDeltaPhi->getTH1();
4669 
4670  v->setEffHistos( dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4671  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4672  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4673  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4674  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4675  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4676  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4677  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4678  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4679  dummy, dummy, dummy, dummy
4680  );
4681  }
4682 
4683  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
4684 
4685  histoname = labelname+"_NumeratorPt";
4686  if(v->getPath().find("HLT_PFMET")==std::string::npos)
4687  title = labelname+"NumeratorPt; CaloMET[GeV/c]";
4688  else
4689  title = labelname+"NumeratorPt; PFMET[GeV/c]";
4690  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4691  NumeratorPt->getTH1();
4692 
4693  histoname = labelname+"_NumeratorPhi";
4694  title = labelname+"NumeratorPhi; #Phi";
4695  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4696  NumeratorPhi->getTH1();
4697 
4698  histoname = labelname+"_DenominatorPt";
4699  if(v->getPath().find("HLT_PFMET")==std::string::npos)
4700  title = labelname+"DenominatorPt; CaloMET[GeV/c]";
4701  else
4702  title = labelname+"DenominatorPt; PFMET[GeV/c]";
4703  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4704  DenominatorPt->getTH1();
4705 
4706  histoname = labelname+"_DenominatorPhi";
4707  title = labelname+"DenominatorPhi; #Phi";
4708  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4709  DenominatorPhi->getTH1();
4710 
4711  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy, dummy, dummy, dummy,
4712  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4713  dummy, dummy, DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy, dummy,
4714  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4715  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4716  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4717  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4718  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4719  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
4720  dummy, dummy, dummy, dummy
4721  );
4722  }// Loop over MET trigger
4723  }
4724 
4725  //------Efficiency wrt Muon trigger-----------------------
4726  if(plotEffwrtMu_){
4727  std::string dirName2 = dirname_ + "/EffWrtMuonTrigger/";
4728  for(PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin(); v!= hltPathsEffWrtMu_.end(); ++v ){
4729  //
4730  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
4731  //
4732  std::string labelname("ME") ;
4733  std::string subdirName = dirName2 + trgPathName;
4734  std::string histoname(labelname+"");
4735  std::string title(labelname+"");
4736  dbe->setCurrentFolder(subdirName);
4737 
4738  MonitorElement *dummy;
4739  dummy = dbe->bookFloat("dummy");
4740 
4741  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0)){
4742 
4743  histoname = labelname+"_NumeratorPt";
4744  title = labelname+"NumeratorPt;Pt[GeV/c]";
4745  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4746  NumeratorPt->getTH1();
4747 
4748  histoname = labelname+"_NumeratorPtBarrel";
4749  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
4750  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4751  NumeratorPtBarrel->getTH1();
4752 
4753  histoname = labelname+"_NumeratorPtEndcap";
4754  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
4755  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4756  NumeratorPtEndcap->getTH1();
4757 
4758  histoname = labelname+"_NumeratorPtForward";
4759  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
4760  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4761  NumeratorPtForward->getTH1();
4762 
4763  histoname = labelname+"_NumeratorEta";
4764  title = labelname+"NumeratorEta;Calo #eta ";
4765  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4766  NumeratorEta->getTH1();
4767 
4768  histoname = labelname+"_NumeratorPhi";
4769  title = labelname+"NumeratorPhi;Calo #Phi";
4770  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4771  NumeratorPhi->getTH1();
4772 
4773  histoname = labelname+"_NumeratorEtaPhi";
4774  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
4775  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4776  NumeratorEtaPhi->getTH1();
4777 
4778  histoname = labelname+"_NumeratorEtaBarrel";
4779  title = labelname+"NumeratorEtaBarrel;Calo #eta ";
4780  MonitorElement * NumeratorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4781  NumeratorEtaBarrel->getTH1();
4782 
4783  histoname = labelname+"_NumeratorPhiBarrel";
4784  title = labelname+"NumeratorPhiBarrel;Calo #Phi";
4785  MonitorElement * NumeratorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4786  NumeratorPhiBarrel->getTH1();
4787 
4788  histoname = labelname+"_NumeratorEtaEndcap";
4789  title = labelname+"NumeratorEtaEndcap;Calo #eta ";
4790  MonitorElement * NumeratorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4791  NumeratorEtaEndcap->getTH1();
4792 
4793  histoname = labelname+"_NumeratorPhiEndcap";
4794  title = labelname+"NumeratorPhiEndcap;Calo #Phi";
4795  MonitorElement * NumeratorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4796  NumeratorPhiEndcap->getTH1();
4797 
4798  histoname = labelname+"_NumeratorEtaForward";
4799  title = labelname+"NumeratorEtaForward;Calo #eta ";
4800  MonitorElement * NumeratorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4801  NumeratorEtaForward->getTH1();
4802 
4803  histoname = labelname+"_NumeratorPhiForward";
4804  title = labelname+"NumeratorPhiForward;Calo #Phi";
4805  MonitorElement * NumeratorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4806  NumeratorPhiForward->getTH1();
4807 
4808  histoname = labelname+"_NumeratorEta_LowpTcut";
4809  title = labelname+"NumeratorEta_LowpTcut;Calo #eta ";
4810  MonitorElement * NumeratorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4811  NumeratorEta_LowpTcut->getTH1();
4812 
4813  histoname = labelname+"_NumeratorPhi_LowpTcut";
4814  title = labelname+"NumeratorPhi_LowpTcut;Calo #Phi";
4815  MonitorElement * NumeratorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4816  NumeratorPhi_LowpTcut->getTH1();
4817 
4818  histoname = labelname+"_NumeratorEtaPhi_LowpTcut";
4819  title = labelname+"NumeratorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
4820  MonitorElement * NumeratorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4821  NumeratorEtaPhi_LowpTcut->getTH1();
4822 
4823  histoname = labelname+"_NumeratorEta_MedpTcut";
4824  title = labelname+"NumeratorEta_MedpTcut;Calo #eta ";
4825  MonitorElement * NumeratorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4826  NumeratorEta_MedpTcut->getTH1();
4827 
4828  histoname = labelname+"_NumeratorPhi_MedpTcut";
4829  title = labelname+"NumeratorPhi_MedpTcut;Calo #Phi";
4830  MonitorElement * NumeratorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4831  NumeratorPhi_MedpTcut->getTH1();
4832 
4833  histoname = labelname+"_NumeratorEtaPhi_MedpTcut";
4834  title = labelname+"NumeratorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
4835  MonitorElement * NumeratorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4836  NumeratorEtaPhi_MedpTcut->getTH1();
4837 
4838  histoname = labelname+"_NumeratorEta_HighpTcut";
4839  title = labelname+"NumeratorEta_HighpTcut;Calo #eta ";
4840  MonitorElement * NumeratorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4841  NumeratorEta_HighpTcut->getTH1();
4842 
4843  histoname = labelname+"_NumeratorPhi_HighpTcut";
4844  title = labelname+"NumeratorPhi_HighpTcut;Calo #Phi";
4845  MonitorElement * NumeratorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4846  NumeratorPhi_HighpTcut->getTH1();
4847 
4848  histoname = labelname+"_NumeratorEtaPhi_HighpTcut";
4849  title = labelname+"NumeratorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
4850  MonitorElement * NumeratorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4851  NumeratorEtaPhi_HighpTcut->getTH1();
4852 
4853  histoname = labelname+"_DenominatorPt";
4854  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
4855  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4856  DenominatorPt->getTH1();
4857 
4858  histoname = labelname+"_DenominatorPtBarrel";
4859  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
4860  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4861  DenominatorPtBarrel->getTH1();
4862 
4863  histoname = labelname+"_DenominatorPtEndcap";
4864  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
4865  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4866  DenominatorPtEndcap->getTH1();
4867 
4868  histoname = labelname+"_DenominatorPtForward";
4869  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
4870  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4871  DenominatorPtForward->getTH1();
4872 
4873  histoname = labelname+"_DenominatorEta";
4874  title = labelname+"DenominatorEta;Calo #eta";
4875  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4876  DenominatorEta->getTH1();
4877 
4878  histoname = labelname+"_DenominatorPhi";
4879  title = labelname+"DenominatorPhi;Calo #Phi";
4880  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4881  DenominatorPhi->getTH1();
4882 
4883  histoname = labelname+"_DenominatorEtaPhi";
4884  title = labelname+"DenominatorEtaPhi;Calo #eta (IC5);Calo #Phi ";
4885  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4886  DenominatorEtaPhi->getTH1();
4887 
4888  histoname = labelname+"_DenominatorEtaBarrel";
4889  title = labelname+"DenominatorEtaBarrel;Calo #eta ";
4890  MonitorElement * DenominatorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4891  DenominatorEtaBarrel->getTH1();
4892 
4893  histoname = labelname+"_DenominatorPhiBarrel";
4894  title = labelname+"DenominatorPhiBarrel;Calo #Phi";
4895  MonitorElement * DenominatorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4896  DenominatorPhiBarrel->getTH1();
4897 
4898  histoname = labelname+"_DenominatorEtaEndcap";
4899  title = labelname+"DenominatorEtaEndcap;Calo #eta ";
4900  MonitorElement * DenominatorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4901  DenominatorEtaEndcap->getTH1();
4902 
4903  histoname = labelname+"_DenominatorPhiEndcap";
4904  title = labelname+"DenominatorPhiEndcap;Calo #Phi";
4905  MonitorElement * DenominatorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4906  DenominatorPhiEndcap->getTH1();
4907 
4908  histoname = labelname+"_DenominatorEtaForward";
4909  title = labelname+"DenominatorEtaForward;Calo #eta ";
4910  MonitorElement * DenominatorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4911  DenominatorEtaForward->getTH1();
4912 
4913  histoname = labelname+"_DenominatorPhiForward";
4914  title = labelname+"DenominatorPhiForward;Calo #Phi";
4915  MonitorElement * DenominatorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4916  DenominatorPhiForward->getTH1();
4917 
4918  histoname = labelname+"_DenominatorEta_LowpTcut";
4919  title = labelname+"DenominatorEta_LowpTcut;Calo #eta ";
4920  MonitorElement * DenominatorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4921  DenominatorEta_LowpTcut->getTH1();
4922 
4923  histoname = labelname+"_DenominatorPhi_LowpTcut";
4924  title = labelname+"DenominatorPhi_LowpTcut;Calo #Phi";
4925  MonitorElement * DenominatorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4926  DenominatorPhi_LowpTcut->getTH1();
4927 
4928  histoname = labelname+"_DenominatorEtaPhi_LowpTcut";
4929  title = labelname+"DenominatorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
4930  MonitorElement * DenominatorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4931  DenominatorEtaPhi_LowpTcut->getTH1();
4932 
4933  histoname = labelname+"_DenominatorEta_MedpTcut";
4934  title = labelname+"DenominatorEta_MedpTcut;Calo #eta ";
4935  MonitorElement * DenominatorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4936  DenominatorEta_MedpTcut->getTH1();
4937 
4938  histoname = labelname+"_DenominatorPhi_MedpTcut";
4939  title = labelname+"DenominatorPhi_MedpTcut;Calo #Phi";
4940  MonitorElement * DenominatorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4941  DenominatorPhi_MedpTcut->getTH1();
4942 
4943  histoname = labelname+"_DenominatorEtaPhi_MedpTcut";
4944  title = labelname+"DenominatorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
4945  MonitorElement * DenominatorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4946  DenominatorEtaPhi_MedpTcut->getTH1();
4947 
4948  histoname = labelname+"_DenominatorEta_HighpTcut";
4949  title = labelname+"DenominatorEta_HighpTcut;Calo #eta ";
4950  MonitorElement * DenominatorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
4951  DenominatorEta_HighpTcut->getTH1();
4952 
4953  histoname = labelname+"_DenominatorPhi_HighpTcut";
4954  title = labelname+"DenominatorPhi_HighpTcut;Calo #Phi";
4955  MonitorElement * DenominatorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
4956  DenominatorPhi_HighpTcut->getTH1();
4957 
4958  histoname = labelname+"_DenominatorEtaPhi_HighpTcut";
4959  title = labelname+"DenominatorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
4960  MonitorElement * DenominatorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
4961  DenominatorEtaPhi_HighpTcut->getTH1();
4962 
4963  histoname = labelname+"_DeltaR";
4964  title = labelname+"DeltaR;";
4965  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
4966  DeltaR->getTH1();
4967 
4968  histoname = labelname+"_DeltaPhi";
4969  title = labelname+"DeltaPhi;";
4970  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
4971  DeltaPhi->getTH1();
4972 
4973  histoname = labelname+"_NumeratorPFPt";
4974  title = labelname+"NumeratorPFPt;PFPt[GeV/c]";
4975  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4976  NumeratorPFPt->getTH1();
4977 
4978  histoname = labelname+"_NumeratorPFMHT";
4979  title = labelname+"NumeratorPFMHT;PFMHT[GeV/c]";
4980  MonitorElement * NumeratorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4981  NumeratorPFMHT->getTH1();
4982 
4983  histoname = labelname+"_NumeratorPFPtBarrel";
4984  title = labelname+"NumeratorPFPtBarrel;PF Pt[GeV/c]";
4985  MonitorElement * NumeratorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4986  NumeratorPFPtBarrel->getTH1();
4987 
4988  histoname = labelname+"_NumeratorPFPtEndcap";
4989  title = labelname+"NumeratorPFPtEndcap;PF Pt[GeV/c]";
4990  MonitorElement * NumeratorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4991  NumeratorPFPtEndcap->getTH1();
4992 
4993  histoname = labelname+"_NumeratorPFPtForward";
4994  title = labelname+"NumeratorPFPtForward;PF Pt[GeV/c]";
4995  MonitorElement * NumeratorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
4996  NumeratorPFPtForward->getTH1();
4997 
4998  histoname = labelname+"_NumeratorPFEta";
4999  title = labelname+"NumeratorPFEta;PF #eta ";
5000  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5001  NumeratorPFEta->getTH1();
5002 
5003  histoname = labelname+"_NumeratorPFPhi";
5004  title = labelname+"NumeratorPFPhi;PF #Phi";
5005  MonitorElement * NumeratorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5006  NumeratorPFPhi->getTH1();
5007 
5008  histoname = labelname+"_NumeratorPFEtaPhi";
5009  title = labelname+"NumeratorPFEtaPhi;PF #eta;PF #Phi";
5010  MonitorElement * NumeratorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5011  NumeratorPFEtaPhi->getTH1();
5012 
5013  histoname = labelname+"_NumeratorPFEtaBarrel";
5014  title = labelname+"NumeratorPFEtaBarrel;PF #eta ";
5015  MonitorElement * NumeratorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5016  NumeratorPFEtaBarrel->getTH1();
5017 
5018  histoname = labelname+"_NumeratorPFPhiBarrel";
5019  title = labelname+"NumeratorPFPhiBarrel;PF #Phi";
5020  MonitorElement * NumeratorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5021  NumeratorPFPhiBarrel->getTH1();
5022 
5023  histoname = labelname+"_NumeratorPFEtaEndcap";
5024  title = labelname+"NumeratorPFEtaEndcap;PF #eta ";
5025  MonitorElement * NumeratorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5026  NumeratorPFEtaEndcap->getTH1();
5027 
5028  histoname = labelname+"_NumeratorPFPhiEndcap";
5029  title = labelname+"NumeratorPFPhiEndcap;PF #Phi";
5030  MonitorElement * NumeratorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5031  NumeratorPFPhiEndcap->getTH1();
5032 
5033  histoname = labelname+"_NumeratorPFEtaForward";
5034  title = labelname+"NumeratorPFEtaForward;PF #eta ";
5035  MonitorElement * NumeratorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5036  NumeratorPFEtaForward->getTH1();
5037 
5038  histoname = labelname+"_NumeratorPFPhiForward";
5039  title = labelname+"NumeratorPFPhiForward;PF #Phi";
5040  MonitorElement * NumeratorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5041  NumeratorPFPhiForward->getTH1();
5042 
5043  histoname = labelname+"_NumeratorPFEta_LowpTcut";
5044  title = labelname+"NumeratorPFEta_LowpTcut;PF #eta ";
5045  MonitorElement * NumeratorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5046  NumeratorPFEta_LowpTcut->getTH1();
5047 
5048  histoname = labelname+"_NumeratorPFPhi_LowpTcut";
5049  title = labelname+"NumeratorPFPhi_LowpTcut;PF #Phi";
5050  MonitorElement * NumeratorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5051  NumeratorPFPhi_LowpTcut->getTH1();
5052 
5053  histoname = labelname+"_NumeratorPFEtaPhi_LowpTcut";
5054  title = labelname+"NumeratorPFEtaPhi_LowpTcut;PF #eta;PF #Phi";
5055  MonitorElement * NumeratorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5056  NumeratorPFEtaPhi_LowpTcut->getTH1();
5057 
5058  histoname = labelname+"_NumeratorPFEta_MedpTcut";
5059  title = labelname+"NumeratorPFEta_MedpTcut;PF #eta ";
5060  MonitorElement * NumeratorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5061  NumeratorPFEta_MedpTcut->getTH1();
5062 
5063  histoname = labelname+"_NumeratorPFPhi_MedpTcut";
5064  title = labelname+"NumeratorPFPhi_MedpTcut;PF #Phi";
5065  MonitorElement * NumeratorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5066  NumeratorPFPhi_MedpTcut->getTH1();
5067 
5068  histoname = labelname+"_NumeratorPFEtaPhi_MedpTcut";
5069  title = labelname+"NumeratorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
5070  MonitorElement * NumeratorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5071  NumeratorPFEtaPhi_MedpTcut->getTH1();
5072 
5073  histoname = labelname+"_NumeratorPFEta_HighpTcut";
5074  title = labelname+"NumeratorPFEta_HighpTcut;PF #eta ";
5075  MonitorElement * NumeratorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5076  NumeratorPFEta_HighpTcut->getTH1();
5077 
5078  histoname = labelname+"_NumeratorPFPhi_HighpTcut";
5079  title = labelname+"NumeratorPFPhi_HighpTcut;PF #Phi";
5080  MonitorElement * NumeratorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5081  NumeratorPFPhi_HighpTcut->getTH1();
5082 
5083  histoname = labelname+"_NumeratorPFEtaPhi_HighpTcut";
5084  title = labelname+"NumeratorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
5085  MonitorElement * NumeratorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5086  NumeratorPFEtaPhi_HighpTcut->getTH1();
5087 
5088  histoname = labelname+"_DenominatorPFMHT";
5089  title = labelname+"DenominatorPFMHT;PF Pt[GeV/c]";
5090  MonitorElement * DenominatorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5091  DenominatorPFMHT->getTH1();
5092 
5093  histoname = labelname+"_DenominatorPFPt";
5094  title = labelname+"DenominatorPFPt;PF Pt[GeV/c]";
5095  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5096  DenominatorPFPt->getTH1();
5097 
5098  histoname = labelname+"_DenominatorPFPtBarrel";
5099  title = labelname+"DenominatorPFPtBarrel;PF Pt[GeV/c]";
5100  MonitorElement * DenominatorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5101  DenominatorPFPtBarrel->getTH1();
5102 
5103  histoname = labelname+"_DenominatorPFPtEndcap";
5104  title = labelname+"DenominatorPFPtEndcap;PF Pt[GeV/c]";
5105  MonitorElement * DenominatorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5106  DenominatorPFPtEndcap->getTH1();
5107 
5108  histoname = labelname+"_DenominatorPFPtForward";
5109  title = labelname+"DenominatorPFPtForward;PF Pt[GeV/c] ";
5110  MonitorElement * DenominatorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5111  DenominatorPFPtForward->getTH1();
5112 
5113  histoname = labelname+"_DenominatorPFEta";
5114  title = labelname+"DenominatorPFEta;PF #eta";
5115  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5116  DenominatorPFEta->getTH1();
5117 
5118  histoname = labelname+"_DenominatorPFPhi";
5119  title = labelname+"DenominatorPFPhi;PF #Phi";
5120  MonitorElement * DenominatorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5121  DenominatorPFPhi->getTH1();
5122 
5123  histoname = labelname+"_DenominatorPFEtaPhi";
5124  title = labelname+"DenominatorPFEtaPhi;PF #eta (IC5);PF #Phi ";
5125  MonitorElement * DenominatorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5126  DenominatorPFEtaPhi->getTH1();
5127 
5128  histoname = labelname+"_DenominatorPFEtaBarrel";
5129  title = labelname+"DenominatorPFEtaBarrel;PF #eta ";
5130  MonitorElement * DenominatorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5131  DenominatorPFEtaBarrel->getTH1();
5132 
5133  histoname = labelname+"_DenominatorPFPhiBarrel";
5134  title = labelname+"DenominatorPFPhiBarrel;PF #Phi";
5135  MonitorElement * DenominatorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5136  DenominatorPFPhiBarrel->getTH1();
5137 
5138  histoname = labelname+"_DenominatorPFEtaEndcap";
5139  title = labelname+"DenominatorPFEtaEndcap;PF #eta ";
5140  MonitorElement * DenominatorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5141  DenominatorPFEtaEndcap->getTH1();
5142 
5143  histoname = labelname+"_DenominatorPFPhiEndcap";
5144  title = labelname+"DenominatorPFPhiEndcap;PF #Phi";
5145  MonitorElement * DenominatorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5146  DenominatorPFPhiEndcap->getTH1();
5147 
5148  histoname = labelname+"_DenominatorPFEtaForward";
5149  title = labelname+"DenominatorPFEtaForward;PF #eta ";
5150  MonitorElement * DenominatorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5151  DenominatorPFEtaForward->getTH1();
5152 
5153  histoname = labelname+"_DenominatorPFPhiForward";
5154  title = labelname+"DenominatorPFPhiForward;PF #Phi";
5155  MonitorElement * DenominatorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5156  DenominatorPFPhiForward->getTH1();
5157 
5158  histoname = labelname+"_DenominatorPFEta_LowpTcut";
5159  title = labelname+"DenominatorPFEta_LowpTcut;PF #eta ";
5160  MonitorElement * DenominatorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5161  DenominatorPFEta_LowpTcut->getTH1();
5162 
5163  histoname = labelname+"_DenominatorPFPhi_LowpTcut";
5164  title = labelname+"DenominatorPFPhi_LowpTcut;PF #Phi";
5165  MonitorElement * DenominatorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5166  DenominatorPFPhi_LowpTcut->getTH1();
5167 
5168  histoname = labelname+"_DenominatorPFEtaPhi_LowpTcut";
5169  title = labelname+"DenominatorPFEtaPhi_LowpTcut;PF #eta;PF #Phi";
5170  MonitorElement * DenominatorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5171  DenominatorPFEtaPhi_LowpTcut->getTH1();
5172 
5173  histoname = labelname+"_DenominatorPFEta_MedpTcut";
5174  title = labelname+"DenominatorPFEta_MedpTcut;PF #eta ";
5175  MonitorElement * DenominatorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5176  DenominatorPFEta_MedpTcut->getTH1();
5177 
5178  histoname = labelname+"_DenominatorPFPhi_MedpTcut";
5179  title = labelname+"DenominatorPFPhi_MedpTcut;PF #Phi";
5180  MonitorElement * DenominatorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5181  DenominatorPFPhi_MedpTcut->getTH1();
5182 
5183  histoname = labelname+"_DenominatorPFEtaPhi_MedpTcut";
5184  title = labelname+"DenominatorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
5185  MonitorElement * DenominatorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5186  DenominatorPFEtaPhi_MedpTcut->getTH1();
5187 
5188  histoname = labelname+"_DenominatorPFEta_HighpTcut";
5189  title = labelname+"DenominatorPFEta_HighpTcut;PF #eta ";
5190  MonitorElement * DenominatorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5191  DenominatorPFEta_HighpTcut->getTH1();
5192 
5193  histoname = labelname+"_DenominatorPFPhi_HighpTcut";
5194  title = labelname+"DenominatorPFPhi_HighpTcut;PF #Phi";
5195  MonitorElement * DenominatorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5196  DenominatorPFPhi_HighpTcut->getTH1();
5197 
5198  histoname = labelname+"_DenominatorPFEtaPhi_HighpTcut";
5199  title = labelname+"DenominatorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
5200  MonitorElement * DenominatorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5201  DenominatorPFEtaPhi_HighpTcut->getTH1();
5202 
5203  histoname = labelname+"_PFDeltaR";
5204  title = labelname+"PFDeltaR;";
5205  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
5206  PFDeltaR->getTH1();
5207 
5208  histoname = labelname+"_PFDeltaPhi";
5209  title = labelname+"PFDeltaPhi;";
5210  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
5211  PFDeltaPhi->getTH1();
5212 
5213  v->setEffHistos(NumeratorPt,
5214  NumeratorPtBarrel,
5215  NumeratorPtEndcap,
5216  NumeratorPtForward,
5217  NumeratorEta,
5218  NumeratorPhi,
5219  NumeratorEtaPhi,
5220  //ml Additional Phi and Eta histos
5221  NumeratorEtaBarrel,
5222  NumeratorPhiBarrel,
5223  NumeratorEtaEndcap,
5224  NumeratorPhiEndcap,
5225  NumeratorEtaForward,
5226  NumeratorPhiForward,
5227  NumeratorEta_LowpTcut,
5228  NumeratorPhi_LowpTcut,
5229  NumeratorEtaPhi_LowpTcut,
5230  NumeratorEta_MedpTcut,
5231  NumeratorPhi_MedpTcut,
5232  NumeratorEtaPhi_MedpTcut,
5233  NumeratorEta_HighpTcut,
5234  NumeratorPhi_HighpTcut,
5235  NumeratorEtaPhi_HighpTcut,
5236  //ml 15 new numerator histograms.
5237  DenominatorPt,
5238  DenominatorPtBarrel,
5239  DenominatorPtEndcap,
5240  DenominatorPtForward,
5241  DenominatorEta,
5242  DenominatorPhi,
5243  DenominatorEtaPhi,
5244  //ml new denom histos
5245  DenominatorEtaBarrel,
5246  DenominatorPhiBarrel,
5247  DenominatorEtaEndcap,
5248  DenominatorPhiEndcap,
5249  DenominatorEtaForward,
5250  DenominatorPhiForward,
5251  DenominatorEta_LowpTcut,
5252  DenominatorPhi_LowpTcut,
5253  DenominatorEtaPhi_LowpTcut,
5254  DenominatorEta_MedpTcut,
5255  DenominatorPhi_MedpTcut,
5256  DenominatorEtaPhi_MedpTcut,
5257  DenominatorEta_HighpTcut,
5258  DenominatorPhi_HighpTcut,
5259  DenominatorEtaPhi_HighpTcut,
5260  DeltaR,
5261  DeltaPhi,
5262  //ml
5263  //adding PF histograms SJ:
5264  NumeratorPFPt,
5265  NumeratorPFMHT,
5266  NumeratorPFPtBarrel,
5267  NumeratorPFPtEndcap,
5268  NumeratorPFPtForward,
5269  NumeratorPFEta,
5270  NumeratorPFPhi,
5271  NumeratorPFEtaPhi,
5272  NumeratorPFEtaBarrel,
5273  NumeratorPFPhiBarrel,
5274  NumeratorPFEtaEndcap,
5275  NumeratorPFPhiEndcap,
5276  NumeratorPFEtaForward,
5277  NumeratorPFPhiForward,
5278  NumeratorPFEta_LowpTcut,
5279  NumeratorPFPhi_LowpTcut,
5280  NumeratorPFEtaPhi_LowpTcut,
5281  NumeratorPFEta_MedpTcut,
5282  NumeratorPFPhi_MedpTcut,
5283  NumeratorPFEtaPhi_MedpTcut,
5284  NumeratorPFEta_HighpTcut,
5285  NumeratorPFPhi_HighpTcut,
5286  NumeratorPFEtaPhi_HighpTcut,
5287  DenominatorPFPt,
5288  DenominatorPFMHT,
5289  DenominatorPFPtBarrel,
5290  DenominatorPFPtEndcap,
5291  DenominatorPFPtForward,
5292  DenominatorPFEta,
5293  DenominatorPFPhi,
5294  DenominatorPFEtaPhi,
5295  DenominatorPFEtaBarrel,
5296  DenominatorPFPhiBarrel,
5297  DenominatorPFEtaEndcap,
5298  DenominatorPFPhiEndcap,
5299  DenominatorPFEtaForward,
5300  DenominatorPFPhiForward,
5301  DenominatorPFEta_LowpTcut,
5302  DenominatorPFPhi_LowpTcut,
5303  DenominatorPFEtaPhi_LowpTcut,
5304  DenominatorPFEta_MedpTcut,
5305  DenominatorPFPhi_MedpTcut,
5306  DenominatorPFEtaPhi_MedpTcut,
5307  DenominatorPFEta_HighpTcut,
5308  DenominatorPFPhi_HighpTcut,
5309  DenominatorPFEtaPhi_HighpTcut,
5310  PFDeltaR,
5311  PFDeltaPhi
5312  );
5313  }
5314 
5315  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0)){
5316 
5317  histoname = labelname+"_NumeratorAvrgPt";
5318  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
5319  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5320  NumeratorPt->getTH1();
5321 
5322  histoname = labelname+"_NumeratorAvrgEta";
5323  title = labelname+"NumeratorAvrgEta;Calo #eta";
5324  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5325  NumeratorEta->getTH1();
5326 
5327  histoname = labelname+"_DenominatorAvrgPt";
5328  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c]";
5329  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5330  DenominatorPt->getTH1();
5331 
5332  histoname = labelname+"_DenominatorAvrgEta";
5333  title = labelname+"DenominatorAvrgEta;Calo #eta ";
5334  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5335  DenominatorEta->getTH1();
5336 
5337  histoname = labelname+"_DeltaR";
5338  title = labelname+"DeltaR;";
5339  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
5340  DeltaR->getTH1();
5341 
5342  histoname = labelname+"_DeltaPhi";
5343  title = labelname+"DeltaPhi;";
5344  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
5345  DeltaPhi->getTH1();
5346 
5347  histoname = labelname+"_NumeratorAvrgPFPt";
5348  title = labelname+"NumeratorAvrgPFPt;PF Pt[GeV/c] ";
5349  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5350  NumeratorPFPt->getTH1();
5351 
5352  histoname = labelname+"_NumeratorAvrgPFEta";
5353  title = labelname+"NumeratorAvrgPFEta;PF #eta";
5354  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5355  NumeratorPFEta->getTH1();
5356 
5357  histoname = labelname+"_DenominatorAvrgPFPt";
5358  title = labelname+"DenominatorAvrgPFPt;PF Pt[GeV/c]";
5359  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5360  DenominatorPFPt->getTH1();
5361 
5362  histoname = labelname+"_DenominatorAvrgPFEta";
5363  title = labelname+"DenominatorAvrgPFEta;PF #eta ";
5364  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5365  DenominatorPFEta->getTH1();
5366 
5367  histoname = labelname+"_PFDeltaR";
5368  title = labelname+"PFDeltaR;";
5369  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
5370  PFDeltaR->getTH1();
5371 
5372  histoname = labelname+"_PFDeltaPhi";
5373  title = labelname+"PFDeltaPhi;";
5374  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
5375  PFDeltaPhi->getTH1();
5376 
5377  v->setEffHistos( dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5378  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5379  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5380  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5381  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5382  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5383  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5384  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5385  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5386  dummy, dummy, dummy, dummy
5387  );
5388  }
5389 
5390  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
5391 
5392  histoname = labelname+"_NumeratorPt";
5393  if(v->getPath().find("HLT_PFMET")==std::string::npos)
5394  title = labelname+"NumeratorPt; CaloMET[GeV/c]";
5395  else
5396  title = labelname+"NumeratorPt; PFMET[GeV/c]";
5397  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5398  NumeratorPt->getTH1();
5399 
5400  histoname = labelname+"_NumeratorPhi";
5401  title = labelname+"NumeratorPhi; #Phi";
5402  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5403  NumeratorPhi->getTH1();
5404 
5405  histoname = labelname+"_DenominatorPt";
5406  if(v->getPath().find("HLT_PFMET")==std::string::npos)
5407  title = labelname+"DenominatorPt; CaloMET[GeV/c]";
5408  else
5409  title = labelname+"DenominatorPt; PFMET[GeV/c]";
5410  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5411  DenominatorPt->getTH1();
5412 
5413  histoname = labelname+"_DenominatorPhi";
5414  title = labelname+"DenominatorPhi; #Phi";
5415  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5416  DenominatorPhi->getTH1();
5417 
5418  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy, dummy, dummy, dummy,
5419  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5420  dummy, dummy, DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy, dummy,
5421  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5422  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5423  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5424  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5425  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5426  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
5427  dummy, dummy, dummy, dummy
5428  );
5429  }// Loop over MET trigger
5430  }
5431  }
5432 
5433  //--------Efficiency wrt MiniBias trigger---------
5434  if(plotEffwrtMB_){
5435  std::string dirName3 = dirname_ + "/EffWrtMBTrigger/";
5436  for(PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin(); v!= hltPathsEffWrtMB_.end(); ++v ){
5437  //
5438  std::string trgPathName = HLTConfigProvider::removeVersion(v->getPath());
5439  //
5440  std::string labelname("ME") ;
5441  std::string subdirName = dirName3 + trgPathName ;
5442  std::string histoname(labelname+"");
5443  std::string title(labelname+"");
5444  dbe->setCurrentFolder(subdirName);
5445 
5446  MonitorElement *dummy;
5447  dummy = dbe->bookFloat("dummy");
5448 
5449  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0)){
5450 
5451  histoname = labelname+"_NumeratorPt";
5452  title = labelname+"NumeratorPt;Calo Pt[GeV/c] ";
5453  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5454  NumeratorPt->getTH1();
5455 
5456  histoname = labelname+"_NumeratorPtBarrel";
5457  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
5458  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5459  NumeratorPtBarrel->getTH1();
5460 
5461  histoname = labelname+"_NumeratorPtEndcap";
5462  title = labelname+"NumeratorPtEndcap; Calo Pt[GeV/c] ";
5463  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5464  NumeratorPtEndcap->getTH1();
5465 
5466  histoname = labelname+"_NumeratorPtForward";
5467  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
5468  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5469  NumeratorPtForward->getTH1();
5470 
5471  histoname = labelname+"_NumeratorEta";
5472  title = labelname+"NumeratorEta;Calo #eta ";
5473  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5474  NumeratorEta->getTH1();
5475 
5476  histoname = labelname+"_NumeratorPhi";
5477  title = labelname+"NumeratorPhi;Calo #Phi";
5478  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5479  NumeratorPhi->getTH1();
5480 
5481  histoname = labelname+"_NumeratorEtaPhi";
5482  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi ";
5483  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5484  NumeratorEtaPhi->getTH1();
5485 
5486  histoname = labelname+"_NumeratorEtaBarrel";
5487  title = labelname+"NumeratorEtaBarrel;Calo #eta ";
5488  MonitorElement * NumeratorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5489  NumeratorEtaBarrel->getTH1();
5490 
5491  histoname = labelname+"_NumeratorPhiBarrel";
5492  title = labelname+"NumeratorPhiBarrel;Calo #Phi";
5493  MonitorElement * NumeratorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5494  NumeratorPhiBarrel->getTH1();
5495 
5496  histoname = labelname+"_NumeratorEtaEndcap";
5497  title = labelname+"NumeratorEtaEndcap;Calo #eta ";
5498  MonitorElement * NumeratorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5499  NumeratorEtaEndcap->getTH1();
5500 
5501  histoname = labelname+"_NumeratorPhiEndcap";
5502  title = labelname+"NumeratorPhiEndcap;Calo #Phi";
5503  MonitorElement * NumeratorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5504  NumeratorPhiEndcap->getTH1();
5505 
5506  histoname = labelname+"_NumeratorEtaForward";
5507  title = labelname+"NumeratorEtaForward;Calo #eta ";
5508  MonitorElement * NumeratorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5509  NumeratorEtaForward->getTH1();
5510 
5511  histoname = labelname+"_NumeratorPhiForward";
5512  title = labelname+"NumeratorPhiForward;Calo #Phi";
5513  MonitorElement * NumeratorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5514  NumeratorPhiForward->getTH1();
5515 
5516  histoname = labelname+"_NumeratorEta_LowpTcut";
5517  title = labelname+"NumeratorEta_LowpTcut;Calo #eta ";
5518  MonitorElement * NumeratorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5519  NumeratorEta_LowpTcut->getTH1();
5520 
5521  histoname = labelname+"_NumeratorPhi_LowpTcut";
5522  title = labelname+"NumeratorPhi_LowpTcut;Calo #Phi";
5523  MonitorElement * NumeratorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5524  NumeratorPhi_LowpTcut->getTH1();
5525 
5526  histoname = labelname+"_NumeratorEtaPhi_LowpTcut";
5527  title = labelname+"NumeratorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
5528  MonitorElement * NumeratorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5529  NumeratorEtaPhi_LowpTcut->getTH1();
5530 
5531  histoname = labelname+"_NumeratorEta_MedpTcut";
5532  title = labelname+"NumeratorEta_MedpTcut;Calo #eta ";
5533  MonitorElement * NumeratorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5534  NumeratorEta_MedpTcut->getTH1();
5535 
5536  histoname = labelname+"_NumeratorPhi_MedpTcut";
5537  title = labelname+"NumeratorPhi_MedpTcut;Calo #Phi";
5538  MonitorElement * NumeratorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5539  NumeratorPhi_MedpTcut->getTH1();
5540 
5541  histoname = labelname+"_NumeratorEtaPhi_MedpTcut";
5542  title = labelname+"NumeratorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
5543  MonitorElement * NumeratorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5544  NumeratorEtaPhi_MedpTcut->getTH1();
5545 
5546  histoname = labelname+"_NumeratorEta_HighpTcut";
5547  title = labelname+"NumeratorEta_HighpTcut;Calo #eta ";
5548  MonitorElement * NumeratorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5549  NumeratorEta_HighpTcut->getTH1();
5550 
5551  histoname = labelname+"_NumeratorPhi_HighpTcut";
5552  title = labelname+"NumeratorPhi_HighpTcut;Calo #Phi";
5553  MonitorElement * NumeratorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5554  NumeratorPhi_HighpTcut->getTH1();
5555 
5556  histoname = labelname+"_NumeratorEtaPhi_HighpTcut";
5557  title = labelname+"NumeratorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
5558  MonitorElement * NumeratorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5559  NumeratorEtaPhi_HighpTcut->getTH1();
5560 
5561  histoname = labelname+"_DenominatorPt";
5562  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
5563  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5564  DenominatorPt->getTH1();
5565 
5566  histoname = labelname+"_DenominatorPtBarrel";
5567  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
5568  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5569  DenominatorPtBarrel->getTH1();
5570 
5571  histoname = labelname+"_DenominatorPtEndcap";
5572  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
5573  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5574  DenominatorPtEndcap->getTH1();
5575 
5576  histoname = labelname+"_DenominatorPtForward";
5577  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c]";
5578  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5579  DenominatorPtForward->getTH1();
5580 
5581  histoname = labelname+"_DenominatorEta";
5582  title = labelname+"DenominatorEta;Calo #eta ";
5583  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5584  DenominatorEta->getTH1();
5585 
5586  histoname = labelname+"_DenominatorPhi";
5587  title = labelname+"DenominatorPhi;Calo #Phi";
5588  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5589  DenominatorPhi->getTH1();
5590 
5591  histoname = labelname+"_DenominatorEtaPhi";
5592  title = labelname+"DenominatorEtaPhi;Calo #eta ;Calo #Phi ";
5593  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5594  DenominatorEtaPhi->getTH1();
5595 
5596  histoname = labelname+"_DenominatorEtaBarrel";
5597  title = labelname+"DenominatorEtaBarrel;Calo #eta ";
5598  MonitorElement * DenominatorEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5599  DenominatorEtaBarrel->getTH1();
5600 
5601  histoname = labelname+"_DenominatorPhiBarrel";
5602  title = labelname+"DenominatorPhiBarrel;Calo #Phi";
5603  MonitorElement * DenominatorPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5604  DenominatorPhiBarrel->getTH1();
5605 
5606  histoname = labelname+"_DenominatorEtaEndcap";
5607  title = labelname+"DenominatorEtaEndcap;Calo #eta ";
5608  MonitorElement * DenominatorEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5609  DenominatorEtaEndcap->getTH1();
5610 
5611  histoname = labelname+"_DenominatorPhiEndcap";
5612  title = labelname+"DenominatorPhiEndcap;Calo #Phi";
5613  MonitorElement * DenominatorPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5614  DenominatorPhiEndcap->getTH1();
5615 
5616  histoname = labelname+"_DenominatorEtaForward";
5617  title = labelname+"DenominatorEtaForward;Calo #eta ";
5618  MonitorElement * DenominatorEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5619  DenominatorEtaForward->getTH1();
5620 
5621  histoname = labelname+"_DenominatorPhiForward";
5622  title = labelname+"DenominatorPhiForward;Calo #Phi";
5623  MonitorElement * DenominatorPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5624  DenominatorPhiForward->getTH1();
5625 
5626  histoname = labelname+"_DenominatorEta_LowpTcut";
5627  title = labelname+"DenominatorEta_LowpTcut;Calo #eta ";
5628  MonitorElement * DenominatorEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5629  DenominatorEta_LowpTcut->getTH1();
5630 
5631  histoname = labelname+"_DenominatorPhi_LowpTcut";
5632  title = labelname+"DenominatorPhi_LowpTcut;Calo #Phi";
5633  MonitorElement * DenominatorPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5634  DenominatorPhi_LowpTcut->getTH1();
5635 
5636  histoname = labelname+"_DenominatorEtaPhi_LowpTcut";
5637  title = labelname+"DenominatorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
5638  MonitorElement * DenominatorEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5639  DenominatorEtaPhi_LowpTcut->getTH1();
5640 
5641  histoname = labelname+"_DenominatorEta_MedpTcut";
5642  title = labelname+"DenominatorEta_MedpTcut;Calo #eta ";
5643  MonitorElement * DenominatorEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5644  DenominatorEta_MedpTcut->getTH1();
5645 
5646  histoname = labelname+"_DenominatorPhi_MedpTcut";
5647  title = labelname+"DenominatorPhi_MedpTcut;Calo #Phi";
5648  MonitorElement * DenominatorPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5649  DenominatorPhi_MedpTcut->getTH1();
5650 
5651  histoname = labelname+"_DenominatorEtaPhi_MedpTcut";
5652  title = labelname+"DenominatorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
5653  MonitorElement * DenominatorEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5654  DenominatorEtaPhi_MedpTcut->getTH1();
5655 
5656  histoname = labelname+"_DenominatorEta_HighpTcut";
5657  title = labelname+"DenominatorEta_HighpTcut;Calo #eta ";
5658  MonitorElement * DenominatorEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5659  DenominatorEta_HighpTcut->getTH1();
5660 
5661  histoname = labelname+"_DenominatorPhi_HighpTcut";
5662  title = labelname+"DenominatorPhi_HighpTcut;Calo #Phi";
5663  MonitorElement * DenominatorPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5664  DenominatorPhi_HighpTcut->getTH1();
5665 
5666  histoname = labelname+"_DenominatorEtaPhi_HighpTcut";
5667  title = labelname+"DenominatorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
5668  MonitorElement * DenominatorEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5669  DenominatorEtaPhi_HighpTcut->getTH1();
5670 
5671  histoname = labelname+"_DeltaR";
5672  title = labelname+"DeltaR;";
5673  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
5674  DeltaR->getTH1();
5675 
5676  histoname = labelname+"_DeltaPhi";
5677  title = labelname+"DeltaPhi;";
5678  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
5679  DeltaPhi->getTH1();
5680 
5681  histoname = labelname+"_NumeratorPFPt";
5682  title = labelname+"NumeratorPFPt;PF Pt[GeV/c] ";
5683  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5684  NumeratorPFPt->getTH1();
5685 
5686  histoname = labelname+"_NumeratorPFMHT";
5687  title = labelname+"NumeratorPFPt;PFMHT[GeV/c] ";
5688  MonitorElement * NumeratorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5689  NumeratorPFMHT->getTH1();
5690 
5691  histoname = labelname+"_NumeratorPFPtBarrel";
5692  title = labelname+"NumeratorPFPtBarrel;PF Pt[GeV/c]";
5693  MonitorElement * NumeratorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5694  NumeratorPFPtBarrel->getTH1();
5695 
5696  histoname = labelname+"_NumeratorPFPtEndcap";
5697  title = labelname+"NumeratorPFPtEndcap; PF Pt[GeV/c] ";
5698  MonitorElement * NumeratorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5699  NumeratorPFPtEndcap->getTH1();
5700 
5701  histoname = labelname+"_NumeratorPFPtForward";
5702  title = labelname+"NumeratorPFPtForward;PF Pt[GeV/c]";
5703  MonitorElement * NumeratorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5704  NumeratorPFPtForward->getTH1();
5705 
5706  histoname = labelname+"_NumeratorPFEta";
5707  title = labelname+"NumeratorPFEta;PF #eta ";
5708  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5709  NumeratorPFEta->getTH1();
5710 
5711  histoname = labelname+"_NumeratorPFPhi";
5712  title = labelname+"NumeratorPFPhi;PF #Phi";
5713  MonitorElement * NumeratorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5714  NumeratorPFPhi->getTH1();
5715 
5716  histoname = labelname+"_NumeratorPFEtaPhi";
5717  title = labelname+"NumeratorPFEtaPhi;PF #eta;PF #Phi ";
5718  MonitorElement * NumeratorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5719  NumeratorPFEtaPhi->getTH1();
5720 
5721  histoname = labelname+"_NumeratorPFEtaBarrel";
5722  title = labelname+"NumeratorPFEtaBarrel;PF #eta ";
5723  MonitorElement * NumeratorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5724  NumeratorPFEtaBarrel->getTH1();
5725 
5726  histoname = labelname+"_NumeratorPFPhiBarrel";
5727  title = labelname+"NumeratorPFPhiBarrel;PF #Phi";
5728  MonitorElement * NumeratorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5729  NumeratorPFPhiBarrel->getTH1();
5730 
5731  histoname = labelname+"_NumeratorPFEtaEndcap";
5732  title = labelname+"NumeratorPFEtaEndcap;PF #eta ";
5733  MonitorElement * NumeratorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5734  NumeratorPFEtaEndcap->getTH1();
5735 
5736  histoname = labelname+"_NumeratorPFPhiEndcap";
5737  title = labelname+"NumeratorPFPhiEndcap;PF #Phi";
5738  MonitorElement * NumeratorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5739  NumeratorPFPhiEndcap->getTH1();
5740 
5741  histoname = labelname+"_NumeratorPFEtaForward";
5742  title = labelname+"NumeratorPFEtaForward;PF #eta ";
5743  MonitorElement * NumeratorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5744  NumeratorPFEtaForward->getTH1();
5745 
5746  histoname = labelname+"_NumeratorPFPhiForward";
5747  title = labelname+"NumeratorPFPhiForward;PF #Phi";
5748  MonitorElement * NumeratorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5749  NumeratorPFPhiForward->getTH1();
5750 
5751  histoname = labelname+"_NumeratorPFEta_LowpTcut";
5752  title = labelname+"NumeratorPFEta_LowpTcut;PF #eta ";
5753  MonitorElement * NumeratorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5754  NumeratorPFEta_LowpTcut->getTH1();
5755 
5756  histoname = labelname+"_NumeratorPFPhi_LowpTcut";
5757  title = labelname+"NumeratorPFPhi_LowpTcut;PF #Phi";
5758  MonitorElement * NumeratorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5759  NumeratorPFPhi_LowpTcut->getTH1();
5760 
5761  histoname = labelname+"_NumeratorPFEtaPhi_LowpTcut";
5762  title = labelname+"NumeratorPFEtaPhi_LowpTcut;PF #eta;PF #Phi";
5763  MonitorElement * NumeratorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5764  NumeratorPFEtaPhi_LowpTcut->getTH1();
5765 
5766  histoname = labelname+"_NumeratorPFEta_MedpTcut";
5767  title = labelname+"NumeratorPFEta_MedpTcut;PF #eta ";
5768  MonitorElement * NumeratorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5769  NumeratorPFEta_MedpTcut->getTH1();
5770 
5771  histoname = labelname+"_NumeratorPFPhi_MedpTcut";
5772  title = labelname+"NumeratorPFPhi_MedpTcut;PF #Phi";
5773  MonitorElement * NumeratorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5774  NumeratorPFPhi_MedpTcut->getTH1();
5775 
5776  histoname = labelname+"_NumeratorPFEtaPhi_MedpTcut";
5777  title = labelname+"NumeratorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
5778  MonitorElement * NumeratorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5779  NumeratorPFEtaPhi_MedpTcut->getTH1();
5780 
5781  histoname = labelname+"_NumeratorPFEta_HighpTcut";
5782  title = labelname+"NumeratorPFEta_HighpTcut;PF #eta ";
5783  MonitorElement * NumeratorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5784  NumeratorPFEta_HighpTcut->getTH1();
5785 
5786  histoname = labelname+"_NumeratorPFPhi_HighpTcut";
5787  title = labelname+"NumeratorPFPhi_HighpTcut;PF #Phi";
5788  MonitorElement * NumeratorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5789  NumeratorPFPhi_HighpTcut->getTH1();
5790 
5791  histoname = labelname+"_NumeratorPFEtaPhi_HighpTcut";
5792  title = labelname+"NumeratorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
5793  MonitorElement * NumeratorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5794  NumeratorPFEtaPhi_HighpTcut->getTH1();
5795 
5796  histoname = labelname+"_DenominatorPFMHT";
5797  title = labelname+"DenominatorPFMHT;PFMHT[GeV/c]";
5798  MonitorElement * DenominatorPFMHT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5799  DenominatorPFMHT->getTH1();
5800 
5801  histoname = labelname+"_DenominatorPFPt";
5802  title = labelname+"DenominatorPFPt;PF Pt[GeV/c]";
5803  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5804  DenominatorPFPt->getTH1();
5805 
5806  histoname = labelname+"_DenominatorPFPtBarrel";
5807  title = labelname+"DenominatorPFPtBarrel;PF Pt[GeV/c]";
5808  MonitorElement * DenominatorPFPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5809  DenominatorPFPtBarrel->getTH1();
5810 
5811  histoname = labelname+"_DenominatorPFPtEndcap";
5812  title = labelname+"DenominatorPFPtEndcap;PF Pt[GeV/c]";
5813  MonitorElement * DenominatorPFPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5814  DenominatorPFPtEndcap->getTH1();
5815 
5816  histoname = labelname+"_DenominatorPFPtForward";
5817  title = labelname+"DenominatorPFPtForward;PF Pt[GeV/c]";
5818  MonitorElement * DenominatorPFPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
5819  DenominatorPFPtForward->getTH1();
5820 
5821  histoname = labelname+"_DenominatorPFEta";
5822  title = labelname+"DenominatorPFEta;PF #eta ";
5823  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5824  DenominatorPFEta->getTH1();
5825 
5826  histoname = labelname+"_DenominatorPFPhi";
5827  title = labelname+"DenominatorPFPhi;PF #Phi";
5828  MonitorElement * DenominatorPFPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5829  DenominatorPFPhi->getTH1();
5830 
5831  histoname = labelname+"_DenominatorPFEtaPhi";
5832  title = labelname+"DenominatorPFEtaPhi;PF #eta ;PF #Phi ";
5833  MonitorElement * DenominatorPFEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5834  DenominatorPFEtaPhi->getTH1();
5835 
5836  histoname = labelname+"_DenominatorPFEtaBarrel";
5837  title = labelname+"DenominatorPFEtaBarrel;PF #eta ";
5838  MonitorElement * DenominatorPFEtaBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5839  DenominatorPFEtaBarrel->getTH1();
5840 
5841  histoname = labelname+"_DenominatorPFPhiBarrel";
5842  title = labelname+"DenominatorPFPhiBarrel;PF #Phi";
5843  MonitorElement * DenominatorPFPhiBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5844  DenominatorPFPhiBarrel->getTH1();
5845 
5846  histoname = labelname+"_DenominatorPFEtaEndcap";
5847  title = labelname+"DenominatorPFEtaEndcap;PF #eta ";
5848  MonitorElement * DenominatorPFEtaEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5849  DenominatorPFEtaEndcap->getTH1();
5850 
5851  histoname = labelname+"_DenominatorPFPhiEndcap";
5852  title = labelname+"DenominatorPFPhiEndcap;PF #Phi";
5853  MonitorElement * DenominatorPFPhiEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5854  DenominatorPFPhiEndcap->getTH1();
5855 
5856  histoname = labelname+"_DenominatorPFEtaForward";
5857  title = labelname+"DenominatorPFEtaForward;PF #eta ";
5858  MonitorElement * DenominatorPFEtaForward = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5859  DenominatorPFEtaForward->getTH1();
5860 
5861  histoname = labelname+"_DenominatorPFPhiForward";
5862  title = labelname+"DenominatorPFPhiForward;PF #Phi";
5863  MonitorElement * DenominatorPFPhiForward = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5864  DenominatorPFPhiForward->getTH1();
5865 
5866  histoname = labelname+"_DenominatorPFEta_LowpTcut";
5867  title = labelname+"DenominatorPFEta_LowpTcut;PF #eta ";
5868  MonitorElement * DenominatorPFEta_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5869  DenominatorPFEta_LowpTcut->getTH1();
5870 
5871  histoname = labelname+"_DenominatorPFPhi_LowpTcut";
5872  title = labelname+"DenominatorPFPhi_LowpTcut;PF #Phi";
5873  MonitorElement * DenominatorPFPhi_LowpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5874  DenominatorPFPhi_LowpTcut->getTH1();
5875 
5876  histoname = labelname+"_DenominatorPFEtaPhi_LowpTcut";
5877  title = labelname+"DenominatorPFEtaPhi_LowpTcut;PF #eta;PF #Phi";
5878  MonitorElement * DenominatorPFEtaPhi_LowpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5879  DenominatorPFEtaPhi_LowpTcut->getTH1();
5880 
5881  histoname = labelname+"_DenominatorPFEta_MedpTcut";
5882  title = labelname+"DenominatorPFEta_MedpTcut;PF #eta ";
5883  MonitorElement * DenominatorPFEta_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5884  DenominatorPFEta_MedpTcut->getTH1();
5885 
5886  histoname = labelname+"_DenominatorPFPhi_MedpTcut";
5887  title = labelname+"DenominatorPFPhi_MedpTcut;PF #Phi";
5888  MonitorElement * DenominatorPFPhi_MedpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5889  DenominatorPFPhi_MedpTcut->getTH1();
5890 
5891  histoname = labelname+"_DenominatorPFEtaPhi_MedpTcut";
5892  title = labelname+"DenominatorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
5893  MonitorElement * DenominatorPFEtaPhi_MedpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5894  DenominatorPFEtaPhi_MedpTcut->getTH1();
5895 
5896  histoname = labelname+"_DenominatorPFEta_HighpTcut";
5897  title = labelname+"DenominatorPFEta_HighpTcut;PF #eta ";
5898  MonitorElement * DenominatorPFEta_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
5899  DenominatorPFEta_HighpTcut->getTH1();
5900 
5901  histoname = labelname+"_DenominatorPFPhi_HighpTcut";
5902  title = labelname+"DenominatorPFPhi_HighpTcut;PF #Phi";
5903  MonitorElement * DenominatorPFPhi_HighpTcut = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
5904  DenominatorPFPhi_HighpTcut->getTH1();
5905 
5906  histoname = labelname+"_DenominatorPFEtaPhi_HighpTcut";
5907  title = labelname+"DenominatorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
5908  MonitorElement * DenominatorPFEtaPhi_HighpTcut = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
5909  DenominatorPFEtaPhi_HighpTcut->getTH1();
5910 
5911  histoname = labelname+"_PFDeltaR";
5912  title = labelname+"PFDeltaR;";
5913  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
5914  PFDeltaR->getTH1();
5915 
5916  histoname = labelname+"_PFDeltaPhi";
5917  title = labelname+"PFDeltaPhi;";
5918  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
5919  PFDeltaPhi->getTH1();
5920 
5921  v->setEffHistos(NumeratorPt,
5922  NumeratorPtBarrel,
5923  NumeratorPtEndcap,
5924  NumeratorPtForward,
5925  NumeratorEta,
5926  NumeratorPhi,
5927  NumeratorEtaPhi,
5928  //
5929  NumeratorEtaBarrel,
5930  NumeratorPhiBarrel,
5931  NumeratorEtaEndcap,
5932  NumeratorPhiEndcap,
5933  NumeratorEtaForward,
5934  NumeratorPhiForward,
5935  NumeratorEta_LowpTcut,
5936  NumeratorPhi_LowpTcut,
5937  NumeratorEtaPhi_LowpTcut,
5938  NumeratorEta_MedpTcut,
5939  NumeratorPhi_MedpTcut,
5940  NumeratorEtaPhi_MedpTcut,
5941  NumeratorEta_HighpTcut,
5942  NumeratorPhi_HighpTcut,
5943  NumeratorEtaPhi_HighpTcut,
5944  //
5945  DenominatorPt,
5946  DenominatorPtBarrel,
5947  DenominatorPtEndcap,
5948  DenominatorPtForward,
5949  DenominatorEta,
5950  DenominatorPhi,
5951  DenominatorEtaPhi,
5952  //
5953  DenominatorEtaBarrel,
5954  DenominatorPhiBarrel,
5955  DenominatorEtaEndcap,
5956  DenominatorPhiEndcap,
5957  DenominatorEtaForward,
5958  DenominatorPhiForward,
5959  DenominatorEta_LowpTcut,
5960  DenominatorPhi_LowpTcut,
5961  DenominatorEtaPhi_LowpTcut,
5962  DenominatorEta_MedpTcut,
5963  DenominatorPhi_MedpTcut,
5964  DenominatorEtaPhi_MedpTcut,
5965  DenominatorEta_HighpTcut,
5966  DenominatorPhi_HighpTcut,
5967  DenominatorEtaPhi_HighpTcut,
5968  DeltaR,
5969  DeltaPhi,
5970  //
5971  NumeratorPFPt,
5972  NumeratorPFMHT,
5973  NumeratorPFPtBarrel,
5974  NumeratorPFPtEndcap,
5975  NumeratorPFPtForward,
5976  NumeratorPFEta,
5977  NumeratorPFPhi,
5978  NumeratorPFEtaPhi,
5979  NumeratorPFEtaBarrel,
5980  NumeratorPFPhiBarrel,
5981  NumeratorPFEtaEndcap,
5982  NumeratorPFPhiEndcap,
5983  NumeratorPFEtaForward,
5984  NumeratorPFPhiForward,
5985  NumeratorPFEta_LowpTcut,
5986  NumeratorPFPhi_LowpTcut,
5987  NumeratorPFEtaPhi_LowpTcut,
5988  NumeratorPFEta_MedpTcut,
5989  NumeratorPFPhi_MedpTcut,
5990  NumeratorPFEtaPhi_MedpTcut,
5991  NumeratorPFEta_HighpTcut,
5992  NumeratorPFPhi_HighpTcut,
5993  NumeratorPFEtaPhi_HighpTcut,
5994  DenominatorPFPt,
5995  DenominatorPFMHT,
5996  DenominatorPFPtBarrel,
5997  DenominatorPFPtEndcap,
5998  DenominatorPFPtForward,
5999  DenominatorPFEta,
6000  DenominatorPFPhi,
6001  DenominatorPFEtaPhi,
6002  DenominatorPFEtaBarrel,
6003  DenominatorPFPhiBarrel,
6004  DenominatorPFEtaEndcap,
6005  DenominatorPFPhiEndcap,
6006  DenominatorPFEtaForward,
6007  DenominatorPFPhiForward,
6008  DenominatorPFEta_LowpTcut,
6009  DenominatorPFPhi_LowpTcut,
6010  DenominatorPFEtaPhi_LowpTcut,
6011  DenominatorPFEta_MedpTcut,
6012  DenominatorPFPhi_MedpTcut,
6013  DenominatorPFEtaPhi_MedpTcut,
6014  DenominatorPFEta_HighpTcut,
6015  DenominatorPFPhi_HighpTcut,
6016  DenominatorPFEtaPhi_HighpTcut,
6017  PFDeltaR,
6018  PFDeltaPhi
6019  );
6020 
6021  }// Loop over Jet Trigger
6022 
6023  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0)){
6024 
6025  histoname = labelname+"_NumeratorAvrgPt";
6026  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
6027  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6028  NumeratorPt->getTH1();
6029 
6030  histoname = labelname+"_NumeratorAvrgEta";
6031  title = labelname+"NumeratorAvrgEta;Calo #eta ";
6032  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
6033  NumeratorEta->getTH1();
6034 
6035  histoname = labelname+"_DenominatorAvrgPt";
6036  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
6037  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6038  DenominatorPt->getTH1();
6039 
6040  histoname = labelname+"_DenominatorAvrgEta";
6041  title = labelname+"DenominatorAvrgEta;Calo #eta ";
6042  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
6043  DenominatorEta->getTH1();
6044 
6045  histoname = labelname+"_DeltaR";
6046  title = labelname+"DeltaR;";
6047  MonitorElement * DeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
6048  DeltaR->getTH1();
6049 
6050  histoname = labelname+"_DeltaPhi";
6051  title = labelname+"DeltaPhi;";
6052  MonitorElement * DeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
6053  DeltaPhi->getTH1();
6054 
6055  histoname = labelname+"_NumeratorAvrgPFPt";
6056  title = labelname+"NumeratorAvrgPFPt;PF pT [GeV/c] ";
6057  MonitorElement * NumeratorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6058  NumeratorPFPt->getTH1();
6059 
6060  histoname = labelname+"_NumeratorAvrgPFEta";
6061  title = labelname+"NumeratorAvrgPFEta;PF #eta ";
6062  MonitorElement * NumeratorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
6063  NumeratorPFEta->getTH1();
6064 
6065  histoname = labelname+"_DenominatorAvrgPFPt";
6066  title = labelname+"DenominatorAvrgPFPt;PF Pt[GeV/c] ";
6067  MonitorElement * DenominatorPFPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6068  DenominatorPFPt->getTH1();
6069 
6070  histoname = labelname+"_DenominatorAvrgPFEta";
6071  title = labelname+"DenominatorAvrgPFEta;PF #eta ";
6072  MonitorElement * DenominatorPFEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
6073  DenominatorPFEta->getTH1();
6074 
6075  histoname = labelname+"_PFDeltaR";
6076  title = labelname+"PFDeltaR;";
6077  MonitorElement * PFDeltaR = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
6078  PFDeltaR->getTH1();
6079 
6080  histoname = labelname+"_PFDeltaPhi";
6081  title = labelname+"PFDeltaPhi;";
6082  MonitorElement * PFDeltaPhi = dbe->book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
6083  PFDeltaPhi->getTH1();
6084 
6085  v->setEffHistos( dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6086  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6087  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6088  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6089  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6090  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6091  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6092  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6093  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6094  dummy, dummy, dummy, dummy
6095  );
6096  }
6097 
6098  if(v->getObjectType() == trigger::TriggerMET || (v->getObjectType() == trigger::TriggerTET)){
6099 
6100  histoname = labelname+"_NumeratorPt";
6101  if(v->getPath().find("HLT_PFMET")==std::string::npos)
6102  title = labelname+"NumeratorPt;CaloMET[GeV/c]";
6103  else
6104  title = labelname+"NumeratorPt;PFMET[GeV/c]";
6105  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6106  NumeratorPt->getTH1();
6107 
6108  histoname = labelname+"_NumeratorPhi";
6109  title = labelname+"NumeratorPhi;#Phi";
6110  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
6111  NumeratorPhi->getTH1();
6112 
6113  histoname = labelname+"_DenominatorPt";
6114  if(v->getPath().find("HLT_PFMET")==std::string::npos)
6115  title = labelname+"DenominatorPt;CaloMET[GeV/c]";
6116  else
6117  title = labelname+"DenominatorPt;PFMET[GeV/c]";
6118  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6119  DenominatorPt->getTH1();
6120 
6121  histoname = labelname+"_DenominatorPhi";
6122  title = labelname+"DenominatorPhi;#Phi";
6123  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
6124  DenominatorPhi->getTH1();
6125 
6126  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy, dummy, dummy, dummy,
6127  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6128  dummy, dummy, DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy, dummy,
6129  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6130  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6131  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6132  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6133  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6134  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
6135  dummy, dummy, dummy, dummy
6136  );
6137  }// Loop over MET trigger
6138  }
6139  }
6140 
6141  }// This is loop over all efficiency plots
6142 
6143 
6144  if(runStandalone_){
6145  //--------Histos to see WHY trigger is NOT fired----------
6146  int Nbins_ = 10;
6147  int Nmin_ = 0;
6148  int Nmax_ = 10;
6149  int Ptbins_ = 1000;
6150  int Etabins_ = 40;
6151  int Phibins_ = 35;
6152  double PtMin_ = 0.;
6153  double PtMax_ = 1000.;
6154  double EtaMin_ = -5.;
6155  double EtaMax_ = 5.;
6156  double PhiMin_ = -3.14159;
6157  double PhiMax_ = 3.14159;
6158 
6159  std::string dirName4_ = dirname_ + "/TriggerNotFired/";
6160  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
6161 
6162  MonitorElement *dummy;
6163  dummy = dbe->bookFloat("dummy");
6164 
6165  std::string labelname("ME") ;
6166  std::string histoname(labelname+"");
6167  std::string title(labelname+"");
6168  dbe->setCurrentFolder(dirName4_ + v->getPath());
6169 
6170  histoname = labelname+"_TriggerSummary";
6171  title = labelname+"Summary of trigger levels";
6172  MonitorElement * TriggerSummary = dbe->book1D(histoname.c_str(),title.c_str(),7, -0.5,6.5);
6173 
6174  std::vector<std::string> trigger;
6175  trigger.push_back("Nevt");
6176  trigger.push_back("L1 failed");
6177  trigger.push_back("L1 & HLT failed");
6178  trigger.push_back("L1 failed but not HLT");
6179  trigger.push_back("L1 passed");
6180  trigger.push_back("L1 & HLT passed");
6181  trigger.push_back("L1 passed but not HLT");
6182 
6183  for(unsigned int i =0; i < trigger.size(); i++)
6184  TriggerSummary->setBinLabel(i+1, trigger[i]);
6185 
6186  if((v->getTriggerType().compare("SingleJet_Trigger") == 0)){
6187  histoname = labelname+"_JetPt";
6188  title = labelname+"Leading jet pT;Pt[GeV/c]";
6189  MonitorElement * JetPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6190  JetPt->getTH1();
6191 
6192  histoname = labelname+"_JetEtaVsPt";
6193  title = labelname+"Leading jet #eta vs pT;#eta;Pt[GeV/c]";
6194  MonitorElement * JetEtaVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Ptbins_,PtMin_,PtMax_);
6195  JetEtaVsPt->getTH1();
6196 
6197  histoname = labelname+"_JetPhiVsPt";
6198  title = labelname+"Leading jet #Phi vs pT;#Phi;Pt[GeV/c]";
6199  MonitorElement * JetPhiVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Ptbins_,PtMin_,PtMax_);
6200  JetPhiVsPt->getTH1();
6201 
6202  v->setDgnsHistos( TriggerSummary, dummy, JetPt, JetEtaVsPt, JetPhiVsPt, dummy, dummy, dummy, dummy, dummy, dummy);
6203  }// single Jet trigger
6204 
6205  if((v->getTriggerType().compare("DiJet_Trigger") == 0)){
6206  histoname = labelname+"_JetSize";
6207  title = labelname+"Jet Size;multiplicity";
6208  MonitorElement * JetSize = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
6209  JetSize->getTH1();
6210 
6211  histoname = labelname+"_AvergPt";
6212  title = labelname+"Average Pt;Pt[GeV/c]";
6213  MonitorElement * Pt12 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6214  Pt12->getTH1();
6215 
6216  histoname = labelname+"_AvergEta";
6217  title = labelname+"Average Eta;#eta";
6218  MonitorElement * Eta12 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
6219  Eta12->getTH1();
6220 
6221  histoname = labelname+"_PhiDifference";
6222  title = labelname+"#Delta#Phi;#Delta#Phi";
6223  MonitorElement * Phi12 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
6224  Phi12->getTH1();
6225 
6226  histoname = labelname+"_Pt3Jet";
6227  title = labelname+"Pt of 3rd Jet;Pt[GeV/c]";
6228  MonitorElement * Pt3 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6229  Pt3->getTH1();
6230 
6231  histoname = labelname+"_Pt12VsPt3Jet";
6232  title = labelname+"Pt of 3rd Jet vs Average Pt of leading jets;Avergage Pt[GeV/c]; Pt of 3rd Jet [GeV/c]";
6233  MonitorElement * Pt12Pt3 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
6234  Pt12Pt3->getTH1();
6235 
6236  histoname = labelname+"_Pt12VsPhi12";
6237  title = labelname+"Average Pt of leading jets vs #Delta#Phi between leading jets;Avergage Pt[GeV/c]; #Delta#Phi";
6238  MonitorElement * Pt12Phi12 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Phibins_,PhiMin_,PhiMax_);
6239  Pt12Phi12->getTH1();
6240 
6241  v->setDgnsHistos( TriggerSummary, JetSize, dummy, dummy, dummy, Pt12, Eta12, Phi12, Pt3, Pt12Pt3, Pt12Phi12);
6242  }// Dijet Jet trigger
6243 
6244  if((v->getTriggerType().compare("MET_Trigger") == 0)){
6245  histoname = labelname+"_MET";
6246  title = labelname+"MET;Pt[GeV/c]";
6247  MonitorElement * MET = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6248  MET->getTH1();
6249 
6250  v->setDgnsHistos(TriggerSummary, dummy, MET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
6251  } // MET trigger
6252 
6253  if((v->getTriggerType().compare("TET_Trigger") == 0)){
6254  histoname = labelname+"_TET";
6255  title = labelname+"TET;Pt[GeV/c]";
6256  MonitorElement * TET = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
6257  TET->getTH1();
6258 
6259  v->setDgnsHistos(TriggerSummary, dummy, TET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
6260  } // TET trigger
6261  }
6262  }//runStandalone
6263  }
6264 }
6265 
6266 //--------------------------------------------------------
6268  const EventSetup& context) {
6269 }
6270 
6271 //--------------------------------------------------------
6273  const EventSetup& context) {
6274 }
6275 
6276 //ml added method to get L1PathName
6278 {
6279 
6280  // find L1 condition for numpath with numpath objecttype
6281  // find PSet for L1 global seed for numpath,
6282  // list module labels for numpath
6283  std::string l1pathname = "dummy";
6284 
6285  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
6286 
6287  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin();
6288  numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
6289 
6290  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed") {
6291  l1pathname = *numpathmodule;
6292  break;
6293  }
6294  }
6295  return l1pathname;
6296 }
6297 
6298 // - method called once each job just after ending the event loop ------------
6299 void
6301  delete jetID;
6302 }
6303 
6304 // EndRun
6306  if (verbose_) std::cout << "endRun, run " << run.id() << std::endl;
6307 }
6308 
6309 //
6311  bool output = false;
6312  if (fabs(eta)<=1.3) output=true;
6313  return output;
6314 }
6315 
6316 //
6318  bool output = false;
6319  if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=true;
6320  return output;
6321 }
6322 
6323 //
6325  bool output = false;
6326  if (fabs(eta)>3.0) output=true;
6327  return output;
6328 }
6329 
6330 //
6332  // hltConfig_ has to be defined first before calling this method
6333  bool output=false;
6334  for (unsigned int j=0; j!=hltConfig_.size(); ++j) {
6335  if (hltConfig_.triggerName(j) == pathname )
6336  output=true;
6337  }
6338  return output;
6339 }
6340 
6341 //
6343  // triggerResults_, triggerNames_ has to be defined first before calling this method
6344  bool output=false;
6345  if(&triggerResults_) {
6346  unsigned index = triggerNames_.triggerIndex(pathName);
6347  if(index < triggerNames_.size() && triggerResults_->accept(index)) output = true;
6348  }
6349  return output;
6350 }
6351 
6352 // This returns the position of trigger name defined in summary histograms
6354  int nbins = rate_All->getTH1()->GetNbinsX();
6355  double binVal = -100;
6356  for(int ibin=1; ibin<nbins+1; ibin++)
6357  {
6358  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
6359  if(binLabel[0]=='\0')continue;
6360  // std::string binLabel_str = string(binLabel);
6361  // if(binLabel_str.compare(trigName)!=0)continue;
6362  if(trigName.compare(binLabel)!=0)continue;
6363 
6364  if(trigName.compare(binLabel)==0){
6365  binVal = rate_All->getTH1()->GetBinCenter(ibin);
6366  break;
6367  }
6368  }
6369  return binVal;
6370 }
6371 
6372 //
6374  // processname_, triggerObj_ has to be defined before calling this method
6375  bool output=false;
6376  edm::InputTag testTag(objectName,"",processname_);
6377  const int index = triggerObj_->filterIndex(testTag);
6378  if ( index >= triggerObj_->sizeFilters() ) {
6379  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< index << " of that name ";
6380  } else {
6381  const trigger::Keys & k = triggerObj_->filterKeys(index);
6382  if (k.size()) output=true;
6383  }
6384  return output;
6385 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
unsigned int size() const
number of trigger paths in trigger table
PathInfoCollection hltPathsAllWrtMu_
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
virtual double et() const GCC11_FINAL
transverse energy
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:207
RunID const & id() const
Definition: RunBase.h:41
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 &)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
Definition: deltaR.h:79
edm::Handle< reco::PFJetCollection > pfjetColl_
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
virtual double TriggerPosition(std::string trigName)
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
double fHPD() const
Definition: JetIDHelper.h:33
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_
#define abs(x)
Definition: mlp_lapack.h:159
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
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)
static const std::string removeVersion(const std::string &trigger)
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
virtual void fillMEforMonAllTrigger(const edm::Event &iEvent, const edm::EventSetup &)
void Fill(long long x)
Collection of Calo MET.
virtual bool isBarrel(double eta)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::vector< std::string > pathFilter_
int iEvent
Definition: GenABIO.cc:243
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
std::vector< std::string > MBTrigPaths_
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
virtual bool isTriggerObjectFound(std::string objectName)
Definition: MET.h:32
T sqrt(T t)
Definition: SSEVec.h:48
virtual bool isForward(double eta)
MonitorElement * correlation_AllWrtMu
std::vector< std::string > pathRejectKeyword_
virtual void fillMEforMonAllTriggerwrtMuonTrigger(const edm::Event &iEvent, const edm::EventSetup &)
int j
Definition: DBlmapReader.cc:9
TH1 * getTH1(void) const
virtual void fillMEforEffWrtMBTrigger(const edm::Event &iEvent, const edm::EventSetup &)
PathInfoCollection hltPathsEffWrtMB_
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
reco::CaloJetCollection calojet
std::vector< std::string > MuonTrigPaths_
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
virtual bool isHLTPathAccepted(std::string pathName)
edm::Handle< reco::CaloJetCollection > calojetColl_
int k[5][pyjets_maxn]
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
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
virtual void fillMEforMonTriggerSummary(const edm::Event &iEvent, const edm::EventSetup &)
#define N
Definition: blowfish.cc:9
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
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
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:51
const std::string getL1ConditionModuleName(const std::string &pathname)
long long int num
Definition: procUtils.cc:71
edm::Handle< trigger::TriggerEvent > triggerObj_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
MonitorElement * correlation_AllWrtMB
T const * product() const
Definition: Handle.h:74
PathInfoCollection hltPathsEffWrtMu_
void endRun(const edm::Run &run, const edm::EventSetup &c)
std::string const & label() const
Definition: InputTag.h:42
void beginRun(const edm::Run &run, const edm::EventSetup &c)
edm::EventID id() const
Definition: EventBase.h:56
virtual void fillMEforEffWrtMuTrigger(const edm::Event &iEvent, const edm::EventSetup &)
edm::Handle< reco::CaloMETCollection > calometColl_
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 &)
T w() const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
virtual float pt() const GCC11_FINAL
transverse momentum
reco::helper::JetIDHelper * jetID
std::string const & instance() const
Definition: InputTag.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
Definition: Run.h:36
PathInfoCollection hltPathsEff_
Definition: DDAxes.h:10
Collection of PF MET.