CMS 3D CMS Logo

L1TMuonProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1TMuonProducer
4 // Class: L1TMuonProducer
5 //
13 //
14 // Original Author: Joschka Philip Lingemann,40 3-B01,+41227671598,
15 // Created: Thu Oct 3 16:31:34 CEST 2013
16 // $Id$
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 #include <fstream>
23 
24 // user include files
29 
32 
34 
41 
45 
51 
52 #include "TMath.h"
53 //
54 // class declaration
55 //
56 using namespace l1t;
57 
59 public:
60  explicit L1TMuonProducer(const edm::ParameterSet&);
61  ~L1TMuonProducer() override;
62 
63  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
64 
65 private:
66  void produce(edm::Event&, const edm::EventSetup&) override;
67 
68  void beginRun(edm::Run const&, edm::EventSetup const&) override;
69  void endRun(edm::Run const&, edm::EventSetup const&) override;
70  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
71  void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
72 
73  static bool compareMuons(const std::shared_ptr<MicroGMTConfiguration::InterMuon>& mu1,
74  const std::shared_ptr<MicroGMTConfiguration::InterMuon>& mu2);
75 
76  void sortMuons(MicroGMTConfiguration::InterMuonList&, unsigned) const;
77 
78  void calculateRank(MicroGMTConfiguration::InterMuonList& muons) const;
79 
80  void splitAndConvertMuons(edm::Handle<MicroGMTConfiguration::InputCollection> const& in,
83  GMTInternalWedges& wedges_pos,
84  GMTInternalWedges& wedges_neg,
85  int bx) const;
86 
89  GMTInternalWedges& wedges,
90  int bx) const;
91 
92  void addMuonsToCollections(MicroGMTConfiguration::InterMuonList& coll,
94  std::unique_ptr<MuonBxCollection>& out,
95  int bx) const;
96 
97  // ----------member data ---------------------------
99  int m_bxMin;
100  int m_bxMax;
102  std::bitset<72> m_inputsToDisable;
103  std::bitset<28> m_caloInputsToDisable;
104  std::bitset<12> m_bmtfInputsToDisable;
105  std::bitset<12> m_omtfInputsToDisable;
106  std::bitset<12> m_emtfInputsToDisable;
107  std::bitset<72> m_maskedInputs;
108  std::bitset<28> m_maskedCaloInputs;
109  std::bitset<12> m_maskedBmtfInputs;
110  std::bitset<12> m_maskedOmtfInputs;
111  std::bitset<12> m_maskedEmtfInputs;
112  std::unique_ptr<L1TMuonGlobalParamsHelper> microGMTParamsHelper;
117  std::shared_ptr<MicroGMTRankPtQualLUT> m_rankPtQualityLUT;
120  std::ofstream m_debugOut;
122 
127 };
128 
129 //
130 // constants, enums and typedefs
131 //
132 
133 //
134 // static data member definitions
135 //
136 
137 //
138 // constructors and destructor
139 //
141  : m_debugOut("test/debug/iso_debug.dat"), m_emtfCancelMode(cancelmode::coordinate) {
142  // edm::InputTag barrelTfInputTag = iConfig.getParameter<edm::InputTag>("barrelTFInput");
143  // edm::InputTag overlapTfInputTag = iConfig.getParameter<edm::InputTag>("overlapTFInput");
144  // edm::InputTag forwardTfInputTag = iConfig.getParameter<edm::InputTag>("forwardTFInput");
145 
146  m_barrelTfInputTag = iConfig.getParameter<edm::InputTag>("barrelTFInput");
147  m_overlapTfInputTag = iConfig.getParameter<edm::InputTag>("overlapTFInput");
148  m_endcapTfInputTag = iConfig.getParameter<edm::InputTag>("forwardTFInput");
149  m_trigTowerTag = iConfig.getParameter<edm::InputTag>("triggerTowerInput");
150 
151  m_autoBxRange = iConfig.getParameter<bool>("autoBxRange");
152  m_bxMin = iConfig.getParameter<int>("bxMin");
153  m_bxMax = iConfig.getParameter<int>("bxMax");
154 
155  m_autoCancelMode = iConfig.getParameter<bool>("autoCancelMode");
156  if (!m_autoCancelMode && iConfig.getParameter<std::string>("emtfCancelMode").find("tracks") == 0) {
158  }
159 
160  m_barrelTfInputToken = consumes<MicroGMTConfiguration::InputCollection>(m_barrelTfInputTag);
161  m_overlapTfInputToken = consumes<MicroGMTConfiguration::InputCollection>(m_overlapTfInputTag);
162  m_endcapTfInputToken = consumes<MicroGMTConfiguration::InputCollection>(m_endcapTfInputTag);
163  m_caloTowerInputToken = consumes<MicroGMTConfiguration::CaloInputCollection>(m_trigTowerTag);
164 
165  //register your products
166  produces<MuonBxCollection>();
167  produces<MuonBxCollection>("imdMuonsBMTF");
168  produces<MuonBxCollection>("imdMuonsEMTFPos");
169  produces<MuonBxCollection>("imdMuonsEMTFNeg");
170  produces<MuonBxCollection>("imdMuonsOMTFPos");
171  produces<MuonBxCollection>("imdMuonsOMTFNeg");
172 }
173 
175 
176 //
177 // member functions
178 //
179 
180 // ------------ method called to produce the data ------------
182  using namespace edm;
183  std::unique_ptr<MuonBxCollection> outMuons(new MuonBxCollection());
184  std::unique_ptr<MuonBxCollection> imdMuonsBMTF(new MuonBxCollection());
185  std::unique_ptr<MuonBxCollection> imdMuonsEMTFPos(new MuonBxCollection());
186  std::unique_ptr<MuonBxCollection> imdMuonsEMTFNeg(new MuonBxCollection());
187  std::unique_ptr<MuonBxCollection> imdMuonsOMTFPos(new MuonBxCollection());
188  std::unique_ptr<MuonBxCollection> imdMuonsOMTFNeg(new MuonBxCollection());
189 
194 
195  iEvent.getByToken(m_barrelTfInputToken, bmtfMuons);
196  iEvent.getByToken(m_endcapTfInputToken, emtfMuons);
197  iEvent.getByToken(m_overlapTfInputToken, omtfMuons);
198  iEvent.getByToken(m_caloTowerInputToken, trigTowers);
199 
200  // find out the BX range from the inputs
201  // the smallest BX window defines the output BX window
202  if (m_autoBxRange) {
203  int bxMin = -1000;
204  int bxMax = 1000;
205  if (!(m_caloInputsToDisable.all() || m_maskedCaloInputs.all())) {
206  bxMin = std::max(bxMin, trigTowers->getFirstBX());
207  bxMax = std::min(bxMax, trigTowers->getLastBX());
208  }
209  if (!(m_bmtfInputsToDisable.all() || m_maskedBmtfInputs.all())) {
210  bxMin = std::max(bxMin, bmtfMuons->getFirstBX());
211  bxMax = std::min(bxMax, bmtfMuons->getLastBX());
212  }
213  if (!(m_omtfInputsToDisable.all() || m_maskedOmtfInputs.all())) {
214  bxMin = std::max(bxMin, omtfMuons->getFirstBX());
215  bxMax = std::min(bxMax, omtfMuons->getLastBX());
216  }
217  if (!(m_emtfInputsToDisable.all() || m_maskedEmtfInputs.all())) {
218  bxMin = std::max(bxMin, emtfMuons->getFirstBX());
219  bxMax = std::min(bxMax, emtfMuons->getLastBX());
220  }
221  if (bxMin > 0) {
222  bxMin = 0;
223  }
224  if (bxMax < 0) {
225  bxMax = 0;
226  }
227  if (bxMin > -1000) {
228  m_bxMin = bxMin;
229  } else {
230  m_bxMin = 0;
231  }
232  if (bxMax < 1000) {
233  m_bxMax = bxMax;
234  } else {
235  m_bxMax = 0;
236  }
237  }
238 
239  // set BX range for outputs
240  outMuons->setBXRange(m_bxMin, m_bxMax);
241  imdMuonsBMTF->setBXRange(m_bxMin, m_bxMax);
242  imdMuonsEMTFPos->setBXRange(m_bxMin, m_bxMax);
243  imdMuonsEMTFNeg->setBXRange(m_bxMin, m_bxMax);
244  imdMuonsOMTFPos->setBXRange(m_bxMin, m_bxMax);
245  imdMuonsOMTFNeg->setBXRange(m_bxMin, m_bxMax);
246 
247  for (int bx = m_bxMin; bx <= m_bxMax; ++bx) {
248  m_isolationUnit.setTowerSums(*trigTowers, bx);
249  MicroGMTConfiguration::InterMuonList internMuonsBmtf;
250  MicroGMTConfiguration::InterMuonList internMuonsEmtfPos;
251  MicroGMTConfiguration::InterMuonList internMuonsEmtfNeg;
252  MicroGMTConfiguration::InterMuonList internMuonsOmtfPos;
253  MicroGMTConfiguration::InterMuonList internMuonsOmtfNeg;
254 
255  // These wedges contain shared pointers to the ones in the InterMuonList
256  GMTInternalWedges omtfNegWedges;
257  GMTInternalWedges bmtfWedges;
258  GMTInternalWedges emtfPosWedges;
259  GMTInternalWedges emtfNegWedges;
260  GMTInternalWedges omtfPosWedges;
261 
262  // this converts the InputMuon type to the InternalMuon type and splits them into
263  // positive / negative eta collections necessary as LUTs may differ for pos / neg.
264  convertMuons(bmtfMuons, internMuonsBmtf, bmtfWedges, bx);
265  splitAndConvertMuons(emtfMuons, internMuonsEmtfPos, internMuonsEmtfNeg, emtfPosWedges, emtfNegWedges, bx);
266  splitAndConvertMuons(omtfMuons, internMuonsOmtfPos, internMuonsOmtfNeg, omtfPosWedges, omtfNegWedges, bx);
267 
268  // cancel out within the track finders:
274 
275  // cancel out between track finder acceptance overlaps:
280 
281  m_isolationUnit.extrapolateMuons(internMuonsBmtf);
282  m_isolationUnit.extrapolateMuons(internMuonsEmtfNeg);
283  m_isolationUnit.extrapolateMuons(internMuonsEmtfPos);
284  m_isolationUnit.extrapolateMuons(internMuonsOmtfNeg);
285  m_isolationUnit.extrapolateMuons(internMuonsOmtfPos);
286 
287  // the rank calculated here is used in the sort below
288  calculateRank(internMuonsBmtf);
289  calculateRank(internMuonsEmtfNeg);
290  calculateRank(internMuonsEmtfPos);
291  calculateRank(internMuonsOmtfNeg);
292  calculateRank(internMuonsOmtfPos);
293 
294  // The sort function both sorts and removes all but best "nSurvivors"
295  sortMuons(internMuonsBmtf, 8);
296  sortMuons(internMuonsOmtfPos, 4);
297  sortMuons(internMuonsOmtfNeg, 4);
298  sortMuons(internMuonsEmtfPos, 4);
299  sortMuons(internMuonsEmtfNeg, 4);
300 
301  // This combines the 5 streams into one InternalMuon collection for
302  // the final global sort.
304  addMuonsToCollections(internMuonsEmtfPos, internalMuons, imdMuonsEMTFPos, bx);
305  addMuonsToCollections(internMuonsOmtfPos, internalMuons, imdMuonsOMTFPos, bx);
306  addMuonsToCollections(internMuonsBmtf, internalMuons, imdMuonsBMTF, bx);
307  addMuonsToCollections(internMuonsOmtfNeg, internalMuons, imdMuonsOMTFNeg, bx);
308  addMuonsToCollections(internMuonsEmtfNeg, internalMuons, imdMuonsEMTFNeg, bx);
309 
310  // sort internal muons and delete all but best 8
311  sortMuons(internalMuons, 8);
312 
313  m_isolationUnit.isolatePreSummed(internalMuons);
314  // copy muons to output collection...
315  for (const auto& mu : internalMuons) {
316  if (mu->hwPt() > 0) {
318  (mu->hwPt() - 1) * 0.5, mu->hwEta() * 0.010875, mu->hwGlobalPhi() * 0.010908, 0.0};
319  int iso = mu->hwAbsIso() + (mu->hwRelIso() << 1);
320  int outMuQual = MicroGMTConfiguration::setOutputMuonQuality(mu->hwQual(), mu->trackFinderType(), mu->hwHF());
321  Muon outMu{vec,
322  mu->hwPt(),
323  mu->hwEta(),
324  mu->hwGlobalPhi(),
325  outMuQual,
326  mu->hwSign(),
327  mu->hwSignValid(),
328  iso,
329  mu->tfMuonIndex(),
330  0,
331  true,
332  mu->hwIsoSum(),
333  mu->hwDPhi(),
334  mu->hwDEta(),
335  mu->hwRank()};
336  if (mu->hwSignValid()) {
337  outMu.setCharge(1 - 2 * mu->hwSign());
338  } else {
339  outMu.setCharge(0);
340  }
341  // set the coordinates at the vertex
342  outMu.setHwEtaAtVtx(MicroGMTConfiguration::calcMuonHwEtaExtra(outMu));
343  outMu.setHwPhiAtVtx(MicroGMTConfiguration::calcMuonHwPhiExtra(outMu));
344  outMu.setEtaAtVtx(MicroGMTConfiguration::calcMuonEtaExtra(outMu));
345  outMu.setPhiAtVtx(MicroGMTConfiguration::calcMuonPhiExtra(outMu));
346  m_debugOut << mu->hwCaloPhi() << " " << mu->hwCaloEta() << std::endl;
347  outMuons->push_back(bx, outMu);
348  }
349  }
350  }
351 
352  iEvent.put(std::move(outMuons));
353  iEvent.put(std::move(imdMuonsBMTF), "imdMuonsBMTF");
354  iEvent.put(std::move(imdMuonsEMTFPos), "imdMuonsEMTFPos");
355  iEvent.put(std::move(imdMuonsEMTFNeg), "imdMuonsEMTFNeg");
356  iEvent.put(std::move(imdMuonsOMTFPos), "imdMuonsOMTFPos");
357  iEvent.put(std::move(imdMuonsOMTFNeg), "imdMuonsOMTFNeg");
358 }
359 
360 bool L1TMuonProducer::compareMuons(const std::shared_ptr<MicroGMTConfiguration::InterMuon>& mu1,
361  const std::shared_ptr<MicroGMTConfiguration::InterMuon>& mu2) {
362  return (mu1->hwWins() >= mu2->hwWins());
363 }
364 
366  MicroGMTConfiguration::InterMuonList::iterator mu1;
367  // reset from previous sort stage
368  for (mu1 = muons.begin(); mu1 != muons.end(); ++mu1) {
369  (*mu1)->setHwWins(0);
370  }
371 
372  int nCancelled = 0;
373  for (mu1 = muons.begin(); mu1 != muons.end(); ++mu1) {
374  int mu1CancelBit = (*mu1)->hwCancelBit();
375  nCancelled += mu1CancelBit;
376  auto mu2 = mu1;
377  mu2++;
378  for (; mu2 != muons.end(); ++mu2) {
379  if (mu1CancelBit != 1 && (*mu2)->hwCancelBit() != 1) {
380  if ((*mu1)->hwRank() >= (*mu2)->hwRank()) {
381  (*mu1)->increaseWins();
382  } else {
383  (*mu2)->increaseWins();
384  }
385  } else if (mu1CancelBit != 1) {
386  (*mu1)->increaseWins();
387  } else if ((*mu2)->hwCancelBit() != 1) {
388  (*mu2)->increaseWins();
389  }
390  }
391  }
392 
393  size_t nMuonsBefore = muons.size();
394  int minWins = nMuonsBefore - nSurvivors;
395 
396  // remove all muons that were cancelled or that do not have sufficient rank
397  // (reduces the container size to nSurvivors)
398  muons.remove_if([&minWins](auto muon) { return ((muon->hwWins() < minWins) || (muon->hwCancelBit() == 1)); });
400 }
401 
403  for (auto& mu1 : muons) {
404  int rank = m_rankPtQualityLUT->lookup(mu1->hwPt(), mu1->hwQual());
405  mu1->setHwRank(rank);
406  }
407 }
408 
411  std::unique_ptr<MuonBxCollection>& out,
412  int bx) const {
413  for (auto& mu : coll) {
414  interout.push_back(mu);
415  math::PtEtaPhiMLorentzVector vec{(mu->hwPt() - 1) * 0.5, mu->hwEta() * 0.010875, mu->hwGlobalPhi() * 0.010908, 0.0};
416  int outMuQual = MicroGMTConfiguration::setOutputMuonQuality(mu->hwQual(), mu->trackFinderType(), mu->hwHF());
417  // set tfMuonIndex and iso to 0 like in the FW
418  Muon outMu{vec,
419  mu->hwPt(),
420  mu->hwEta(),
421  mu->hwGlobalPhi(),
422  outMuQual,
423  mu->hwSign(),
424  mu->hwSignValid(),
425  0,
426  0,
427  0,
428  true,
429  0,
430  mu->hwDPhi(),
431  mu->hwDEta(),
432  mu->hwRank()};
433  if (mu->hwSignValid()) {
434  outMu.setCharge(1 - 2 * mu->hwSign());
435  } else {
436  outMu.setCharge(0);
437  }
438 
439  out->push_back(bx, outMu);
440  }
441 }
442 
446  GMTInternalWedges& wedges_pos,
447  GMTInternalWedges& wedges_neg,
448  int bx) const {
449  // initialize the wedge collections:
450  for (int i = 0; i < 6; ++i) {
451  wedges_pos[i] = std::vector<std::shared_ptr<GMTInternalMuon>>();
452  wedges_pos[i].reserve(3);
453  wedges_neg[i] = std::vector<std::shared_ptr<GMTInternalMuon>>();
454  wedges_neg[i].reserve(3);
455  }
456  if (bx < in->getFirstBX() || bx > in->getLastBX())
457  return;
458  int muIdx = 0;
459  int currentLink = 0;
460  for (size_t i = 0; i < in->size(bx); ++i, ++muIdx) {
461  int link = in->at(bx, i).link();
462  if (m_inputsToDisable.test(link) || m_maskedInputs.test(link))
463  continue; // only process if input link is enabled and not masked
464  if (currentLink != link) {
465  muIdx = 0;
466  currentLink = link;
467  }
468  int gPhi = MicroGMTConfiguration::calcGlobalPhi(
469  in->at(bx, i).hwPhi(), in->at(bx, i).trackFinderType(), in->at(bx, i).processor());
470  int tfMuonIdx = 3 * (currentLink - 36) + muIdx;
471  std::shared_ptr<GMTInternalMuon> out = std::make_shared<GMTInternalMuon>(in->at(bx, i), gPhi, tfMuonIdx);
472  if (in->at(bx, i).hwEta() > 0) {
473  out_pos.push_back(out);
474  wedges_pos[in->at(bx, i).processor()].push_back(out);
475  } else {
476  out_neg.emplace_back(out);
477  wedges_neg[in->at(bx, i).processor()].push_back(out);
478  }
479  }
480  for (int i = 0; i < 6; ++i) {
481  if (wedges_pos[i].size() > 3)
482  edm::LogWarning("Input Mismatch") << " too many inputs per processor for emtf+ / omtf+. Wedge " << i << ": Size "
483  << wedges_pos[i].size() << std::endl;
484  if (wedges_neg[i].size() > 3)
485  edm::LogWarning("Input Mismatch") << " too many inputs per processor for emtf- / omtf-. Wedge " << i << ": Size "
486  << wedges_neg[i].size() << std::endl;
487  }
488 }
489 
492  GMTInternalWedges& wedges,
493  int bx) const {
494  // initialize the wedge collection:
495  for (int i = 0; i < 12; ++i) {
496  wedges[i] = std::vector<std::shared_ptr<GMTInternalMuon>>();
497  wedges[i].reserve(3);
498  }
499  if (bx < in->getFirstBX() || bx > in->getLastBX())
500  return;
501  int muIdx = 0;
502  int currentLink = 0;
503  for (size_t i = 0; i < in->size(bx); ++i, ++muIdx) {
504  int link = in->at(bx, i).link();
505  if (m_inputsToDisable.test(link) || m_maskedInputs.test(link))
506  continue; // only process if input link is enabled and not masked
507  if (currentLink != link) {
508  muIdx = 0;
509  currentLink = link;
510  }
511  int gPhi = MicroGMTConfiguration::calcGlobalPhi(
512  in->at(bx, i).hwPhi(), in->at(bx, i).trackFinderType(), in->at(bx, i).processor());
513  int tfMuonIdx = 3 * (currentLink - 36) + muIdx;
514  std::shared_ptr<GMTInternalMuon> outMu = std::make_shared<GMTInternalMuon>(in->at(bx, i), gPhi, tfMuonIdx);
515  out.emplace_back(outMu);
516  wedges[in->at(bx, i).processor()].push_back(outMu);
517  }
518  for (int i = 0; i < 12; ++i) {
519  if (wedges[i].size() > 3)
520  edm::LogWarning("Input Mismatch") << " too many inputs per processor for barrel. Wedge " << i << ": Size "
521  << wedges[i].size() << std::endl;
522  }
523 }
524 
525 // ------------ method called when starting to processes a run ------------
527  const L1TMuonGlobalParamsRcd& microGMTParamsRcd = iSetup.get<L1TMuonGlobalParamsRcd>();
528  edm::ESHandle<L1TMuonGlobalParams> microGMTParamsHandle;
529  microGMTParamsRcd.get(microGMTParamsHandle);
530 
531  std::unique_ptr<L1TMuonGlobalParams_PUBLIC> microGMTParams(
532  new L1TMuonGlobalParams_PUBLIC(cast_to_L1TMuonGlobalParams_PUBLIC(*microGMTParamsHandle.product())));
533  if (microGMTParams->pnodes_.empty()) {
534  edm::ESHandle<L1TMuonGlobalParams> o2oProtoHandle;
535  iSetup.get<L1TMuonGlobalParamsO2ORcd>().get(o2oProtoHandle);
537  std::unique_ptr<L1TMuonGlobalParamsHelper>(new L1TMuonGlobalParamsHelper(*o2oProtoHandle.product()));
538  } else
540 
541  //microGMTParamsHelper->print(std::cout);
542  m_inputsToDisable = microGMTParamsHelper->inputsToDisable();
543  edm::LogVerbatim("L1TMuonProducer")
544  << "uGMT inputsToDisable: " << m_inputsToDisable
545  << "\n EMTF-|OMTF-| BMTF |OMTF+|EMTF+| CALO | res 0";
546  m_caloInputsToDisable = microGMTParamsHelper->caloInputsToDisable();
547  m_bmtfInputsToDisable = microGMTParamsHelper->bmtfInputsToDisable();
548  m_omtfInputsToDisable = microGMTParamsHelper->omtfInputsToDisable();
549  m_emtfInputsToDisable = microGMTParamsHelper->emtfInputsToDisable();
550  m_maskedInputs = microGMTParamsHelper->maskedInputs();
551  edm::LogVerbatim("L1TMuonProducer")
552  << "uGMT maskedInputs: " << m_maskedInputs
553  << "\n EMTF-|OMTF-| BMTF |OMTF+|EMTF+| CALO | res 0";
554  m_maskedCaloInputs = microGMTParamsHelper->maskedCaloInputs();
555  m_maskedBmtfInputs = microGMTParamsHelper->maskedBmtfInputs();
556  m_maskedOmtfInputs = microGMTParamsHelper->maskedOmtfInputs();
557  m_maskedEmtfInputs = microGMTParamsHelper->maskedEmtfInputs();
562 
563  if (m_autoCancelMode && microGMTParamsHelper->fwVersion() > 0x5000000) {
565  }
566 }
567 
568 // ------------ method called when ending the processing of a run ------------
570 
571 // ------------ method called when starting to processes a luminosity block ------------
573 
574 // ------------ method called when ending the processing of a luminosity block ------------
576 
577 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
579  //The following says we do not know what parameters are allowed so do no validation
580  // Please change this to state exactly what you do use, even if it is no parameters
582  desc.setUnknown();
583  descriptions.addDefault(desc);
584 }
585 
586 //define this as a plug-in
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
Ecal2004TBTDCRanges_v1_cff.endRun
endRun
Definition: Ecal2004TBTDCRanges_v1_cff.py:4
l1t::bmtf
Definition: RegionalMuonCandFwd.h:8
l1t::MicroGMTCancelOutUnit::setCancelOutBits
void setCancelOutBits(GMTInternalWedges &, tftype, cancelmode)
Cancel out between sectors/wedges in one track finder.
Definition: MicroGMTCancelOutUnit.cc:39
l1t::emtf_neg
Definition: RegionalMuonCandFwd.h:8
L1TMuonProducer::m_endcapTfInputTag
edm::InputTag m_endcapTfInputTag
Definition: L1TMuonProducer.cc:115
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:355
l1t::MicroGMTCancelOutUnit::setCancelOutBitsOverlapEndcap
void setCancelOutBitsOverlapEndcap(GMTInternalWedges &, GMTInternalWedges &, cancelmode)
Cancel-out between overlap and endcap track finders.
Definition: MicroGMTCancelOutUnit.cc:102
L1TMuonProducer::m_overlapTfInputToken
edm::EDGetTokenT< MicroGMTConfiguration::InputCollection > m_overlapTfInputToken
Definition: L1TMuonProducer.cc:124
GMTInternalMuon.h
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
ESHandle.h
muon
Definition: MuonCocktails.h:17
l1t::omtf_pos
Definition: RegionalMuonCandFwd.h:8
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
L1TMuonProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: L1TMuonProducer.cc:578
l1t::MicroGMTConfiguration::InterMuonList
GMTInternalMuonList InterMuonList
Definition: MicroGMTConfiguration.h:39
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT< MicroGMTConfiguration::InputCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TMuonProducer
Definition: L1TMuonProducer.cc:58
l1t::MuonBxCollection
BXVector< Muon > MuonBxCollection
Definition: Muon.h:11
Muon.h
L1TMuonProducer::~L1TMuonProducer
~L1TMuonProducer() override
Definition: L1TMuonProducer.cc:174
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
l1t::cancelmode
cancelmode
Definition: MicroGMTCancelOutUnit.h:11
L1TMuonProducer::m_autoCancelMode
bool m_autoCancelMode
Definition: L1TMuonProducer.cc:101
EDProducer.h
l1t::MicroGMTIsolationUnit::initialise
void initialise(L1TMuonGlobalParamsHelper *)
Initialisation from ES record.
Definition: MicroGMTIsolationUnit.cc:12
L1TMuonProducer::m_bmtfInputsToDisable
std::bitset< 12 > m_bmtfInputsToDisable
Definition: L1TMuonProducer.cc:104
L1TMuonProducer::convertMuons
void convertMuons(edm::Handle< MicroGMTConfiguration::InputCollection > const &in, MicroGMTConfiguration::InterMuonList &out, GMTInternalWedges &wedges, int bx) const
Definition: L1TMuonProducer.cc:490
L1TMuonProducer::m_maskedOmtfInputs
std::bitset< 12 > m_maskedOmtfInputs
Definition: L1TMuonProducer.cc:110
MicroGMTCancelOutUnit.h
edm::Handle
Definition: AssociativeIterator.h:50
L1TMuonProducer::m_caloTowerInputToken
edm::EDGetTokenT< MicroGMTConfiguration::CaloInputCollection > m_caloTowerInputToken
Definition: L1TMuonProducer.cc:126
L1TMuonProducer::m_rankPtQualityLUT
std::shared_ptr< MicroGMTRankPtQualLUT > m_rankPtQualityLUT
Definition: L1TMuonProducer.cc:117
Muon
Definition: Muon.py:1
MicroGMTRankPtQualLUT.h
L1TMuonProducer::m_emtfInputsToDisable
std::bitset< 12 > m_emtfInputsToDisable
Definition: L1TMuonProducer.cc:106
l1t::MicroGMTIsolationUnit
Definition: MicroGMTIsolationUnit.h:14
BXVector::getFirstBX
int getFirstBX() const
l1tstage1emulator_dqm_sourceclient-live_cfg.bxMin
bxMin
Definition: l1tstage1emulator_dqm_sourceclient-live_cfg.py:84
MakerMacros.h
l1t::GMTInternalWedges
std::map< int, std::vector< std::shared_ptr< GMTInternalMuon > > > GMTInternalWedges
Definition: GMTInternalMuonFwd.h:11
L1TMuonProducer::m_trigTowerTag
edm::InputTag m_trigTowerTag
Definition: L1TMuonProducer.cc:116
l1t::MicroGMTRankPtQualLUTFactory::create
static ReturnType create(const std::string &filename, const int fwVersion, const unsigned ptFactor, const unsigned qualFactor)
Definition: MicroGMTRankPtQualLUTFactory.cc:18
l1t::coordinate
Definition: MicroGMTCancelOutUnit.h:11
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MicroGMTConfiguration.h
L1TMuonGlobalParams_PUBLIC
Definition: L1TMuonGlobalParams_PUBLIC.h:21
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
L1TMuonProducer::calculateRank
void calculateRank(MicroGMTConfiguration::InterMuonList &muons) const
Definition: L1TMuonProducer.cc:402
edm::ESHandle
Definition: DTSurvey.h:22
l1tstage1emulator_dqm_sourceclient-live_cfg.bxMax
bxMax
Definition: l1tstage1emulator_dqm_sourceclient-live_cfg.py:85
l1t::MicroGMTCancelOutUnit
Definition: MicroGMTCancelOutUnit.h:13
L1TMuonProducer::microGMTParamsHelper
std::unique_ptr< L1TMuonGlobalParamsHelper > microGMTParamsHelper
Definition: L1TMuonProducer.cc:112
L1TMuonProducer::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: L1TMuonProducer.cc:575
L1TMuonProducer::splitAndConvertMuons
void splitAndConvertMuons(edm::Handle< MicroGMTConfiguration::InputCollection > const &in, MicroGMTConfiguration::InterMuonList &out_pos, MicroGMTConfiguration::InterMuonList &out_neg, GMTInternalWedges &wedges_pos, GMTInternalWedges &wedges_neg, int bx) const
Definition: L1TMuonProducer.cc:443
L1TMuonProducer::m_barrelTfInputToken
edm::EDGetTokenT< MicroGMTConfiguration::InputCollection > m_barrelTfInputToken
Definition: L1TMuonProducer.cc:123
L1TMuonProducer::m_maskedCaloInputs
std::bitset< 28 > m_maskedCaloInputs
Definition: L1TMuonProducer.cc:108
l1t::MicroGMTIsolationUnit::setTowerSums
void setTowerSums(const MicroGMTConfiguration::CaloInputCollection &inputs, int bx)
Definition: MicroGMTIsolationUnit.cc:185
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
L1TMuonProducer::m_barrelTfInputTag
edm::InputTag m_barrelTfInputTag
Definition: L1TMuonProducer.cc:113
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
MicroGMTIsolationUnit.h
L1TMuonProducer::m_maskedBmtfInputs
std::bitset< 12 > m_maskedBmtfInputs
Definition: L1TMuonProducer.cc:109
L1TMuonGlobalParamsO2ORcd.h
edm::ParameterSet
Definition: ParameterSet.h:36
L1TMuonProducer::m_maskedEmtfInputs
std::bitset< 12 > m_maskedEmtfInputs
Definition: L1TMuonProducer.cc:111
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
l1t::MicroGMTIsolationUnit::extrapolateMuons
void extrapolateMuons(MicroGMTConfiguration::InterMuonList &) const
Definition: MicroGMTIsolationUnit.cc:67
l1t
delete x;
Definition: CaloConfig.h:22
MicroGMTLUTFactories.h
L1TMuonProducer::m_emtfCancelMode
l1t::cancelmode m_emtfCancelMode
Definition: L1TMuonProducer.cc:121
L1TMuonGlobalParams.h
recoMuon::in
Definition: RecoMuonEnumerators.h:6
L1TMuonGlobalParams_PUBLIC.h
L1TMuonProducer::m_maskedInputs
std::bitset< 72 > m_maskedInputs
Definition: L1TMuonProducer.cc:107
L1TMuonProducer::m_endcapTfInputToken
edm::EDGetTokenT< MicroGMTConfiguration::InputCollection > m_endcapTfInputToken
Definition: L1TMuonProducer.cc:125
LorentzVector.h
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TMuonProducer::m_bxMax
int m_bxMax
Definition: L1TMuonProducer.cc:100
L1TMuonProducer::m_autoBxRange
bool m_autoBxRange
Definition: L1TMuonProducer.cc:98
edm::LogVerbatim
Definition: MessageLogger.h:297
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
L1TMuonGlobalParamsRcd
Definition: L1TMuonGlobalParamsRcd.h:23
L1TMuonProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: L1TMuonProducer.cc:572
L1TMuonProducer::m_isolationUnit
MicroGMTIsolationUnit m_isolationUnit
Definition: L1TMuonProducer.cc:118
L1TMuonProducer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: L1TMuonProducer.cc:526
L1TMuonGlobalParamsHelper.h
L1TMuonProducer::m_debugOut
std::ofstream m_debugOut
Definition: L1TMuonProducer.cc:120
L1TMuonProducer::compareMuons
static bool compareMuons(const std::shared_ptr< MicroGMTConfiguration::InterMuon > &mu1, const std::shared_ptr< MicroGMTConfiguration::InterMuon > &mu2)
Definition: L1TMuonProducer.cc:360
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
l1t::MicroGMTIsolationUnit::isolatePreSummed
void isolatePreSummed(MicroGMTConfiguration::InterMuonList &muons) const
Definition: MicroGMTIsolationUnit.cc:203
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
L1TMuonGlobalParamsO2ORcd
Definition: L1TMuonGlobalParamsO2ORcd.h:26
L1TMuonProducer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: L1TMuonProducer.cc:569
L1TMuonProducer::m_bxMin
int m_bxMin
Definition: L1TMuonProducer.cc:99
l1t::emtf_pos
Definition: RegionalMuonCandFwd.h:8
Frameworkfwd.h
l1t::MicroGMTCancelOutUnit::initialise
void initialise(L1TMuonGlobalParamsHelper *)
Initialisation from ES record.
Definition: MicroGMTCancelOutUnit.cc:10
AlignmentPI::coordinate
coordinate
Definition: AlignmentPayloadInspectorHelper.h:33
l1t::MicroGMTCancelOutUnit::setCancelOutBitsOverlapBarrel
void setCancelOutBitsOverlapBarrel(GMTInternalWedges &, GMTInternalWedges &, cancelmode)
Cancel-out between overlap and barrel track finders.
Definition: MicroGMTCancelOutUnit.cc:68
L1TMuonProducer::m_omtfInputsToDisable
std::bitset< 12 > m_omtfInputsToDisable
Definition: L1TMuonProducer.cc:105
L1TMuonProducer::m_cancelOutUnit
MicroGMTCancelOutUnit m_cancelOutUnit
Definition: L1TMuonProducer.cc:119
EventSetup.h
RegionalMuonCand.h
cast_to_L1TMuonGlobalParams
const L1TMuonGlobalParams & cast_to_L1TMuonGlobalParams(const L1TMuonGlobalParams_PUBLIC &x)
Definition: L1TMuonGlobalParams_PUBLIC.cc:10
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
L1TMuonProducer::sortMuons
void sortMuons(MicroGMTConfiguration::InterMuonList &, unsigned) const
Definition: L1TMuonProducer.cc:365
math::PtEtaPhiMLorentzVector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
cast_to_L1TMuonGlobalParams_PUBLIC
const L1TMuonGlobalParams_PUBLIC & cast_to_L1TMuonGlobalParams_PUBLIC(const L1TMuonGlobalParams &x)
Definition: L1TMuonGlobalParams_PUBLIC.cc:3
ParameterSet.h
L1TMuonProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: L1TMuonProducer.cc:181
edm::Event
Definition: Event.h:73
l1t::omtf_neg
Definition: RegionalMuonCandFwd.h:8
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
BXVector::getLastBX
int getLastBX() const
L1TMuonProducer::m_overlapTfInputTag
edm::InputTag m_overlapTfInputTag
Definition: L1TMuonProducer.cc:114
L1TMuonGlobalParamsRcd.h
edm::InputTag
Definition: InputTag.h:15
L1TMuonProducer::L1TMuonProducer
L1TMuonProducer(const edm::ParameterSet &)
Definition: L1TMuonProducer.cc:140
L1TMuonGlobalParamsHelper
Definition: L1TMuonGlobalParamsHelper.h:24
L1TMuonProducer::m_inputsToDisable
std::bitset< 72 > m_inputsToDisable
Definition: L1TMuonProducer.cc:102
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
L1TMuonProducer::m_caloInputsToDisable
std::bitset< 28 > m_caloInputsToDisable
Definition: L1TMuonProducer.cc:103
L1TMuonProducer::addMuonsToCollections
void addMuonsToCollections(MicroGMTConfiguration::InterMuonList &coll, MicroGMTConfiguration::InterMuonList &interout, std::unique_ptr< MuonBxCollection > &out, int bx) const
Definition: L1TMuonProducer.cc:409