CMS 3D CMS Logo

TriggerSummaryProducerAOD.h
Go to the documentation of this file.
1 #ifndef HLTcore_TriggerSummaryProducerAOD_h
2 #define HLTcore_TriggerSummaryProducerAOD_h
3 
21 
25 
31 
48 
57 
58 #include <map>
59 #include <set>
60 #include <string>
61 #include <vector>
62 
63 #include <functional>
64 #include "tbb/concurrent_unordered_set.h"
65 #include <regex>
66 
67 namespace edm {
68  class EventSetup;
69 }
70 
71 namespace edm {
73 }
74 
75 //
76 // class declaration
77 //
78 
80 struct InputTagHash {
81  std::size_t operator()(const edm::InputTag& inputTag) const {
82  std::hash<std::string> Hash;
83  // bit-wise xor
84  return Hash(inputTag.label()) ^ Hash(inputTag.instance()) ^ Hash(inputTag.process());
85  }
86 };
88 public:
90  ~TriggerSummaryProducerAOD() override;
91  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
92  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
93  void endJob() override;
94 
95 private:
97  struct OrderInputTag {
99  OrderInputTag(bool ignoreProcess) : ignoreProcess_(ignoreProcess){};
100  inline bool operator()(const edm::InputTag& l, const edm::InputTag& r) const {
101  int c = l.label().compare(r.label());
102  if (0 == c) {
103  if (ignoreProcess_) {
104  return l.instance() < r.instance();
105  }
106  c = l.instance().compare(r.instance());
107  if (0 == c) {
108  return l.process() < r.process();
109  }
110  }
111  return c < 0;
112  };
113  };
114 
115  using ProductIDtoIndex = std::map<edm::ProductID, unsigned int>;
116  using InputTagSet = std::set<edm::InputTag, OrderInputTag>;
117  template <typename C>
120  std::vector<std::string>&,
121  trigger::Keys&,
122  const edm::Event&,
124  const InputTagSet&) const;
125 
126  template <typename T>
133 
134  template <typename C>
136  const edm::InputTag& tag,
137  const trigger::Vids&,
138  const std::vector<edm::Ref<C>>&,
139  const ProductIDtoIndex&,
141  trigger::Vids& oIds) const;
142 
143  template <typename C>
144  void fillFilterObjectMember(trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<C>&) const;
146  trigger::Vids& ids,
147  const int&,
148  const int&,
151  trigger::Vids& ids,
152  const int&,
153  const int&,
156  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::PFMETCollection>&) const;
158  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::CaloMETCollection>&) const;
160  trigger::Keys& keys, trigger::Vids& ids, const int&, const int&, const edm::Ref<reco::METCollection>&) const;
161 
163  const bool throw_;
167  std::vector<std::regex> moduleLabelPatternsToMatch_;
168  std::vector<std::regex> moduleLabelPatternsToSkip_;
169 
171  mutable tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> filterTagsGlobal_;
172 
174  mutable tbb::concurrent_unordered_set<edm::InputTag, InputTagHash> collectionTagsGlobal_;
175 
177  //trigger::TriggerObjectCollection toc_;
178  //std::vector<std::string> tags_;
180  //std::map<edm::ProductID, unsigned int> offset_;
181 
183  //trigger::Keys keys_;
185  //trigger::Vids ids_;
186 
188  //std::vector<bool> maskFilters_;
189 
219 };
220 #endif
edm::StreamID
Definition: StreamID.h:30
CaloJetCollection.h
PFTauFwd.h
L1HFRingsFwd.h
TriggerSummaryProducerAOD::InputTagSet
std::set< edm::InputTag, OrderInputTag > InputTagSet
Definition: TriggerSummaryProducerAOD.h:116
L1MuonParticleFwd.h
trigger::Vids
std::vector< int > Vids
Definition: TriggerTypeDefs.h:21
cond::Hash
std::string Hash
Definition: Types.h:43
TriggerSummaryProducerAOD::getElectronCollection_
edm::GetterOfProducts< reco::ElectronCollection > getElectronCollection_
Definition: TriggerSummaryProducerAOD.h:192
TriggerSummaryProducerAOD::getL1TTkEmCollection_
edm::GetterOfProducts< l1t::TkEmCollection > getL1TTkEmCollection_
Definition: TriggerSummaryProducerAOD.h:214
TriggerSummaryProducerAOD::getRecoChargedCandidateCollection_
edm::GetterOfProducts< reco::RecoChargedCandidateCollection > getRecoChargedCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:193
PFTau.h
TriggerSummaryProducerAOD::collectionTagsGlobal_
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > collectionTagsGlobal_
list of L3 collection tags
Definition: TriggerSummaryProducerAOD.h:174
TriggerSummaryProducerAOD::getCompositeCandidateCollection_
edm::GetterOfProducts< reco::CompositeCandidateCollection > getCompositeCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:195
edm
HLT enums.
Definition: AlignableModifier.h:19
TriggerSummaryProducerAOD::fillFilterObjectMembers
void fillFilterObjectMembers(const edm::Event &, const edm::InputTag &tag, const trigger::Vids &, const std::vector< edm::Ref< C >> &, const ProductIDtoIndex &, trigger::Keys &keys, trigger::Vids &oIds) const
Definition: TriggerSummaryProducerAOD.cc:593
TriggerSummaryProducerAOD::pn_
std::string pn_
process name
Definition: TriggerSummaryProducerAOD.h:165
PFJetCollection.h
GetterOfProducts.h
TriggerSummaryProducerAOD::moduleLabelPatternsToMatch_
std::vector< std::regex > moduleLabelPatternsToMatch_
module labels which should be avoided
Definition: TriggerSummaryProducerAOD.h:167
TriggerTypeDefs.h
TriggerFilterObjectWithRefs.h
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
PFMETCollection.h
TriggerSummaryProducerAOD::getL1THPSPFTauCollection_
edm::GetterOfProducts< l1t::HPSPFTauCollection > getL1THPSPFTauCollection_
Definition: TriggerSummaryProducerAOD.h:217
CaloMETFwd.h
l1extra::L1EtMissParticle
Definition: L1EtMissParticle.h:27
TriggerSummaryProducerAOD::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: TriggerSummaryProducerAOD.cc:239
edm::Ref
Definition: AssociativeIterator.h:58
TkMuon.h
CaloMETCollection.h
TriggerSummaryProducerAOD::getL1TTkElectronCollection_
edm::GetterOfProducts< l1t::TkElectronCollection > getL1TTkElectronCollection_
Definition: TriggerSummaryProducerAOD.h:213
reco::CaloMET
Definition: CaloMET.h:21
TriggerSummaryProducerAOD::getL1TTauParticleCollection_
edm::GetterOfProducts< l1t::TauBxCollection > getL1TTauParticleCollection_
Definition: TriggerSummaryProducerAOD.h:210
reco::MET
Definition: MET.h:41
TriggerSummaryProducerAOD::getIsolatedPixelTrackCandidateCollection_
edm::GetterOfProducts< reco::IsolatedPixelTrackCandidateCollection > getIsolatedPixelTrackCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:199
TriggerSummaryProducerAOD::getL1TPFTauCollection_
edm::GetterOfProducts< l1t::PFTauCollection > getL1TPFTauCollection_
Definition: TriggerSummaryProducerAOD.h:216
TriggerSummaryProducerAOD::getL1EtMissParticleCollection_
edm::GetterOfProducts< l1extra::L1EtMissParticleCollection > getL1EtMissParticleCollection_
Definition: TriggerSummaryProducerAOD.h:203
TriggerSummaryProducerAOD::OrderInputTag::ignoreProcess_
bool ignoreProcess_
Definition: TriggerSummaryProducerAOD.h:98
ProductID.h
InputTagHash
GlobalCache.
Definition: TriggerSummaryProducerAOD.h:80
TriggerSummaryProducerAOD::getCaloMETCollection_
edm::GetterOfProducts< reco::CaloMETCollection > getCaloMETCollection_
Definition: TriggerSummaryProducerAOD.h:197
TriggerSummaryProducerAOD::getL1EmParticleCollection_
edm::GetterOfProducts< l1extra::L1EmParticleCollection > getL1EmParticleCollection_
Definition: TriggerSummaryProducerAOD.h:200
TriggerSummaryProducerAOD::getL1TEtSumParticleCollection_
edm::GetterOfProducts< l1t::EtSumBxCollection > getL1TEtSumParticleCollection_
Definition: TriggerSummaryProducerAOD.h:211
l1extra::L1HFRings
Definition: L1HFRings.h:31
TriggerSummaryProducerAOD::ProductIDtoIndex
std::map< edm::ProductID, unsigned int > ProductIDtoIndex
Definition: TriggerSummaryProducerAOD.h:115
HPSPFTauFwd.h
TriggerSummaryProducerAOD::throw_
const bool throw_
throw on error
Definition: TriggerSummaryProducerAOD.h:163
edm::global::EDProducer
Definition: EDProducer.h:32
TriggerSummaryProducerAOD::getL1TJetParticleCollection_
edm::GetterOfProducts< l1t::JetBxCollection > getL1TJetParticleCollection_
Definition: TriggerSummaryProducerAOD.h:209
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
L1EmParticleFwd.h
TriggerSummaryProducerAOD::fillTriggerObjectCollections
void fillTriggerObjectCollections(trigger::TriggerObjectCollection &, ProductIDtoIndex &, std::vector< std::string > &, trigger::Keys &, const edm::Event &, const edm::GetterOfProducts< C > &, const InputTagSet &) const
Definition: TriggerSummaryProducerAOD.cc:463
TriggerSummaryProducerAOD::OrderInputTag::OrderInputTag
OrderInputTag(bool ignoreProcess)
Definition: TriggerSummaryProducerAOD.h:99
CompositeCandidateFwd.h
TriggerSummaryProducerAOD::getTriggerFilterObjectWithRefs_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getTriggerFilterObjectWithRefs_
trigger object collection
Definition: TriggerSummaryProducerAOD.h:190
reco::PFMET
Definition: PFMET.h:18
ElectronFwd.h
TriggerSummaryProducerAOD
Definition: TriggerSummaryProducerAOD.h:87
METCollection.h
L1JetParticleFwd.h
edm::ParameterSet
Definition: ParameterSet.h:47
L1EtMissParticleFwd.h
Event.h
TriggerSummaryProducerAOD::getRecoEcalCandidateCollection_
edm::GetterOfProducts< reco::RecoEcalCandidateCollection > getRecoEcalCandidateCollection_
Definition: TriggerSummaryProducerAOD.h:191
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
InputTagHash::operator()
std::size_t operator()(const edm::InputTag &inputTag) const
Definition: TriggerSummaryProducerAOD.h:81
TriggerSummaryProducerAOD::getL1TPFTrackCollection_
edm::GetterOfProducts< l1t::PFTrackCollection > getL1TPFTrackCollection_
Definition: TriggerSummaryProducerAOD.h:218
TriggerSummaryProducerAOD::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TriggerSummaryProducerAOD.cc:225
TriggerSummaryProducerAOD::TriggerSummaryProducerAOD
TriggerSummaryProducerAOD(const edm::ParameterSet &)
Definition: TriggerSummaryProducerAOD.cc:85
TriggerSummaryProducerAOD::getL1TPFJetCollection_
edm::GetterOfProducts< l1t::PFJetCollection > getL1TPFJetCollection_
Definition: TriggerSummaryProducerAOD.h:215
TriggerSummaryProducerAOD::getCaloJetCollection_
edm::GetterOfProducts< reco::CaloJetCollection > getCaloJetCollection_
Definition: TriggerSummaryProducerAOD.h:194
TriggerSummaryProducerAOD::OrderInputTag
InputTag ordering class.
Definition: TriggerSummaryProducerAOD.h:97
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
TriggerSummaryProducerAOD::getL1MuonParticleCollection_
edm::GetterOfProducts< l1extra::L1MuonParticleCollection > getL1MuonParticleCollection_
Definition: TriggerSummaryProducerAOD.h:201
TriggerSummaryProducerAOD::getL1TTkMuonCollection_
edm::GetterOfProducts< l1t::TkMuonCollection > getL1TTkMuonCollection_
Definition: TriggerSummaryProducerAOD.h:212
PFTrack.h
edm::GetterOfProducts
Definition: GetterOfProducts.h:120
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
TkEm.h
edm::EventSetup
Definition: EventSetup.h:58
TriggerSummaryProducerAOD::fillTriggerObject
void fillTriggerObject(trigger::TriggerObjectCollection &, const T &) const
Definition: TriggerSummaryProducerAOD.cc:510
TriggerSummaryProducerAOD::getL1TEGammaParticleCollection_
edm::GetterOfProducts< l1t::EGammaBxCollection > getL1TEGammaParticleCollection_
Definition: TriggerSummaryProducerAOD.h:208
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerObject.h
InputTag.h
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TriggerSummaryProducerAOD::getL1JetParticleCollection_
edm::GetterOfProducts< l1extra::L1JetParticleCollection > getL1JetParticleCollection_
Definition: TriggerSummaryProducerAOD.h:202
TkElectron.h
TriggerSummaryProducerAOD::moduleLabelPatternsToSkip_
std::vector< std::regex > moduleLabelPatternsToSkip_
Definition: TriggerSummaryProducerAOD.h:168
PFMETFwd.h
TriggerSummaryProducerAOD::filterTagsGlobal_
tbb::concurrent_unordered_set< edm::InputTag, InputTagHash > filterTagsGlobal_
list of L3 filter tags
Definition: TriggerSummaryProducerAOD.h:171
TriggerSummaryProducerAOD::getPFMETCollection_
edm::GetterOfProducts< reco::PFMETCollection > getPFMETCollection_
Definition: TriggerSummaryProducerAOD.h:198
HPSPFTau.h
Ref.h
ConfigurationDescriptions
T
long double T
Definition: Basic3DVectorLD.h:48
TriggerSummaryProducerAOD::getPFTauCollection_
edm::GetterOfProducts< reco::PFTauCollection > getPFTauCollection_
Definition: TriggerSummaryProducerAOD.h:206
METFwd.h
TriggerSummaryProducerAOD::OrderInputTag::operator()
bool operator()(const edm::InputTag &l, const edm::InputTag &r) const
Definition: TriggerSummaryProducerAOD.h:100
TriggerSummaryProducerAOD::endJob
void endJob() override
Definition: TriggerSummaryProducerAOD.cc:758
TriggerSummaryProducerAOD::getMETCollection_
edm::GetterOfProducts< reco::METCollection > getMETCollection_
Definition: TriggerSummaryProducerAOD.h:196
RecoEcalCandidateFwd.h
TriggerSummaryProducerAOD::getPFJetCollection_
edm::GetterOfProducts< reco::PFJetCollection > getPFJetCollection_
Definition: TriggerSummaryProducerAOD.h:205
TriggerSummaryProducerAOD::~TriggerSummaryProducerAOD
~TriggerSummaryProducerAOD() override
EventSetup
ParameterSet.h
TriggerSummaryProducerAOD::fillFilterObjectMember
void fillFilterObjectMember(trigger::Keys &keys, trigger::Vids &ids, const int &, const int &, const edm::Ref< C > &) const
Definition: TriggerSummaryProducerAOD.cc:653
EDProducer.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
TriggerSummaryProducerAOD::getL1TMuonParticleCollection_
edm::GetterOfProducts< l1t::MuonBxCollection > getL1TMuonParticleCollection_
Definition: TriggerSummaryProducerAOD.h:207
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
edm::Event
Definition: Event.h:73
RecoChargedCandidateFwd.h
IsolatedPixelTrackCandidateFwd.h
edm::InputTag
Definition: InputTag.h:15
TriggerSummaryProducerAOD::getL1HFRingsCollection_
edm::GetterOfProducts< l1extra::L1HFRingsCollection > getL1HFRingsCollection_
Definition: TriggerSummaryProducerAOD.h:204
PFJet.h