CMS 3D CMS Logo

HLTL1TSeed.cc
Go to the documentation of this file.
1 #include <string>
2 #include <list>
3 #include <vector>
4 #include <algorithm>
5 #include <iostream>
6 #include <sstream>
7 #include <cassert>
8 
24 
26 
27 #include "HLTL1TSeed.h"
28 
29 using namespace std;
30 
31 // constructors
33  : HLTStreamFilter(parSet),
34  //useObjectMaps_(parSet.getParameter<bool>("L1UseL1TriggerObjectMaps")),
35  m_l1SeedsLogicalExpression(parSet.getParameter<string>("L1SeedsLogicalExpression")),
36  m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag>("L1ObjectMapInputTag")),
37  m_l1GtObjectMapToken(consumes<GlobalObjectMapRecord>(m_l1GtObjectMapTag)),
38  m_l1GlobalTag(parSet.getParameter<edm::InputTag>("L1GlobalInputTag")),
39  m_l1GlobalToken(consumes<GlobalAlgBlkBxCollection>(m_l1GlobalTag)),
40  m_l1MuonCollectionsTag(parSet.getParameter<edm::InputTag>("L1MuonInputTag")), // FIX WHEN UNPACKERS ADDED
41  m_l1MuonTag(m_l1MuonCollectionsTag),
42  m_l1MuonToken(consumes<l1t::MuonBxCollection>(m_l1MuonTag)),
43  m_l1MuonShowerCollectionsTag(
44  parSet.getParameter<edm::InputTag>("L1MuonShowerInputTag")), // FIX WHEN UNPACKERS ADDED
45  m_l1MuonShowerTag(m_l1MuonShowerCollectionsTag),
46  m_l1MuonShowerToken(consumes<l1t::MuonShowerBxCollection>(m_l1MuonShowerTag)),
47  m_l1EGammaCollectionsTag(parSet.getParameter<edm::InputTag>("L1EGammaInputTag")), // FIX WHEN UNPACKERS ADDED
48  m_l1EGammaTag(m_l1EGammaCollectionsTag),
49  m_l1EGammaToken(consumes<l1t::EGammaBxCollection>(m_l1EGammaTag)),
50  m_l1JetCollectionsTag(parSet.getParameter<edm::InputTag>("L1JetInputTag")), // FIX WHEN UNPACKERS ADDED
51  m_l1JetTag(m_l1JetCollectionsTag),
52  m_l1JetToken(consumes<l1t::JetBxCollection>(m_l1JetTag)),
53  m_l1TauCollectionsTag(parSet.getParameter<edm::InputTag>("L1TauInputTag")), // FIX WHEN UNPACKERS ADDED
54  m_l1TauTag(m_l1TauCollectionsTag),
55  m_l1TauToken(consumes<l1t::TauBxCollection>(m_l1TauTag)),
56  m_l1EtSumCollectionsTag(parSet.getParameter<edm::InputTag>("L1EtSumInputTag")), // FIX WHEN UNPACKERS ADDED
57  m_l1EtSumTag(m_l1EtSumCollectionsTag),
58  m_l1EtSumToken(consumes<l1t::EtSumBxCollection>(m_l1EtSumTag)),
59  m_l1GlobalDecision(false),
60  m_isDebugEnabled(edm::isDebugEnabled()) {
61  if (m_l1SeedsLogicalExpression.empty()) {
62  throw cms::Exception("FailModule") << "\nTrying to seed with an empty L1SeedsLogicalExpression.\n" << std::endl;
63 
64  } else if (m_l1SeedsLogicalExpression != "L1GlobalDecision") {
65  // check also the logical expression - add/remove spaces if needed
67 
68  // list of required algorithms for seeding
69  // dummy values for tokenNumber and tokenResult
72  size_t l1AlgoSeedsSize = m_l1AlgoSeeds.size();
73 
74  m_l1AlgoSeedsRpn.reserve(l1AlgoSeedsSize);
75  m_l1AlgoSeedsObjType.reserve(l1AlgoSeedsSize);
76 
77  } else {
78  m_l1GlobalDecision = true;
79  }
80 }
81 
82 // destructor
84  // empty now
85 }
86 
87 // member functions
88 
92 
93  // # logical expression for the required L1 algorithms;
94  // # the algorithms are specified by name
95  // # allowed operators: "AND", "OR", "NOT", "(", ")"
96  // #
97  // # by convention, "L1GlobalDecision" logical expression means global decision
98  desc.add<string>("L1SeedsLogicalExpression", "");
99  desc.add<edm::InputTag>("L1ObjectMapInputTag", edm::InputTag("hltGtStage2ObjectMap"));
100  desc.add<edm::InputTag>("L1GlobalInputTag", edm::InputTag("hltGtStage2Digis"));
101  desc.add<edm::InputTag>("L1MuonInputTag", edm::InputTag("hltGtStage2Digis:Muon"));
102  desc.add<edm::InputTag>("L1MuonShowerInputTag", edm::InputTag("hltGtStage2Digis:MuonShower"));
103  desc.add<edm::InputTag>("L1EGammaInputTag", edm::InputTag("hltGtStage2Digis:EGamma"));
104  desc.add<edm::InputTag>("L1JetInputTag", edm::InputTag("hltGtStage2Digis:Jet"));
105  desc.add<edm::InputTag>("L1TauInputTag", edm::InputTag("hltGtStage2Digis:Tau"));
106  desc.add<edm::InputTag>("L1EtSumInputTag", edm::InputTag("hltGtStage2Digis:EtSum"));
107  descriptions.add("hltL1TSeed", desc);
108 }
109 
111  const edm::EventSetup& evSetup,
112  trigger::TriggerFilterObjectWithRefs& filterproduct) {
113  bool rc = false;
114 
115  // the filter object
116  if (saveTags()) {
117  // muons
118  filterproduct.addCollectionTag(m_l1MuonTag);
119 
120  // muon showers
121  filterproduct.addCollectionTag(m_l1MuonShowerTag);
122 
123  // egamma
124  filterproduct.addCollectionTag(m_l1EGammaTag);
125 
126  // jet
127  filterproduct.addCollectionTag(m_l1JetTag);
128 
129  // tau
130  filterproduct.addCollectionTag(m_l1TauTag);
131 
132  // etsum
133  filterproduct.addCollectionTag(m_l1EtSumTag);
134  }
135 
136  // Get all the seeding from iEvent (i.e. L1TriggerObjectMapRecord)
137  //
138  rc = seedsL1TriggerObjectMaps(iEvent, filterproduct);
139 
140  if (m_isDebugEnabled) {
141  dumpTriggerFilterObjectWithRefs(filterproduct);
142  }
143 
144  return rc;
145 }
146 
147 // detailed print of filter content
149  LogTrace("HLTL1TSeed") << "\nHLTL1TSeed::hltFilter "
150  << "\n Dump TriggerFilterObjectWithRefs\n"
151  << endl;
152 
153  vector<l1t::MuonRef> seedsL1Mu;
154  filterproduct.getObjects(trigger::TriggerL1Mu, seedsL1Mu);
155  const size_t sizeSeedsL1Mu = seedsL1Mu.size();
156 
157  LogTrace("HLTL1TSeed") << "\n HLTL1TSeed: seed logical expression = " << m_l1SeedsLogicalExpression << endl;
158 
159  LogTrace("HLTL1TSeed") << "\n L1Mu seeds: " << sizeSeedsL1Mu << endl << endl;
160 
161  for (size_t i = 0; i != sizeSeedsL1Mu; i++) {
162  l1t::MuonRef obj = l1t::MuonRef(seedsL1Mu[i]);
163 
164  LogTrace("HLTL1TSeed") << "\tL1Mu "
165  << "\t"
166  << "q = "
167  << obj->hwCharge() // TEMP get hwCharge insead of charge which is not yet set NEED FIX.
168  << "\t"
169  << "pt = " << obj->pt() << "\t"
170  << "eta = " << obj->eta() << "\t"
171  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
172  }
173 
174  vector<l1t::MuonShowerRef> seedsL1MuShower;
175  filterproduct.getObjects(trigger::TriggerL1MuShower, seedsL1MuShower);
176  const size_t sizeSeedsL1MuShower = seedsL1MuShower.size();
177 
178  LogTrace("HLTL1TSeed") << "\n HLTL1TSeed: seed logical expression = " << m_l1SeedsLogicalExpression << endl;
179 
180  LogTrace("HLTL1TSeed") << "\n L1MuShower seeds: " << sizeSeedsL1MuShower << endl << endl;
181 
182  for (size_t i = 0; i != sizeSeedsL1MuShower; i++) {
183  l1t::MuonShowerRef obj = l1t::MuonShowerRef(seedsL1MuShower[i]);
184 
185  LogTrace("HLTL1TSeed") << "\tL1MuShower "
186  << "\t"
187  << "pt = " << obj->pt() << "\t"
188  << "eta = " << obj->eta() << "\t"
189  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
190  }
191 
192  vector<l1t::EGammaRef> seedsL1EG;
193  filterproduct.getObjects(trigger::TriggerL1EG, seedsL1EG);
194  const size_t sizeSeedsL1EG = seedsL1EG.size();
195 
196  LogTrace("HLTL1TSeed") << "\n L1EG seeds: " << sizeSeedsL1EG << endl << endl;
197 
198  for (size_t i = 0; i != sizeSeedsL1EG; i++) {
199  l1t::EGammaRef obj = l1t::EGammaRef(seedsL1EG[i]);
200 
201  LogTrace("HLTL1TSeed") << "\tL1EG "
202  << "\t"
203  << "pt = " << obj->pt() << "\t"
204  << "eta = " << obj->eta() << "\t"
205  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
206  }
207 
208  vector<l1t::JetRef> seedsL1Jet;
209  filterproduct.getObjects(trigger::TriggerL1Jet, seedsL1Jet);
210  const size_t sizeSeedsL1Jet = seedsL1Jet.size();
211 
212  LogTrace("HLTL1TSeed") << "\n L1Jet seeds: " << sizeSeedsL1Jet << endl << endl;
213 
214  for (size_t i = 0; i != sizeSeedsL1Jet; i++) {
215  l1t::JetRef obj = l1t::JetRef(seedsL1Jet[i]);
216 
217  LogTrace("HLTL1TSeed") << "\tL1Jet "
218  << "\t"
219  << "pt = " << obj->pt() << "\t"
220  << "eta = " << obj->eta() << "\t"
221  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
222  }
223 
224  vector<l1t::TauRef> seedsL1Tau;
225  filterproduct.getObjects(trigger::TriggerL1Tau, seedsL1Tau);
226  const size_t sizeSeedsL1Tau = seedsL1Tau.size();
227 
228  LogTrace("HLTL1TSeed") << "\n L1Tau seeds: " << sizeSeedsL1Tau << endl << endl;
229 
230  for (size_t i = 0; i != sizeSeedsL1Tau; i++) {
231  l1t::TauRef obj = l1t::TauRef(seedsL1Tau[i]);
232 
233  LogTrace("HLTL1TSeed") << "\tL1Tau "
234  << "\t"
235  << "pt = " << obj->pt() << "\t"
236  << "eta = " << obj->eta() << "\t"
237  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
238  }
239 
240  vector<l1t::EtSumRef> seedsL1EtSumETT;
241  filterproduct.getObjects(trigger::TriggerL1ETT, seedsL1EtSumETT);
242  const size_t sizeSeedsL1EtSumETT = seedsL1EtSumETT.size();
243  LogTrace("HLTL1TSeed") << "\n L1EtSum ETT seeds: " << sizeSeedsL1EtSumETT << endl << endl;
244 
245  for (size_t i = 0; i != sizeSeedsL1EtSumETT; i++) {
246  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumETT[i]);
247 
248  LogTrace("HLTL1TSeed") << "\tL1EtSum ETT"
249  << "\t"
250  << "pt = " << obj->pt() << "\t"
251  << "eta = " << obj->eta() << "\t"
252  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
253  }
254 
255  vector<l1t::EtSumRef> seedsL1EtSumHTT;
256  filterproduct.getObjects(trigger::TriggerL1HTT, seedsL1EtSumHTT);
257  const size_t sizeSeedsL1EtSumHTT = seedsL1EtSumHTT.size();
258  LogTrace("HLTL1TSeed") << "\n L1EtSum HTT seeds: " << sizeSeedsL1EtSumHTT << endl << endl;
259 
260  for (size_t i = 0; i != sizeSeedsL1EtSumHTT; i++) {
261  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumHTT[i]);
262 
263  LogTrace("HLTL1TSeed") << "\tL1EtSum HTT"
264  << "\t"
265  << "pt = " << obj->pt() << "\t"
266  << "eta = " << obj->eta() << "\t"
267  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
268  }
269 
270  vector<l1t::EtSumRef> seedsL1EtSumETM;
271  filterproduct.getObjects(trigger::TriggerL1ETM, seedsL1EtSumETM);
272  const size_t sizeSeedsL1EtSumETM = seedsL1EtSumETM.size();
273  LogTrace("HLTL1TSeed") << "\n L1EtSum ETM seeds: " << sizeSeedsL1EtSumETM << endl << endl;
274 
275  for (size_t i = 0; i != sizeSeedsL1EtSumETM; i++) {
276  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumETM[i]);
277 
278  LogTrace("HLTL1TSeed") << "\tL1EtSum ETM"
279  << "\t"
280  << "pt = " << obj->pt() << "\t"
281  << "eta = " << obj->eta() << "\t"
282  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
283  }
284 
285  vector<l1t::EtSumRef> seedsL1EtSumETMHF;
286  filterproduct.getObjects(trigger::TriggerL1ETMHF, seedsL1EtSumETMHF);
287  const size_t sizeSeedsL1EtSumETMHF = seedsL1EtSumETMHF.size();
288  LogTrace("HLTL1TSeed") << "\n L1EtSum ETMHF seeds: " << sizeSeedsL1EtSumETMHF << endl << endl;
289 
290  for (size_t i = 0; i != sizeSeedsL1EtSumETMHF; i++) {
291  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumETMHF[i]);
292 
293  LogTrace("HLTL1TSeed") << "\tL1EtSum ETMHF"
294  << "\t"
295  << "pt = " << obj->pt() << "\t"
296  << "eta = " << obj->eta() << "\t"
297  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
298  }
299 
300  vector<l1t::EtSumRef> seedsL1EtSumHTM;
301  filterproduct.getObjects(trigger::TriggerL1HTM, seedsL1EtSumHTM);
302  const size_t sizeSeedsL1EtSumHTM = seedsL1EtSumHTM.size();
303  LogTrace("HLTL1TSeed") << "\n L1EtSum HTM seeds: " << sizeSeedsL1EtSumHTM << endl << endl;
304 
305  for (size_t i = 0; i != sizeSeedsL1EtSumHTM; i++) {
306  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumHTM[i]);
307 
308  LogTrace("HLTL1TSeed") << "\tL1EtSum HTM"
309  << "\t"
310  << "pt = " << obj->pt() << "\t"
311  << "eta = " << obj->eta() << "\t"
312  << "phi = " << obj->phi(); //<< "\t" << "BX = " << obj->bx();
313  }
314 
315  vector<l1t::EtSumRef> seedsL1EtSumCentrality;
316  filterproduct.getObjects(trigger::TriggerL1Centrality, seedsL1EtSumCentrality);
317  const size_t sizeSeedsL1EtSumCentrality = seedsL1EtSumCentrality.size();
318  LogTrace("HLTL1TSeed") << "\n L1EtSum Centrality seeds: " << sizeSeedsL1EtSumCentrality << endl << endl;
319 
320  for (size_t i = 0; i != sizeSeedsL1EtSumCentrality; i++) {
321  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumCentrality[i]);
322 
323  LogTrace("HLTL1TSeed") << "\tL1EtSum Centrality Bits: " << std::bitset<8>(obj->hwPt())
324  << " (hwPt = " << obj->hwPt() << ")";
325  }
326 
327  vector<l1t::EtSumRef> seedsL1EtSumMinBiasHFP0;
328  filterproduct.getObjects(trigger::TriggerL1MinBiasHFP0, seedsL1EtSumMinBiasHFP0);
329  const size_t sizeSeedsL1EtSumMinBiasHFP0 = seedsL1EtSumMinBiasHFP0.size();
330  LogTrace("HLTL1TSeed") << "\n L1EtSum MinBiasHFP0 seeds: " << sizeSeedsL1EtSumMinBiasHFP0 << endl << endl;
331 
332  for (size_t i = 0; i != sizeSeedsL1EtSumMinBiasHFP0; i++) {
333  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumMinBiasHFP0[i]);
334 
335  LogTrace("HLTL1TSeed") << "\tL1EtSum MinBiasHFP0: hwPt = " << obj->hwPt();
336  }
337 
338  vector<l1t::EtSumRef> seedsL1EtSumMinBiasHFM0;
339  filterproduct.getObjects(trigger::TriggerL1MinBiasHFM0, seedsL1EtSumMinBiasHFM0);
340  const size_t sizeSeedsL1EtSumMinBiasHFM0 = seedsL1EtSumMinBiasHFM0.size();
341  LogTrace("HLTL1TSeed") << "\n L1EtSum MinBiasHFM0 seeds: " << sizeSeedsL1EtSumMinBiasHFM0 << endl << endl;
342 
343  for (size_t i = 0; i != sizeSeedsL1EtSumMinBiasHFM0; i++) {
344  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumMinBiasHFM0[i]);
345 
346  LogTrace("HLTL1TSeed") << "\tL1EtSum MinBiasHFM0: hwPt = " << obj->hwPt();
347  }
348 
349  vector<l1t::EtSumRef> seedsL1EtSumMinBiasHFP1;
350  filterproduct.getObjects(trigger::TriggerL1MinBiasHFP1, seedsL1EtSumMinBiasHFP1);
351  const size_t sizeSeedsL1EtSumMinBiasHFP1 = seedsL1EtSumMinBiasHFP1.size();
352  LogTrace("HLTL1TSeed") << "\n L1EtSum MinBiasHFP1 seeds: " << sizeSeedsL1EtSumMinBiasHFP1 << endl << endl;
353 
354  for (size_t i = 0; i != sizeSeedsL1EtSumMinBiasHFP1; i++) {
355  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumMinBiasHFP1[i]);
356 
357  LogTrace("HLTL1TSeed") << "\tL1EtSum MinBiasHFP1: hwPt = " << obj->hwPt();
358  }
359 
360  vector<l1t::EtSumRef> seedsL1EtSumMinBiasHFM1;
361  filterproduct.getObjects(trigger::TriggerL1MinBiasHFM1, seedsL1EtSumMinBiasHFM1);
362  const size_t sizeSeedsL1EtSumMinBiasHFM1 = seedsL1EtSumMinBiasHFM1.size();
363  LogTrace("HLTL1TSeed") << "\n L1EtSum MinBiasHFM1 seeds: " << sizeSeedsL1EtSumMinBiasHFM1 << endl << endl;
364 
365  for (size_t i = 0; i != sizeSeedsL1EtSumMinBiasHFM1; i++) {
366  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumMinBiasHFM1[i]);
367 
368  LogTrace("HLTL1TSeed") << "\tL1EtSum MinBiasHFM1: hwPt = " << obj->hwPt();
369  }
370 
371  vector<l1t::EtSumRef> seedsL1EtSumTowerCount;
372  filterproduct.getObjects(trigger::TriggerL1TowerCount, seedsL1EtSumTowerCount);
373  const size_t sizeSeedsL1EtSumTowerCount = seedsL1EtSumTowerCount.size();
374  LogTrace("HLTL1TSeed") << "\n L1EtSum TowerCount seeds: " << sizeSeedsL1EtSumTowerCount << endl << endl;
375 
376  for (size_t i = 0; i != sizeSeedsL1EtSumTowerCount; i++) {
377  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumTowerCount[i]);
378 
379  LogTrace("HLTL1TSeed") << "\tL1EtSum TowerCount: hwPt = " << obj->hwPt();
380  }
381 
382  vector<l1t::EtSumRef> seedsL1EtSumAsymEt;
383  filterproduct.getObjects(trigger::TriggerL1AsymEt, seedsL1EtSumAsymEt);
384  const size_t sizeSeedsL1EtSumAsymEt = seedsL1EtSumAsymEt.size();
385  LogTrace("HLTL1TSeed") << "\n L1EtSum AsymEt seeds: " << sizeSeedsL1EtSumAsymEt << endl << endl;
386 
387  for (size_t i = 0; i != sizeSeedsL1EtSumAsymEt; i++) {
388  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumAsymEt[i]);
389 
390  LogTrace("HLTL1TSeed") << "\tL1EtSum AsymEt: hwPt = " << obj->hwPt();
391  }
392 
393  vector<l1t::EtSumRef> seedsL1EtSumAsymHt;
394  filterproduct.getObjects(trigger::TriggerL1AsymHt, seedsL1EtSumAsymHt);
395  const size_t sizeSeedsL1EtSumAsymHt = seedsL1EtSumAsymHt.size();
396  LogTrace("HLTL1TSeed") << "\n L1EtSum AsymHt seeds: " << sizeSeedsL1EtSumAsymHt << endl << endl;
397 
398  for (size_t i = 0; i != sizeSeedsL1EtSumAsymHt; i++) {
399  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumAsymHt[i]);
400 
401  LogTrace("HLTL1TSeed") << "\tL1EtSum AsymHt: hwPt = " << obj->hwPt();
402  }
403 
404  vector<l1t::EtSumRef> seedsL1EtSumAsymEtHF;
405  filterproduct.getObjects(trigger::TriggerL1AsymEtHF, seedsL1EtSumAsymEtHF);
406  const size_t sizeSeedsL1EtSumAsymEtHF = seedsL1EtSumAsymEtHF.size();
407  LogTrace("HLTL1TSeed") << "\n L1EtSum AsymEtHF seeds: " << sizeSeedsL1EtSumAsymEtHF << endl << endl;
408 
409  for (size_t i = 0; i != sizeSeedsL1EtSumAsymEtHF; i++) {
410  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumAsymEtHF[i]);
411 
412  LogTrace("HLTL1TSeed") << "\tL1EtSum AsymEtHF: hwPt = " << obj->hwPt();
413  }
414 
415  vector<l1t::EtSumRef> seedsL1EtSumAsymHtHF;
416  filterproduct.getObjects(trigger::TriggerL1AsymHtHF, seedsL1EtSumAsymHtHF);
417  const size_t sizeSeedsL1EtSumAsymHtHF = seedsL1EtSumAsymHtHF.size();
418  LogTrace("HLTL1TSeed") << "\n L1EtSum AsymHtHF seeds: " << sizeSeedsL1EtSumAsymHtHF << endl << endl;
419 
420  for (size_t i = 0; i != sizeSeedsL1EtSumAsymHtHF; i++) {
421  l1t::EtSumRef obj = l1t::EtSumRef(seedsL1EtSumAsymHtHF[i]);
422 
423  LogTrace("HLTL1TSeed") << "\tL1EtSum AsymHtHF: hwPt = " << obj->hwPt();
424  }
425 
426  LogTrace("HLTL1TSeed") << " \n\n" << endl;
427 }
428 
429 // seeding is done via L1 trigger object maps, considering the objects which fired in L1
431  // Two GT objects are obtained from the Event: (1) the unpacked GT and (2) the emulated GT.
432  // Return value of the function is the score of seeding logical expression, evaluated using (1).
433  // Seeding is performed (per l1_algo) if ACCEPT both in (1) and (2). Seed objects are identified
434  // and only available from ObjectMaps created in (2).
435 
436  // define index lists for all particle types
437 
438  std::list<int> listMuon;
439  std::list<int> listMuonShower;
440 
441  std::list<int> listEG;
442 
443  std::list<int> listJet;
444  std::list<int> listTau;
445 
446  std::list<int> listETM;
447  std::list<int> listETT;
448  std::list<int> listHTT;
449  std::list<int> listHTM;
450  std::list<int> listETMHF;
451 
452  std::list<int> listJetCounts;
453 
454  std::list<int> listCentrality;
455  std::list<int> listMinBiasHFP0;
456  std::list<int> listMinBiasHFM0;
457  std::list<int> listMinBiasHFP1;
458  std::list<int> listMinBiasHFM1;
459  std::list<int> listTotalEtEm;
460  std::list<int> listMissingEtHF;
461  std::list<int> listTowerCount;
462  std::list<int> listAsymEt;
463  std::list<int> listAsymHt;
464  std::list<int> listAsymEtHF;
465  std::list<int> listAsymHtHF;
466 
467  // get handle to unpacked GT
469  iEvent.getByToken(m_l1GlobalToken, uGtAlgoBlocks);
470 
471  if (!uGtAlgoBlocks.isValid()) {
472  edm::LogWarning("HLTL1TSeed") << " Warning: GlobalAlgBlkBxCollection with input tag " << m_l1GlobalTag
473  << " requested in configuration, but not found in the event." << std::endl;
474 
475  return false;
476  }
477 
478  // check size
479  if (uGtAlgoBlocks->isEmpty(0)) {
480  edm::LogWarning("HLTL1TSeed") << " Warning: GlobalAlgBlkBxCollection with input tag " << m_l1GlobalTag
481  << " is empty for BX=0.";
482  return false;
483  }
484 
485  // get handle to object maps from emulator (one object map per algorithm)
486  edm::Handle<GlobalObjectMapRecord> gtObjectMapRecord;
487  iEvent.getByToken(m_l1GtObjectMapToken, gtObjectMapRecord);
488 
489  if (!gtObjectMapRecord.isValid()) {
490  edm::LogWarning("HLTL1TSeed") << " Warning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
491  << " requested in configuration, but not found in the event." << std::endl;
492 
493  return false;
494  }
495 
496  if (m_isDebugEnabled) {
497  const std::vector<GlobalObjectMap>& objMaps = gtObjectMapRecord->gtObjectMap();
498 
499  LogTrace("HLTL1TSeed") << "\nHLTL1Seed"
500  << "\n--------------------------------------------------------------------------------------"
501  "-------------------------------";
502 
503  LogTrace("HLTL1TSeed")
504  << "\n\tAlgorithms in L1TriggerObjectMapRecord and GT results ( emulated | initial | prescaled | final ) "
505  << endl;
506 
507  LogTrace("HLTL1TSeed") << "\n\tmap"
508  << "\tAlgoBit" << std::setw(40) << "algoName"
509  << "\t (emul|ini|pre|fin)" << endl;
510 
511  LogTrace("HLTL1TSeed") << "----------------------------------------------------------------------------------------"
512  "-----------------------------";
513 
514  for (size_t imap = 0; imap < objMaps.size(); imap++) {
515  int bit = objMaps[imap].algoBitNumber(); // same as bit from L1T Menu
516 
517  int emulDecision = objMaps[imap].algoGtlResult();
518 
519  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
520  int initDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionInitial(bit);
521  int presDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionInterm(bit);
522  int finlDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionFinal(bit);
523 
524  if (emulDecision != initDecision) {
525  LogTrace("HLTL1TSeed") << "L1T decision (emulated vs. unpacked initial) is not the same:"
526  << "\n\tbit = " << std::setw(3) << bit << std::setw(40) << objMaps[imap].algoName()
527  << "\t emulated decision = " << emulDecision
528  << "\t unpacked initial decision = " << initDecision
529  << "\nThis should not happen. Include the L1TGtEmulCompare module in the sequence."
530  << endl;
531  }
532 
533  LogTrace("HLTL1TSeed") << "\t" << std::setw(3) << imap << "\tbit = " << std::setw(3) << bit << std::setw(40)
534  << objMaps[imap].algoName() << "\t ( " << emulDecision << " | " << initDecision << " | "
535  << presDecision << " | " << finlDecision << " ) ";
536  }
537  LogTrace("HLTL1TSeed") << endl;
538  }
539 
540  // Filter decision in case of "L1GlobalDecision" logical expression.
541  // By convention, it means global decision.
542  // /////////////////////////////////////////////////////////////////
543  if (m_l1GlobalDecision) {
544  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
545  return (uGtAlgoBlocks->at(0, 0)).getFinalOR();
546  }
547 
548  // Update/Reset m_l1AlgoLogicParser by reseting token result
549  // /////////////////////////////////////////////////////////
550  std::vector<GlobalLogicParser::OperandToken>& algOpTokenVector = m_l1AlgoLogicParser.operandTokenVector();
551 
552  for (auto& i : algOpTokenVector) {
553  // rest token result
554  //
555  i.tokenResult = false;
556  }
557 
558  // Update m_l1AlgoLogicParser and store emulator results for algOpTokens
559  // /////////////////////////////////////////////////////////////////////
560  for (auto& i : algOpTokenVector) {
561  std::string algoName = i.tokenName;
562 
563  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoName);
564 
565  if (objMap == nullptr) {
566  throw cms::Exception("FailModule")
567  << "\nAlgorithm " << algoName
568  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
569  << "Please check if algorithm " << algoName << " is present in the L1 menu\n"
570  << std::endl;
571 
572  } else {
573  //(algOpTokenVector[i]).tokenResult = objMap->algoGtlResult();
574 
575  int bit = objMap->algoBitNumber();
576  bool finalAlgoDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionFinal(bit);
577  i.tokenResult = finalAlgoDecision;
578  }
579  }
580 
581  // Filter decision
582  // ///////////////
583  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
584 
585  if (m_isDebugEnabled) {
586  LogTrace("HLTL1TSeed") << "\nHLTL1TSeed: l1SeedsLogicalExpression (names) = '" << m_l1SeedsLogicalExpression << "'"
587  << "\n Result for logical expression after update of algOpTokens: " << seedsResult << "\n"
588  << std::endl;
589  }
590 
593 
594  for (std::vector<GlobalLogicParser::OperandToken>::const_iterator itSeed = m_l1AlgoSeeds.begin();
595  itSeed != m_l1AlgoSeeds.end();
596  ++itSeed) {
597  std::string algoSeedName = (*itSeed).tokenName;
598 
599  LogTrace("HLTL1TSeed") << "\n ---------------- algo seed name = " << algoSeedName << endl;
600 
601  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoSeedName);
602 
603  if (objMap == nullptr) {
604  // Should not get here
605  //
606  throw cms::Exception("FailModule")
607  << "\nAlgorithm " << algoSeedName
608  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
609  << "Please check if algorithm " << algoSeedName << " is present in the L1 menu\n"
610  << std::endl;
611  }
612 
613  int algoSeedBitNumber = objMap->algoBitNumber();
614  bool algoSeedResult = objMap->algoGtlResult();
615 
616  // unpacked GT results: uGtAlgoBlock has decisions initial, prescaled, and final after masks
617  bool algoSeedResultMaskAndPresc = uGtAlgoBlocks->at(0, 0).getAlgoDecisionFinal(algoSeedBitNumber);
618 
619  LogTrace("HLTL1TSeed") << "\n\tAlgo seed " << algoSeedName << " result emulated | final = " << algoSeedResult
620  << " | " << algoSeedResultMaskAndPresc << endl;
621 
624  if (!algoSeedResultMaskAndPresc)
625  continue;
626 
628  // This should not happen if the emulated and unpacked GT are consistent
630  if (!algoSeedResult)
631  continue;
632 
633  const std::vector<GlobalLogicParser::OperandToken>& opTokenVecObjMap = objMap->operandTokenVector();
634  const std::vector<L1TObjectTypeInCond>& condObjTypeVec = objMap->objectTypeVector();
635  const std::vector<CombinationsInCond>& condCombinations = objMap->combinationVector();
636 
637  LogTrace("HLTL1TSeed") << "\n\talgoName =" << objMap->algoName() << "\talgoBitNumber = " << algoSeedBitNumber
638  << "\talgoGtlResult = " << algoSeedResult << endl
639  << endl;
640 
641  if (opTokenVecObjMap.size() != condObjTypeVec.size()) {
642  edm::LogWarning("HLTL1TSeed")
643  << "\nWarning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
644  << "\nhas object map for bit number " << algoSeedBitNumber
645  << " which contains different size vectors of operand tokens and of condition object types!" << std::endl;
646 
647  assert(opTokenVecObjMap.size() == condObjTypeVec.size());
648  }
649 
650  if (opTokenVecObjMap.size() != condCombinations.size()) {
651  edm::LogWarning("HLTL1TSeed")
652  << "\nWarning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
653  << "\nhas object map for bit number " << algoSeedBitNumber
654  << " which contains different size vectors of operand tokens and of condition object combinations!"
655  << std::endl;
656 
657  assert(opTokenVecObjMap.size() == condCombinations.size());
658  }
659 
660  // operands are conditions of L1 algo
661  //
662  for (size_t condNumber = 0; condNumber < opTokenVecObjMap.size(); condNumber++) {
663  std::vector<l1t::GlobalObject> condObjType = condObjTypeVec[condNumber];
664 
665  for (auto& jOb : condObjType) {
666  LogTrace("HLTL1TSeed") << setw(15) << "\tcondObjType = " << jOb << endl;
667  }
668 
669  const std::string condName = opTokenVecObjMap[condNumber].tokenName;
670  bool condResult = opTokenVecObjMap[condNumber].tokenResult;
671 
672  // only procede for conditions that passed
673  //
674  if (!condResult) {
675  continue;
676  }
677 
678  // loop over combinations for a given condition
679  //
680  const CombinationsInCond* condComb = objMap->getCombinationsInCond(condNumber);
681 
682  LogTrace("HLTL1TSeed") << setw(15) << "\tcondCombinations = " << condComb->size() << endl;
683 
684  for (auto const& itComb : (*condComb)) {
685  LogTrace("HLTL1TSeed") << setw(15) << "\tnew combination" << endl;
686 
687  // loop over objects in a combination for a given condition
688  //
689  for (auto itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
690  // in case of object-less triggers (e.g. L1_ZeroBias) condObjType vector is empty, so don't seed!
691  //
692  if (condObjType.empty()) {
693  LogTrace("HLTL1TSeed")
694  << "\talgoName = " << objMap->algoName()
695  << " is object-less L1 algorithm, so do not attempt to store any objects to the list of seeds.\n"
696  << std::endl;
697  continue;
698  }
699 
700  // the index of the object type is the same as the index of the object
701  size_t iType = std::distance(itComb.begin(), itObject);
702 
703  // get object type and push indices on the list
704  //
705  const l1t::GlobalObject objTypeVal = condObjType.at(iType);
706 
707  LogTrace("HLTL1TSeed") << "\tAdd object of type " << objTypeVal << " and index " << (*itObject)
708  << " to the seed list." << std::endl;
709 
710  // THESE OBJECT CASES ARE CURRENTLY MISSING:
711  //gtMinBias,
712  //gtExternal,
713  //ObjNull
714 
715  switch (objTypeVal) {
716  case l1t::gtMu: {
717  listMuon.push_back(*itObject);
718  } break;
719  case l1t::gtMuShower: {
720  listMuonShower.push_back(*itObject);
721  } break;
722  case l1t::gtEG: {
723  listEG.push_back(*itObject);
724  } break;
725  case l1t::gtJet: {
726  listJet.push_back(*itObject);
727  } break;
728  case l1t::gtTau: {
729  listTau.push_back(*itObject);
730  } break;
731  case l1t::gtETM: {
732  listETM.push_back(*itObject);
733  } break;
734  case l1t::gtETT: {
735  listETT.push_back(*itObject);
736  } break;
737  case l1t::gtHTT: {
738  listHTT.push_back(*itObject);
739  } break;
740  case l1t::gtHTM: {
741  listHTM.push_back(*itObject);
742  } break;
743  case l1t::gtETMHF: {
744  listETMHF.push_back(*itObject);
745  } break;
746  case l1t::gtTowerCount: {
747  listTowerCount.push_back(*itObject);
748  } break;
749  case l1t::gtMinBiasHFP0: {
750  listMinBiasHFP0.push_back(*itObject);
751  } break;
752  case l1t::gtMinBiasHFM0: {
753  listMinBiasHFM0.push_back(*itObject);
754  } break;
755  case l1t::gtMinBiasHFP1: {
756  listMinBiasHFP1.push_back(*itObject);
757  } break;
758  case l1t::gtMinBiasHFM1: {
759  listMinBiasHFM1.push_back(*itObject);
760  } break;
761  case l1t::gtETTem: {
762  listTotalEtEm.push_back(*itObject);
763  } break;
764  case l1t::gtAsymmetryEt: {
765  listAsymEt.push_back(*itObject);
766  } break;
767  case l1t::gtAsymmetryHt: {
768  listAsymHt.push_back(*itObject);
769  } break;
770  case l1t::gtAsymmetryEtHF: {
771  listAsymEtHF.push_back(*itObject);
772  } break;
773  case l1t::gtAsymmetryHtHF: {
774  listAsymHtHF.push_back(*itObject);
775  } break;
776  case l1t::gtCentrality0:
777  case l1t::gtCentrality1:
778  case l1t::gtCentrality2:
779  case l1t::gtCentrality3:
780  case l1t::gtCentrality4:
781  case l1t::gtCentrality5:
782  case l1t::gtCentrality6:
783  case l1t::gtCentrality7: {
784  listCentrality.push_back(*itObject);
785  } break;
786 
787  //case JetCounts: {
788  // listJetCounts.push_back(*itObject);
789  //}
790 
791  break;
792  default: {
793  // should not arrive here
794 
795  LogTrace("HLTL1TSeed") << "\n HLTL1TSeed::hltFilter "
796  << "\n Unknown object of type " << objTypeVal << " and index " << (*itObject)
797  << " in the seed list." << std::endl;
798  } break;
799 
800  } // end switch objTypeVal
801 
802  } // end for itObj
803 
804  } // end for itComb
805 
806  } // end for condition
807 
808  } // end for itSeed
809 
810  // eliminate duplicates
811 
812  listMuon.sort();
813  listMuon.unique();
814 
815  listMuonShower.sort();
816  listMuonShower.unique();
817 
818  listEG.sort();
819  listEG.unique();
820 
821  listJet.sort();
822  listJet.unique();
823 
824  listTau.sort();
825  listTau.unique();
826 
827  listETM.sort();
828  listETM.unique();
829 
830  listETT.sort();
831  listETT.unique();
832 
833  listHTT.sort();
834  listHTT.unique();
835 
836  listHTM.sort();
837  listHTM.unique();
838 
839  listETMHF.sort();
840  listETMHF.unique();
841 
842  listJetCounts.sort();
843  listJetCounts.unique();
844 
845  listCentrality.sort();
846  listCentrality.unique();
847 
848  listMinBiasHFP0.sort();
849  listMinBiasHFP0.unique();
850 
851  listMinBiasHFM0.sort();
852  listMinBiasHFM0.unique();
853 
854  listMinBiasHFP1.sort();
855  listMinBiasHFP1.unique();
856 
857  listMinBiasHFM1.sort();
858  listMinBiasHFM1.unique();
859 
860  listTotalEtEm.sort();
861  listTotalEtEm.unique();
862 
863  listMissingEtHF.sort();
864  listMissingEtHF.unique();
865 
866  listTowerCount.sort();
867  listTowerCount.unique();
868 
869  listAsymEt.sort();
870  listAsymEt.unique();
871 
872  listAsymHt.sort();
873  listAsymHt.unique();
874 
875  listAsymEtHF.sort();
876  listAsymEtHF.unique();
877 
878  listAsymHtHF.sort();
879  listAsymHtHF.unique();
880 
881  // record the L1 physics objects in the HLT filterproduct
882  // //////////////////////////////////////////////////////
883 
884  // Muon
885  if (!listMuon.empty()) {
887  iEvent.getByToken(m_l1MuonToken, muons);
888 
889  if (!muons.isValid()) {
890  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1MuonBxCollection with input tag " << m_l1MuonTag
891  << "\nrequested in configuration, but not found in the event."
892  << "\nNo muons added to filterproduct." << endl;
893  } else {
894  for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
895  // Transform to index for Bx = 0 to begin of BxVector
896  unsigned int index = muons->begin(0) - muons->begin() + *itObj;
897 
898  l1t::MuonRef myref(muons, index);
899  filterproduct.addObject(trigger::TriggerL1Mu, myref);
900  }
901  }
902  }
903 
904  // Muon Shower
905  if (!listMuonShower.empty()) {
907  iEvent.getByToken(m_l1MuonShowerToken, muonShowers);
908 
909  if (!muonShowers.isValid()) {
910  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1MuonShowerBxCollection with input tag " << m_l1MuonShowerTag
911  << "\nrequested in configuration, but not found in the event."
912  << "\nNo muon showers added to filterproduct." << endl;
913  } else {
914  for (std::list<int>::const_iterator itObj = listMuonShower.begin(); itObj != listMuonShower.end(); ++itObj) {
915  // Transform to index for Bx = 0 to begin of BxVector
916  unsigned int index = muonShowers->begin(0) - muonShowers->begin() + *itObj;
917 
918  l1t::MuonShowerRef myref(muonShowers, index);
919  filterproduct.addObject(trigger::TriggerL1MuShower, myref);
920  }
921  }
922  }
923 
924  // EG (isolated)
925  if (!listEG.empty()) {
927  iEvent.getByToken(m_l1EGammaToken, egammas);
928  if (!egammas.isValid()) {
929  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1EGammaBxCollection with input tag " << m_l1EGammaTag
930  << "\nrequested in configuration, but not found in the event."
931  << "\nNo egammas added to filterproduct." << endl;
932  } else {
933  for (std::list<int>::const_iterator itObj = listEG.begin(); itObj != listEG.end(); ++itObj) {
934  // Transform to begin of BxVector
935  unsigned int index = egammas->begin(0) - egammas->begin() + *itObj;
936 
937  l1t::EGammaRef myref(egammas, index);
938  filterproduct.addObject(trigger::TriggerL1EG, myref);
939  }
940  }
941  }
942 
943  // Jet
944  if (!listJet.empty()) {
946  iEvent.getByToken(m_l1JetToken, jets);
947 
948  if (!jets.isValid()) {
949  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1JetBxCollection with input tag " << m_l1JetTag
950  << "\nrequested in configuration, but not found in the event."
951  << "\nNo jets added to filterproduct." << endl;
952  } else {
953  for (std::list<int>::const_iterator itObj = listJet.begin(); itObj != listJet.end(); ++itObj) {
954  // Transform to begin of BxVector
955  unsigned int index = jets->begin(0) - jets->begin() + *itObj;
956 
957  l1t::JetRef myref(jets, index);
958  filterproduct.addObject(trigger::TriggerL1Jet, myref);
959  }
960  }
961  }
962 
963  // Tau
964  if (!listTau.empty()) {
966  iEvent.getByToken(m_l1TauToken, taus);
967 
968  if (!taus.isValid()) {
969  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1TauBxCollection with input tag " << m_l1TauTag
970  << "\nrequested in configuration, but not found in the event."
971  << "\nNo taus added to filterproduct." << endl;
972  } else {
973  for (std::list<int>::const_iterator itObj = listTau.begin(); itObj != listTau.end(); ++itObj) {
974  // Transform to begin of BxVector
975  unsigned int index = taus->begin(0) - taus->begin() + *itObj;
976 
977  l1t::TauRef myref(taus, index);
978  filterproduct.addObject(trigger::TriggerL1Tau, myref);
979  }
980  }
981  }
982 
983  // ETT, HTT, ETM, HTM
985  iEvent.getByToken(m_l1EtSumToken, etsums);
986  if (!etsums.isValid()) {
987  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1EtSumBxCollection with input tag " << m_l1EtSumTag
988  << "\nrequested in configuration, but not found in the event."
989  << "\nNo etsums added to filterproduct." << endl;
990  } else {
992 
993  for (iter = etsums->begin(0); iter != etsums->end(0); ++iter) {
994  l1t::EtSumRef myref(etsums, etsums->key(iter));
995 
996  switch (iter->getType()) {
998  if (!listETT.empty())
999  filterproduct.addObject(trigger::TriggerL1ETT, myref);
1000  break;
1001  case l1t::EtSum::kTotalHt:
1002  if (!listHTT.empty())
1003  filterproduct.addObject(trigger::TriggerL1HTT, myref);
1004  break;
1006  if (!listETM.empty())
1007  filterproduct.addObject(trigger::TriggerL1ETM, myref);
1008  break;
1010  if (!listHTM.empty())
1011  filterproduct.addObject(trigger::TriggerL1HTM, myref);
1012  break;
1014  if (!listETMHF.empty())
1015  filterproduct.addObject(trigger::TriggerL1ETMHF, myref);
1016  break;
1018  if (!listCentrality.empty())
1019  filterproduct.addObject(trigger::TriggerL1Centrality, myref);
1020  break;
1022  if (!listMinBiasHFP0.empty())
1023  filterproduct.addObject(trigger::TriggerL1MinBiasHFP0, myref);
1024  break;
1026  if (!listMinBiasHFM0.empty())
1027  filterproduct.addObject(trigger::TriggerL1MinBiasHFM0, myref);
1028  break;
1030  if (!listMinBiasHFP1.empty())
1031  filterproduct.addObject(trigger::TriggerL1MinBiasHFP1, myref);
1032  break;
1034  if (!listMinBiasHFM1.empty())
1035  filterproduct.addObject(trigger::TriggerL1MinBiasHFM1, myref);
1036  break;
1038  if (!listTotalEtEm.empty())
1039  filterproduct.addObject(trigger::TriggerL1TotalEtEm, myref);
1040  break;
1042  if (!listTowerCount.empty())
1043  filterproduct.addObject(trigger::TriggerL1TowerCount, myref);
1044  break;
1045  case l1t::EtSum::kAsymEt:
1046  if (!listAsymEt.empty())
1047  filterproduct.addObject(trigger::TriggerL1AsymEt, myref);
1048  break;
1049  case l1t::EtSum::kAsymHt:
1050  if (!listAsymHt.empty())
1051  filterproduct.addObject(trigger::TriggerL1AsymHt, myref);
1052  break;
1053  case l1t::EtSum::kAsymEtHF:
1054  if (!listAsymEtHF.empty())
1055  filterproduct.addObject(trigger::TriggerL1AsymEtHF, myref);
1056  break;
1057  case l1t::EtSum::kAsymHtHF:
1058  if (!listAsymHtHF.empty())
1059  filterproduct.addObject(trigger::TriggerL1AsymHtHF, myref);
1060  break;
1061  default:
1062  LogTrace("HLTL1TSeed") << " L1EtSum seed of currently unsuported HLT TriggerType. l1t::EtSum type: "
1063  << iter->getType() << "\n";
1064 
1065  } // end switch
1066 
1067  } // end for
1068 
1069  } // end else
1070 
1071  // TODO FIXME uncomment if block when JetCounts implemented
1072 
1073  // // jet counts
1074  // if (!listJetCounts.empty()) {
1075  // edm::Handle<l1extra::L1JetCounts> l1JetCounts;
1076  // iEvent.getByToken(m_l1CollectionsToken.label(), l1JetCounts);
1077  //
1078  // for (std::list<int>::const_iterator itObj = listJetCounts.begin();
1079  // itObj != listJetCounts.end(); ++itObj) {
1080  //
1081  // filterproduct.addObject(trigger::TriggerL1JetCounts,l1extra::L1JetCountsRefProd(l1JetCounts));
1082  // // FIXME: RefProd!
1083  //
1084  // }
1085  //
1086  // }
1087 
1088  LogTrace("HLTL1TSeed") << "\nHLTL1Seed:seedsL1TriggerObjectMaps returning " << seedsResult << endl << endl;
1089 
1090  return seedsResult;
1091 }
1092 
1093 // register as framework plugin
size
Write out results.
const std::vector< L1TObjectTypeInCond > & objectTypeVector() const
BXVector< EGamma > EGammaBxCollection
Definition: EGamma.h:10
bool saveTags() const
std::string m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:97
bool isDebugEnabled()
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::EDGetTokenT< l1t::EtSumBxCollection > m_l1EtSumToken
Definition: HLTL1TSeed.h:136
edm::Ref< EGammaBxCollection > EGammaRef
Definition: TkEGTau.h:35
std::vector< const std::vector< GlobalLogicParser::TokenRPN > * > m_l1AlgoSeedsRpn
vector of Rpn vectors for the required algorithms for seeding
Definition: HLTL1TSeed.h:85
unsigned int key(const_iterator &iter) const
Definition: BXVector.h:101
edm::InputTag m_l1MuonTag
Definition: HLTL1TSeed.h:110
edm::InputTag m_l1MuonShowerTag
Definition: HLTL1TSeed.h:115
HLTL1TSeed(const edm::ParameterSet &)
constructor
Definition: HLTL1TSeed.cc:32
enum start value shifted to 81 so as to avoid clashes with PDG codes
bool seedsL1TriggerObjectMaps(edm::Event &, trigger::TriggerFilterObjectWithRefs &)
seeding is done via L1 trigger object maps, considering the objects which fired in L1 ...
Definition: HLTL1TSeed.cc:430
void dumpTriggerFilterObjectWithRefs(trigger::TriggerFilterObjectWithRefs &) const
detailed print of filter content
Definition: HLTL1TSeed.cc:148
GlobalObject
Definition: GlobalObject.h:16
const std::vector< CombinationsInCond > & combinationVector() const
edm::Ref< JetBxCollection > JetRef
Definition: Jet.h:12
edm::Ref< EtSumBxCollection > EtSumRef
Definition: EtSum.h:12
delete x;
Definition: CaloConfig.h:22
bool isEmpty(int bx) const
assert(be >=bs)
BXVector< Tau > TauBxCollection
Definition: Tau.h:10
std::vector< GlobalLogicParser::OperandToken > expressionSeedsOperandList()
#define LogTrace(id)
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
const_iterator begin(int bx) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
std::vector< T >::const_iterator const_iterator
Definition: BXVector.h:18
BXVector< EtSum > EtSumBxCollection
Definition: EtSum.h:10
bool algoGtlResult() const
int iEvent
Definition: GenABIO.cc:224
edm::InputTag m_l1JetTag
Definition: HLTL1TSeed.h:125
edm::InputTag m_l1GtObjectMapTag
InputTag for L1 Global Trigger object maps. This is done per menu. Should be part of Run...
Definition: HLTL1TSeed.h:100
~HLTL1TSeed() override
destructor
Definition: HLTL1TSeed.cc:83
edm::EDGetTokenT< l1t::JetBxCollection > m_l1JetToken
Definition: HLTL1TSeed.h:126
std::vector< OperandToken > & operandTokenVector()
return the vector of operand tokens
GlobalLogicParser m_l1AlgoLogicParser
logic parser for m_l1SeedsLogicalExpression
Definition: HLTL1TSeed.h:79
edm::EDGetTokenT< l1t::EGammaBxCollection > m_l1EGammaToken
Definition: HLTL1TSeed.h:121
edm::InputTag m_l1EtSumTag
Definition: HLTL1TSeed.h:135
edm::InputTag m_l1TauTag
Definition: HLTL1TSeed.h:130
edm::Ref< TauBxCollection > TauRef
Definition: Tau.h:12
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
BXVector< MuonShower > MuonShowerBxCollection
Definition: MuonShower.h:18
const T & at(int bx, unsigned i) const
const std::vector< GlobalLogicParser::OperandToken > & operandTokenVector() const
edm::Ref< MuonShowerBxCollection > MuonShowerRef
Definition: MuonShower.h:20
const std::vector< GlobalObjectMap > & gtObjectMap() const
get / set the vector of object maps
BXVector< Muon > MuonBxCollection
Definition: Muon.h:11
bool m_isDebugEnabled
cache edm::isDebugEnabled()
Definition: HLTL1TSeed.h:142
std::vector< GlobalLogicParser::OperandToken > m_l1AlgoSeeds
list of required algorithms for seeding
Definition: HLTL1TSeed.h:82
BXVector< Jet > JetBxCollection
Definition: Jet.h:10
const GlobalObjectMap * getObjectMap(const std::string &algoNameVal) const
return the object map for the algorithm algoNameVal
edm::InputTag m_l1EGammaTag
Definition: HLTL1TSeed.h:120
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool isValid() const
Definition: HandleBase.h:70
const std::string & algoName() const
destructor
int algoBitNumber() const
get / set bit number for algorithm in the object map
edm::InputTag m_l1GlobalTag
InputTag for L1 Global Trigger.
Definition: HLTL1TSeed.h:104
edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1GlobalToken
Definition: HLTL1TSeed.h:105
const_iterator end(int bx) const
HLT enums.
edm::Ref< MuonBxCollection > MuonRef
Definition: Muon.h:13
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) override
filter the event
Definition: HLTL1TSeed.cc:110
bool m_l1GlobalDecision
flag to pass if L1TGlobal accept
Definition: HLTL1TSeed.h:139
Log< level::Warning, false > LogWarning
virtual const bool expressionResult() const
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
parameter description
Definition: HLTL1TSeed.cc:89
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
std::vector< std::vector< const std::vector< l1t::GlobalObject > * > > m_l1AlgoSeedsObjType
vector of object-type vectors for each condition in the required algorithms for seeding ...
Definition: HLTL1TSeed.h:88
edm::EDGetTokenT< l1t::MuonBxCollection > m_l1MuonToken
Definition: HLTL1TSeed.h:111
edm::EDGetTokenT< l1t::TauBxCollection > m_l1TauToken
Definition: HLTL1TSeed.h:131
edm::EDGetTokenT< l1t::MuonShowerBxCollection > m_l1MuonShowerToken
Definition: HLTL1TSeed.h:116
edm::EDGetTokenT< GlobalObjectMapRecord > m_l1GtObjectMapToken
Definition: HLTL1TSeed.h:101