CMS 3D CMS Logo

DTTrigPhase2Prod.cc
Go to the documentation of this file.
10 
17 
21 
24 
39 
53 
54 // DT trigger GeomUtils
56 
57 //RPC TP
62 
63 #include <fstream>
64 #include <iostream>
65 #include <queue>
66 #include <cmath>
67 
68 using namespace edm;
69 using namespace std;
70 using namespace cmsdt;
71 
73  typedef std::map<DTChamberId, DTDigiCollection, std::less<DTChamberId>> DTDigiMap;
74  typedef DTDigiMap::iterator DTDigiMap_iterator;
75  typedef DTDigiMap::const_iterator DTDigiMap_const_iterator;
76 
77 public:
80 
82  ~DTTrigPhase2Prod() override;
83 
85  void beginRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) override;
86 
88  void produce(edm::Event& iEvent, const edm::EventSetup& iEventSetup) override;
89 
91  void endRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) override;
92 
93  // Methods
94  int rango(const metaPrimitive& mp) const;
95  bool outer(const metaPrimitive& mp) const;
96  bool inner(const metaPrimitive& mp) const;
97  void printmP(const std::string& ss, const metaPrimitive& mP) const;
98  void printmPC(const std::string& ss, const metaPrimitive& mP) const;
99  bool hasPosRF(int wh, int sec) const;
100 
101  // Getter-methods
102  MP_QUALITY getMinimumQuality(void);
103 
104  // Setter-methods
105  void setChiSquareThreshold(float ch2Thr);
106  void setMinimumQuality(MP_QUALITY q);
107 
108  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
109 
110  // data-members
113  std::vector<std::pair<int, MuonPath>> primitives_;
114 
115 private:
116  // Trigger Configuration Manager CCB validity flag
118 
119  // BX offset used to correct DTTPG output
121 
122  // Debug Flag
123  bool debug_;
124  bool dump_;
129 
130  // ParameterSet
133 
134  // Grouping attributes and methods
135  int algo_; // Grouping code
136  std::unique_ptr<MotherGrouping> grouping_obj_;
137  std::unique_ptr<MuonPathAnalyzer> mpathanalyzer_;
138  std::unique_ptr<MPFilter> mpathqualityenhancer_;
139  std::unique_ptr<MPFilter> mpathqualityenhancerbayes_;
140  std::unique_ptr<MPFilter> mpathredundantfilter_;
141  std::unique_ptr<MPFilter> mpathhitsfilter_;
142  std::unique_ptr<MuonPathAssociator> mpathassociator_;
143  std::shared_ptr<GlobalCoordsObtainer> globalcoordsobtainer_;
144 
145  // Buffering
149  std::vector<DTDigiCollection*> distribDigis(std::queue<std::pair<DTLayerId, DTDigi>>& inQ);
150  void processDigi(std::queue<std::pair<DTLayerId, DTDigi>>& inQ,
151  std::vector<std::queue<std::pair<DTLayerId, DTDigi>>*>& vec);
152 
153  // RPC
154  std::unique_ptr<RPCIntegrator> rpc_integrator_;
155  bool useRPC_;
156 
157  void assignIndex(std::vector<metaPrimitive>& inMPaths);
158  void assignIndexPerBX(std::vector<metaPrimitive>& inMPaths);
159  int assignQualityOrder(const metaPrimitive& mP) const;
160 
161  const std::unordered_map<int, int> qmap_;
162 };
163 
164 namespace {
165  struct {
166  bool operator()(std::pair<DTLayerId, DTDigi> a, std::pair<DTLayerId, DTDigi> b) const {
167  return (a.second.time() < b.second.time());
168  }
169  } const DigiTimeOrdering;
170 } // namespace
171 
173  : qmap_({{8, 8}, {7, 7}, {6, 6}, {4, 4}, {3, 3}, {2, 2}, {1, 1}}) {
174  produces<L1Phase2MuDTPhContainer>();
175  produces<L1Phase2MuDTThContainer>();
176  produces<L1Phase2MuDTExtPhContainer>();
177  produces<L1Phase2MuDTExtThContainer>();
178 
179  debug_ = pset.getUntrackedParameter<bool>("debug");
180  dump_ = pset.getUntrackedParameter<bool>("dump");
181 
182  scenario_ = pset.getParameter<int>("scenario");
183 
184  df_extended_ = pset.getParameter<int>("df_extended");
185  max_index_ = pset.getParameter<int>("max_primitives") - 1;
186 
187  dtDigisToken_ = consumes<DTDigiCollection>(pset.getParameter<edm::InputTag>("digiTag"));
188 
189  rpcRecHitsLabel_ = consumes<RPCRecHitCollection>(pset.getParameter<edm::InputTag>("rpcRecHits"));
190  useRPC_ = pset.getParameter<bool>("useRPC");
191 
192  // Choosing grouping scheme:
193  algo_ = pset.getParameter<int>("algo");
194 
195  edm::ConsumesCollector consumesColl(consumesCollector());
196  globalcoordsobtainer_ = std::make_shared<GlobalCoordsObtainer>(pset);
197  globalcoordsobtainer_->generate_luts();
198 
199  if (algo_ == PseudoBayes) {
200  grouping_obj_ =
201  std::make_unique<PseudoBayesGrouping>(pset.getParameter<edm::ParameterSet>("PseudoBayesPattern"), consumesColl);
202  } else if (algo_ == HoughTrans) {
203  grouping_obj_ =
204  std::make_unique<HoughGrouping>(pset.getParameter<edm::ParameterSet>("HoughGrouping"), consumesColl);
205  } else {
206  grouping_obj_ = std::make_unique<InitialGrouping>(pset, consumesColl);
207  }
208 
209  if (algo_ == Standard) {
210  if (debug_)
211  LogDebug("DTTrigPhase2Prod") << "DTp2:constructor: JM analyzer";
212  mpathanalyzer_ = std::make_unique<MuonPathAnalyticAnalyzer>(pset, consumesColl, globalcoordsobtainer_);
213  } else {
214  if (debug_)
215  LogDebug("DTTrigPhase2Prod") << "DTp2:constructor: Full chamber analyzer";
216  mpathanalyzer_ = std::make_unique<MuonPathAnalyzerInChamber>(pset, consumesColl, globalcoordsobtainer_);
217  }
218 
219  // Getting buffer option
220  activateBuffer_ = pset.getParameter<bool>("activateBuffer");
221  superCellhalfspacewidth_ = pset.getParameter<int>("superCellspacewidth") / 2;
222  superCelltimewidth_ = pset.getParameter<double>("superCelltimewidth");
223 
224  mpathqualityenhancer_ = std::make_unique<MPQualityEnhancerFilter>(pset);
225  mpathqualityenhancerbayes_ = std::make_unique<MPQualityEnhancerFilterBayes>(pset);
226  mpathredundantfilter_ = std::make_unique<MPRedundantFilter>(pset);
227  mpathhitsfilter_ = std::make_unique<MPCleanHitsFilter>(pset);
228  mpathassociator_ = std::make_unique<MuonPathAssociator>(pset, consumesColl, globalcoordsobtainer_);
229  rpc_integrator_ = std::make_unique<RPCIntegrator>(pset, consumesColl);
230 
231  dtGeomH = esConsumes<DTGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
232 }
233 
235  if (debug_)
236  LogDebug("DTTrigPhase2Prod") << "DTp2: calling destructor" << std::endl;
237 }
238 
239 void DTTrigPhase2Prod::beginRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) {
240  if (debug_)
241  LogDebug("DTTrigPhase2Prod") << "beginRun " << iRun.id().run();
242  if (debug_)
243  LogDebug("DTTrigPhase2Prod") << "beginRun: getting DT geometry";
244 
245  grouping_obj_->initialise(iEventSetup); // Grouping object initialisation
246  mpathanalyzer_->initialise(iEventSetup); // Analyzer object initialisation
247  mpathqualityenhancer_->initialise(iEventSetup); // Filter object initialisation
248  mpathredundantfilter_->initialise(iEventSetup); // Filter object initialisation
249  mpathqualityenhancerbayes_->initialise(iEventSetup); // Filter object initialisation
250  mpathhitsfilter_->initialise(iEventSetup);
251  mpathassociator_->initialise(iEventSetup); // Associator object initialisation
252 
253  if (auto geom = iEventSetup.getHandle(dtGeomH)) {
254  dtGeo_ = &(*geom);
255  }
256 }
257 
258 void DTTrigPhase2Prod::produce(Event& iEvent, const EventSetup& iEventSetup) {
259  if (debug_)
260  LogDebug("DTTrigPhase2Prod") << "produce";
262  iEvent.getByToken(dtDigisToken_, dtdigis);
263 
264  if (debug_)
265  LogDebug("DTTrigPhase2Prod") << "\t Getting the RPC RecHits" << std::endl;
267  iEvent.getByToken(rpcRecHitsLabel_, rpcRecHits);
268 
270  // GROUPING CODE:
272 
273  DTDigiMap digiMap;
275  for (const auto& detUnitIt : *dtdigis) {
276  const DTLayerId& layId = detUnitIt.first;
277  const DTChamberId chambId = layId.superlayerId().chamberId();
278  const DTDigiCollection::Range& range = detUnitIt.second;
279  digiMap[chambId].put(range, layId);
280  }
281 
282  // generate a list muon paths for each event!!!
283  if (debug_ && activateBuffer_)
284  LogDebug("DTTrigPhase2Prod") << "produce - Getting and grouping digis per chamber using a buffer and super cells.";
285  else if (debug_)
286  LogDebug("DTTrigPhase2Prod") << "produce - Getting and grouping digis per chamber.";
287 
288  MuonPathPtrs muonpaths;
289  for (const auto& ich : dtGeo_->chambers()) {
290  // The code inside this for loop would ideally later fit inside a trigger unit (in principle, a DT station) of the future Phase 2 DT Trigger.
291  const DTChamber* chamb = ich;
292  DTChamberId chid = chamb->id();
293  DTDigiMap_iterator dmit = digiMap.find(chid);
294 
295  if (dmit == digiMap.end())
296  continue;
297 
298  if (activateBuffer_) { // Use buffering (per chamber) or not
299  // Import digis from the station
300  std::vector<std::pair<DTLayerId, DTDigi>> tmpvec;
301  tmpvec.clear();
302 
303  for (const auto& dtLayerIdIt : (*dmit).second) {
304  for (DTDigiCollection::const_iterator digiIt = (dtLayerIdIt.second).first;
305  digiIt != (dtLayerIdIt.second).second;
306  digiIt++) {
307  tmpvec.emplace_back(dtLayerIdIt.first, *digiIt);
308  }
309  }
310 
311  // Check to enhance CPU time usage
312  if (tmpvec.empty())
313  continue;
314 
315  // Order digis depending on TDC time and insert them into a queue (FIFO buffer). TODO: adapt for MC simulations.
316  std::sort(tmpvec.begin(), tmpvec.end(), DigiTimeOrdering);
317  std::queue<std::pair<DTLayerId, DTDigi>> timequeue;
318 
319  for (const auto& elem : tmpvec)
320  timequeue.emplace(elem);
321  tmpvec.clear();
322 
323  // Distribute the digis from the queue into supercells
324  std::vector<DTDigiCollection*> superCells;
325  superCells = distribDigis(timequeue);
326 
327  // Process each supercell & collect the resulting muonpaths (as the muonpaths std::vector is only enlarged each time
328  // the groupings access it, it's not needed to "collect" the final products).
329 
330  while (!superCells.empty()) {
331  grouping_obj_->run(iEvent, iEventSetup, *(superCells.back()), muonpaths);
332  superCells.pop_back();
333  }
334  } else {
335  grouping_obj_->run(iEvent, iEventSetup, (*dmit).second, muonpaths);
336  }
337  }
338  digiMap.clear();
339 
340  if (dump_) {
341  for (unsigned int i = 0; i < muonpaths.size(); i++) {
342  stringstream ss;
343  ss << iEvent.id().event() << " mpath " << i << ": ";
344  for (int lay = 0; lay < muonpaths.at(i)->nprimitives(); lay++)
345  ss << muonpaths.at(i)->primitive(lay)->channelId() << " ";
346  for (int lay = 0; lay < muonpaths.at(i)->nprimitives(); lay++)
347  ss << muonpaths.at(i)->primitive(lay)->tdcTimeStamp() << " ";
348  for (int lay = 0; lay < muonpaths.at(i)->nprimitives(); lay++)
349  ss << muonpaths.at(i)->primitive(lay)->laterality() << " ";
350  LogInfo("DTTrigPhase2Prod") << ss.str();
351  }
352  }
353 
354  // FILTER GROUPING
355  MuonPathPtrs filteredmuonpaths;
356  if (algo_ == Standard) {
357  mpathredundantfilter_->run(iEvent, iEventSetup, muonpaths, filteredmuonpaths);
358  } else {
359  mpathhitsfilter_->run(iEvent, iEventSetup, muonpaths, filteredmuonpaths);
360  }
361 
362  if (dump_) {
363  for (unsigned int i = 0; i < filteredmuonpaths.size(); i++) {
364  stringstream ss;
365  ss << iEvent.id().event() << " filt. mpath " << i << ": ";
366  for (int lay = 0; lay < filteredmuonpaths.at(i)->nprimitives(); lay++)
367  ss << filteredmuonpaths.at(i)->primitive(lay)->channelId() << " ";
368  for (int lay = 0; lay < filteredmuonpaths.at(i)->nprimitives(); lay++)
369  ss << filteredmuonpaths.at(i)->primitive(lay)->tdcTimeStamp() << " ";
370  LogInfo("DTTrigPhase2Prod") << ss.str();
371  }
372  }
373 
377 
378  if (debug_)
379  LogDebug("DTTrigPhase2Prod") << "MUON PATHS found: " << muonpaths.size() << " (" << filteredmuonpaths.size()
380  << ") in event " << iEvent.id().event();
381  if (debug_)
382  LogDebug("DTTrigPhase2Prod") << "filling NmetaPrimtives" << std::endl;
383  std::vector<metaPrimitive> metaPrimitives;
384  MuonPathPtrs outmpaths;
385  if (algo_ == Standard) {
386  if (debug_)
387  LogDebug("DTTrigPhase2Prod") << "Fitting 1SL ";
388  mpathanalyzer_->run(iEvent, iEventSetup, filteredmuonpaths, metaPrimitives);
389  } else {
390  // implementation for advanced (2SL) grouping, no filter required..
391  if (debug_)
392  LogDebug("DTTrigPhase2Prod") << "Fitting 2SL at once ";
393  mpathanalyzer_->run(iEvent, iEventSetup, muonpaths, outmpaths);
394  }
395 
396  if (dump_) {
397  for (unsigned int i = 0; i < outmpaths.size(); i++) {
398  LogInfo("DTTrigPhase2Prod") << iEvent.id().event() << " mp " << i << ": " << outmpaths.at(i)->bxTimeValue() << " "
399  << outmpaths.at(i)->horizPos() << " " << outmpaths.at(i)->tanPhi() << " "
400  << outmpaths.at(i)->phi() << " " << outmpaths.at(i)->phiB() << " "
401  << outmpaths.at(i)->quality() << " " << outmpaths.at(i)->chiSquare();
402  }
403  for (unsigned int i = 0; i < metaPrimitives.size(); i++) {
404  stringstream ss;
405  ss << iEvent.id().event() << " mp " << i << ": ";
406  printmP(ss.str(), metaPrimitives.at(i));
407  }
408  }
409 
410  muonpaths.clear();
411  filteredmuonpaths.clear();
412 
414  // FILTER SECTIONS:
416 
417  if (debug_)
418  LogDebug("DTTrigPhase2Prod") << "declaring new vector for filtered" << std::endl;
419 
420  std::vector<metaPrimitive> filteredMetaPrimitives;
421  if (algo_ == Standard)
422  mpathqualityenhancer_->run(iEvent, iEventSetup, metaPrimitives, filteredMetaPrimitives);
423 
424  if (dump_) {
425  for (unsigned int i = 0; i < filteredMetaPrimitives.size(); i++) {
426  stringstream ss;
427  ss << iEvent.id().event() << " filtered mp " << i << ": ";
428  printmP(ss.str(), filteredMetaPrimitives.at(i));
429  }
430  }
431 
432  metaPrimitives.clear();
433  metaPrimitives.erase(metaPrimitives.begin(), metaPrimitives.end());
434 
435  if (debug_)
436  LogDebug("DTTrigPhase2Prod") << "DTp2 in event:" << iEvent.id().event() << " we found "
437  << filteredMetaPrimitives.size() << " filteredMetaPrimitives (superlayer)"
438  << std::endl;
439  if (debug_)
440  LogDebug("DTTrigPhase2Prod") << "filteredMetaPrimitives: starting correlations" << std::endl;
441 
445 
446  std::vector<metaPrimitive> correlatedMetaPrimitives;
447  if (algo_ == Standard)
448  mpathassociator_->run(iEvent, iEventSetup, dtdigis, filteredMetaPrimitives, correlatedMetaPrimitives);
449  else {
450  for (const auto& muonpath : outmpaths) {
451  correlatedMetaPrimitives.emplace_back(muonpath->rawId(),
452  (double)muonpath->bxTimeValue(),
453  muonpath->horizPos(),
454  muonpath->tanPhi(),
455  muonpath->phi(),
456  muonpath->phiB(),
457  muonpath->phi_cmssw(),
458  muonpath->phiB_cmssw(),
459  muonpath->chiSquare(),
460  (int)muonpath->quality(),
461  muonpath->primitive(0)->channelId(),
462  muonpath->primitive(0)->tdcTimeStamp(),
463  muonpath->primitive(0)->laterality(),
464  muonpath->primitive(1)->channelId(),
465  muonpath->primitive(1)->tdcTimeStamp(),
466  muonpath->primitive(1)->laterality(),
467  muonpath->primitive(2)->channelId(),
468  muonpath->primitive(2)->tdcTimeStamp(),
469  muonpath->primitive(2)->laterality(),
470  muonpath->primitive(3)->channelId(),
471  muonpath->primitive(3)->tdcTimeStamp(),
472  muonpath->primitive(3)->laterality(),
473  muonpath->primitive(4)->channelId(),
474  muonpath->primitive(4)->tdcTimeStamp(),
475  muonpath->primitive(4)->laterality(),
476  muonpath->primitive(5)->channelId(),
477  muonpath->primitive(5)->tdcTimeStamp(),
478  muonpath->primitive(5)->laterality(),
479  muonpath->primitive(6)->channelId(),
480  muonpath->primitive(6)->tdcTimeStamp(),
481  muonpath->primitive(6)->laterality(),
482  muonpath->primitive(7)->channelId(),
483  muonpath->primitive(7)->tdcTimeStamp(),
484  muonpath->primitive(7)->laterality());
485  }
486  }
487  filteredMetaPrimitives.clear();
488 
489  if (debug_)
490  LogDebug("DTTrigPhase2Prod") << "DTp2 in event:" << iEvent.id().event() << " we found "
491  << correlatedMetaPrimitives.size() << " correlatedMetPrimitives (chamber)";
492 
493  if (dump_) {
494  LogInfo("DTTrigPhase2Prod") << "DTp2 in event:" << iEvent.id().event() << " we found "
495  << correlatedMetaPrimitives.size() << " correlatedMetPrimitives (chamber)";
496 
497  for (unsigned int i = 0; i < correlatedMetaPrimitives.size(); i++) {
498  stringstream ss;
499  ss << iEvent.id().event() << " correlated mp " << i << ": ";
500  printmPC(ss.str(), correlatedMetaPrimitives.at(i));
501  }
502  }
503 
504  double shift_back = 0;
505  if (scenario_ == MC) //scope for MC
506  shift_back = 400;
507  else if (scenario_ == DATA) //scope for data
508  shift_back = 0;
509  else if (scenario_ == SLICE_TEST) //scope for slice test
510  shift_back = 400;
511 
512  // RPC integration
513  if (useRPC_) {
514  rpc_integrator_->initialise(iEventSetup, shift_back);
515  rpc_integrator_->prepareMetaPrimitives(rpcRecHits);
516  rpc_integrator_->matchWithDTAndUseRPCTime(correlatedMetaPrimitives);
517  rpc_integrator_->makeRPCOnlySegments();
518  rpc_integrator_->storeRPCSingleHits();
519  rpc_integrator_->removeRPCHitsUsed();
520  }
521 
523  vector<L1Phase2MuDTPhDigi> outP2Ph;
524  vector<L1Phase2MuDTExtPhDigi> outExtP2Ph;
525  vector<L1Phase2MuDTThDigi> outP2Th;
526  vector<L1Phase2MuDTExtThDigi> outExtP2Th;
527 
528  // Assigning index value
529  assignIndex(correlatedMetaPrimitives);
530  for (const auto& metaPrimitiveIt : correlatedMetaPrimitives) {
531  DTChamberId chId(metaPrimitiveIt.rawId);
532  DTSuperLayerId slId(metaPrimitiveIt.rawId);
533  if (debug_)
534  LogDebug("DTTrigPhase2Prod") << "looping in final vector: SuperLayerId" << chId << " x=" << metaPrimitiveIt.x
535  << " quality=" << metaPrimitiveIt.quality
536  << " BX=" << round(metaPrimitiveIt.t0 / 25.) << " index=" << metaPrimitiveIt.index;
537 
538  int sectorTP = chId.sector();
539  //sectors 13 and 14 exist only for the outermost stations for sectors 4 and 10 respectively
540  //due to the larger MB4 that are divided into two.
541  if (sectorTP == 13)
542  sectorTP = 4;
543  if (sectorTP == 14)
544  sectorTP = 10;
545  sectorTP = sectorTP - 1;
546  int sl = 0;
547  if (metaPrimitiveIt.quality < LOWLOWQ || metaPrimitiveIt.quality == CHIGHQ) {
548  if (inner(metaPrimitiveIt))
549  sl = 1;
550  else
551  sl = 3;
552  }
553 
554  if (debug_)
555  LogDebug("DTTrigPhase2Prod") << "pushing back phase-2 dataformat carlo-federica dataformat";
556 
557  if (slId.superLayer() != 2) {
558  if (df_extended_ == 1 || df_extended_ == 2) {
559  int pathWireId[8] = {metaPrimitiveIt.wi1,
560  metaPrimitiveIt.wi2,
561  metaPrimitiveIt.wi3,
562  metaPrimitiveIt.wi4,
563  metaPrimitiveIt.wi5,
564  metaPrimitiveIt.wi6,
565  metaPrimitiveIt.wi7,
566  metaPrimitiveIt.wi8};
567 
568  int pathTDC[8] = {max((int)round(metaPrimitiveIt.tdc1 - shift_back * LHC_CLK_FREQ), -1),
569  max((int)round(metaPrimitiveIt.tdc2 - shift_back * LHC_CLK_FREQ), -1),
570  max((int)round(metaPrimitiveIt.tdc3 - shift_back * LHC_CLK_FREQ), -1),
571  max((int)round(metaPrimitiveIt.tdc4 - shift_back * LHC_CLK_FREQ), -1),
572  max((int)round(metaPrimitiveIt.tdc5 - shift_back * LHC_CLK_FREQ), -1),
573  max((int)round(metaPrimitiveIt.tdc6 - shift_back * LHC_CLK_FREQ), -1),
574  max((int)round(metaPrimitiveIt.tdc7 - shift_back * LHC_CLK_FREQ), -1),
575  max((int)round(metaPrimitiveIt.tdc8 - shift_back * LHC_CLK_FREQ), -1)};
576 
577  int pathLat[8] = {metaPrimitiveIt.lat1,
578  metaPrimitiveIt.lat2,
579  metaPrimitiveIt.lat3,
580  metaPrimitiveIt.lat4,
581  metaPrimitiveIt.lat5,
582  metaPrimitiveIt.lat6,
583  metaPrimitiveIt.lat7,
584  metaPrimitiveIt.lat8};
585 
586  // phiTP (extended DF)
587  outExtP2Ph.emplace_back(
588  L1Phase2MuDTExtPhDigi((int)round(metaPrimitiveIt.t0 / (float)LHC_CLK_FREQ) - shift_back,
589  chId.wheel(), // uwh (m_wheel)
590  sectorTP, // usc (m_sector)
591  chId.station(), // ust (m_station)
592  sl, // ust (m_station)
593  (int)round(metaPrimitiveIt.phi * PHIRES_CONV), // uphi (m_phiAngle)
594  (int)round(metaPrimitiveIt.phiB * PHIBRES_CONV), // uphib (m_phiBending)
595  metaPrimitiveIt.quality, // uqua (m_qualityCode)
596  metaPrimitiveIt.index, // uind (m_segmentIndex)
597  (int)round(metaPrimitiveIt.t0) - shift_back * LHC_CLK_FREQ, // ut0 (m_t0Segment)
598  (int)round(metaPrimitiveIt.chi2 * CHI2RES_CONV), // uchi2 (m_chi2Segment)
599  (int)round(metaPrimitiveIt.x * 1000), // ux (m_xLocal)
600  (int)round(metaPrimitiveIt.tanPhi * 1000), // utan (m_tanPsi)
601  (int)round(metaPrimitiveIt.phi_cmssw * PHIRES_CONV), // uphi (m_phiAngleCMSSW)
602  (int)round(metaPrimitiveIt.phiB_cmssw * PHIBRES_CONV), // uphib (m_phiBendingCMSSW)
603  metaPrimitiveIt.rpcFlag, // urpc (m_rpcFlag)
604  pathWireId,
605  pathTDC,
606  pathLat));
607  }
608  if (df_extended_ == 0 || df_extended_ == 2) {
609  // phiTP (standard DF)
610  outP2Ph.push_back(L1Phase2MuDTPhDigi(
611  (int)round(metaPrimitiveIt.t0 / (float)LHC_CLK_FREQ) - shift_back,
612  chId.wheel(), // uwh (m_wheel)
613  sectorTP, // usc (m_sector)
614  chId.station(), // ust (m_station)
615  sl, // ust (m_station)
616  (int)round(metaPrimitiveIt.phi * PHIRES_CONV), // uphi (_phiAngle)
617  (int)round(metaPrimitiveIt.phiB * PHIBRES_CONV), // uphib (m_phiBending)
618  metaPrimitiveIt.quality, // uqua (m_qualityCode)
619  metaPrimitiveIt.index, // uind (m_segmentIndex)
620  (int)round(metaPrimitiveIt.t0) - shift_back * LHC_CLK_FREQ, // ut0 (m_t0Segment)
621  (int)round(metaPrimitiveIt.chi2 * CHI2RES_CONV), // uchi2 (m_chi2Segment)
622  metaPrimitiveIt.rpcFlag // urpc (m_rpcFlag)
623  ));
624  }
625  } else {
626  if (df_extended_ == 1 || df_extended_ == 2) {
627  int pathWireId[4] = {metaPrimitiveIt.wi1, metaPrimitiveIt.wi2, metaPrimitiveIt.wi3, metaPrimitiveIt.wi4};
628 
629  int pathTDC[4] = {max((int)round(metaPrimitiveIt.tdc1 - shift_back * LHC_CLK_FREQ), -1),
630  max((int)round(metaPrimitiveIt.tdc2 - shift_back * LHC_CLK_FREQ), -1),
631  max((int)round(metaPrimitiveIt.tdc3 - shift_back * LHC_CLK_FREQ), -1),
632  max((int)round(metaPrimitiveIt.tdc4 - shift_back * LHC_CLK_FREQ), -1)};
633 
634  int pathLat[4] = {metaPrimitiveIt.lat1, metaPrimitiveIt.lat2, metaPrimitiveIt.lat3, metaPrimitiveIt.lat4};
635 
636  // thTP (extended DF)
637  outExtP2Th.emplace_back(
638  L1Phase2MuDTExtThDigi((int)round(metaPrimitiveIt.t0 / (float)LHC_CLK_FREQ) - shift_back,
639  chId.wheel(), // uwh (m_wheel)
640  sectorTP, // usc (m_sector)
641  chId.station(), // ust (m_station)
642  (int)round(metaPrimitiveIt.phi * ZRES_CONV), // uz (m_zGlobal)
643  (int)round(metaPrimitiveIt.phiB * KRES_CONV), // uk (m_kSlope)
644  metaPrimitiveIt.quality, // uqua (m_qualityCode)
645  metaPrimitiveIt.index, // uind (m_segmentIndex)
646  (int)round(metaPrimitiveIt.t0) - shift_back * LHC_CLK_FREQ, // ut0 (m_t0Segment)
647  (int)round(metaPrimitiveIt.chi2 * CHI2RES_CONV), // uchi2 (m_chi2Segment)
648  (int)round(metaPrimitiveIt.x * 1000), // ux (m_yLocal)
649  (int)round(metaPrimitiveIt.phi_cmssw * PHIRES_CONV), // uphi (m_zCMSSW)
650  (int)round(metaPrimitiveIt.phiB_cmssw * PHIBRES_CONV), // uphib (m_kCMSSW)
651  metaPrimitiveIt.rpcFlag, // urpc (m_rpcFlag)
652  pathWireId,
653  pathTDC,
654  pathLat));
655  }
656  if (df_extended_ == 0 || df_extended_ == 2) {
657  // thTP (standard DF)
658  outP2Th.push_back(L1Phase2MuDTThDigi(
659  (int)round(metaPrimitiveIt.t0 / (float)LHC_CLK_FREQ) - shift_back,
660  chId.wheel(), // uwh (m_wheel)
661  sectorTP, // usc (m_sector)
662  chId.station(), // ust (m_station)
663  (int)round(metaPrimitiveIt.phi * ZRES_CONV), // uz (m_zGlobal)
664  (int)round(metaPrimitiveIt.phiB * KRES_CONV), // uk (m_kSlope)
665  metaPrimitiveIt.quality, // uqua (m_qualityCode)
666  metaPrimitiveIt.index, // uind (m_segmentIndex)
667  (int)round(metaPrimitiveIt.t0) - shift_back * LHC_CLK_FREQ, // ut0 (m_t0Segment)
668  (int)round(metaPrimitiveIt.chi2 * CHI2RES_CONV), // uchi2 (m_chi2Segment)
669  metaPrimitiveIt.rpcFlag // urpc (m_rpcFlag)
670  ));
671  }
672  }
673  }
674 
675  // Storing RPC hits that were not used elsewhere
676  if (useRPC_) {
677  for (auto rpc_dt_digi = rpc_integrator_->rpcRecHits_translated_.begin();
678  rpc_dt_digi != rpc_integrator_->rpcRecHits_translated_.end();
679  rpc_dt_digi++) {
680  outP2Ph.push_back(*rpc_dt_digi);
681  }
682  }
683 
684  // Storing Phi results
685  if (df_extended_ == 1 || df_extended_ == 2) {
686  std::unique_ptr<L1Phase2MuDTExtPhContainer> resultExtP2Ph(new L1Phase2MuDTExtPhContainer);
687  resultExtP2Ph->setContainer(outExtP2Ph);
688  iEvent.put(std::move(resultExtP2Ph));
689  }
690  if (df_extended_ == 0 || df_extended_ == 2) {
691  std::unique_ptr<L1Phase2MuDTPhContainer> resultP2Ph(new L1Phase2MuDTPhContainer);
692  resultP2Ph->setContainer(outP2Ph);
693  iEvent.put(std::move(resultP2Ph));
694  }
695  outExtP2Ph.clear();
696  outExtP2Ph.erase(outExtP2Ph.begin(), outExtP2Ph.end());
697  outP2Ph.clear();
698  outP2Ph.erase(outP2Ph.begin(), outP2Ph.end());
699 
700  // Storing Theta results
701  if (df_extended_ == 1 || df_extended_ == 2) {
702  std::unique_ptr<L1Phase2MuDTExtThContainer> resultExtP2Th(new L1Phase2MuDTExtThContainer);
703  resultExtP2Th->setContainer(outExtP2Th);
704  iEvent.put(std::move(resultExtP2Th));
705  }
706  if (df_extended_ == 0 || df_extended_ == 2) {
707  std::unique_ptr<L1Phase2MuDTThContainer> resultP2Th(new L1Phase2MuDTThContainer);
708  resultP2Th->setContainer(outP2Th);
709  iEvent.put(std::move(resultP2Th));
710  }
711  outExtP2Th.clear();
712  outExtP2Th.erase(outExtP2Th.begin(), outExtP2Th.end());
713  outP2Th.clear();
714  outP2Th.erase(outP2Th.begin(), outP2Th.end());
715 }
716 
717 void DTTrigPhase2Prod::endRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) {
718  grouping_obj_->finish();
719  mpathanalyzer_->finish();
720  mpathqualityenhancer_->finish();
721  mpathqualityenhancerbayes_->finish();
722  mpathredundantfilter_->finish();
723  mpathhitsfilter_->finish();
724  mpathassociator_->finish();
725  rpc_integrator_->finish();
726 };
727 
728 bool DTTrigPhase2Prod::outer(const metaPrimitive& mp) const {
729  int counter = (mp.wi5 != -1) + (mp.wi6 != -1) + (mp.wi7 != -1) + (mp.wi8 != -1);
730  return (counter > 2);
731 }
732 
733 bool DTTrigPhase2Prod::inner(const metaPrimitive& mp) const {
734  int counter = (mp.wi1 != -1) + (mp.wi2 != -1) + (mp.wi3 != -1) + (mp.wi4 != -1);
735  return (counter > 2);
736 }
737 
738 bool DTTrigPhase2Prod::hasPosRF(int wh, int sec) const { return wh > 0 || (wh == 0 && sec % 4 > 1); }
739 
740 void DTTrigPhase2Prod::printmP(const string& ss, const metaPrimitive& mP) const {
741  DTSuperLayerId slId(mP.rawId);
742  LogInfo("DTTrigPhase2Prod") << ss << (int)slId << "\t " << setw(2) << left << mP.wi1 << " " << setw(2) << left
743  << mP.wi2 << " " << setw(2) << left << mP.wi3 << " " << setw(2) << left << mP.wi4 << " "
744  << setw(5) << left << mP.tdc1 << " " << setw(5) << left << mP.tdc2 << " " << setw(5)
745  << left << mP.tdc3 << " " << setw(5) << left << mP.tdc4 << " " << setw(10) << right
746  << mP.x << " " << setw(9) << left << mP.tanPhi << " " << setw(5) << left << mP.t0 << " "
747  << setw(13) << left << mP.chi2 << " r:" << rango(mP);
748 }
749 
750 void DTTrigPhase2Prod::printmPC(const string& ss, const metaPrimitive& mP) const {
751  DTChamberId ChId(mP.rawId);
752  LogInfo("DTTrigPhase2Prod") << ss << (int)ChId << "\t " << setw(2) << left << mP.wi1 << " " << setw(2) << left
753  << mP.wi2 << " " << setw(2) << left << mP.wi3 << " " << setw(2) << left << mP.wi4 << " "
754  << setw(2) << left << mP.wi5 << " " << setw(2) << left << mP.wi6 << " " << setw(2) << left
755  << mP.wi7 << " " << setw(2) << left << mP.wi8 << " " << setw(5) << left << mP.tdc1 << " "
756  << setw(5) << left << mP.tdc2 << " " << setw(5) << left << mP.tdc3 << " " << setw(5)
757  << left << mP.tdc4 << " " << setw(5) << left << mP.tdc5 << " " << setw(5) << left
758  << mP.tdc6 << " " << setw(5) << left << mP.tdc7 << " " << setw(5) << left << mP.tdc8
759  << " " << setw(2) << left << mP.lat1 << " " << setw(2) << left << mP.lat2 << " "
760  << setw(2) << left << mP.lat3 << " " << setw(2) << left << mP.lat4 << " " << setw(2)
761  << left << mP.lat5 << " " << setw(2) << left << mP.lat6 << " " << setw(2) << left
762  << mP.lat7 << " " << setw(2) << left << mP.lat8 << " " << setw(10) << right << mP.x << " "
763  << setw(9) << left << mP.tanPhi << " " << setw(5) << left << mP.t0 << " " << setw(13)
764  << left << mP.chi2 << " r:" << rango(mP);
765 }
766 
768  if (mp.quality == 1 or mp.quality == 2)
769  return 3;
770  if (mp.quality == 3 or mp.quality == 4)
771  return 4;
772  return mp.quality;
773 }
774 
775 void DTTrigPhase2Prod::assignIndex(std::vector<metaPrimitive>& inMPaths) {
776  std::map<int, std::vector<metaPrimitive>> primsPerBX;
777  for (const auto& metaPrimitive : inMPaths) {
778  int BX = round(metaPrimitive.t0 / 25.);
779  primsPerBX[BX].push_back(metaPrimitive);
780  }
781  inMPaths.clear();
782  for (auto& prims : primsPerBX) {
783  assignIndexPerBX(prims.second);
784  for (const auto& primitive : prims.second)
785  if (primitive.index <= max_index_)
786  inMPaths.push_back(primitive);
787  }
788 }
789 
790 void DTTrigPhase2Prod::assignIndexPerBX(std::vector<metaPrimitive>& inMPaths) {
791  // First we asociate a new index to the metaprimitive depending on quality or phiB;
792  uint32_t rawId = -1;
793  int numP = -1;
794  for (auto& metaPrimitiveIt : inMPaths) {
795  numP++;
796  rawId = metaPrimitiveIt.rawId;
797  int iOrder = assignQualityOrder(metaPrimitiveIt);
798  int inf = 0;
799  int numP2 = -1;
800  for (auto& metaPrimitiveItN : inMPaths) {
801  int nOrder = assignQualityOrder(metaPrimitiveItN);
802  numP2++;
803  if (rawId != metaPrimitiveItN.rawId)
804  continue;
805  if (numP2 == numP) {
806  metaPrimitiveIt.index = inf;
807  break;
808  } else if (iOrder < nOrder) {
809  inf++;
810  } else if (iOrder > nOrder) {
811  metaPrimitiveItN.index++;
812  } else if (iOrder == nOrder) {
813  if (std::abs(metaPrimitiveIt.phiB) >= std::abs(metaPrimitiveItN.phiB)) {
814  inf++;
815  } else if (std::abs(metaPrimitiveIt.phiB) < std::abs(metaPrimitiveItN.phiB)) {
816  metaPrimitiveItN.index++;
817  }
818  }
819  } // ending second for
820  } // ending first for
821 }
822 
824  if (mP.quality > 8 || mP.quality < 1)
825  return -1;
826 
827  return qmap_.find(mP.quality)->second;
828 }
829 
830 std::vector<DTDigiCollection*> DTTrigPhase2Prod::distribDigis(std::queue<std::pair<DTLayerId, DTDigi>>& inQ) {
831  std::vector<std::queue<std::pair<DTLayerId, DTDigi>>*> tmpVector;
832  tmpVector.clear();
833  std::vector<DTDigiCollection*> collVector;
834  collVector.clear();
835  while (!inQ.empty()) {
836  processDigi(inQ, tmpVector);
837  }
838  for (auto& sQ : tmpVector) {
839  DTDigiCollection tmpColl;
840  while (!sQ->empty()) {
841  tmpColl.insertDigi((sQ->front().first), (sQ->front().second));
842  sQ->pop();
843  }
844  collVector.push_back(&tmpColl);
845  }
846  return collVector;
847 }
848 
849 void DTTrigPhase2Prod::processDigi(std::queue<std::pair<DTLayerId, DTDigi>>& inQ,
850  std::vector<std::queue<std::pair<DTLayerId, DTDigi>>*>& vec) {
851  bool classified = false;
852  if (!vec.empty()) {
853  for (auto& sC : vec) { // Conditions for entering a super cell.
854  if ((sC->front().second.time() + superCelltimewidth_) > inQ.front().second.time()) {
855  // Time requirement
856  if (TMath::Abs(sC->front().second.wire() - inQ.front().second.wire()) <= superCellhalfspacewidth_) {
857  // Spatial requirement
858  sC->push(std::move(inQ.front()));
859  classified = true;
860  }
861  }
862  }
863  }
864  if (classified) {
865  inQ.pop();
866  return;
867  }
868 
869  std::queue<std::pair<DTLayerId, DTDigi>> newQueue;
870 
871  std::pair<DTLayerId, DTDigi> tmpPair;
872  tmpPair = std::move(inQ.front());
873  newQueue.push(tmpPair);
874  inQ.pop();
875 
876  vec.push_back(&newQueue);
877 }
878 
880  // dtTriggerPhase2PrimitiveDigis
882  desc.add<edm::InputTag>("digiTag", edm::InputTag("CalibratedDigis"));
883  desc.add<int>("trigger_with_sl", 4);
884  desc.add<int>("timeTolerance", 999999);
885  desc.add<double>("tanPhiTh", 1.0);
886  desc.add<double>("tanPhiThw2max", 1.3);
887  desc.add<double>("tanPhiThw2min", 0.5);
888  desc.add<double>("tanPhiThw1max", 0.9);
889  desc.add<double>("tanPhiThw1min", 0.2);
890  desc.add<double>("tanPhiThw0", 0.5);
891  desc.add<double>("chi2Th", 0.01);
892  desc.add<double>("chi2corTh", 0.1);
893  desc.add<bool>("useBX_correlation", false);
894  desc.add<double>("dT0_correlate_TP", 25.0);
895  desc.add<int>("dBX_correlate_TP", 0);
896  desc.add<double>("dTanPsi_correlate_TP", 99999.0);
897  desc.add<bool>("clean_chi2_correlation", true);
898  desc.add<bool>("allow_confirmation", true);
899  desc.add<double>("minx_match_2digis", 1.0);
900  desc.add<int>("scenario", 0);
901  desc.add<int>("df_extended", 0);
902  desc.add<int>("max_primitives", 999);
903  desc.add<edm::FileInPath>("ttrig_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_ttrig.txt"));
904  desc.add<edm::FileInPath>("z_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_z.txt"));
905  desc.add<edm::FileInPath>("shift_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_x.txt"));
906  desc.add<edm::FileInPath>("shift_theta_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/theta_shift.txt"));
907  desc.add<edm::FileInPath>("global_coords_filename",
908  edm::FileInPath("L1Trigger/DTTriggerPhase2/data/global_coord_perp_x_phi0.txt"));
909  desc.add<int>("algo", 0);
910  desc.add<int>("minHits4Fit", 3);
911  desc.add<bool>("splitPathPerSL", true);
912  desc.addUntracked<bool>("debug", false);
913  desc.addUntracked<bool>("dump", false);
914  desc.add<edm::InputTag>("rpcRecHits", edm::InputTag("rpcRecHits"));
915  desc.add<bool>("useRPC", false);
916  desc.add<int>("bx_window", 1);
917  desc.add<double>("phi_window", 50.0);
918  desc.add<int>("max_quality_to_overwrite_t0", 9);
919  desc.add<bool>("storeAllRPCHits", false);
920  desc.add<bool>("activateBuffer", false);
921  desc.add<double>("superCelltimewidth", 400);
922  desc.add<int>("superCellspacewidth", 20);
923  {
925  psd0.addUntracked<bool>("debug", false);
926  psd0.add<double>("angletan", 0.3);
927  psd0.add<double>("anglebinwidth", 1.0);
928  psd0.add<double>("posbinwidth", 2.1);
929  psd0.add<double>("maxdeltaAngDeg", 10);
930  psd0.add<double>("maxdeltaPos", 10);
931  psd0.add<int>("UpperNumber", 6);
932  psd0.add<int>("LowerNumber", 4);
933  psd0.add<double>("MaxDistanceToWire", 0.03);
934  psd0.add<int>("minNLayerHits", 6);
935  psd0.add<int>("minSingleSLHitsMax", 3);
936  psd0.add<int>("minSingleSLHitsMin", 3);
937  psd0.add<bool>("allowUncorrelatedPatterns", true);
938  psd0.add<int>("minUncorrelatedHits", 3);
939  desc.add<edm::ParameterSetDescription>("HoughGrouping", psd0);
940  }
941  {
943  psd0.add<edm::FileInPath>(
944  "pattern_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/PseudoBayesPatterns_uncorrelated_v0.root"));
945  psd0.addUntracked<bool>("debug", false);
946  psd0.add<int>("minNLayerHits", 3);
947  psd0.add<int>("minSingleSLHitsMax", 3);
948  psd0.add<int>("minSingleSLHitsMin", 0);
949  psd0.add<int>("allowedVariance", 1);
950  psd0.add<bool>("allowDuplicates", false);
951  psd0.add<bool>("setLateralities", true);
952  psd0.add<bool>("allowUncorrelatedPatterns", true);
953  psd0.add<int>("minUncorrelatedHits", 3);
954  psd0.add<bool>("saveOnPlace", true);
955  psd0.add<int>("maxPathsPerMatch", 256);
956  desc.add<edm::ParameterSetDescription>("PseudoBayesPattern", psd0);
957  }
958  descriptions.add("dtTriggerPhase2PrimitiveDigis", desc);
959 }
960 
int station() const
Return the station number.
Definition: DTChamberId.h:42
std::unique_ptr< MotherGrouping > grouping_obj_
std::map< DTChamberId, DTDigiCollection, std::less< DTChamberId > > DTDigiMap
bool hasPosRF(int wh, int sec) const
void produce(edm::Event &iEvent, const edm::EventSetup &iEventSetup) override
Producer: process every event and generates trigger data.
int superLayer() const
Return the superlayer number.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
constexpr int CHI2RES_CONV
Definition: constants.h:226
constexpr float PHIBRES_CONV
Definition: constants.h:225
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:32
DTTrigPhase2Prod(const edm::ParameterSet &pset)
Constructor.
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:128
void processDigi(std::queue< std::pair< DTLayerId, DTDigi >> &inQ, std::vector< std::queue< std::pair< DTLayerId, DTDigi >> *> &vec)
std::unique_ptr< MPFilter > mpathhitsfilter_
edm::EDGetTokenT< DTDigiCollection > dtDigisToken_
std::vector< DTDigiCollection * > distribDigis(std::queue< std::pair< DTLayerId, DTDigi >> &inQ)
std::unique_ptr< RPCIntegrator > rpc_integrator_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
edm::EDGetTokenT< RPCRecHitCollection > rpcRecHitsLabel_
Primitive< F, X >::type primitive(const F &f)
Definition: Primitive.h:41
void assignIndex(std::vector< metaPrimitive > &inMPaths)
const DTGeometry * dtGeo_
int iEvent
Definition: GenABIO.cc:224
void printmPC(const std::string &ss, const metaPrimitive &mP) const
DTChamberId chamberId() const
Return the corresponding ChamberId.
bool inner(const metaPrimitive &mp) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::unique_ptr< MuonPathAnalyzer > mpathanalyzer_
constexpr float KRES_CONV
Definition: constants.h:229
std::unique_ptr< MPFilter > mpathqualityenhancer_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void printmP(const std::string &ss, const metaPrimitive &mP) const
std::unique_ptr< MuonPathAssociator > mpathassociator_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr float ZRES_CONV
Definition: constants.h:228
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
RunID const & id() const
Definition: RunBase.h:39
Log< level::Info, false > LogInfo
MP_QUALITY
Definition: constants.h:42
bool outer(const metaPrimitive &mp) const
void endRun(edm::Run const &iRun, const edm::EventSetup &iEventSetup) override
endRun: finish things
std::unique_ptr< MPFilter > mpathredundantfilter_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::shared_ptr< GlobalCoordsObtainer > globalcoordsobtainer_
std::pair< const_iterator, const_iterator > Range
double b
Definition: hdecay.h:120
std::vector< DigiType >::const_iterator const_iterator
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< MPFilter > mpathqualityenhancerbayes_
constexpr int LHC_CLK_FREQ
Definition: constants.h:176
int rango(const metaPrimitive &mp) const
DTDigiMap::iterator DTDigiMap_iterator
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
HLT enums.
int sector() const
Definition: DTChamberId.h:49
void assignIndexPerBX(std::vector< metaPrimitive > &inMPaths)
~DTTrigPhase2Prod() override
Destructor.
double a
Definition: hdecay.h:121
DTDigiMap::const_iterator DTDigiMap_const_iterator
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
constexpr float PHIRES_CONV
Definition: constants.h:224
int assignQualityOrder(const metaPrimitive &mP) const
const std::unordered_map< int, int > qmap_
void beginRun(edm::Run const &iRun, const edm::EventSetup &iEventSetup) override
Create Trigger Units before starting event processing.
def move(src, dest)
Definition: eostools.py:511
std::vector< std::pair< int, MuonPath > > primitives_
RunNumber_t run() const
Definition: RunID.h:26
Definition: Run.h:45
#define LogDebug(id)