CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerSummaryProducerAOD.cc
Go to the documentation of this file.
1 
10 #include <algorithm>
11 #include <memory>
12 #include <typeinfo>
13 
16 
23 
36 
42 
48 
51 
54 
55 #include "boost/algorithm/string.hpp"
56 
57 namespace {
58  std::vector<std::regex> convertToRegex(std::vector<std::string> const& iPatterns) {
59  std::vector<std::regex> result;
60 
61  for(auto const& pattern: iPatterns) {
62  auto regexPattern = pattern;
63  boost::replace_all(regexPattern, "*", ".*");
64  boost::replace_all(regexPattern, "?", ".");
65 
66  result.emplace_back(regexPattern);
67  }
68  return result;
69  }
70 }
71 
72 //
73 // constructors and destructor
74 //
76  pn_(ps.getParameter<std::string>("processName")),
77  moduleLabelPatternsToMatch_(convertToRegex(ps.getParameter<std::vector<std::string>>("moduleLabelPatternsToMatch"))),
78  moduleLabelPatternsToSkip_(convertToRegex(ps.getParameter<std::vector<std::string>>("moduleLabelPatternsToSkip"))),
79  filterTagsEvent_(pn_!="*"),
80  filterTagsStream_(pn_!="*"),
81  collectionTagsEvent_(pn_!="*"),
82  collectionTagsStream_(pn_!="*"),
83  toc_(),
84  tags_(),
85  offset_(),
86  keys_(),
87  ids_(),
88  maskFilters_()
89 {
90  if (pn_=="@") {
92  if (tns.isAvailable()) {
93  pn_ = tns->getProcessName();
94  } else {
95  edm::LogError("TriggerSummaryProducerAOD") << "HLT Error: TriggerNamesService not available!";
96  pn_="*";
97  }
98 
103  }
104  LogDebug("TriggerSummaryProducerAOD") << "Using process name: '" << pn_ <<"'";
105 
106  filterTagsStream_.clear();
107  collectionTagsStream_.clear();
108 
109  produces<trigger::TriggerEvent>();
110 
111  auto const* pProcessName = &pn_;
114  auto productMatch = [pProcessName,&moduleLabelPatternsToSkip,&moduleLabelPatternsToMatch](edm::BranchDescription const& iBranch) -> bool {
115  if(iBranch.processName() == *pProcessName || *pProcessName == "*") {
116  auto const& label = iBranch.moduleLabel();
117  for(auto& match: moduleLabelPatternsToMatch) {
118  if(std::regex_match(label,match)) {
119  //make sure this is not in the reject list
120  for(auto& reject: moduleLabelPatternsToSkip) {
121  if(std::regex_match(label,reject)) {
122  return false;
123  }
124  }
125  return true;
126  }
127  }
128  }
129  return false;
130  };
131 
154 
162  getMETCollection_(bd);
178  });
179 }
180 
182 {
183 }
184 
185 //
186 // member functions
187 //
188 
189 namespace {
190  inline void
192 
193  using std::string;
194 
195  const char token(':');
196  const string empty;
197 
198  label=tag;
199  const string::size_type i1(label.find(token));
200  if (i1==string::npos) {
201  instance=empty;
202  process=empty;
203  } else {
204  instance=label.substr(i1+1);
205  label.resize(i1);
206  const string::size_type i2(instance.find(token));
207  if (i2==string::npos) {
208  process=empty;
209  } else {
210  process=instance.substr(i2+1);
211  instance.resize(i2);
212  }
213  }
214  }
215 }
216 
219  desc.add<std::string>("processName","@")->setComment("Process name to use when getting data. The value of '@' is used to denote the current process name.");
220  desc.add<std::vector<std::string>>("moduleLabelPatternsToMatch",std::vector<std::string>(1,"hlt*"))->setComment("glob patterns for module labels to get data.");
221  desc.add<std::vector<std::string>>("moduleLabelPatternsToSkip",std::vector<std::string>())->setComment("module labels for data products which should not be gotten.");
222  descriptions.add("triggerSummaryProducerAOD", desc);
223 }
224 
225 // ------------ method called to produce the data ------------
226 void
228 {
229  using namespace std;
230  using namespace edm;
231  using namespace reco;
232  using namespace l1extra;
233  using namespace trigger;
234  using namespace l1t;
235 
236  std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs;
238 
239  const unsigned int nfob(fobs.size());
240  LogTrace("TriggerSummaryProducerAOD") << "Number of filter objects found: " << nfob;
241 
242  string tagLabel,tagInstance,tagProcess;
243 
249  maskFilters_.clear();
250  maskFilters_.resize(nfob);
251  filterTagsEvent_.clear();
252  collectionTagsEvent_.clear();
253  unsigned int nf(0);
254  for (unsigned int ifob=0; ifob!=nfob; ++ifob) {
255  maskFilters_[ifob]=false;
256  const vector<string>& collectionTags_(fobs[ifob]->getCollectionTagsAsStrings());
257  const unsigned int ncol(collectionTags_.size());
258  if (ncol>0) {
259  nf++;
260  maskFilters_[ifob]=true;
261  const string& label (fobs[ifob].provenance()->moduleLabel());
262  const string& instance (fobs[ifob].provenance()->productInstanceName());
263  const string& process (fobs[ifob].provenance()->processName());
264  filterTagsEvent_.insert(InputTag(label,instance,process));
265  for (unsigned int icol=0; icol!=ncol; ++icol) {
266  // overwrite process name (usually not set)
267  tokenizeTag(collectionTags_[icol],tagLabel,tagInstance,tagProcess);
268  collectionTagsEvent_.insert(InputTag(tagLabel,tagInstance,pn_));
269  }
270  }
271  }
273  if (filterTagsEvent_.size()!=nf) {
274  LogError("TriggerSummaryProducerAOD")
275  << "Mismatch in number of filter tags: "
276  << filterTagsEvent_.size() << "!=" << nf ;
277  }
278 
282 
284  if (isDebugEnabled()) {
285 
287  const unsigned int nc(collectionTagsEvent_.size());
288  LogTrace("TriggerSummaryProducerAOD") << "Number of unique collections requested " << nc;
289  const InputTagSet::const_iterator cb(collectionTagsEvent_.begin());
290  const InputTagSet::const_iterator ce(collectionTagsEvent_.end());
291  for ( InputTagSet::const_iterator ci=cb; ci!=ce; ++ci) {
292  LogTrace("TriggerSummaryProducerAOD") << distance(cb,ci) << " " << ci->encode();
293  }
294  const unsigned int nf(filterTagsEvent_.size());
295  LogTrace("TriggerSummaryProducerAOD") << "Number of unique filters requested " << nf;
296  const InputTagSet::const_iterator fb(filterTagsEvent_.begin());
297  const InputTagSet::const_iterator fe(filterTagsEvent_.end());
298  for ( InputTagSet::const_iterator fi=fb; fi!=fe; ++fi) {
299  LogTrace("TriggerSummaryProducerAOD") << distance(fb,fi) << " " << fi->encode();
300  }
301 
302  }
303 
309  toc_.clear();
310  tags_.clear();
311  keys_.clear();
312  offset_.clear();
313  fillTriggerObjectCollections< RecoEcalCandidateCollection>(iEvent, getRecoEcalCandidateCollection_);
314  fillTriggerObjectCollections< ElectronCollection>(iEvent, getElectronCollection_);
315  fillTriggerObjectCollections< RecoChargedCandidateCollection>(iEvent, getRecoChargedCandidateCollection_);
316  fillTriggerObjectCollections< CaloJetCollection>(iEvent, getCaloJetCollection_);
317  fillTriggerObjectCollections< CompositeCandidateCollection>(iEvent, getCompositeCandidateCollection_);
318  fillTriggerObjectCollections< METCollection>(iEvent, getMETCollection_);
319  fillTriggerObjectCollections< CaloMETCollection>(iEvent, getCaloMETCollection_);
320  fillTriggerObjectCollections<IsolatedPixelTrackCandidateCollection>(iEvent, getIsolatedPixelTrackCandidateCollection_);
322  fillTriggerObjectCollections< L1EmParticleCollection>(iEvent, getL1EmParticleCollection_);
323  fillTriggerObjectCollections< L1MuonParticleCollection>(iEvent, getL1MuonParticleCollection_);
324  fillTriggerObjectCollections< L1JetParticleCollection>(iEvent, getL1JetParticleCollection_);
325  fillTriggerObjectCollections< L1EtMissParticleCollection>(iEvent, getL1EtMissParticleCollection_);
326  fillTriggerObjectCollections< L1HFRingsCollection>(iEvent, getL1HFRingsCollection_);
327  fillTriggerObjectCollections< MuonBxCollection>(iEvent, getL1TMuonParticleCollection_);
328  fillTriggerObjectCollections< EGammaBxCollection>(iEvent, getL1TEGammaParticleCollection_);
329  fillTriggerObjectCollections< JetBxCollection>(iEvent, getL1TJetParticleCollection_);
330  fillTriggerObjectCollections< TauBxCollection>(iEvent, getL1TTauParticleCollection_);
331  fillTriggerObjectCollections< EtSumBxCollection>(iEvent, getL1TEtSumParticleCollection_);
333  fillTriggerObjectCollections< PFJetCollection>(iEvent, getPFJetCollection_);
334  fillTriggerObjectCollections< PFTauCollection>(iEvent, getPFTauCollection_);
335  fillTriggerObjectCollections< PFMETCollection>(iEvent, getPFMETCollection_);
337  const unsigned int nk(tags_.size());
338  LogDebug("TriggerSummaryProducerAOD") << "Number of collections found: " << nk;
339  const unsigned int no(toc_.size());
340  LogDebug("TriggerSummaryProducerAOD") << "Number of physics objects found: " << no;
341 
344  unique_ptr<TriggerEvent> product(new TriggerEvent(pn_,nk,no,nf));
345 
347  product->addCollections(tags_,keys_);
348  product->addObjects(toc_);
349 
351  for (unsigned int ifob=0; ifob!=nfob; ++ifob) {
352  if (maskFilters_[ifob]) {
353  const string& label (fobs[ifob].provenance()->moduleLabel());
354  const string& instance (fobs[ifob].provenance()->productInstanceName());
355  const string& process (fobs[ifob].provenance()->processName());
356  const edm::InputTag filterTag(label,instance,process);
357  ids_.clear();
358  keys_.clear();
359  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->photonIds() ,fobs[ifob]->photonRefs());
360  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->electronIds() ,fobs[ifob]->electronRefs());
361  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->muonIds() ,fobs[ifob]->muonRefs());
362  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->jetIds() ,fobs[ifob]->jetRefs());
363  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->compositeIds(),fobs[ifob]->compositeRefs());
364  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->basemetIds() ,fobs[ifob]->basemetRefs());
365  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->calometIds() ,fobs[ifob]->calometRefs());
366  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->pixtrackIds() ,fobs[ifob]->pixtrackRefs());
367  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1emIds() ,fobs[ifob]->l1emRefs());
368  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1muonIds() ,fobs[ifob]->l1muonRefs());
369  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1jetIds() ,fobs[ifob]->l1jetRefs());
370  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1etmissIds() ,fobs[ifob]->l1etmissRefs());
371  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1hfringsIds(),fobs[ifob]->l1hfringsRefs());
372  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1tmuonIds() ,fobs[ifob]->l1tmuonRefs());
373  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1tegammaIds(),fobs[ifob]->l1tegammaRefs());
374  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1tjetIds() ,fobs[ifob]->l1tjetRefs());
375  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1ttauIds() ,fobs[ifob]->l1ttauRefs());
376  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->l1tetsumIds() ,fobs[ifob]->l1tetsumRefs());
377  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->pfjetIds() ,fobs[ifob]->pfjetRefs());
378  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->pftauIds() ,fobs[ifob]->pftauRefs());
379  fillFilterObjectMembers(iEvent,filterTag,fobs[ifob]->pfmetIds() ,fobs[ifob]->pfmetRefs());
380  product->addFilter(filterTag,ids_,keys_);
381  }
382  }
383 
384  OrphanHandle<TriggerEvent> ref = iEvent.put(std::move(product));
385  LogTrace("TriggerSummaryProducerAOD") << "Number of physics objects packed: " << ref->sizeObjects();
386  LogTrace("TriggerSummaryProducerAOD") << "Number of filter objects packed: " << ref->sizeFilters();
387 
388 }
389 
390 template <typename C>
392 
396 
397  using namespace std;
398  using namespace edm;
399  using namespace reco;
400  using namespace l1extra;
401  using namespace trigger;
402  using namespace l1t;
403 
404  vector<Handle<C> > collections;
405  getter.fillHandles(iEvent, collections);
406  const unsigned int nc(collections.size());
407 
408  for (unsigned int ic=0; ic!=nc; ++ic) {
409  const Provenance& provenance(*(collections[ic].provenance()));
410  const string& label (provenance.moduleLabel());
411  const string& instance (provenance.productInstanceName());
412  const string& process (provenance.processName());
413  const InputTag collectionTag(label,instance,process);
414 
415  if (collectionTagsEvent_.find(collectionTag)!=collectionTagsEvent_.end()) {
416  const ProductID pid(collections[ic].provenance()->productID());
417  if (offset_.find(pid)!=offset_.end()) {
418  LogError("TriggerSummaryProducerAOD") << "Duplicate pid!";
419  }
420  offset_[pid]=toc_.size();
421  const unsigned int n(collections[ic]->size());
422  for (unsigned int i=0; i!=n; ++i) {
423  fillTriggerObject( (*collections[ic])[i] );
424  }
425  tags_.push_back(collectionTag.encode());
426  keys_.push_back(toc_.size());
427  }
428 
429  }
430 }
431 
432 template <typename T>
434 
435  using namespace trigger;
436  toc_.push_back( TriggerObject(object) );
437 
438  return;
439 }
440 
442 
443  using namespace l1extra;
444  using namespace trigger;
445 
447  object.hfEtSum(L1HFRings::kRing1PosEta),
448  object.hfEtSum(L1HFRings::kRing1NegEta),
449  object.hfEtSum(L1HFRings::kRing2PosEta),
450  object.hfEtSum(L1HFRings::kRing2NegEta) ) );
452  object.hfBitCount(L1HFRings::kRing1PosEta),
453  object.hfBitCount(L1HFRings::kRing1NegEta),
454  object.hfBitCount(L1HFRings::kRing2PosEta),
455  object.hfBitCount(L1HFRings::kRing2NegEta) ) );
456 
457  return;
458 }
459 
461 
462  using namespace l1extra;
463  using namespace trigger;
464 
465  toc_.push_back( TriggerObject(object) );
466  if (object.type()==L1EtMissParticle::kMET) {
467  toc_.push_back(TriggerObject(TriggerL1ETT,object.etTotal(),0.0,0.0,0.0));
468  } else if (object.type()==L1EtMissParticle::kMHT) {
469  toc_.push_back(TriggerObject(TriggerL1HTT,object.etTotal(),0.0,0.0,0.0));
470  } else {
471  toc_.push_back(TriggerObject(0, object.etTotal(),0.0,0.0,0.0));
472  }
473 
474  return;
475 }
476 
478 
479  using namespace reco;
480  using namespace trigger;
481 
482  toc_.push_back( TriggerObject(object) );
483  toc_.push_back(TriggerObject(TriggerTET ,object.sumEt() ,0.0,0.0,0.0));
484  toc_.push_back(TriggerObject(TriggerMETSig ,object.mEtSig() ,0.0,0.0,0.0));
485  toc_.push_back(TriggerObject(TriggerELongit,object.e_longitudinal(),0.0,0.0,0.0));
486 
487  return;
488 }
489 
491 
492  using namespace reco;
493  using namespace trigger;
494 
495  toc_.push_back( TriggerObject(object) );
496  toc_.push_back(TriggerObject(TriggerTET ,object.sumEt() ,0.0,0.0,0.0));
497  toc_.push_back(TriggerObject(TriggerMETSig ,object.mEtSig() ,0.0,0.0,0.0));
498  toc_.push_back(TriggerObject(TriggerELongit,object.e_longitudinal(),0.0,0.0,0.0));
499 
500  return;
501 }
502 
504 
505  using namespace reco;
506  using namespace trigger;
507 
508  toc_.push_back( TriggerObject(object) );
509  toc_.push_back(TriggerObject(TriggerTHT ,object.sumEt() ,0.0,0.0,0.0));
510  toc_.push_back(TriggerObject(TriggerMHTSig ,object.mEtSig() ,0.0,0.0,0.0));
511  toc_.push_back(TriggerObject(TriggerHLongit,object.e_longitudinal(),0.0,0.0,0.0));
512 
513  return;
514 }
515 
516 template <typename C>
517 void TriggerSummaryProducerAOD::fillFilterObjectMembers(const edm::Event& iEvent, const edm::InputTag& tag, const trigger::Vids& ids, const std::vector<edm::Ref<C> >& refs) {
518 
522 
523  using namespace std;
524  using namespace edm;
525  using namespace reco;
526  using namespace l1extra;
527  using namespace trigger;
528 
529  if (ids.size()!=refs.size()) {
530  LogError("TriggerSummaryProducerAOD") << "Vector length is different: "
531  << ids.size() << " " << refs.size();
532  }
533 
534  const unsigned int n(min(ids.size(),refs.size()));
535  for (unsigned int i=0; i!=n; ++i) {
536  const ProductID pid(refs[i].id());
537  if (!(pid.isValid())) {
538  LogError("TriggerSummaryProducerAOD")
539  << "Iinvalid pid: " << pid
540  << " FilterTag / Key: " << tag.encode()
541  << " / " << i << "of" << n
542  << " CollectionTag / Key: "
543  << " <Unrecoverable>"
544  << " / " << refs[i].key()
545  << " CollectionType: " << typeid(C).name();
546  } else if (offset_.find(pid)==offset_.end()) {
547  const string& label(iEvent.getProvenance(pid).moduleLabel());
548  const string& instance(iEvent.getProvenance(pid).productInstanceName());
549  const string& process(iEvent.getProvenance(pid).processName());
550  LogError("TriggerSummaryProducerAOD")
551  << "Uunknown pid: " << pid
552  << " FilterTag / Key: " << tag.encode()
553  << " / " << i << "of" << n
554  << " CollectionTag / Key: "
555  << InputTag(label,instance,process).encode()
556  << " / " << refs[i].key()
557  << " CollectionType: " << typeid(C).name();
558  } else {
559  fillFilterObjectMember(offset_[pid],ids[i],refs[i]);
560  }
561  }
562  return;
563 
564 }
565 
566 template <typename C>
567 void TriggerSummaryProducerAOD::fillFilterObjectMember(const int& offset, const int& id, const edm::Ref<C> & ref) {
568 
569  keys_.push_back(offset+ref.key());
570  ids_.push_back(id);
571 
572  return;
573 }
574 
576 
577  using namespace trigger;
578 
579  if (id==TriggerL1HfBitCounts) {
580  keys_.push_back(offset+2*ref.key()+1);
581  } else { // if (ids[i]==TriggerL1HfRingEtSums) {
582  keys_.push_back(offset+2*ref.key()+0);
583  }
584  ids_.push_back(id);
585 
586  return;
587 }
588 
590 
591  using namespace trigger;
592 
593  if ( (id==TriggerL1ETT) || (id==TriggerL1HTT) ) {
594  keys_.push_back(offset+2*ref.key()+1);
595  } else {
596  keys_.push_back(offset+2*ref.key()+0);
597  }
598  ids_.push_back(id);
599 
600  return;
601 }
602 
604 
605  using namespace trigger;
606 
607  if ( (id==TriggerTHT) || (id==TriggerTET) ) {
608  keys_.push_back(offset+4*ref.key()+1);
609  } else if ( (id==TriggerMETSig) || (id==TriggerMHTSig) ) {
610  keys_.push_back(offset+4*ref.key()+2);
611  } else if ( (id==TriggerELongit) || (id==TriggerHLongit) ) {
612  keys_.push_back(offset+4*ref.key()+3);
613  } else {
614  keys_.push_back(offset+4*ref.key()+0);
615  }
616  ids_.push_back(id);
617 
618  return;
619 }
620 
622 
623  using namespace trigger;
624 
625  if ( (id==TriggerTHT) || (id==TriggerTET) ) {
626  keys_.push_back(offset+4*ref.key()+1);
627  } else if ( (id==TriggerMETSig) || (id==TriggerMHTSig) ) {
628  keys_.push_back(offset+4*ref.key()+2);
629  } else if ( (id==TriggerELongit) || (id==TriggerHLongit) ) {
630  keys_.push_back(offset+4*ref.key()+3);
631  } else {
632  keys_.push_back(offset+4*ref.key()+0);
633  }
634  ids_.push_back(id);
635 
636  return;
637 }
638 
640 
641  using namespace trigger;
642 
643  if ( (id==TriggerTHT) || (id==TriggerTET) ) {
644  keys_.push_back(offset+4*ref.key()+1);
645  } else if ( (id==TriggerMETSig) || (id==TriggerMHTSig) ) {
646  keys_.push_back(offset+4*ref.key()+2);
647  } else if ( (id==TriggerELongit) || (id==TriggerHLongit) ) {
648  keys_.push_back(offset+4*ref.key()+3);
649  } else {
650  keys_.push_back(offset+4*ref.key()+0);
651  }
652  ids_.push_back(id);
653 
654  return;
655 }
656 
658  globalCache()->collectionTagsGlobal_.insert(collectionTagsStream_.begin(),collectionTagsStream_.end());
659  globalCache()->filterTagsGlobal_.insert(filterTagsStream_.begin(),filterTagsStream_.end());
660  return;
661 }
662 
664 
665  using namespace std;
666  using namespace edm;
667  using namespace trigger;
668 
669  LogVerbatim("TriggerSummaryProducerAOD") << endl;
670  LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::globalEndJob - accumulated tags:" << endl;
671 
672  InputTagSet filterTags(false);
673  InputTagSet collectionTags(false);
674 
675  filterTags.insert(globalInputTags->filterTagsGlobal_.begin(),globalInputTags->filterTagsGlobal_.end());
676  collectionTags.insert(globalInputTags->collectionTagsGlobal_.begin(),globalInputTags->collectionTagsGlobal_.end());
677 
678  const unsigned int nc(collectionTags.size());
679  const unsigned int nf(filterTags.size());
680  LogVerbatim("TriggerSummaryProducerAOD") << " Overall number of Collections/Filters: "
681  << nc << "/" << nf << endl;
682 
683  LogVerbatim("TriggerSummaryProducerAOD") << " The collections: " << nc << endl;
684  const InputTagSet::const_iterator cb(collectionTags.begin());
685  const InputTagSet::const_iterator ce(collectionTags.end());
686  for ( InputTagSet::const_iterator ci=cb; ci!=ce; ++ci) {
687  LogVerbatim("TriggerSummaryProducerAOD") << " " << distance(cb,ci) << " " << ci->encode() << endl;
688  }
689 
690  LogVerbatim("TriggerSummaryProducerAOD") << " The filters:" << nf << endl;
691  const InputTagSet::const_iterator fb(filterTags.begin());
692  const InputTagSet::const_iterator fe(filterTags.end());
693  for ( InputTagSet::const_iterator fi=fb; fi!=fe; ++fi) {
694  LogVerbatim("TriggerSummaryProducerAOD") << " " << distance(fb,fi) << " " << fi->encode() << endl;
695  }
696 
697  LogVerbatim("TriggerSummaryProducerAOD") << "TriggerSummaryProducerAOD::endJob." << endl;
698  LogVerbatim("TriggerSummaryProducerAOD") << endl;
699 
700  return;
701 
702 }
#define LogDebug(id)
virtual void produce(edm::Event &, const edm::EventSetup &) override
type
Definition: HCALResponse.h:21
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
Definition: ProducerBase.h:71
bool isDebugEnabled()
void setComment(std::string const &value)
edm::GetterOfProducts< l1t::TauBxCollection > getL1TTauParticleCollection_
int i
Definition: DBlmapReader.cc:9
std::vector< std::regex > moduleLabelPatternsToSkip_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > getL1JetParticleCollection_
edm::GetterOfProducts< reco::IsolatedPixelTrackCandidateCollection > getIsolatedPixelTrackCandidateCollection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
edm::GetterOfProducts< reco::RecoEcalCandidateCollection > getRecoEcalCandidateCollection_
std::string const & getProcessName() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > getL1MuonParticleCollection_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
trigger::TriggerObjectCollection toc_
trigger object collection
edm::GetterOfProducts< reco::PFTauCollection > getPFTauCollection_
static PFTauRenderPlugin instance
std::vector< bool > maskFilters_
packing decision
edm::GetterOfProducts< reco::METCollection > getMETCollection_
edm::GetterOfProducts< l1t::JetBxCollection > getL1TJetParticleCollection_
std::set< edm::InputTag, OrderInputTag > InputTagSet
edm::GetterOfProducts< reco::CaloJetCollection > getCaloJetCollection_
void fillFilterObjectMember(const int &, const int &, const edm::Ref< C > &)
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > getL1EtMissParticleCollection_
key_type key() const
Accessor for product key.
Definition: Ref.h:264
tuple moduleLabelPatternsToMatch
std::vector< std::string > tags_
std::string const & processName() const
Definition: Provenance.h:52
uint16_t size_type
std::string encode() const
Definition: InputTag.cc:165
tuple result
Definition: mps_fire.py:84
edm::GetterOfProducts< reco::PFJetCollection > getPFJetCollection_
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
int iEvent
Definition: GenABIO.cc:230
edm::GetterOfProducts< reco::RecoChargedCandidateCollection > getRecoChargedCandidateCollection_
Definition: MET.h:42
edm::GetterOfProducts< l1extra::L1HFRingsCollection > getL1HFRingsCollection_
def move
Definition: eostools.py:510
std::vector< std::regex > moduleLabelPatternsToMatch_
module labels which should be avoided
bool isAvailable() const
Definition: Service.h:46
std::map< edm::ProductID, unsigned int > offset_
global map for indices into toc_: offset per input L3 collection
T min(T a, T b)
Definition: MathUtil.h:58
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void fillFilterObjectMembers(const edm::Event &, const edm::InputTag &tag, const trigger::Vids &, const std::vector< edm::Ref< C > > &)
edm::GetterOfProducts< l1t::MuonBxCollection > getL1TMuonParticleCollection_
#define LogTrace(id)
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > filterTagsGlobal_
tuple pid
Definition: sysUtil.py:22
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::string const & moduleLabel() const
Definition: Provenance.h:50
edm::GetterOfProducts< reco::CaloMETCollection > getCaloMETCollection_
edm::GetterOfProducts< reco::ElectronCollection > getElectronCollection_
InputTagSet collectionTagsEvent_
list of L3 collection tags
tuple moduleLabelPatternsToSkip
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T > > &handles) const
edm::GetterOfProducts< reco::CompositeCandidateCollection > getCompositeCandidateCollection_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getTriggerFilterObjectWithRefs_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
edm::GetterOfProducts< reco::PFMETCollection > getPFMETCollection_
void fillTriggerObjectCollections(const edm::Event &, edm::GetterOfProducts< C > &)
InputTagSet filterTagsEvent_
list of L3 filter tags
TriggerSummaryProducerAOD(const edm::ParameterSet &, const GlobalInputTags *)
bool isValid() const
Definition: ProductID.h:35
static void globalEndJob(const GlobalInputTags *)
std::string const & productInstanceName() const
Definition: Provenance.h:53
tuple process
Definition: LaserDQM_cfg.py:3
Provenance getProvenance(BranchID const &theID) const
Definition: Event.cc:81
long double T
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > collectionTagsGlobal_
edm::GetterOfProducts< l1t::EtSumBxCollection > getL1TEtSumParticleCollection_
tuple size
Write out results.
std::vector< int > Vids
edm::GetterOfProducts< l1extra::L1EmParticleCollection > getL1EmParticleCollection_
edm::GetterOfProducts< l1t::EGammaBxCollection > getL1TEGammaParticleCollection_