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