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->size() == 0) {
480  edm::LogWarning("HLTL1TSeed") << " Warning: GlobalAlgBlkBxCollection with input tag " << m_l1GlobalTag
481  << " is empty." << std::endl;
482 
483  return false;
484  }
485 
486  // get handle to object maps from emulator (one object map per algorithm)
487  edm::Handle<GlobalObjectMapRecord> gtObjectMapRecord;
488  iEvent.getByToken(m_l1GtObjectMapToken, gtObjectMapRecord);
489 
490  if (!gtObjectMapRecord.isValid()) {
491  edm::LogWarning("HLTL1TSeed") << " Warning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
492  << " requested in configuration, but not found in the event." << std::endl;
493 
494  return false;
495  }
496 
497  if (m_isDebugEnabled) {
498  const std::vector<GlobalObjectMap>& objMaps = gtObjectMapRecord->gtObjectMap();
499 
500  LogTrace("HLTL1TSeed") << "\nHLTL1Seed"
501  << "\n--------------------------------------------------------------------------------------"
502  "-------------------------------";
503 
504  LogTrace("HLTL1TSeed")
505  << "\n\tAlgorithms in L1TriggerObjectMapRecord and GT results ( emulated | initial | prescaled | final ) "
506  << endl;
507 
508  LogTrace("HLTL1TSeed") << "\n\tmap"
509  << "\tAlgoBit" << std::setw(40) << "algoName"
510  << "\t (emul|ini|pre|fin)" << endl;
511 
512  LogTrace("HLTL1TSeed") << "----------------------------------------------------------------------------------------"
513  "-----------------------------";
514 
515  for (size_t imap = 0; imap < objMaps.size(); imap++) {
516  int bit = objMaps[imap].algoBitNumber(); // same as bit from L1T Menu
517 
518  int emulDecision = objMaps[imap].algoGtlResult();
519 
520  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
521  int initDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionInitial(bit);
522  int presDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionInterm(bit);
523  int finlDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionFinal(bit);
524 
525  if (emulDecision != initDecision) {
526  LogTrace("HLTL1TSeed") << "L1T decision (emulated vs. unpacked initial) is not the same:"
527  << "\n\tbit = " << std::setw(3) << bit << std::setw(40) << objMaps[imap].algoName()
528  << "\t emulated decision = " << emulDecision
529  << "\t unpacked initial decision = " << initDecision
530  << "\nThis should not happen. Include the L1TGtEmulCompare module in the sequence."
531  << endl;
532  }
533 
534  LogTrace("HLTL1TSeed") << "\t" << std::setw(3) << imap << "\tbit = " << std::setw(3) << bit << std::setw(40)
535  << objMaps[imap].algoName() << "\t ( " << emulDecision << " | " << initDecision << " | "
536  << presDecision << " | " << finlDecision << " ) ";
537  }
538  LogTrace("HLTL1TSeed") << endl;
539  }
540 
541  // Filter decision in case of "L1GlobalDecision" logical expression.
542  // By convention, it means global decision.
543  // /////////////////////////////////////////////////////////////////
544  if (m_l1GlobalDecision) {
545  // For bx=0 , get 0th AlgoBlock, so in BXvector at(bx=0,i=0)
546  return (uGtAlgoBlocks->at(0, 0)).getFinalOR();
547  }
548 
549  // Update/Reset m_l1AlgoLogicParser by reseting token result
550  // /////////////////////////////////////////////////////////
551  std::vector<GlobalLogicParser::OperandToken>& algOpTokenVector = m_l1AlgoLogicParser.operandTokenVector();
552 
553  for (auto& i : algOpTokenVector) {
554  // rest token result
555  //
556  i.tokenResult = false;
557  }
558 
559  // Update m_l1AlgoLogicParser and store emulator results for algOpTokens
560  // /////////////////////////////////////////////////////////////////////
561  for (auto& i : algOpTokenVector) {
562  std::string algoName = i.tokenName;
563 
564  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoName);
565 
566  if (objMap == nullptr) {
567  throw cms::Exception("FailModule")
568  << "\nAlgorithm " << algoName
569  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
570  << "Please check if algorithm " << algoName << " is present in the L1 menu\n"
571  << std::endl;
572 
573  } else {
574  //(algOpTokenVector[i]).tokenResult = objMap->algoGtlResult();
575 
576  int bit = objMap->algoBitNumber();
577  bool finalAlgoDecision = (uGtAlgoBlocks->at(0, 0)).getAlgoDecisionFinal(bit);
578  i.tokenResult = finalAlgoDecision;
579  }
580  }
581 
582  // Filter decision
583  // ///////////////
584  bool seedsResult = m_l1AlgoLogicParser.expressionResult();
585 
586  if (m_isDebugEnabled) {
587  LogTrace("HLTL1TSeed") << "\nHLTL1TSeed: l1SeedsLogicalExpression (names) = '" << m_l1SeedsLogicalExpression << "'"
588  << "\n Result for logical expression after update of algOpTokens: " << seedsResult << "\n"
589  << std::endl;
590  }
591 
594 
595  for (std::vector<GlobalLogicParser::OperandToken>::const_iterator itSeed = m_l1AlgoSeeds.begin();
596  itSeed != m_l1AlgoSeeds.end();
597  ++itSeed) {
598  std::string algoSeedName = (*itSeed).tokenName;
599 
600  LogTrace("HLTL1TSeed") << "\n ---------------- algo seed name = " << algoSeedName << endl;
601 
602  const GlobalObjectMap* objMap = gtObjectMapRecord->getObjectMap(algoSeedName);
603 
604  if (objMap == nullptr) {
605  // Should not get here
606  //
607  throw cms::Exception("FailModule")
608  << "\nAlgorithm " << algoSeedName
609  << ", requested as seed by a HLT path, cannot be matched to a L1 algo name in any GlobalObjectMap\n"
610  << "Please check if algorithm " << algoSeedName << " is present in the L1 menu\n"
611  << std::endl;
612  }
613 
614  int algoSeedBitNumber = objMap->algoBitNumber();
615  bool algoSeedResult = objMap->algoGtlResult();
616 
617  // unpacked GT results: uGtAlgoBlock has decisions initial, prescaled, and final after masks
618  bool algoSeedResultMaskAndPresc = uGtAlgoBlocks->at(0, 0).getAlgoDecisionFinal(algoSeedBitNumber);
619 
620  LogTrace("HLTL1TSeed") << "\n\tAlgo seed " << algoSeedName << " result emulated | final = " << algoSeedResult
621  << " | " << algoSeedResultMaskAndPresc << endl;
622 
625  if (!algoSeedResultMaskAndPresc)
626  continue;
627 
629  // This should not happen if the emulated and unpacked GT are consistent
631  if (!algoSeedResult)
632  continue;
633 
634  const std::vector<GlobalLogicParser::OperandToken>& opTokenVecObjMap = objMap->operandTokenVector();
635  const std::vector<L1TObjectTypeInCond>& condObjTypeVec = objMap->objectTypeVector();
636  const std::vector<CombinationsInCond>& condCombinations = objMap->combinationVector();
637 
638  LogTrace("HLTL1TSeed") << "\n\talgoName =" << objMap->algoName() << "\talgoBitNumber = " << algoSeedBitNumber
639  << "\talgoGtlResult = " << algoSeedResult << endl
640  << endl;
641 
642  if (opTokenVecObjMap.size() != condObjTypeVec.size()) {
643  edm::LogWarning("HLTL1TSeed")
644  << "\nWarning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
645  << "\nhas object map for bit number " << algoSeedBitNumber
646  << " which contains different size vectors of operand tokens and of condition object types!" << std::endl;
647 
648  assert(opTokenVecObjMap.size() == condObjTypeVec.size());
649  }
650 
651  if (opTokenVecObjMap.size() != condCombinations.size()) {
652  edm::LogWarning("HLTL1TSeed")
653  << "\nWarning: GlobalObjectMapRecord with input tag " << m_l1GtObjectMapTag
654  << "\nhas object map for bit number " << algoSeedBitNumber
655  << " which contains different size vectors of operand tokens and of condition object combinations!"
656  << std::endl;
657 
658  assert(opTokenVecObjMap.size() == condCombinations.size());
659  }
660 
661  // operands are conditions of L1 algo
662  //
663  for (size_t condNumber = 0; condNumber < opTokenVecObjMap.size(); condNumber++) {
664  std::vector<l1t::GlobalObject> condObjType = condObjTypeVec[condNumber];
665 
666  for (auto& jOb : condObjType) {
667  LogTrace("HLTL1TSeed") << setw(15) << "\tcondObjType = " << jOb << endl;
668  }
669 
670  const std::string condName = opTokenVecObjMap[condNumber].tokenName;
671  bool condResult = opTokenVecObjMap[condNumber].tokenResult;
672 
673  // only procede for conditions that passed
674  //
675  if (!condResult) {
676  continue;
677  }
678 
679  // loop over combinations for a given condition
680  //
681  const CombinationsInCond* condComb = objMap->getCombinationsInCond(condNumber);
682 
683  LogTrace("HLTL1TSeed") << setw(15) << "\tcondCombinations = " << condComb->size() << endl;
684 
685  for (auto const& itComb : (*condComb)) {
686  LogTrace("HLTL1TSeed") << setw(15) << "\tnew combination" << endl;
687 
688  // loop over objects in a combination for a given condition
689  //
690  for (auto itObject = itComb.begin(); itObject != itComb.end(); itObject++) {
691  // in case of object-less triggers (e.g. L1_ZeroBias) condObjType vector is empty, so don't seed!
692  //
693  if (condObjType.empty()) {
694  LogTrace("HLTL1TSeed")
695  << "\talgoName = " << objMap->algoName()
696  << " is object-less L1 algorithm, so do not attempt to store any objects to the list of seeds.\n"
697  << std::endl;
698  continue;
699  }
700 
701  // the index of the object type is the same as the index of the object
702  size_t iType = std::distance(itComb.begin(), itObject);
703 
704  // get object type and push indices on the list
705  //
706  const l1t::GlobalObject objTypeVal = condObjType.at(iType);
707 
708  LogTrace("HLTL1TSeed") << "\tAdd object of type " << objTypeVal << " and index " << (*itObject)
709  << " to the seed list." << std::endl;
710 
711  // THESE OBJECT CASES ARE CURRENTLY MISSING:
712  //gtMinBias,
713  //gtExternal,
714  //ObjNull
715 
716  switch (objTypeVal) {
717  case l1t::gtMu: {
718  listMuon.push_back(*itObject);
719  } break;
720  case l1t::gtMuShower: {
721  listMuonShower.push_back(*itObject);
722  } break;
723  case l1t::gtEG: {
724  listEG.push_back(*itObject);
725  } break;
726  case l1t::gtJet: {
727  listJet.push_back(*itObject);
728  } break;
729  case l1t::gtTau: {
730  listTau.push_back(*itObject);
731  } break;
732  case l1t::gtETM: {
733  listETM.push_back(*itObject);
734  } break;
735  case l1t::gtETT: {
736  listETT.push_back(*itObject);
737  } break;
738  case l1t::gtHTT: {
739  listHTT.push_back(*itObject);
740  } break;
741  case l1t::gtHTM: {
742  listHTM.push_back(*itObject);
743  } break;
744  case l1t::gtETMHF: {
745  listETMHF.push_back(*itObject);
746  } break;
747  case l1t::gtTowerCount: {
748  listTowerCount.push_back(*itObject);
749  } break;
750  case l1t::gtMinBiasHFP0: {
751  listMinBiasHFP0.push_back(*itObject);
752  } break;
753  case l1t::gtMinBiasHFM0: {
754  listMinBiasHFM0.push_back(*itObject);
755  } break;
756  case l1t::gtMinBiasHFP1: {
757  listMinBiasHFP1.push_back(*itObject);
758  } break;
759  case l1t::gtMinBiasHFM1: {
760  listMinBiasHFM1.push_back(*itObject);
761  } break;
762  case l1t::gtETTem: {
763  listTotalEtEm.push_back(*itObject);
764  } break;
765  case l1t::gtAsymmetryEt: {
766  listAsymEt.push_back(*itObject);
767  } break;
768  case l1t::gtAsymmetryHt: {
769  listAsymHt.push_back(*itObject);
770  } break;
771  case l1t::gtAsymmetryEtHF: {
772  listAsymEtHF.push_back(*itObject);
773  } break;
774  case l1t::gtAsymmetryHtHF: {
775  listAsymHtHF.push_back(*itObject);
776  } break;
777  case l1t::gtCentrality0:
778  case l1t::gtCentrality1:
779  case l1t::gtCentrality2:
780  case l1t::gtCentrality3:
781  case l1t::gtCentrality4:
782  case l1t::gtCentrality5:
783  case l1t::gtCentrality6:
784  case l1t::gtCentrality7: {
785  listCentrality.push_back(*itObject);
786  } break;
787 
788  //case JetCounts: {
789  // listJetCounts.push_back(*itObject);
790  //}
791 
792  break;
793  default: {
794  // should not arrive here
795 
796  LogTrace("HLTL1TSeed") << "\n HLTL1TSeed::hltFilter "
797  << "\n Unknown object of type " << objTypeVal << " and index " << (*itObject)
798  << " in the seed list." << std::endl;
799  } break;
800 
801  } // end switch objTypeVal
802 
803  } // end for itObj
804 
805  } // end for itComb
806 
807  } // end for condition
808 
809  } // end for itSeed
810 
811  // eliminate duplicates
812 
813  listMuon.sort();
814  listMuon.unique();
815 
816  listMuonShower.sort();
817  listMuonShower.unique();
818 
819  listEG.sort();
820  listEG.unique();
821 
822  listJet.sort();
823  listJet.unique();
824 
825  listTau.sort();
826  listTau.unique();
827 
828  listETM.sort();
829  listETM.unique();
830 
831  listETT.sort();
832  listETT.unique();
833 
834  listHTT.sort();
835  listHTT.unique();
836 
837  listHTM.sort();
838  listHTM.unique();
839 
840  listETMHF.sort();
841  listETMHF.unique();
842 
843  listJetCounts.sort();
844  listJetCounts.unique();
845 
846  listCentrality.sort();
847  listCentrality.unique();
848 
849  listMinBiasHFP0.sort();
850  listMinBiasHFP0.unique();
851 
852  listMinBiasHFM0.sort();
853  listMinBiasHFM0.unique();
854 
855  listMinBiasHFP1.sort();
856  listMinBiasHFP1.unique();
857 
858  listMinBiasHFM1.sort();
859  listMinBiasHFM1.unique();
860 
861  listTotalEtEm.sort();
862  listTotalEtEm.unique();
863 
864  listMissingEtHF.sort();
865  listMissingEtHF.unique();
866 
867  listTowerCount.sort();
868  listTowerCount.unique();
869 
870  listAsymEt.sort();
871  listAsymEt.unique();
872 
873  listAsymHt.sort();
874  listAsymHt.unique();
875 
876  listAsymEtHF.sort();
877  listAsymEtHF.unique();
878 
879  listAsymHtHF.sort();
880  listAsymHtHF.unique();
881 
882  // record the L1 physics objects in the HLT filterproduct
883  // //////////////////////////////////////////////////////
884 
885  // Muon
886  if (!listMuon.empty()) {
888  iEvent.getByToken(m_l1MuonToken, muons);
889 
890  if (!muons.isValid()) {
891  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1MuonBxCollection with input tag " << m_l1MuonTag
892  << "\nrequested in configuration, but not found in the event."
893  << "\nNo muons added to filterproduct." << endl;
894  } else {
895  for (std::list<int>::const_iterator itObj = listMuon.begin(); itObj != listMuon.end(); ++itObj) {
896  // Transform to index for Bx = 0 to begin of BxVector
897  unsigned int index = muons->begin(0) - muons->begin() + *itObj;
898 
899  l1t::MuonRef myref(muons, index);
900  filterproduct.addObject(trigger::TriggerL1Mu, myref);
901  }
902  }
903  }
904 
905  // Muon Shower
906  if (!listMuonShower.empty()) {
908  iEvent.getByToken(m_l1MuonShowerToken, muonShowers);
909 
910  if (!muonShowers.isValid()) {
911  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1MuonShowerBxCollection with input tag " << m_l1MuonShowerTag
912  << "\nrequested in configuration, but not found in the event."
913  << "\nNo muon showers added to filterproduct." << endl;
914  } else {
915  for (std::list<int>::const_iterator itObj = listMuonShower.begin(); itObj != listMuonShower.end(); ++itObj) {
916  // Transform to index for Bx = 0 to begin of BxVector
917  unsigned int index = muonShowers->begin(0) - muonShowers->begin() + *itObj;
918 
919  l1t::MuonShowerRef myref(muonShowers, index);
920  filterproduct.addObject(trigger::TriggerL1MuShower, myref);
921  }
922  }
923  }
924 
925  // EG (isolated)
926  if (!listEG.empty()) {
928  iEvent.getByToken(m_l1EGammaToken, egammas);
929  if (!egammas.isValid()) {
930  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1EGammaBxCollection with input tag " << m_l1EGammaTag
931  << "\nrequested in configuration, but not found in the event."
932  << "\nNo egammas added to filterproduct." << endl;
933  } else {
934  for (std::list<int>::const_iterator itObj = listEG.begin(); itObj != listEG.end(); ++itObj) {
935  // Transform to begin of BxVector
936  unsigned int index = egammas->begin(0) - egammas->begin() + *itObj;
937 
938  l1t::EGammaRef myref(egammas, index);
939  filterproduct.addObject(trigger::TriggerL1EG, myref);
940  }
941  }
942  }
943 
944  // Jet
945  if (!listJet.empty()) {
947  iEvent.getByToken(m_l1JetToken, jets);
948 
949  if (!jets.isValid()) {
950  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1JetBxCollection with input tag " << m_l1JetTag
951  << "\nrequested in configuration, but not found in the event."
952  << "\nNo jets added to filterproduct." << endl;
953  } else {
954  for (std::list<int>::const_iterator itObj = listJet.begin(); itObj != listJet.end(); ++itObj) {
955  // Transform to begin of BxVector
956  unsigned int index = jets->begin(0) - jets->begin() + *itObj;
957 
958  l1t::JetRef myref(jets, index);
959  filterproduct.addObject(trigger::TriggerL1Jet, myref);
960  }
961  }
962  }
963 
964  // Tau
965  if (!listTau.empty()) {
967  iEvent.getByToken(m_l1TauToken, taus);
968 
969  if (!taus.isValid()) {
970  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1TauBxCollection with input tag " << m_l1TauTag
971  << "\nrequested in configuration, but not found in the event."
972  << "\nNo taus added to filterproduct." << endl;
973  } else {
974  for (std::list<int>::const_iterator itObj = listTau.begin(); itObj != listTau.end(); ++itObj) {
975  // Transform to begin of BxVector
976  unsigned int index = taus->begin(0) - taus->begin() + *itObj;
977 
978  l1t::TauRef myref(taus, index);
979  filterproduct.addObject(trigger::TriggerL1Tau, myref);
980  }
981  }
982  }
983 
984  // ETT, HTT, ETM, HTM
986  iEvent.getByToken(m_l1EtSumToken, etsums);
987  if (!etsums.isValid()) {
988  edm::LogWarning("HLTL1TSeed") << "\nWarning: L1EtSumBxCollection with input tag " << m_l1EtSumTag
989  << "\nrequested in configuration, but not found in the event."
990  << "\nNo etsums added to filterproduct." << endl;
991  } else {
993 
994  for (iter = etsums->begin(0); iter != etsums->end(0); ++iter) {
995  l1t::EtSumRef myref(etsums, etsums->key(iter));
996 
997  switch (iter->getType()) {
999  if (!listETT.empty())
1000  filterproduct.addObject(trigger::TriggerL1ETT, myref);
1001  break;
1002  case l1t::EtSum::kTotalHt:
1003  if (!listHTT.empty())
1004  filterproduct.addObject(trigger::TriggerL1HTT, myref);
1005  break;
1007  if (!listETM.empty())
1008  filterproduct.addObject(trigger::TriggerL1ETM, myref);
1009  break;
1011  if (!listHTM.empty())
1012  filterproduct.addObject(trigger::TriggerL1HTM, myref);
1013  break;
1015  if (!listETMHF.empty())
1016  filterproduct.addObject(trigger::TriggerL1ETMHF, myref);
1017  break;
1019  if (!listCentrality.empty())
1020  filterproduct.addObject(trigger::TriggerL1Centrality, myref);
1021  break;
1023  if (!listMinBiasHFP0.empty())
1024  filterproduct.addObject(trigger::TriggerL1MinBiasHFP0, myref);
1025  break;
1027  if (!listMinBiasHFM0.empty())
1028  filterproduct.addObject(trigger::TriggerL1MinBiasHFM0, myref);
1029  break;
1031  if (!listMinBiasHFP1.empty())
1032  filterproduct.addObject(trigger::TriggerL1MinBiasHFP1, myref);
1033  break;
1035  if (!listMinBiasHFM1.empty())
1036  filterproduct.addObject(trigger::TriggerL1MinBiasHFM1, myref);
1037  break;
1039  if (!listTotalEtEm.empty())
1040  filterproduct.addObject(trigger::TriggerL1TotalEtEm, myref);
1041  break;
1043  if (!listTowerCount.empty())
1044  filterproduct.addObject(trigger::TriggerL1TowerCount, myref);
1045  break;
1046  case l1t::EtSum::kAsymEt:
1047  if (!listAsymEt.empty())
1048  filterproduct.addObject(trigger::TriggerL1AsymEt, myref);
1049  break;
1050  case l1t::EtSum::kAsymHt:
1051  if (!listAsymHt.empty())
1052  filterproduct.addObject(trigger::TriggerL1AsymHt, myref);
1053  break;
1054  case l1t::EtSum::kAsymEtHF:
1055  if (!listAsymEtHF.empty())
1056  filterproduct.addObject(trigger::TriggerL1AsymEtHF, myref);
1057  break;
1058  case l1t::EtSum::kAsymHtHF:
1059  if (!listAsymHtHF.empty())
1060  filterproduct.addObject(trigger::TriggerL1AsymHtHF, myref);
1061  break;
1062  default:
1063  LogTrace("HLTL1TSeed") << " L1EtSum seed of currently unsuported HLT TriggerType. l1t::EtSum type: "
1064  << iter->getType() << "\n";
1065 
1066  } // end switch
1067 
1068  } // end for
1069 
1070  } // end else
1071 
1072  // TODO FIXME uncomment if block when JetCounts implemented
1073 
1074  // // jet counts
1075  // if (!listJetCounts.empty()) {
1076  // edm::Handle<l1extra::L1JetCounts> l1JetCounts;
1077  // iEvent.getByToken(m_l1CollectionsToken.label(), l1JetCounts);
1078  //
1079  // for (std::list<int>::const_iterator itObj = listJetCounts.begin();
1080  // itObj != listJetCounts.end(); ++itObj) {
1081  //
1082  // filterproduct.addObject(trigger::TriggerL1JetCounts,l1extra::L1JetCountsRefProd(l1JetCounts));
1083  // // FIXME: RefProd!
1084  //
1085  // }
1086  //
1087  // }
1088 
1089  LogTrace("HLTL1TSeed") << "\nHLTL1Seed:seedsL1TriggerObjectMaps returning " << seedsResult << endl << endl;
1090 
1091  return seedsResult;
1092 }
1093 
1094 // 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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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
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
unsigned size(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
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