CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
DTMeantimerPatternReco Class Reference

#include <DTMeantimerPatternReco.h>

Inheritance diagram for DTMeantimerPatternReco:
DTRecSegment2DBaseAlgo

Public Member Functions

std::string algoName () const override
 return the algo name More...
 
 DTMeantimerPatternReco (const edm::ParameterSet &pset, edm::ConsumesCollector cc)
 Constructor. More...
 
edm::OwnVector< DTSLRecSegment2Dreconstruct (const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits) override
 this function is called in the producer More...
 
void setES (const edm::EventSetup &setup) override
 
 ~DTMeantimerPatternReco () override
 Destructor. More...
 
- Public Member Functions inherited from DTRecSegment2DBaseAlgo
 DTRecSegment2DBaseAlgo (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~DTRecSegment2DBaseAlgo ()
 Destructor. More...
 

Private Member Functions

void addHits (DTSegmentCand *segCand, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits, std::vector< DTSegmentCand *> &result)
 
std::vector< DTSegmentCand * > buildSegments (const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)
 
bool checkDoubleCandidates (std::vector< DTSegmentCand *> &segs, DTSegmentCand *seg)
 
DTSegmentCandfitWithT0 (DTSegmentCand *seg, const bool fitdebug)
 
bool geometryFilter (const DTWireId first, const DTWireId second) const
 
std::vector< std::shared_ptr< DTHitPairForFit > > initHits (const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
 
void printPattern (std::vector< DTSegmentCand::AssPoint > &assHits, const DTHitPairForFit *hit)
 

Private Attributes

bool debug
 
unsigned int maxfound
 
std::string theAlgoName
 
double theAlphaMaxPhi
 
double theAlphaMaxTheta
 
DTSegmentCleanertheCleaner
 
edm::ESHandle< DTGeometrytheDTGeometry
 
const edm::ESGetToken< DTGeometry, MuonGeometryRecordtheDTGeometryToken
 
DTLinearFittheFitter
 
unsigned int theMaxAllowedHits
 
double theMaxChi2
 
DTSegmentUpdatortheUpdator
 

Friends

class DTMeantimerPatternReco4D
 

Detailed Description

Algo for reconstructing 2d segment in DT using a combinatorial approach with a T0 estimation produced along the way

Author
Stefano Lacaprara - INFN Legnaro stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
Riccardo Bellan - INFN TO ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch
Piotr Traczyk - SINS Warsaw ptrac.nosp@m.zyk@.nosp@m.fuw.e.nosp@m.du.p.nosp@m.l

Definition at line 46 of file DTMeantimerPatternReco.h.

Constructor & Destructor Documentation

◆ DTMeantimerPatternReco()

DTMeantimerPatternReco::DTMeantimerPatternReco ( const edm::ParameterSet pset,
edm::ConsumesCollector  cc 
)

Constructor.

Definition at line 39 of file DTMeantimerPatternReco.cc.

References gpuPixelDoublets::cc, debug, muonDTDigis_cfi::pset, theAlphaMaxPhi, theAlphaMaxTheta, theCleaner, theMaxAllowedHits, theMaxChi2, and theUpdator.

41  theFitter(new DTLinearFit()),
42  theAlgoName("DTMeantimerPatternReco"),
43  theDTGeometryToken(cc.esConsumes()) {
44  theMaxAllowedHits = pset.getParameter<unsigned int>("MaxAllowedHits"); // 100
45  theAlphaMaxTheta = pset.getParameter<double>("AlphaMaxTheta"); // 0.1 ;
46  theAlphaMaxPhi = pset.getParameter<double>("AlphaMaxPhi"); // 1.0 ;
47  theMaxChi2 = pset.getParameter<double>("MaxChi2"); // 8.0 ;
48  debug = pset.getUntrackedParameter<bool>("debug");
51 }
DTRecSegment2DBaseAlgo(const edm::ParameterSet &)
Constructor.
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken

◆ ~DTMeantimerPatternReco()

DTMeantimerPatternReco::~DTMeantimerPatternReco ( )
override

Destructor.

Definition at line 54 of file DTMeantimerPatternReco.cc.

References theCleaner, theFitter, and theUpdator.

54  {
55  delete theUpdator;
56  delete theCleaner;
57  delete theFitter;
58 }

Member Function Documentation

◆ addHits()

void DTMeantimerPatternReco::addHits ( DTSegmentCand segCand,
const std::vector< std::shared_ptr< DTHitPairForFit >> &  hits,
std::vector< DTSegmentCand *> &  result 
)
private

Definition at line 190 of file DTMeantimerPatternReco.cc.

References DTSegmentCand::add(), checkDoubleCandidates(), DTSegmentCand::chi2(), gather_cfg::cout, debug, fitWithT0(), geometryFilter(), DTSegmentCand::good(), hfClusterShapes_cfi::hits, DTEnums::Left, maxfound, nHits, DTSegmentCand::nHits(), DTSegmentCand::removeHit(), mps_fire::result, groupFilesInBlocks::reverse, DTEnums::Right, DTSegmentCand::t0(), and funct::true.

Referenced by buildSegments().

192  {
193  double chi2l, chi2r, t0l, t0r;
194  bool foundSomething = false;
195 
196  if (debug)
197  cout << " DTMeantimerPatternReco::addHit " << endl
198  << " Picked " << segCand->nHits() << " hits, " << hits.size() << " left." << endl;
199 
200  if (segCand->nHits() + hits.size() < maxfound)
201  return;
202 
203  // loop over the remaining hits
204  for (hitCont::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
205  // if (debug) {
206  // cout << " Trying B: " << **hit<< " wire: " << (*hit)->id() << endl;
207  // printPattern(assHits,*hit);
208  // }
209 
212 
213  segCand->add(lhit);
214  bool left_ok = (fitWithT0(segCand, false) ? true : false);
215  chi2l = segCand->chi2();
216  t0l = segCand->t0();
217  segCand->removeHit(lhit);
218 
219  segCand->add(rhit);
220  bool right_ok = (fitWithT0(segCand, false) ? true : false);
221  chi2r = segCand->chi2();
222  t0r = segCand->t0();
223  segCand->removeHit(rhit);
224 
225  if (debug) {
226  int nHits = segCand->nHits() + 1;
227  cout << " Left: t0= " << t0l << " chi2/nHits= " << chi2l << "/" << nHits << " ok: " << left_ok << endl;
228  cout << " Right: t0= " << t0r << " chi2/nHits= " << chi2r << "/" << nHits << " ok: " << right_ok << endl;
229  }
230 
231  if (!left_ok && !right_ok)
232  continue;
233 
234  foundSomething = true;
235 
236  // prepare the hit set for the next search, start from the other side
237  hitCont hitsForFit;
238  for (hitCont::const_iterator tmpHit = hit + 1; tmpHit != hits.end(); tmpHit++)
239  if (geometryFilter((*tmpHit)->id(), (*hit)->id()))
240  hitsForFit.push_back(*tmpHit);
241 
242  reverse(hitsForFit.begin(), hitsForFit.end());
243 
244  // choose only one - left or right
245  if (segCand->nHits() > 3 && left_ok && right_ok) {
246  if (chi2l < chi2r - 0.1)
247  right_ok = false;
248  else if (chi2r < chi2l - 0.1)
249  left_ok = false;
250  }
251 
252  if (left_ok) {
253  segCand->add(lhit);
254  addHits(segCand, hitsForFit, result);
255  segCand->removeHit(lhit);
256  }
257 
258  if (right_ok) {
259  segCand->add(rhit);
260  addHits(segCand, hitsForFit, result);
261  segCand->removeHit(rhit);
262  }
263  }
264 
265  if (foundSomething)
266  return;
267  // if we didn't find any new hits compatible with the current candidate, we proceed to check and store the candidate
268 
269  // If we already have a segment with more hits from this hit pair - don't save this one.
270  if (segCand->nHits() < maxfound)
271  return;
272 
273  // Check if semgent Ok, calculate chi2
274  bool seg_ok = (fitWithT0(segCand, debug) ? true : false);
275  if (!seg_ok)
276  return;
277 
278  if (!segCand->good()) {
279  // if (debug) cout << " Segment not good() - skipping" << endl;
280  return;
281  }
282 
283  if (segCand->nHits() > maxfound)
284  maxfound = segCand->nHits();
285  if (debug)
286  cout << endl << " Seg t0= " << segCand->t0() << endl << *segCand << endl;
287 
288  if (checkDoubleCandidates(result, segCand)) {
289  result.push_back(new DTSegmentCand(*segCand));
290  if (debug)
291  cout << " Result is now " << result.size() << endl;
292  } else {
293  if (debug)
294  cout << " Exists - skipping" << endl;
295  }
296 }
std::pair< std::shared_ptr< DTHitPairForFit >, DTEnums::DTCellSide > AssPoint
Definition: DTSegmentCand.h:36
void addHits(DTSegmentCand *segCand, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits, std::vector< DTSegmentCand *> &result)
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
std::vector< std::shared_ptr< DTHitPairForFit > > hitCont
virtual bool good() const
DTSegmentCand * fitWithT0(DTSegmentCand *seg, const bool fitdebug)
virtual void add(AssPoint newHit)
add hits to the hit list.
bool checkDoubleCandidates(std::vector< DTSegmentCand *> &segs, DTSegmentCand *seg)
virtual double chi2() const
the chi2 (NOT chi2/NDOF) of the fit
Definition: DTSegmentCand.h:61
bool geometryFilter(const DTWireId first, const DTWireId second) const
virtual void removeHit(AssPoint hit)
remove hit from the candidate
virtual double t0() const
the t0 of the segment
Definition: DTSegmentCand.h:67
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits

◆ algoName()

std::string DTMeantimerPatternReco::algoName ( ) const
inlineoverridevirtual

return the algo name

Implements DTRecSegment2DBaseAlgo.

Definition at line 61 of file DTMeantimerPatternReco.h.

References theAlgoName.

61 { return theAlgoName; }

◆ buildSegments()

vector< DTSegmentCand * > DTMeantimerPatternReco::buildSegments ( const DTSuperLayer sl,
const std::vector< std::shared_ptr< DTHitPairForFit >> &  hits 
)
private

Definition at line 98 of file DTMeantimerPatternReco.cc.

References addHits(), DTSegmentCleaner::clean(), gather_cfg::cout, debug, geometryFilter(), hfClusterShapes_cfi::hits, DTSuperLayer::id(), hit::id, listHistos::IP, DTEnums::Left, maxfound, mps_fire::result, DTEnums::Right, theAlphaMaxPhi, theAlphaMaxTheta, theCleaner, theMaxAllowedHits, PV3DBase< T, PVType, FrameType >::theta(), and GeomDet::toGlobal().

Referenced by DTMeantimerPatternReco4D::buildPhiSuperSegmentsCandidates(), and reconstruct().

99  {
100  vector<DTSegmentCand*> result;
102 
103  if (debug) {
104  cout << "buildSegments: " << sl->id() << " nHits " << hits.size() << endl;
105  for (hitIter hit = hits.begin(); hit != hits.end(); ++hit)
106  cout << **hit << " wire: " << (*hit)->id() << " DigiTime: " << (*hit)->digiTime() << endl;
107  }
108 
109  if (hits.size() > theMaxAllowedHits) {
110  if (debug) {
111  cout << "Warning: this SuperLayer " << sl->id() << " has too many hits : " << hits.size() << " max allowed is "
112  << theMaxAllowedHits << endl;
113  cout << "Skipping segment reconstruction... " << endl;
114  }
115  return result;
116  }
117 
118  GlobalPoint IP;
119  float DAlphaMax;
120  if ((sl->id()).superlayer() == 2) // Theta SL
121  DAlphaMax = theAlphaMaxTheta;
122  else // Phi SL
123  DAlphaMax = theAlphaMaxPhi;
124 
125  // get two hits in different layers and see if there are other hits
126  // compatible with them
127  for (hitCont::const_iterator firstHit = hits.begin(); firstHit != hits.end(); ++firstHit) {
128  for (hitCont::const_reverse_iterator lastHit = hits.rbegin(); (*lastHit) != (*firstHit); ++lastHit) {
129  // a geometrical sensibility cut for the two hits
130  if (!geometryFilter((*firstHit)->id(), (*lastHit)->id()))
131  continue;
132 
133  // create a set of hits for the fit (only the hits between the two selected ones)
134  hitCont hitsForFit;
135  for (hitCont::const_iterator tmpHit = firstHit + 1; (*tmpHit) != (*lastHit); tmpHit++)
136  if ((geometryFilter((*tmpHit)->id(), (*lastHit)->id())) && (geometryFilter((*tmpHit)->id(), (*firstHit)->id())))
137  hitsForFit.push_back(*tmpHit);
138 
139  for (int firstLR = 0; firstLR < 2; ++firstLR) {
140  for (int lastLR = 0; lastLR < 2; ++lastLR) {
141  // TODO move the global transformation in the DTHitPairForFit class
142  // when it will be moved I will able to remove the sl from the input parameter
143  GlobalPoint gposFirst = sl->toGlobal((*firstHit)->localPosition(codes[firstLR]));
144  GlobalPoint gposLast = sl->toGlobal((*lastHit)->localPosition(codes[lastLR]));
145  GlobalVector gvec = gposLast - gposFirst;
146  GlobalVector gvecIP = gposLast - IP;
147 
148  // difference in angle measured
149  float DAlpha = fabs(gvec.theta() - gvecIP.theta());
150  if (DAlpha > DAlphaMax)
151  continue;
152 
153  // if(debug) {
154  // cout << "Selected hit pair:" << endl;
155  // cout << " First " << *(*firstHit) << " Layer Id: " << (*firstHit)->id().layerId() << " Side: " << firstLR << " DigiTime: " << (*firstHit)->digiTime() << endl;
156  // cout << " Last " << *(*lastHit) << " Layer Id: " << (*lastHit)->id().layerId() << " Side: " << lastLR << " DigiTime: " << (*lastHit)->digiTime() << endl;
157  // }
158 
160  auto segCand = std::make_unique<DTSegmentCand>(pointSet, sl);
161  segCand->add(*firstHit, codes[firstLR]);
162  segCand->add(*lastHit, codes[lastLR]);
163 
164  // run hit adding/segment building
165  maxfound = 3;
166  addHits(segCand.get(), hitsForFit, result);
167  }
168  }
169  }
170  }
171 
172  // now I have a couple of segment hypotheses, should check for ghosts
173  if (debug) {
174  cout << "Result (before cleaning): " << result.size() << endl;
175  for (vector<DTSegmentCand*>::const_iterator seg = result.begin(); seg != result.end(); ++seg)
176  cout << *(*seg) << endl;
177  }
178 
180 
181  if (debug) {
182  cout << "Result (after cleaning): " << result.size() << endl;
183  for (vector<DTSegmentCand*>::const_iterator seg = result.begin(); seg != result.end(); ++seg)
184  cout << *(*seg) << endl;
185  }
186 
187  return result;
188 }
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
std::vector< DTSegmentCand * > clean(const std::vector< DTSegmentCand *> &inputCands) const
do the cleaning
void addHits(DTSegmentCand *segCand, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits, std::vector< DTSegmentCand *> &result)
std::vector< std::shared_ptr< DTHitPairForFit > > hitCont
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
unsigned int id
std::set< AssPoint, AssPointLessZ > AssPointCont
Definition: DTSegmentCand.h:38
hitCont::const_iterator hitIter
bool geometryFilter(const DTWireId first, const DTWireId second) const
DTSuperLayerId id() const
Return the DetId of this SL.
Definition: DTSuperLayer.cc:34
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72

◆ checkDoubleCandidates()

bool DTMeantimerPatternReco::checkDoubleCandidates ( std::vector< DTSegmentCand *> &  segs,
DTSegmentCand seg 
)
private

Definition at line 364 of file DTMeantimerPatternReco.cc.

References HLT_2024v14_cff::cands, DTSegmentCand::chi2ndof(), createfilelist::int, and DTSegmentCand::nHits().

Referenced by addHits().

364  {
365  for (vector<DTSegmentCand*>::iterator cand = cands.begin(); cand != cands.end(); ++cand) {
366  if (*(*cand) == *seg)
367  return false;
368  if (((*cand)->nHits() >= seg->nHits()) && ((*cand)->chi2ndof() < seg->chi2ndof()))
369  if ((*cand)->nSharedHitPairs(*seg) > int(seg->nHits() - 2))
370  return false;
371  }
372  return true;
373 }
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
virtual double chi2ndof() const
the chi2/NDOF of the fit
Definition: DTSegmentCand.h:64

◆ fitWithT0()

DTSegmentCand * DTMeantimerPatternReco::fitWithT0 ( DTSegmentCand seg,
const bool  fitdebug 
)
private

Definition at line 334 of file DTMeantimerPatternReco.cc.

References DTSegmentCand::chi2(), nano_mu_local_reco_cff::chi2, DTSegmentUpdator::fit(), DTSegmentCand::nHits(), DTSegmentCand::t0(), theMaxChi2, and theUpdator.

Referenced by addHits().

334  {
335  // perform the 3 parameter fit on the segment candidate
336  theUpdator->fit(seg, true, fitdebug);
337  double chi2 = seg->chi2();
338 
339  // Sanity check - drop segment candidates with a failed 3-par fit.
340  // (this includes segments with hits after the calculated t0 correction ending up
341  // beyond the chamber walls or on the other side of the wire)
342  if (chi2 == -1.)
343  return nullptr;
344 
345  // at this point we keep all 3-hit segments that passed the above check
346  if (seg->nHits() == 3)
347  return seg;
348 
349  // for segments with no t0 information we impose a looser chi2 cut
350  if (seg->t0() == 0) {
351  if (chi2 < 100.)
352  return seg;
353  else
354  return nullptr;
355  }
356 
357  // cut on chi2/ndof of the segment candidate
358  if ((chi2 / (seg->nHits() - 3) < theMaxChi2))
359  return seg;
360  else
361  return nullptr;
362 }
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
virtual double chi2() const
the chi2 (NOT chi2/NDOF) of the fit
Definition: DTSegmentCand.h:61
virtual double t0() const
the t0 of the segment
Definition: DTSegmentCand.h:67

◆ geometryFilter()

bool DTMeantimerPatternReco::geometryFilter ( const DTWireId  first,
const DTWireId  second 
) const
private

Definition at line 298 of file DTMeantimerPatternReco.cc.

References funct::abs(), gather_cfg::cout, dqmdumpme::first, and edm::second().

Referenced by addHits(), and buildSegments().

298  {
299  // return true;
300 
301  const int layerLowerCut[4] = {0, -1, -2, -2};
302  const int layerUpperCut[4] = {0, 2, 2, 3};
303  // const int layerLowerCut[4]={0,-2,-4,-5};
304  // const int layerUpperCut[4]={0, 3, 4, 6};
305 
306  // deal only with hits that are in the same SL
307  if (first.layerId().superlayerId().superLayer() != second.layerId().superlayerId().superLayer())
308  return true;
309 
310  int deltaLayer = abs(first.layerId().layer() - second.layerId().layer());
311 
312  // drop hits in the same layer
313  if (!deltaLayer)
314  return false;
315 
316  // protection against unexpected layer numbering
317  if (deltaLayer > 3) {
318  cout << "*** WARNING! DT Layer numbers differ by more than 3! for hits: " << endl;
319  cout << " " << first << endl;
320  cout << " " << second << endl;
321  return false;
322  }
323 
324  // accept only hits in cells "not too far away"
325  int deltaWire = first.wire() - second.wire();
326  if (second.layerId().layer() % 2 == 0)
327  deltaWire = -deltaWire; // yet another trick to get it right...
328  if ((deltaWire <= layerLowerCut[deltaLayer]) || (deltaWire >= layerUpperCut[deltaLayer]))
329  return false;
330 
331  return true;
332 }
U second(std::pair< T, U > const &p)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ initHits()

vector< std::shared_ptr< DTHitPairForFit > > DTMeantimerPatternReco::initHits ( const DTSuperLayer sl,
const std::vector< DTRecHit1DPair > &  hits 
)
private

Definition at line 89 of file DTMeantimerPatternReco.cc.

References hfClusterShapes_cfi::hits, mps_fire::result, and theDTGeometry.

Referenced by DTMeantimerPatternReco4D::buildPhiSuperSegmentsCandidates(), and reconstruct().

90  {
92  for (vector<DTRecHit1DPair>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
93  result.push_back(std::make_shared<DTHitPairForFit>(*hit, *sl, theDTGeometry));
94  }
95  return result;
96 }
std::vector< std::shared_ptr< DTHitPairForFit > > hitCont
edm::ESHandle< DTGeometry > theDTGeometry

◆ printPattern()

void DTMeantimerPatternReco::printPattern ( std::vector< DTSegmentCand::AssPoint > &  assHits,
const DTHitPairForFit hit 
)
private

Definition at line 375 of file DTMeantimerPatternReco.cc.

References gather_cfg::cout, mps_fire::i, DTEnums::Left, cuy::mark, and nano_mu_digi_cff::wire.

375  {
376  char mark[26] = {". . . . . . . . . . . . "};
377  int wire[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
378 
379  for (vector<DTSegmentCand::AssPoint>::const_iterator assHit = assHits.begin(); assHit != assHits.end(); ++assHit) {
380  int lay =
381  (((*assHit).first)->id().superlayerId().superLayer() - 1) * 4 + ((*assHit).first)->id().layerId().layer() - 1;
382  wire[lay] = ((*assHit).first)->id().wire();
383  if ((*assHit).second == DTEnums::Left)
384  mark[lay * 2] = 'L';
385  else
386  mark[lay * 2] = 'R';
387  }
388 
389  int lay = ((*hit).id().superlayerId().superLayer() - 1) * 4 + (*hit).id().layerId().layer() - 1;
390  wire[lay] = (*hit).id().wire();
391  mark[lay * 2] = '*';
392 
393  cout << " " << mark << endl << " ";
394  for (int i = 0; i < 12; i++)
395  if (wire[i])
396  cout << setw(2) << wire[i];
397  else
398  cout << " ";
399  cout << endl;
400 }
mark
Definition: cuy.py:1010

◆ reconstruct()

edm::OwnVector< DTSLRecSegment2D > DTMeantimerPatternReco::reconstruct ( const DTSuperLayer sl,
const std::vector< DTRecHit1DPair > &  hits 
)
overridevirtual

this function is called in the producer

Implements DTRecSegment2DBaseAlgo.

Definition at line 61 of file DTMeantimerPatternReco.cc.

References buildSegments(), HLT_2024v14_cff::candidates, gather_cfg::cout, debug, initHits(), mps_fire::result, theUpdator, and DTSegmentUpdator::update().

Referenced by DTMeantimerPatternReco4D::reconstruct().

62  {
64  std::vector<std::shared_ptr<DTHitPairForFit>> hitsForFit = initHits(sl, pairs);
65 
66  vector<DTSegmentCand*> candidates = buildSegments(sl, hitsForFit);
67 
68  vector<DTSegmentCand*>::const_iterator cand = candidates.begin();
69  while (cand < candidates.end()) {
70  DTSLRecSegment2D* segment = (**cand);
71  theUpdator->update(segment, true);
72 
73  if (debug)
74  cout << "Reconstructed 2D segments " << *segment << endl;
75  result.push_back(segment);
76 
77  delete *(cand++); // delete the candidate!
78  }
79 
80  return result;
81 }
std::vector< std::shared_ptr< DTHitPairForFit > > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
void update(DTRecSegment4D *seg, const bool calcT0, bool allow3par) const
recompute hits position and refit the segment4D
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)

◆ setES()

void DTMeantimerPatternReco::setES ( const edm::EventSetup setup)
overridevirtual

Through this function the EventSetup is percolated to the objs which request it

Implements DTRecSegment2DBaseAlgo.

Definition at line 83 of file DTMeantimerPatternReco.cc.

References DTSegmentUpdator::setES(), singleTopDQM_cfi::setup, theDTGeometry, theDTGeometryToken, and theUpdator.

Referenced by DTMeantimerPatternReco4D::setES().

83  {
84  // Get the DT Geometry
87 }
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken
void setES(const edm::EventSetup &setup)
set the setup
edm::ESHandle< DTGeometry > theDTGeometry

Friends And Related Function Documentation

◆ DTMeantimerPatternReco4D

friend class DTMeantimerPatternReco4D
friend

Definition at line 71 of file DTMeantimerPatternReco.h.

Member Data Documentation

◆ debug

bool DTMeantimerPatternReco::debug
private

◆ maxfound

unsigned int DTMeantimerPatternReco::maxfound
private

Definition at line 108 of file DTMeantimerPatternReco.h.

Referenced by addHits(), and buildSegments().

◆ theAlgoName

std::string DTMeantimerPatternReco::theAlgoName
private

Definition at line 99 of file DTMeantimerPatternReco.h.

Referenced by algoName().

◆ theAlphaMaxPhi

double DTMeantimerPatternReco::theAlphaMaxPhi
private

Definition at line 102 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

◆ theAlphaMaxTheta

double DTMeantimerPatternReco::theAlphaMaxTheta
private

Definition at line 101 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

◆ theCleaner

DTSegmentCleaner* DTMeantimerPatternReco::theCleaner
private

◆ theDTGeometry

edm::ESHandle<DTGeometry> DTMeantimerPatternReco::theDTGeometry
private

Definition at line 110 of file DTMeantimerPatternReco.h.

Referenced by initHits(), and setES().

◆ theDTGeometryToken

const edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTMeantimerPatternReco::theDTGeometryToken
private

Definition at line 111 of file DTMeantimerPatternReco.h.

Referenced by setES().

◆ theFitter

DTLinearFit* DTMeantimerPatternReco::theFitter
private

Definition at line 69 of file DTMeantimerPatternReco.h.

Referenced by ~DTMeantimerPatternReco().

◆ theMaxAllowedHits

unsigned int DTMeantimerPatternReco::theMaxAllowedHits
private

Definition at line 100 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

◆ theMaxChi2

double DTMeantimerPatternReco::theMaxChi2
private

Definition at line 103 of file DTMeantimerPatternReco.h.

Referenced by DTMeantimerPatternReco(), and fitWithT0().

◆ theUpdator

DTSegmentUpdator* DTMeantimerPatternReco::theUpdator
private