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