CMS 3D CMS Logo

HoughGrouping.cc
Go to the documentation of this file.
2 
6 
8 
9 #include <cmath>
10 #include <memory>
11 
12 #include "TMath.h"
13 
14 using namespace std;
15 using namespace edm;
16 using namespace cmsdt;
17 using namespace cms_units::operators;
18 
19 namespace {
20  struct {
21  bool operator()(ProtoCand a, ProtoCand b) const {
22  unsigned short int sumhqa = 0;
23  unsigned short int sumhqb = 0;
24  unsigned short int sumlqa = 0;
25  unsigned short int sumlqb = 0;
26  double sumdista = 0;
27  double sumdistb = 0;
28 
29  for (unsigned short int lay = 0; lay < 8; lay++) {
30  sumhqa += (unsigned short int)a.isThereHitInLayer_[lay];
31  sumhqb += (unsigned short int)b.isThereHitInLayer_[lay];
32  sumlqa += (unsigned short int)a.isThereNeighBourHitInLayer_[lay];
33  sumlqb += (unsigned short int)b.isThereNeighBourHitInLayer_[lay];
34  sumdista += a.xDistToPattern_[lay];
35  sumdistb += b.xDistToPattern_[lay];
36  }
37 
38  if (a.nLayersWithHits_ != b.nLayersWithHits_)
39  return (a.nLayersWithHits_ > b.nLayersWithHits_); // number of layers with hits
40  else if (sumhqa != sumhqb)
41  return (sumhqa > sumhqb); // number of hq hits
42  else if (sumlqa != sumlqb)
43  return (sumlqa > sumlqb); // number of lq hits
44  else if (a.nHitsDiff_ != b.nHitsDiff_)
45  return (a.nHitsDiff_ < b.nHitsDiff_); // abs. diff. between SL1 & SL3 hits
46  else
47  return (sumdista < sumdistb); // abs. dist. to digis
48  }
49  } const HoughOrdering;
50 } // namespace
51 // ============================================================================
52 // Constructors and destructor
53 // ============================================================================
55  : MotherGrouping(pset, iC), debug_(pset.getUntrackedParameter<bool>("debug")) {
56  // Obtention of parameters
57  if (debug_)
58  LogDebug("HoughGrouping") << "HoughGrouping: constructor";
59 
60  // HOUGH TRANSFORM CONFIGURATION
61  angletan_ = pset.getParameter<double>("angletan");
62  anglebinwidth_ = pset.getParameter<double>("anglebinwidth");
63  posbinwidth_ = pset.getParameter<double>("posbinwidth");
64 
65  // MAXIMA SEARCH CONFIGURATION
66  maxdeltaAngDeg_ = pset.getParameter<double>("maxdeltaAngDeg");
67  maxdeltaPos_ = pset.getParameter<double>("maxdeltaPos");
68  upperNumber_ = (unsigned short int)pset.getParameter<int>("UpperNumber");
69  lowerNumber_ = (unsigned short int)pset.getParameter<int>("LowerNumber");
70 
71  // HITS ASSOCIATION CONFIGURATION
72  maxDistanceToWire_ = pset.getParameter<double>("MaxDistanceToWire");
73 
74  // CANDIDATE QUALITY CONFIGURATION
75  minNLayerHits_ = (unsigned short int)pset.getParameter<int>("minNLayerHits");
76  minSingleSLHitsMax_ = (unsigned short int)pset.getParameter<int>("minSingleSLHitsMax");
77  minSingleSLHitsMin_ = (unsigned short int)pset.getParameter<int>("minSingleSLHitsMin");
78  allowUncorrelatedPatterns_ = pset.getParameter<bool>("allowUncorrelatedPatterns");
79  minUncorrelatedHits_ = (unsigned short int)pset.getParameter<int>("minUncorrelatedHits");
80 
82 }
83 
85  if (debug_)
86  LogDebug("HoughGrouping") << "HoughGrouping: destructor" << endl;
87 }
88 
89 // ============================================================================
90 // Main methods (initialise, run, finish)
91 // ============================================================================
92 void HoughGrouping::initialise(const edm::EventSetup& iEventSetup) {
93  if (debug_)
94  LogDebug("HoughGrouping") << "initialise";
95 
96  resetAttributes();
97 
98  maxrads_ = 0.5 * M_PI - atan(angletan_);
99  minangle_ = (double)convertDegToRad(anglebinwidth_);
100  halfanglebins_ = round(maxrads_ / minangle_ + 1);
101  anglebins_ = (unsigned short int)2 * halfanglebins_;
102  oneanglebin_ = maxrads_ / halfanglebins_;
103 
104  maxdeltaAng_ = maxdeltaAngDeg_ * 2 * M_PI / 360;
105 
106  // Initialisation of anglemap. Posmap depends on the size of the chamber.
107  double phi = 0;
108  anglemap_ = {};
109  for (unsigned short int ab = 0; ab < halfanglebins_; ab++) {
110  anglemap_[ab] = phi;
111  phi += oneanglebin_;
112  }
113 
114  phi = (M_PI - maxrads_);
115  for (unsigned short int ab = halfanglebins_; ab < anglebins_; ab++) {
116  anglemap_[ab] = phi;
117  phi += oneanglebin_;
118  }
119 
120  if (debug_) {
121  LogDebug("HoughGrouping")
122  << "\nHoughGrouping::ResetAttributes - Information from the initialisation of HoughGrouping:";
123  LogDebug("HoughGrouping") << "ResetAttributes - maxrads: " << maxrads_;
124  LogDebug("HoughGrouping") << "ResetAttributes - anglebinwidth: " << anglebinwidth_;
125  LogDebug("HoughGrouping") << "ResetAttributes - minangle: " << minangle_;
126  LogDebug("HoughGrouping") << "ResetAttributes - halfanglebins: " << halfanglebins_;
127  LogDebug("HoughGrouping") << "ResetAttributes - anglebins: " << anglebins_;
128  LogDebug("HoughGrouping") << "ResetAttributes - oneanglebin: " << oneanglebin_;
129  LogDebug("HoughGrouping") << "ResetAttributes - posbinwidth: " << posbinwidth_;
130  }
131 
132  const MuonGeometryRecord& geom = iEventSetup.get<MuonGeometryRecord>();
133  dtGeo_ = &geom.get(dtGeomH);
134 }
135 
137  const edm::EventSetup& iEventSetup,
138  const DTDigiCollection& digis,
139  MuonPathPtrs& outMpath) {
140  if (debug_)
141  LogDebug("HoughGrouping") << "\nHoughGrouping::run";
142 
143  resetAttributes();
144 
145  if (debug_)
146  LogDebug("HoughGrouping") << "run - Beginning digis' loop...";
147  LocalPoint wirePosInLay, wirePosInChamber;
148  GlobalPoint wirePosGlob;
149  for (DTDigiCollection::DigiRangeIterator dtLayerIdIt = digis.begin(); dtLayerIdIt != digis.end(); dtLayerIdIt++) {
150  const DTLayer* lay = dtGeo_->layer((*dtLayerIdIt).first);
151  for (DTDigiCollection::const_iterator digiIt = ((*dtLayerIdIt).second).first;
152  digiIt != ((*dtLayerIdIt).second).second;
153  digiIt++) {
154  if (debug_) {
155  LogDebug("HoughGrouping") << "\nHoughGrouping::run - Digi number " << idigi_;
156  LogDebug("HoughGrouping") << "run - Wheel: " << (*dtLayerIdIt).first.wheel();
157  LogDebug("HoughGrouping") << "run - Chamber: " << (*dtLayerIdIt).first.station();
158  LogDebug("HoughGrouping") << "run - Sector: " << (*dtLayerIdIt).first.sector();
159  LogDebug("HoughGrouping") << "run - Superlayer: " << (*dtLayerIdIt).first.superLayer();
160  LogDebug("HoughGrouping") << "run - Layer: " << (*dtLayerIdIt).first.layer();
161  LogDebug("HoughGrouping") << "run - Wire: " << (*digiIt).wire();
162  LogDebug("HoughGrouping") << "run - First wire: " << lay->specificTopology().firstChannel();
163  LogDebug("HoughGrouping") << "run - Last wire: " << lay->specificTopology().lastChannel();
164  LogDebug("HoughGrouping") << "run - First wire x: "
166  LogDebug("HoughGrouping") << "run - Last wire x: "
168  LogDebug("HoughGrouping") << "run - Cell width: " << lay->specificTopology().cellWidth();
169  LogDebug("HoughGrouping") << "run - Cell height: " << lay->specificTopology().cellHeight();
170  }
171  if ((*dtLayerIdIt).first.superLayer() == 2)
172  continue;
173 
174  wirePosInLay = LocalPoint(lay->specificTopology().wirePosition((*digiIt).wire()), 0, 0);
175  wirePosGlob = lay->toGlobal(wirePosInLay);
176  wirePosInChamber = lay->chamber()->toLocal(wirePosGlob);
177 
178  if ((*dtLayerIdIt).first.superLayer() == 3) {
179  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()] = DTPrimitive();
180  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()].setTDCTimeStamp((*digiIt).time());
181  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()].setChannelId((*digiIt).wire());
182  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()].setLayerId((*dtLayerIdIt).first.layer());
183  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()].setSuperLayerId((*dtLayerIdIt).first.superLayer());
184  digimap_[(*dtLayerIdIt).first.layer() + 3][(*digiIt).wire()].setCameraId((*dtLayerIdIt).first.rawId());
185  } else {
186  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()] = DTPrimitive();
187  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()].setTDCTimeStamp((*digiIt).time());
188  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()].setChannelId((*digiIt).wire());
189  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()].setLayerId((*dtLayerIdIt).first.layer());
190  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()].setSuperLayerId((*dtLayerIdIt).first.superLayer());
191  digimap_[(*dtLayerIdIt).first.layer() - 1][(*digiIt).wire()].setCameraId((*dtLayerIdIt).first.rawId());
192  }
193 
194  // Obtaining geometrical info of the chosen chamber
195  if (xlowlim_ == 0 && xhighlim_ == 0 && zlowlim_ == 0 && zhighlim_ == 0) {
196  thewheel_ = (*dtLayerIdIt).first.wheel();
197  thestation_ = (*dtLayerIdIt).first.station();
198  thesector_ = (*dtLayerIdIt).first.sector();
199  obtainGeometricalBorders(lay);
200  }
201 
202  if (debug_) {
203  LogDebug("HoughGrouping") << "run - X position of the cell (chamber frame of reference): "
204  << wirePosInChamber.x();
205  LogDebug("HoughGrouping") << "run - Y position of the cell (chamber frame of reference): "
206  << wirePosInChamber.y();
207  LogDebug("HoughGrouping") << "run - Z position of the cell (chamber frame of reference): "
208  << wirePosInChamber.z();
209  }
210 
211  hitvec_.push_back({wirePosInChamber.x() - 1.05, wirePosInChamber.z()});
212  hitvec_.push_back({wirePosInChamber.x() + 1.05, wirePosInChamber.z()});
213  nhits_ += 2;
214 
215  idigi_++;
216  }
217  }
218 
219  if (debug_) {
220  LogDebug("HoughGrouping") << "\nHoughGrouping::run - nhits: " << nhits_;
221  LogDebug("HoughGrouping") << "run - idigi: " << idigi_;
222  }
223 
224  if (hitvec_.empty()) {
225  if (debug_)
226  LogDebug("HoughGrouping") << "run - No digis present in this chamber.";
227  return;
228  }
229 
230  // Perform the Hough transform of the inputs.
231  doHoughTransform();
232 
233  // Obtain the maxima
234  maxima_ = getMaximaVector();
235  resetPosElementsOfLinespace();
236 
237  if (maxima_.empty()) {
238  if (debug_)
239  LogDebug("HoughGrouping") << "run - No good maxima found in this event.";
240  return;
241  }
242 
243  DTChamberId TheChambId(thewheel_, thestation_, thesector_);
244  const DTChamber* TheChamb = dtGeo_->chamber(TheChambId);
245  std::vector<ProtoCand> cands;
246 
247  for (unsigned short int ican = 0; ican < maxima_.size(); ican++) {
248  if (debug_)
249  LogDebug("HoughGrouping") << "\nHoughGrouping::run - Candidate number: " << ican;
250  cands.push_back(associateHits(TheChamb, maxima_.at(ican).first, maxima_.at(ican).second));
251  }
252 
253  // Now we filter them:
254  orderAndFilter(cands, outMpath);
255  if (debug_)
256  LogDebug("HoughGrouping") << "run - now we have our muonpaths! It has " << outMpath.size() << " elements";
257 
258  cands.clear();
259  return;
260 }
261 
263  if (debug_)
264  LogDebug("HoughGrouping") << "finish";
265  return;
266 }
267 
268 // ============================================================================
269 // Other methods
270 // ============================================================================
272  if (debug_)
273  LogDebug("HoughGrouping") << "ResetAttributes";
274  // std::vector's:
275  maxima_.clear();
276  hitvec_.clear();
277 
278  // Integer-type variables:
279  spacebins_ = 0;
280  idigi_ = 0;
281  nhits_ = 0;
282  xlowlim_ = 0;
283  xhighlim_ = 0;
284  zlowlim_ = 0;
285  zhighlim_ = 0;
286  thestation_ = 0;
287  thesector_ = 0;
288  thewheel_ = 0;
289 
290  // Arrays:
291  // NOTE: linespace array is treated and reset separately
292 
293  // Maps (dictionaries):
294  posmap_.clear();
295  for (unsigned short int abslay = 0; abslay < 8; abslay++)
296  digimap_[abslay].clear();
297 }
298 
300  if (debug_)
301  LogDebug("HoughGrouping") << "ResetPosElementsOfLinespace";
302  for (unsigned short int ab = 0; ab < anglebins_; ab++) {
303  linespace_[ab].clear();
304  }
305  linespace_.clear();
306 }
307 
309  if (debug_)
310  LogDebug("HoughGrouping") << "ObtainGeometricalBorders";
311  LocalPoint FirstWireLocal(lay->chamber()->superLayer(1)->layer(1)->specificTopology().wirePosition(
313  0,
314  0); // TAKING INFO FROM L1 OF SL1 OF THE CHOSEN CHAMBER
315  GlobalPoint FirstWireGlobal = lay->chamber()->superLayer(1)->layer(1)->toGlobal(FirstWireLocal);
316  LocalPoint FirstWireLocalCh = lay->chamber()->toLocal(FirstWireGlobal);
317 
318  LocalPoint LastWireLocal(lay->chamber()->superLayer(1)->layer(1)->specificTopology().wirePosition(
319  lay->chamber()->superLayer(1)->layer(1)->specificTopology().lastChannel()),
320  0,
321  0);
322  GlobalPoint LastWireGlobal = lay->chamber()->superLayer(1)->layer(1)->toGlobal(LastWireLocal);
323  LocalPoint LastWireLocalCh = lay->chamber()->toLocal(LastWireGlobal);
324 
325  // unsigned short int upsl = thestation == 4 ? 2 : 3;
326  unsigned short int upsl = thestation_ == 4 ? 3 : 3;
327  if (debug_)
328  LogDebug("HoughGrouping") << "ObtainGeometricalBorders - uppersuperlayer: " << upsl;
329 
330  LocalPoint FirstWireLocalUp(lay->chamber()->superLayer(upsl)->layer(4)->specificTopology().wirePosition(
331  lay->chamber()->superLayer(upsl)->layer(4)->specificTopology().firstChannel()),
332  0,
333  0); // TAKING INFO FROM L1 OF SL1 OF THE CHOSEN CHAMBER
334  GlobalPoint FirstWireGlobalUp = lay->chamber()->superLayer(upsl)->layer(4)->toGlobal(FirstWireLocalUp);
335  LocalPoint FirstWireLocalChUp = lay->chamber()->toLocal(FirstWireGlobalUp);
336 
337  xlowlim_ = FirstWireLocalCh.x() - lay->chamber()->superLayer(1)->layer(1)->specificTopology().cellWidth() / 2;
338  xhighlim_ = LastWireLocalCh.x() + lay->chamber()->superLayer(1)->layer(1)->specificTopology().cellWidth() / 2;
339  zlowlim_ = FirstWireLocalChUp.z() - lay->chamber()->superLayer(upsl)->layer(4)->specificTopology().cellHeight() / 2;
340  zhighlim_ = LastWireLocalCh.z() + lay->chamber()->superLayer(1)->layer(1)->specificTopology().cellHeight() / 2;
341 
342  spacebins_ = round(std::abs(xhighlim_ - xlowlim_) / posbinwidth_);
343 }
344 
346  if (debug_)
347  LogDebug("HoughGrouping") << "DoHoughTransform";
348  // First we want to obtain the number of bins in angle that we want. To do so, we will consider at first a maximum angle of
349  // (in rad.) pi/2 - arctan(0.3) (i.e. ~73º) and a resolution (width of bin angle) of 2º.
350 
351  if (debug_) {
352  LogDebug("HoughGrouping") << "DoHoughTransform - maxrads: " << maxrads_;
353  LogDebug("HoughGrouping") << "DoHoughTransform - minangle: " << minangle_;
354  LogDebug("HoughGrouping") << "DoHoughTransform - halfanglebins: " << halfanglebins_;
355  LogDebug("HoughGrouping") << "DoHoughTransform - anglebins: " << anglebins_;
356  LogDebug("HoughGrouping") << "DoHoughTransform - oneanglebin: " << oneanglebin_;
357  LogDebug("HoughGrouping") << "DoHoughTransform - spacebins: " << spacebins_;
358  }
359 
360  double rho = 0, phi = 0, sbx = 0;
361  double lowinitsb = xlowlim_ + posbinwidth_ / 2;
362 
363  // Initialisation
364  linespace_.resize(anglebins_, std::vector<unsigned short int>(spacebins_));
365  for (unsigned short int ab = 0; ab < anglebins_; ab++) {
366  sbx = lowinitsb;
367  for (unsigned short int sb = 0; sb < spacebins_; sb++) {
368  posmap_[sb] = sbx;
369  linespace_[ab][sb] = 0;
370  sbx += posbinwidth_;
371  }
372  }
373 
374  // Filling of the double array and actually doing the transform
375  for (unsigned short int i = 0; i < hitvec_.size(); i++) {
376  for (unsigned short int ab = 0; ab < anglebins_; ab++) {
377  phi = anglemap_[ab];
378  rho = hitvec_.at(i).first * cos(phi) + hitvec_.at(i).second * sin(phi);
379  sbx = lowinitsb - posbinwidth_ / 2;
380  for (unsigned short int sb = 0; sb < spacebins_; sb++) {
381  if (rho < sbx) {
382  linespace_[ab][sb]++;
383  break;
384  }
385  sbx += posbinwidth_;
386  }
387  }
388  }
389 }
390 
392  if (debug_)
393  LogDebug("HoughGrouping") << "getMaximaVector";
394  PointTuples tmpvec;
395 
396  bool flagsearched = false;
397  unsigned short int numbertolookat = upperNumber_;
398 
399  while (!flagsearched) {
400  for (unsigned short int ab = 0; ab < anglebins_; ab++) {
401  for (unsigned short int sb = 0; sb < spacebins_; sb++) {
402  if (linespace_[ab][sb] >= numbertolookat)
403  tmpvec.push_back({anglemap_[ab], posmap_[sb], linespace_[ab][sb]});
404  }
405  }
406  if (((numbertolookat - 1) < lowerNumber_) || (!tmpvec.empty()))
407  flagsearched = true;
408  else
409  numbertolookat--;
410  }
411 
412  if (tmpvec.empty()) {
413  if (debug_)
414  LogDebug("HoughGrouping") << "GetMaximaVector - No maxima could be found";
415  PointsInPlane finalvec;
416  return finalvec;
417  } else {
418  PointsInPlane finalvec = findTheMaxima(tmpvec);
419 
420  // And now obtain the values of m and n of the lines.
421  for (unsigned short int i = 0; i < finalvec.size(); i++)
422  finalvec.at(i) = transformPair(finalvec.at(i));
423  return finalvec;
424  }
425 }
426 
428  if (debug_)
429  LogDebug("HoughGrouping") << "transformPair";
430  // input: (ang, pos); output: (m, n)
431  if (inputpair.first == 0)
432  return {1000, -1000 * inputpair.second};
433  else
434  return {-1. / tan(inputpair.first), inputpair.second / sin(inputpair.first)};
435 }
436 
438  if (debug_)
439  LogDebug("HoughGrouping") << "findTheMaxima";
440  bool fullyreduced = false;
441  unsigned short int ind = 0;
442 
443  std::vector<unsigned short int> chosenvec;
444  PointsInPlane resultvec;
445  PointInPlane finalpair = {};
446 
447  if (debug_)
448  LogDebug("HoughGrouping") << "findTheMaxima - prewhile";
449  while (!fullyreduced) {
450  if (debug_) {
451  LogDebug("HoughGrouping") << "\nHoughGrouping::findTheMaxima - New iteration";
452  LogDebug("HoughGrouping") << "findTheMaxima - inputvec size: " << inputvec.size();
453  LogDebug("HoughGrouping") << "findTheMaxima - ind: " << ind;
454  LogDebug("HoughGrouping") << "findTheMaxima - maximum deltaang: " << maxdeltaAng_
455  << " and maximum deltapos: " << maxdeltaPos_;
456  }
457  chosenvec.clear();
458  //calculate distances and check out the ones that are near
459  if (debug_)
460  LogDebug("HoughGrouping") << "findTheMaxima - Ours have " << get<2>(inputvec.at(ind))
461  << " entries, ang.: " << get<0>(inputvec.at(ind))
462  << " and pos.: " << get<1>(inputvec.at(ind));
463 
464  for (unsigned short int j = ind + 1; j < inputvec.size(); j++) {
465  if (getTwoDelta(inputvec.at(ind), inputvec.at(j)).first <= maxdeltaAng_ &&
466  getTwoDelta(inputvec.at(ind), inputvec.at(j)).second <= maxdeltaPos_) {
467  chosenvec.push_back(j);
468  if (debug_)
469  LogDebug("HoughGrouping") << "findTheMaxima - - Adding num. " << j
470  << " with deltaang: " << getTwoDelta(inputvec.at(ind), inputvec.at(j)).first
471  << ", and deltapos: " << getTwoDelta(inputvec.at(ind), inputvec.at(j)).second
472  << " and with " << get<2>(inputvec.at(j))
473  << " entries, ang.: " << get<0>(inputvec.at(j))
474  << " and pos.: " << get<1>(inputvec.at(j));
475  } else if (debug_)
476  LogDebug("HoughGrouping") << "findTheMaxima - - Ignoring num. " << j
477  << " with deltaang: " << getTwoDelta(inputvec.at(ind), inputvec.at(j)).first
478  << ", and deltapos: " << getTwoDelta(inputvec.at(ind), inputvec.at(j)).second
479  << " and with " << get<2>(inputvec.at(j)) << " entries.";
480  }
481 
482  if (debug_)
483  LogDebug("HoughGrouping") << "findTheMaxima - chosenvecsize: " << chosenvec.size();
484 
485  if (chosenvec.empty()) {
486  if (ind + 1 >= (unsigned short int)inputvec.size())
487  fullyreduced = true;
488  if ((get<0>(inputvec.at(ind)) <= maxrads_) || (get<0>(inputvec.at(ind)) >= M_PI - maxrads_))
489  resultvec.push_back({get<0>(inputvec.at(ind)), get<1>(inputvec.at(ind))});
490  else if (debug_)
491  LogDebug("HoughGrouping") << "findTheMaxima - - Candidate dropped due to an excess in angle";
492  ind++;
493  continue;
494  }
495 
496  // Now average them
497  finalpair = getAveragePoint(inputvec, ind, chosenvec);
498 
499  // Erase the ones you used
500  inputvec.erase(inputvec.begin() + ind);
501  for (short int j = chosenvec.size() - 1; j > -1; j--) {
502  if (debug_)
503  LogDebug("HoughGrouping") << "findTheMaxima - erasing index: " << chosenvec.at(j) - 1;
504  inputvec.erase(inputvec.begin() + chosenvec.at(j) - 1);
505  }
506 
507  if (debug_)
508  LogDebug("HoughGrouping") << "findTheMaxima - inputvec size: " << inputvec.size();
509 
510  // And add the one you calculated:
511  if ((finalpair.first <= maxrads_) || (finalpair.first >= M_PI - maxrads_))
512  resultvec.push_back(finalpair);
513  else if (debug_)
514  LogDebug("HoughGrouping") << "findTheMaxima - - Candidate dropped due to an excess in angle";
515 
516  if (ind + 1 >= (unsigned short int)inputvec.size())
517  fullyreduced = true;
518  if (debug_)
519  LogDebug("HoughGrouping") << "findTheMaxima - iteration ends";
520  ind++;
521  }
522  if (debug_)
523  LogDebug("HoughGrouping") << "findTheMaxima - postwhile";
524  return resultvec;
525 }
526 
528  if (debug_)
529  LogDebug("HoughGrouping") << "getTwoDelta";
530  return {abs(get<0>(pair1) - get<0>(pair2)), abs(get<1>(pair1) - get<1>(pair2))};
531 }
532 
534  unsigned short int firstindex,
535  const std::vector<unsigned short int>& indexlist) {
536  if (debug_)
537  LogDebug("HoughGrouping") << "getAveragePoint";
538  std::vector<double> xs;
539  std::vector<double> ys;
540  std::vector<double> ws;
541  xs.push_back(get<0>(inputvec.at(firstindex)));
542  ys.push_back(get<1>(inputvec.at(firstindex)));
543  ws.push_back(exp(get<2>(inputvec.at(firstindex))));
544  for (unsigned short int i = 0; i < indexlist.size(); i++) {
545  xs.push_back(get<0>(inputvec.at(indexlist.at(i))));
546  ys.push_back(get<1>(inputvec.at(indexlist.at(i))));
547  ws.push_back(exp(get<2>(inputvec.at(indexlist.at(i)))));
548  }
549  return {TMath::Mean(xs.begin(), xs.end(), ws.begin()), TMath::Mean(ys.begin(), ys.end(), ws.begin())};
550 }
551 
552 ProtoCand HoughGrouping::associateHits(const DTChamber* thechamb, double m, double n) {
553  if (debug_)
554  LogDebug("HoughGrouping") << "associateHits";
555  LocalPoint tmpLocal, AWireLocal, AWireLocalCh, tmpLocalCh, thepoint;
556  GlobalPoint tmpGlobal, AWireGlobal;
557  double tmpx = 0;
558  unsigned short int tmpwire = 0;
559  unsigned short int abslay = 0;
561  bool isleft = false;
562  bool isright = false;
563 
564  ProtoCand returnPC;
565  for (auto l = 0; l < NUM_LAYERS_2SL; l++) {
566  returnPC.isThereHitInLayer_.push_back(false);
567  returnPC.isThereNeighBourHitInLayer_.push_back(false);
568  returnPC.xDistToPattern_.push_back(0);
569  returnPC.dtHits_.push_back(DTPrimitive());
570  }
571 
572  if (debug_)
573  LogDebug("HoughGrouping") << "associateHits - Beginning SL loop";
574  for (unsigned short int sl = 1; sl < 3 + 1; sl++) {
575  if (sl == 2)
576  continue;
577  if (debug_)
578  LogDebug("HoughGrouping") << "associateHits - SL: " << sl;
579 
580  for (unsigned short int l = 1; l < 4 + 1; l++) {
581  if (debug_)
582  LogDebug("HoughGrouping") << "associateHits - L: " << l;
583  isleft = false;
584  isright = false;
585  lat = NONE;
586  if (sl == 1)
587  abslay = l - 1;
588  else
589  abslay = l + 3;
590  AWireLocal = LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(
591  thechamb->superLayer(sl)->layer(l)->specificTopology().firstChannel()),
592  0,
593  0);
594  AWireGlobal = thechamb->superLayer(sl)->layer(l)->toGlobal(AWireLocal);
595  AWireLocalCh = thechamb->toLocal(AWireGlobal);
596  tmpx = (AWireLocalCh.z() - n) / m;
597 
598  if ((tmpx <= xlowlim_) || (tmpx >= xhighlim_)) {
599  returnPC.dtHits_[abslay] = DTPrimitive(); // empty primitive
600  continue;
601  }
602 
603  thepoint = LocalPoint(tmpx, 0, AWireLocalCh.z());
604  tmpwire = thechamb->superLayer(sl)->layer(l)->specificTopology().channel(thepoint);
605  if (debug_)
606  LogDebug("HoughGrouping") << "associateHits - Wire number: " << tmpwire;
607  if (debug_)
608  LogDebug("HoughGrouping") << "associateHits - First channel in layer: "
609  << thechamb->superLayer(sl)->layer(l)->specificTopology().firstChannel();
610  if ((digimap_[abslay]).count(tmpwire)) {
611  // OK, we have a digi, let's choose the laterality, if we can:
612  tmpLocal = LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(tmpwire), 0, 0);
613  tmpGlobal = thechamb->superLayer(sl)->layer(l)->toGlobal(tmpLocal);
614  tmpLocalCh = thechamb->toLocal(tmpGlobal);
615 
616  if (abs(tmpLocalCh.x() - thepoint.x()) >= maxDistanceToWire_) {
617  // The distance where lateralities are not put is 0.03 cm, which is a conservative threshold for the resolution of the cells.
618  if ((tmpLocalCh.x() - thepoint.x()) > 0)
619  lat = LEFT;
620  else
621  lat = RIGHT;
622  }
623 
624  // Filling info
625  returnPC.nLayersWithHits_++;
626  returnPC.isThereHitInLayer_[abslay] = true;
627  returnPC.isThereNeighBourHitInLayer_[abslay] = true;
628  if (lat == LEFT)
629  returnPC.xDistToPattern_[abslay] = abs(tmpx - (tmpLocalCh.x() - 1.05));
630  else if (lat == RIGHT)
631  returnPC.xDistToPattern_[abslay] = abs(tmpx - (tmpLocalCh.x() + 1.05));
632  else
633  returnPC.xDistToPattern_[abslay] = abs(tmpx - tmpLocalCh.x());
634  returnPC.dtHits_[abslay] = DTPrimitive(digimap_[abslay][tmpwire]);
635  returnPC.dtHits_[abslay].setLaterality(lat);
636  } else {
637  if (debug_)
638  LogDebug("HoughGrouping") << "associateHits - No hit in the crossing cell";
639  if ((digimap_[abslay]).count(tmpwire - 1))
640  isleft = true;
641  if ((digimap_[abslay]).count(tmpwire + 1))
642  isright = true;
643  if (debug_)
644  LogDebug("HoughGrouping") << "associateHits - There is in the left: " << (int)isleft;
645  if (debug_)
646  LogDebug("HoughGrouping") << "associateHits - There is in the right: " << (int)isright;
647 
648  if ((isleft) && (!isright)) {
649  tmpLocal = LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(tmpwire - 1), 0, 0);
650  tmpGlobal = thechamb->superLayer(sl)->layer(l)->toGlobal(tmpLocal);
651  tmpLocalCh = thechamb->toLocal(tmpGlobal);
652 
653  // Filling info
654  returnPC.nLayersWithHits_++;
655  returnPC.isThereNeighBourHitInLayer_[abslay] = true;
656  returnPC.xDistToPattern_[abslay] = abs(tmpx - (tmpLocalCh.x() + 1.05));
657  returnPC.dtHits_[abslay] = DTPrimitive(digimap_[abslay][tmpwire - 1]);
658  returnPC.dtHits_[abslay].setLaterality(RIGHT);
659 
660  } else if ((!isleft) && (isright)) {
661  tmpLocal = LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(tmpwire + 1), 0, 0);
662  tmpGlobal = thechamb->superLayer(sl)->layer(l)->toGlobal(tmpLocal);
663  tmpLocalCh = thechamb->toLocal(tmpGlobal);
664 
665  // Filling info
666  returnPC.nLayersWithHits_++;
667  returnPC.isThereNeighBourHitInLayer_[abslay] = true;
668  returnPC.xDistToPattern_[abslay] = abs(tmpx - (tmpLocalCh.x() - 1.05));
669  returnPC.dtHits_[abslay] = DTPrimitive(digimap_[abslay][tmpwire + 1]);
670  returnPC.dtHits_[abslay].setLaterality(LEFT);
671  } else if ((isleft) && (isright)) {
672  LocalPoint tmpLocal_l =
673  LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(tmpwire - 1), 0, 0);
674  GlobalPoint tmpGlobal_l = thechamb->superLayer(sl)->layer(l)->toGlobal(tmpLocal_l);
675  LocalPoint tmpLocalCh_l = thechamb->toLocal(tmpGlobal_l);
676 
677  LocalPoint tmpLocal_r =
678  LocalPoint(thechamb->superLayer(sl)->layer(l)->specificTopology().wirePosition(tmpwire + 1), 0, 0);
679  GlobalPoint tmpGlobal_r = thechamb->superLayer(sl)->layer(l)->toGlobal(tmpLocal_r);
680  LocalPoint tmpLocalCh_r = thechamb->toLocal(tmpGlobal_r);
681 
682  // Filling info
683  returnPC.nLayersWithHits_++;
684  returnPC.isThereNeighBourHitInLayer_[abslay] = true;
685 
686  bool isDistRight = std::abs(thepoint.x() - tmpLocalCh_l.x()) < std::abs(thepoint.x() - tmpLocalCh_r.x());
687  if (isDistRight) {
688  returnPC.xDistToPattern_[abslay] = std::abs(tmpx - (tmpLocalCh.x() + 1.05));
689  returnPC.dtHits_[abslay] = DTPrimitive(digimap_[abslay][tmpwire - 1]);
690  returnPC.dtHits_[abslay].setLaterality(RIGHT);
691  } else {
692  returnPC.xDistToPattern_[abslay] = std::abs(tmpx - (tmpLocalCh.x() - 1.05));
693  returnPC.dtHits_[abslay] = DTPrimitive(digimap_[abslay][tmpwire + 1]);
694  returnPC.dtHits_[abslay].setLaterality(LEFT);
695  }
696  } else { // case where there are no digis
697  returnPC.dtHits_[abslay] = DTPrimitive(); // empty primitive
698  }
699  }
700  }
701  }
702 
703  setDifferenceBetweenSL(returnPC);
704  if (debug_) {
705  LogDebug("HoughGrouping") << "associateHits - Finishing with the candidate. We have found the following of it:";
706  LogDebug("HoughGrouping") << "associateHits - # of layers with hits: " << returnPC.nLayersWithHits_;
707  for (unsigned short int lay = 0; lay < 8; lay++) {
708  LogDebug("HoughGrouping") << "associateHits - For absolute layer: " << lay;
709  LogDebug("HoughGrouping") << "associateHits - # of HQ hits: " << returnPC.isThereHitInLayer_[lay];
710  LogDebug("HoughGrouping") << "associateHits - # of LQ hits: " << returnPC.isThereNeighBourHitInLayer_[lay];
711  }
712  LogDebug("HoughGrouping") << "associateHits - Abs. diff. between SL1 and SL3 hits: " << returnPC.nHitsDiff_;
713  for (unsigned short int lay = 0; lay < 8; lay++) {
714  LogDebug("HoughGrouping") << "associateHits - For absolute layer: " << lay;
715  LogDebug("HoughGrouping") << "associateHits - Abs. distance to digi: " << returnPC.xDistToPattern_[lay];
716  }
717  }
718  return returnPC;
719 }
720 
722  if (debug_)
723  LogDebug("HoughGrouping") << "setDifferenceBetweenSL";
724  short int absres = 0;
725  for (unsigned short int lay = 0; lay < 8; lay++) {
726  if (tupl.dtHits_[lay].channelId() > 0) {
727  if (lay <= 3)
728  absres++;
729  else
730  absres--;
731  }
732  }
733 
734  if (absres >= 0)
735  tupl.nHitsDiff_ = absres;
736  else
737  tupl.nHitsDiff_ = (unsigned short int)(-absres);
738 }
739 
740 void HoughGrouping::orderAndFilter(std::vector<ProtoCand>& invector, MuonPathPtrs& outMuonPath) {
741  if (debug_)
742  LogDebug("HoughGrouping") << "orderAndFilter";
743  // 0: # of layers with hits.
744  // 1: # of hits of high quality (the expected line crosses the cell).
745  // 2: # of hits of low quality (the expected line is in a neighbouring cell).
746  // 3: absolute diff. between the number of hits in SL1 and SL3.
747  // 4: absolute distance to all hits of the segment.
748  // 5: DTPrimitive of the candidate.
749 
750  std::vector<unsigned short int> elstoremove;
751  // ordering:
752  if (debug_)
753  LogDebug("HoughGrouping") << "orderAndFilter - First ordering";
754  std::sort(invector.begin(), invector.end(), HoughOrdering);
755 
756  // Now filtering:
757  unsigned short int ind = 0;
758  bool filtered = false;
759  if (debug_)
760  LogDebug("HoughGrouping") << "orderAndFilter - Entering while";
761  while (!filtered) {
762  if (debug_)
763  LogDebug("HoughGrouping") << "\nHoughGrouping::orderAndFilter - New iteration with ind: " << ind;
764  elstoremove.clear();
765  for (unsigned short int i = ind + 1; i < invector.size(); i++) {
766  if (debug_)
767  LogDebug("HoughGrouping") << "orderAndFilter - Checking index: " << i;
768  for (unsigned short int lay = 0; lay < 8; lay++) {
769  if (debug_)
770  LogDebug("HoughGrouping") << "orderAndFilter - Checking layer number: " << lay;
771  if (invector.at(i).dtHits_[lay].channelId() == invector.at(ind).dtHits_[lay].channelId() &&
772  invector.at(ind).dtHits_[lay].channelId() != -1) {
773  invector.at(i).nLayersWithHits_--;
774  invector.at(i).isThereHitInLayer_[lay] = false;
775  invector.at(i).isThereNeighBourHitInLayer_[lay] = false;
776  setDifferenceBetweenSL(invector.at(i));
777  // We check that if its a different laterality, the best candidate of the two of them changes its laterality to not-known (that is, both).
778  if (invector.at(i).dtHits_[lay].laterality() != invector.at(ind).dtHits_[lay].laterality())
779  invector.at(ind).dtHits_[lay].setLaterality(NONE);
780 
781  invector.at(i).dtHits_[lay] = DTPrimitive();
782  }
783  }
784  if (debug_)
785  LogDebug("HoughGrouping")
786  << "orderAndFilter - Finished checking all the layers, now seeing if we should remove the "
787  "candidate";
788 
789  if (!areThereEnoughHits(invector.at(i))) {
790  if (debug_)
791  LogDebug("HoughGrouping") << "orderAndFilter - This candidate shall be removed!";
792  elstoremove.push_back((unsigned short int)i);
793  }
794  }
795 
796  if (debug_)
797  LogDebug("HoughGrouping") << "orderAndFilter - We are gonna erase " << elstoremove.size() << " elements";
798 
799  for (short int el = (elstoremove.size() - 1); el > -1; el--) {
800  invector.erase(invector.begin() + elstoremove.at(el));
801  }
802 
803  if (ind + 1 == (unsigned short int)invector.size())
804  filtered = true;
805  else
806  std::sort(invector.begin() + ind + 1, invector.end(), HoughOrdering);
807  ind++;
808  }
809 
810  // Ultimate filter: if the remaining do not fill the requirements (configurable through pset arguments), they are removed also.
811  for (short int el = (invector.size() - 1); el > -1; el--) {
812  if (!areThereEnoughHits(invector.at(el))) {
813  invector.erase(invector.begin() + el);
814  }
815  }
816 
817  if (invector.empty()) {
818  if (debug_)
819  LogDebug("HoughGrouping") << "OrderAndFilter - We do not have candidates with the minimum hits required.";
820  return;
821  } else if (debug_)
822  LogDebug("HoughGrouping") << "OrderAndFilter - At the end, we have only " << invector.size() << " good paths!";
823 
824  // Packing dt primitives
825  for (unsigned short int i = 0; i < invector.size(); i++) {
826  DTPrimitivePtrs ptrPrimitive;
827  unsigned short int tmplowfill = 0;
828  unsigned short int tmpupfill = 0;
829  for (unsigned short int lay = 0; lay < 8; lay++) {
830  auto dtAux = std::make_shared<DTPrimitive>(invector.at(i).dtHits_[lay]);
831  ptrPrimitive.push_back(std::move(dtAux));
832  if (debug_) {
833  LogDebug("HoughGrouping") << "\nHoughGrouping::OrderAndFilter - cameraid: " << ptrPrimitive[lay]->cameraId();
834  LogDebug("HoughGrouping") << "OrderAndFilter - channelid (GOOD): " << ptrPrimitive[lay]->channelId();
835  LogDebug("HoughGrouping") << "OrderAndFilter - channelid (AM): " << ptrPrimitive[lay]->channelId() - 1;
836  }
837  // Fixing channel ID to AM conventions...
838  if (ptrPrimitive[lay]->channelId() != -1)
839  ptrPrimitive[lay]->setChannelId(ptrPrimitive[lay]->channelId() - 1);
840 
841  if (ptrPrimitive[lay]->cameraId() > 0) {
842  if (lay < 4)
843  tmplowfill++;
844  else
845  tmpupfill++;
846  }
847  }
848 
849  auto ptrMuonPath = std::make_shared<MuonPath>(ptrPrimitive, tmplowfill, tmpupfill);
850  outMuonPath.push_back(ptrMuonPath);
851  if (debug_) {
852  for (unsigned short int lay = 0; lay < 8; lay++) {
853  LogDebug("HoughGrouping") << "OrderAndFilter - Final cameraID: "
854  << outMuonPath.back()->primitive(lay)->cameraId();
855  LogDebug("HoughGrouping") << "OrderAndFilter - Final channelID: "
856  << outMuonPath.back()->primitive(lay)->channelId();
857  LogDebug("HoughGrouping") << "OrderAndFilter - Final time: "
858  << outMuonPath.back()->primitive(lay)->tdcTimeStamp();
859  }
860  }
861  }
862  return;
863 }
864 
866  if (debug_)
867  LogDebug("HoughGrouping") << "areThereEnoughHits";
868  unsigned short int numhitssl1 = 0;
869  unsigned short int numhitssl3 = 0;
870  for (unsigned short int lay = 0; lay < 8; lay++) {
871  if ((tupl.dtHits_[lay].channelId() > 0) && (lay < 4))
872  numhitssl1++;
873  else if (tupl.dtHits_[lay].channelId() > 0)
874  numhitssl3++;
875  }
876 
877  if (debug_)
878  LogDebug("HoughGrouping") << "areThereEnoughHits - Hits in SL1: " << numhitssl1;
879  if (debug_)
880  LogDebug("HoughGrouping") << "areThereEnoughHits - Hits in SL3: " << numhitssl3;
881 
882  if ((numhitssl1 != 0) && (numhitssl3 != 0)) { // Correlated candidates
883  if ((numhitssl1 + numhitssl3) >= minNLayerHits_) {
884  if (numhitssl1 > numhitssl3) {
885  return ((numhitssl1 >= minSingleSLHitsMax_) && (numhitssl3 >= minSingleSLHitsMin_));
886  } else if (numhitssl3 > numhitssl1) {
887  return ((numhitssl3 >= minSingleSLHitsMax_) && (numhitssl1 >= minSingleSLHitsMin_));
888  } else
889  return true;
890  }
891  } else if (allowUncorrelatedPatterns_) { // Uncorrelated candidates
892  return ((numhitssl1 + numhitssl3) >= minNLayerHits_);
893  }
894  return false;
895 }
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
std::tuple< double, double, unsigned short int > PointTuple
Definition: HoughGrouping.h:31
unsigned short int lowerNumber_
Definition: HoughGrouping.h:80
void doHoughTransform()
unsigned short int minNLayerHits_
Definition: HoughGrouping.h:80
unsigned short int nLayersWithHits_
Definition: HoughGrouping.h:20
double maxdeltaAngDeg_
Definition: HoughGrouping.h:82
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
constexpr double convertDegToRad(NumType degrees)
Definition: angle_units.h:27
PointInPlane getTwoDelta(const PointTuple &pair1, const PointTuple &pair2)
void setDifferenceBetweenSL(ProtoCand &tupl)
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, const DTDigiCollection &digis, MuonPathPtrs &outMpath) override
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
LATERAL_CASES
Definition: constants.h:45
T z() const
Definition: PV3DBase.h:61
double maxDistanceToWire_
Definition: HoughGrouping.h:82
unsigned short int upperNumber_
Definition: HoughGrouping.h:80
ProtoCand associateHits(const DTChamber *thechamb, double m, double n)
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:128
unsigned short int minUncorrelatedHits_
Definition: HoughGrouping.h:80
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DTPrimitives dtHits_
Definition: HoughGrouping.h:26
bool allowUncorrelatedPatterns_
Definition: HoughGrouping.h:79
void orderAndFilter(std::vector< ProtoCand > &invector, MuonPathPtrs &outMuonPath)
const DTChamber * chamber() const
Definition: DTLayer.cc:45
PointsInPlane getMaximaVector()
unsigned short int minSingleSLHitsMin_
Definition: HoughGrouping.h:80
void initialise(const edm::EventSetup &iEventSetup) override
double maxdeltaPos_
Definition: HoughGrouping.h:82
PointsInPlane findTheMaxima(PointTuples &inputvec)
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
auto &__restrict__ ws
U second(std::pair< T, U > const &p)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
HoughGrouping(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
int iEvent
Definition: GenABIO.cc:224
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:53
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:69
const bool debug_
Definition: HoughGrouping.h:78
double posbinwidth_
Definition: HoughGrouping.h:82
PointInPlane getAveragePoint(const PointTuples &inputvec, unsigned short int firstindex, const std::vector< unsigned short int > &indexlist)
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54
static const TGPicture * filtered(bool iBackgroundIsBlack)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
PointInPlane transformPair(const PointInPlane &inputpair)
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T get() const
Definition: EventSetup.h:82
void obtainGeometricalBorders(const DTLayer *lay)
double angletan_
Definition: HoughGrouping.h:82
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
unsigned short int minSingleSLHitsMax_
Definition: HoughGrouping.h:80
std::vector< PointInPlane > PointsInPlane
Definition: HoughGrouping.h:30
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
Definition: HoughGrouping.h:85
void resetPosElementsOfLinespace()
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
std::pair< double, double > PointInPlane
Definition: HoughGrouping.h:29
double anglebinwidth_
Definition: HoughGrouping.h:82
#define M_PI
std::vector< PointTuple > PointTuples
Definition: HoughGrouping.h:32
std::vector< double > xDistToPattern_
Definition: HoughGrouping.h:25
void finish() override
unsigned short int nHitsDiff_
Definition: HoughGrouping.h:24
uint8_t channelId(const VFATFrame &frame)
retrieve this channel identifier
~HoughGrouping() override
constexpr int NUM_LAYERS_2SL
Definition: constants.h:254
double b
Definition: hdecay.h:118
std::vector< DigiType >::const_iterator const_iterator
void resetAttributes()
bool areThereEnoughHits(const ProtoCand &tupl)
HLT enums.
double a
Definition: hdecay.h:119
int channel(const LocalPoint &p) const override
Definition: DTTopology.cc:54
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
std::vector< bool > isThereHitInLayer_
Definition: HoughGrouping.h:21
void clear(EGIsoObj &c)
Definition: egamma.h:82
Definition: TkAlStyle.h:43
def move(src, dest)
Definition: eostools.py:511
std::vector< bool > isThereNeighBourHitInLayer_
Definition: HoughGrouping.h:23
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:71
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
#define LogDebug(id)