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)
 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
 
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 43 of file DTMeantimerPatternReco.h.

Constructor & Destructor Documentation

DTMeantimerPatternReco::DTMeantimerPatternReco ( const edm::ParameterSet pset)

Constructor.

Definition at line 38 of file DTMeantimerPatternReco.cc.

References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), theAlphaMaxPhi, theAlphaMaxTheta, theCleaner, theMaxAllowedHits, theMaxChi2, and theUpdator.

39  : DTRecSegment2DBaseAlgo(pset), theFitter(new DTLinearFit()), theAlgoName("DTMeantimerPatternReco") {
40  theMaxAllowedHits = pset.getParameter<unsigned int>("MaxAllowedHits"); // 100
41  theAlphaMaxTheta = pset.getParameter<double>("AlphaMaxTheta"); // 0.1 ;
42  theAlphaMaxPhi = pset.getParameter<double>("AlphaMaxPhi"); // 1.0 ;
43  theMaxChi2 = pset.getParameter<double>("MaxChi2"); // 8.0 ;
44  debug = pset.getUntrackedParameter<bool>("debug");
45  theUpdator = new DTSegmentUpdator(pset);
46  theCleaner = new DTSegmentCleaner(pset);
47 }
DTRecSegment2DBaseAlgo(const edm::ParameterSet &)
Constructor.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTMeantimerPatternReco::~DTMeantimerPatternReco ( )
override

Destructor.

Definition at line 50 of file DTMeantimerPatternReco.cc.

References theCleaner, theFitter, and theUpdator.

50  {
51  delete theUpdator;
52  delete theCleaner;
53  delete theFitter;
54 }

Member Function Documentation

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

Definition at line 186 of file DTMeantimerPatternReco.cc.

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

Referenced by buildSegments().

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

return the algo name

Implements DTRecSegment2DBaseAlgo.

Definition at line 58 of file DTMeantimerPatternReco.h.

References singleTopDQM_cfi::setup.

58 { return theAlgoName; }
vector< DTSegmentCand * > DTMeantimerPatternReco::buildSegments ( const DTSuperLayer sl,
const std::vector< std::shared_ptr< DTHitPairForFit >> &  hits 
)
private

Definition at line 94 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().

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

Definition at line 360 of file DTMeantimerPatternReco.cc.

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

Referenced by addHits().

360  {
361  for (vector<DTSegmentCand*>::iterator cand = cands.begin(); cand != cands.end(); ++cand) {
362  if (*(*cand) == *seg)
363  return false;
364  if (((*cand)->nHits() >= seg->nHits()) && ((*cand)->chi2ndof() < seg->chi2ndof()))
365  if ((*cand)->nSharedHitPairs(*seg) > int(seg->nHits() - 2))
366  return false;
367  }
368  return true;
369 }
virtual double chi2ndof() const
the chi2/NDOF of the fit
Definition: DTSegmentCand.h:64
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:58
DTSegmentCand * DTMeantimerPatternReco::fitWithT0 ( DTSegmentCand seg,
const bool  fitdebug 
)
private

Definition at line 330 of file DTMeantimerPatternReco.cc.

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

Referenced by addHits().

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

Definition at line 294 of file DTMeantimerPatternReco.cc.

References funct::abs(), gather_cfg::cout, DTLayerId::layer(), DTWireId::layerId(), DTSuperLayerId::superLayer(), DTLayerId::superlayerId(), and DTWireId::wire().

Referenced by addHits(), and buildSegments().

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

Definition at line 85 of file DTMeantimerPatternReco.cc.

References mps_fire::result, and theDTGeometry.

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

86  {
88  for (vector<DTRecHit1DPair>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
89  result.push_back(std::make_shared<DTHitPairForFit>(*hit, *sl, theDTGeometry));
90  }
91  return result;
92 }
std::vector< std::shared_ptr< DTHitPairForFit > > hitCont
edm::ESHandle< DTGeometry > theDTGeometry
void DTMeantimerPatternReco::printPattern ( std::vector< DTSegmentCand::AssPoint > &  assHits,
const DTHitPairForFit hit 
)
private

Definition at line 371 of file DTMeantimerPatternReco.cc.

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

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

References buildSegments(), HLT_2018_cff::candidates, gather_cfg::cout, debug, initHits(), edm::OwnVector< T, P >::push_back(), mps_fire::result, theUpdator, and DTSegmentUpdator::update().

Referenced by DTMeantimerPatternReco4D::reconstruct().

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

References edm::EventSetup::get(), DTSegmentUpdator::setES(), theDTGeometry, and theUpdator.

Referenced by DTMeantimerPatternReco4D::setES().

79  {
80  // Get the DT Geometry
81  setup.get<MuonGeometryRecord>().get(theDTGeometry);
82  theUpdator->setES(setup);
83 }
void setES(const edm::EventSetup &setup)
set the setup
T get() const
Definition: EventSetup.h:73
edm::ESHandle< DTGeometry > theDTGeometry

Friends And Related Function Documentation

friend class DTMeantimerPatternReco4D
friend

Definition at line 68 of file DTMeantimerPatternReco.h.

Member Data Documentation

bool DTMeantimerPatternReco::debug
private
unsigned int DTMeantimerPatternReco::maxfound
private

Definition at line 105 of file DTMeantimerPatternReco.h.

Referenced by addHits(), and buildSegments().

std::string DTMeantimerPatternReco::theAlgoName
private

Definition at line 96 of file DTMeantimerPatternReco.h.

double DTMeantimerPatternReco::theAlphaMaxPhi
private

Definition at line 99 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

double DTMeantimerPatternReco::theAlphaMaxTheta
private

Definition at line 98 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

DTSegmentCleaner* DTMeantimerPatternReco::theCleaner
private
edm::ESHandle<DTGeometry> DTMeantimerPatternReco::theDTGeometry
private

Definition at line 107 of file DTMeantimerPatternReco.h.

Referenced by initHits(), and setES().

DTLinearFit* DTMeantimerPatternReco::theFitter
private

Definition at line 66 of file DTMeantimerPatternReco.h.

Referenced by ~DTMeantimerPatternReco().

unsigned int DTMeantimerPatternReco::theMaxAllowedHits
private

Definition at line 97 of file DTMeantimerPatternReco.h.

Referenced by buildSegments(), and DTMeantimerPatternReco().

double DTMeantimerPatternReco::theMaxChi2
private

Definition at line 100 of file DTMeantimerPatternReco.h.

Referenced by DTMeantimerPatternReco(), and fitWithT0().

DTSegmentUpdator* DTMeantimerPatternReco::theUpdator
private