CMS 3D CMS Logo

DynamicTruncation.cc
Go to the documentation of this file.
1 
29 
30 #define MAX_THR 1e7
31 
32 using namespace edm;
33 using namespace std;
34 using namespace reco;
35 
36 namespace dyt_utils {
37  static const std::map<etaRegion, std::string> etaRegionStr{{etaRegion::eta0p8, "eta0p8"},
38  {etaRegion::eta1p2, "eta1p2"},
39  {etaRegion::eta2p0, "eta2p0"},
40  {etaRegion::eta2p2, "eta2p2"},
41  {etaRegion::eta2p4, "eta2p4"}};
42 };
43 
45  : cscGeomToken_(iC.esConsumes()),
46  muonRecHitBuilderToken_(iC.esConsumes(edm::ESInputTag("", "MuonRecHitBuilder"))),
47  updatorToken_(iC.esConsumes(edm::ESInputTag("", "KFUpdator"))),
48  navMuonToken_(iC.esConsumes()),
49  dytThresholdsToken_(iC.esConsumes()),
50  dtAlignmentErrorsToken_(iC.esConsumes()),
51  cscAlignmentErrorsToken_(iC.esConsumes()) {}
52 
55  const MuonServiceProxy &theService) {
56  propagator = theService.propagator("SmartPropagatorAny");
57  propagatorPF = theService.propagator("SmartPropagatorAny");
58  propagatorCompatibleDet = theService.propagator("SmartPropagatorAny");
59  theG = theService.trackingGeometry();
60  theMuonRecHitBuilder = eventSetup.getHandle(config.muonRecHitBuilderToken_);
61  updatorHandle = eventSetup.getHandle(config.updatorToken_);
62  cscGeom = eventSetup.getHandle(config.cscGeomToken_);
63  navMuon = eventSetup.getHandle(config.navMuonToken_);
64  magfield = theService.magneticField();
65  navigation = std::make_unique<DirectMuonNavigation>(theService.detLayerGeometry());
66  getSegs = std::make_unique<ChamberSegmentUtility>();
67  {
68  edm::ESHandle<DYTThrObject> dytThresholdsH = eventSetup.getHandle(config.dytThresholdsToken_);
69  AlignmentErrorsExtended const &dtAlignmentErrorsExtended = eventSetup.getData(config.dtAlignmentErrorsToken_);
70  AlignmentErrorsExtended const &cscAlignmentErrorsExtended = eventSetup.getData(config.cscAlignmentErrorsToken_);
71 
72  thrManager = std::make_unique<ThrParameters>(dytThresholdsH, dtAlignmentErrorsExtended, cscAlignmentErrorsExtended);
73  }
74  useDBforThr = thrManager->isValidThdDB();
75  dytThresholds = nullptr;
76  if (useDBforThr)
77  dytThresholds = thrManager->getInitialThresholds();
78 
79  doUpdateOfKFStates = true;
80  useParametrizedThr = false;
81 }
82 
84 
87  if (temp.isValid())
88  tsos = updatorHandle->update(tsos, *rechit);
89 }
90 
92  ConstRecHitContainer tmprecHits;
93  vector<const TrackingRecHit *> DTrh = bestDTSeg.recHits();
94  for (vector<const TrackingRecHit *>::iterator it = DTrh.begin(); it != DTrh.end(); it++) {
95  tmprecHits.push_back(theMuonRecHitBuilder->build(*it));
96  }
97  sort(tmprecHits);
98  for (ConstRecHitContainer::const_iterator it = tmprecHits.begin(); it != tmprecHits.end(); ++it) {
99  DTLayerId layid((*it)->det()->geographicalId());
101  if (temp.isValid()) {
103  if (tempTsos.isValid())
104  tsos = tempTsos;
105  }
106  }
107 }
108 
110  ConstRecHitContainer tmprecHits;
111  vector<CSCRecHit2D> CSCrh = bestCSCSeg.specificRecHits();
112  for (vector<CSCRecHit2D>::iterator it = CSCrh.begin(); it != CSCrh.end(); ++it) {
113  tmprecHits.push_back(theMuonRecHitBuilder->build(&*it));
114  }
115  sort(tmprecHits);
116  for (ConstRecHitContainer::const_iterator it = tmprecHits.begin(); it != tmprecHits.end(); ++it) {
117  const CSCLayer *cscLayer = cscGeom->layer((*it)->det()->geographicalId());
119  if (temp.isValid()) {
121  if (tempTsos.isValid())
122  tsos = tempTsos;
123  }
124  }
125 }
126 
131  if (selector < 0 || selector > 2)
132  throw cms::Exception("NotAvailable") << "DYT selector: wrong option!" << endl;
133  //if (selector == 0) cout << "[DYT disabled]\n";
134  //if (selector == 1) cout << "[use all compatible stations]\n";
135  //if (selector == 2) cout << "[stop at second consecutive incompatible station]\n";
137 }
138 
139 void DynamicTruncation::setUseAPE(bool useAPE_) { useAPE = useAPE_; }
140 
141 void DynamicTruncation::setUpdateState(bool upState) { doUpdateOfKFStates = upState; }
142 
143 void DynamicTruncation::setThr(const vector<int> &thr) {
144  if (thr.size() == 2) {
145  for (unsigned int i = 0; i < thr.size(); i++)
146  if (thr[i] >= 0)
147  Thrs.push_back(thr[i]);
148  else
149  Thrs.push_back(MAX_THR);
150  return;
151  }
152  throw cms::Exception("NotAvailable")
153  << "WARNING: wrong size for the threshold vector!\nExpected size: 2\n Found size: " << thr.size();
154 }
155 
157  for (auto const &region : dyt_utils::etaRegionStr) {
158  parameters[region.first] = par.getParameter<std::vector<double> >(region.second);
159  }
160 }
164 
165 //===> filter
167  result.clear();
168  prelFitMeas.clear();
169 
170  // Get APE maps
171  dtApeMap = thrManager->GetDTApeMap();
172  cscApeMap = thrManager->GetCSCApeMap();
173 
174  // Get Last tracker TSOS (updated)
175  vector<TrajectoryMeasurement> muonMeasurements = traj.measurements();
176  TrajectoryMeasurement lastTKm = muonMeasurements.front();
177  for (vector<TrajectoryMeasurement>::const_iterator imT = muonMeasurements.begin(); imT != muonMeasurements.end();
178  imT++) {
179  if (!(*imT).recHit()->isValid())
180  continue;
181  const TransientTrackingRecHit *hit = &(*(*imT).recHit());
182  if (hit->geographicalId().det() == DetId::Tracker) {
183  result.push_back((*imT).recHit());
184  if (!(*imT).forwardPredictedState().isValid())
185  continue;
186  if ((*imT).forwardPredictedState().globalPosition().mag() >
188  lastTKm = *imT;
189  }
190  }
192  update(currentState, lastTKm.recHit());
193 
195  update(prelFitState, lastTKm.recHit());
197 
198  // Run the DYT
199  filteringAlgo();
200 
201  return result;
202 }
203 
204 //===> filteringAlgo
206  map<int, vector<DetId> > compatibleIds;
207  map<int, vector<DTRecSegment4D> > dtSegMap;
208  map<int, vector<CSCSegment> > cscSegMap;
209  int incompConLay = 0;
210  nStationsUsed = 0;
211 
212  // Get list of compatible layers
213  compatibleDets(currentState, compatibleIds);
214 
215  // Fill segment maps
216  fillSegmentMaps(compatibleIds, dtSegMap, cscSegMap);
217 
218  // Do a preliminary fit
219  if (useDBforThr)
220  preliminaryFit(compatibleIds, dtSegMap, cscSegMap);
221 
222  // Loop on compatible layers
223  for (map<int, vector<DetId> >::iterator it = compatibleIds.begin(); it != compatibleIds.end(); ++it) {
224  int stLayer = stationfromDet(it->second.front());
225  DTRecSegment4D bestDTSeg;
226  CSCSegment bestCSCSeg;
227  double bestDTEstimator = MAX_THR;
228  double bestCSCEstimator = MAX_THR;
229  vector<DTRecSegment4D> dtSegs = dtSegMap[it->first];
230  vector<CSCSegment> cscSegs = cscSegMap[it->first];
231 
232  // DT case: find the most compatible segment
233  TrajectoryStateOnSurface tsosDTlayer;
234  testDTstation(currentState, dtSegs, bestDTEstimator, bestDTSeg, tsosDTlayer);
235 
236  // CSC case: find the most compatible segment
237  TrajectoryStateOnSurface tsosCSClayer;
238  testCSCstation(currentState, cscSegs, bestCSCEstimator, bestCSCSeg, tsosCSClayer);
239 
240  // Decide whether to keep the layer or not
241  bool chosenLayer =
242  chooseLayers(incompConLay, bestDTEstimator, bestDTSeg, tsosDTlayer, bestCSCEstimator, bestCSCSeg, tsosCSClayer);
243  fillDYTInfos(stLayer, chosenLayer, incompConLay, bestDTEstimator, bestCSCEstimator, bestDTSeg, bestCSCSeg);
244  }
245  //cout << "Number of used stations = " << nStationsUsed << endl;
246 }
247 
248 //===> stationfromDet
250  if (det.subdetId() == MuonSubdetId::CSC) {
251  CSCDetId ch(det);
252  return ch.station();
253  }
254  if (det.subdetId() == MuonSubdetId::DT) {
255  DTChamberId ch(det);
256  return ch.station();
257  }
258  return 0;
259 }
260 
261 //===> fillDYTInfos
263  bool const &chosenLayer,
264  int &incompConLay,
265  double const &bestDTEstimator,
266  double const &bestCSCEstimator,
267  DTRecSegment4D const &bestDTSeg,
268  CSCSegment const &bestCSCSeg) {
269  if (chosenLayer) {
270  nStationsUsed++;
271  incompConLay = 0;
272  if (bestDTEstimator <= bestCSCEstimator) {
273  estimatorMap[st] = bestDTEstimator;
274  DetId id(bestDTSeg.chamberId());
275  idChamberMap[st] = id;
276  } else {
277  DetId id(bestCSCSeg.cscDetId());
278  idChamberMap[st] = id;
279  estimatorMap[st] = bestCSCEstimator;
280  }
281  usedStationMap[st] = true;
282  } else {
283  incompConLay++;
284  estimatorMap[st] = -1;
285  usedStationMap[st] = false;
286  }
287 }
288 
289 //===> compatibleDets
290 void DynamicTruncation::compatibleDets(TrajectoryStateOnSurface &tsos, map<int, vector<DetId> > &detMap) {
291  MuonPatternRecoDumper dumper;
292  MeasurementEstimator *theEstimator = new Chi2MeasurementEstimator(1000, 1000);
293  vector<const DetLayer *> navLayers;
294  navLayers = navigation->compatibleLayers(*(currentState.freeState()), alongMomentum);
295  unsigned int ilayerCorrected = 0;
296  for (unsigned int ilayer = 0; ilayer < navLayers.size(); ilayer++) {
297  // Skip RPC layers
298  if (navLayers[ilayer]->subDetector() != GeomDetEnumerators::DT &&
299  navLayers[ilayer]->subDetector() != GeomDetEnumerators::CSC)
300  continue;
301  ilayerCorrected++;
302  vector<DetLayer::DetWithState> comps =
303  navLayers[ilayer]->compatibleDets(currentState, *propagatorCompatibleDet, *theEstimator);
304  //cout << comps.size() << " compatible Dets with " << navLayers[ilayer]->subDetector() << " Layer " << ilayer << " "
305  //<< dumper.dumpLayer(navLayers[ilayer]);
306  if (!comps.empty()) {
307  for (unsigned int icomp = 0; icomp < comps.size(); icomp++) {
308  DetId id(comps[icomp].first->geographicalId().rawId());
309  detMap[ilayerCorrected].push_back(id);
310  }
311  }
312  }
313  if (theEstimator)
314  delete theEstimator;
315 }
316 
317 //===> fillSegmentMaps
318 void DynamicTruncation::fillSegmentMaps(map<int, vector<DetId> > &compatibleIds,
319  map<int, vector<DTRecSegment4D> > &dtSegMap,
320  map<int, vector<CSCSegment> > &cscSegMap) {
321  for (map<int, vector<DetId> >::iterator it = compatibleIds.begin(); it != compatibleIds.end(); ++it) {
322  vector<DetId> ids = compatibleIds[it->first];
323  for (unsigned j = 0; j < ids.size(); j++) {
324  if (ids[j].subdetId() == MuonSubdetId::CSC) {
325  CSCDetId ch(ids[j]);
326  vector<CSCSegment> tmp = getSegs->getCSCSegmentsInChamber(ch);
327  for (unsigned int k = 0; k < tmp.size(); k++)
328  cscSegMap[it->first].push_back(tmp[k]);
329  }
330  if (ids[j].subdetId() == MuonSubdetId::DT) {
331  DTChamberId ch(ids[j]);
332  vector<DTRecSegment4D> tmp = getSegs->getDTSegmentsInChamber(ch);
333  for (unsigned int k = 0; k < tmp.size(); k++)
334  dtSegMap[it->first].push_back(tmp[k]);
335  }
336  }
337  }
338 }
339 
340 //===> testDTstation
342  vector<DTRecSegment4D> const &segments,
343  double &bestEstimator,
344  DTRecSegment4D &bestSeg,
345  TrajectoryStateOnSurface &tsosdt) {
346  if (segments.empty())
347  return;
348  for (unsigned int iSeg = 0; iSeg < segments.size(); iSeg++) {
349  DTChamberId chamber(segments[iSeg].chamberId());
350  if (!propagator->propagate(startingState, theG->idToDet(chamber)->surface()).isValid())
351  continue;
352  tsosdt = propagator->propagate(startingState, theG->idToDet(chamber)->surface());
353  //if (!tsosdt.isValid()) continue;
354  LocalError apeLoc;
355  if (useAPE)
356  apeLoc = ErrorFrameTransformer().transform(dtApeMap.find(chamber)->second, theG->idToDet(chamber)->surface());
357  StateSegmentMatcher estim(tsosdt, segments[iSeg], apeLoc);
358  double estimator = estim.value();
359  //cout << "estimator DT = " << estimator << endl;
360  if (estimator >= bestEstimator)
361  continue;
362  bestEstimator = estimator;
363  bestSeg = segments[iSeg];
364  }
365 }
366 
367 //===> testCSCstation
369  vector<CSCSegment> const &segments,
370  double &bestEstimator,
371  CSCSegment &bestSeg,
372  TrajectoryStateOnSurface &tsoscsc) {
373  if (segments.empty())
374  return;
375  for (unsigned int iSeg = 0; iSeg < segments.size(); iSeg++) {
376  CSCDetId chamber(segments[iSeg].cscDetId());
377  if (!propagator->propagate(startingState, theG->idToDet(chamber)->surface()).isValid())
378  continue;
379  tsoscsc = propagator->propagate(startingState, theG->idToDet(chamber)->surface());
380  //if (!tsoscsc.isValid()) continue;
381  LocalError apeLoc;
382  if (useAPE)
384  StateSegmentMatcher estim(tsoscsc, segments[iSeg], apeLoc);
385  double estimator = estim.value();
386  //cout << "estimator CSC = " << estimator << endl;
387  if (estimator >= bestEstimator)
388  continue;
389  bestEstimator = estimator;
390  bestSeg = segments[iSeg];
391  }
392 }
393 
394 //===> useSegment
396  result.push_back(theMuonRecHitBuilder->build(&bestDTSeg));
397  if (doUpdateOfKFStates)
398  updateWithDThits(currentState, bestDTSeg);
399  else
400  currentState = tsosDT;
401 }
402 
403 //===> useSegment
404 void DynamicTruncation::useSegment(CSCSegment const &bestCSCSeg, TrajectoryStateOnSurface const &tsosCSC) {
405  result.push_back(theMuonRecHitBuilder->build(&bestCSCSeg));
406  if (doUpdateOfKFStates)
407  updateWithCSChits(currentState, bestCSCSeg);
408  else
409  currentState = tsosCSC;
410 }
411 
412 //===> preliminaryFit
413 void DynamicTruncation::preliminaryFit(map<int, vector<DetId> > compatibleIds,
414  map<int, vector<DTRecSegment4D> > dtSegMap,
415  map<int, vector<CSCSegment> > cscSegMap) {
416  for (map<int, vector<DetId> >::iterator it = compatibleIds.begin(); it != compatibleIds.end(); ++it) {
417  DTRecSegment4D bestDTSeg;
418  CSCSegment bestCSCSeg;
419  double bestDTEstimator = MAX_THR;
420  double bestCSCEstimator = MAX_THR;
421  double initThr = MAX_THR;
422  vector<DTRecSegment4D> dtSegs = dtSegMap[it->first];
423  vector<CSCSegment> cscSegs = cscSegMap[it->first];
424 
425  // DT case: find the most compatible segment
426  TrajectoryStateOnSurface tsosDTlayer;
427  testDTstation(prelFitState, dtSegs, bestDTEstimator, bestDTSeg, tsosDTlayer);
428 
429  // CSC case: find the most compatible segment
430  TrajectoryStateOnSurface tsosCSClayer;
431  testCSCstation(prelFitState, cscSegs, bestCSCEstimator, bestCSCSeg, tsosCSClayer);
432 
433  // Decide whether to keep the layer or not
434  if (bestDTEstimator == MAX_THR && bestCSCEstimator == MAX_THR)
435  continue;
436  if (bestDTEstimator <= bestCSCEstimator) {
437  getThresholdFromCFG(initThr, DetId(bestDTSeg.chamberId()));
438  if (bestDTEstimator >= initThr)
439  continue;
440  prelFitMeas.push_back(theMuonRecHitBuilder->build(&bestDTSeg));
441  auto aSegRH = prelFitMeas.back();
442  auto uRes = updatorHandle->update(tsosDTlayer, *aSegRH);
443  if (uRes.isValid()) {
444  prelFitState = uRes;
445  } else {
446  prelFitMeas.pop_back();
447  }
448  } else {
449  getThresholdFromCFG(initThr, DetId(bestCSCSeg.cscDetId()));
450  if (bestCSCEstimator >= initThr)
451  continue;
452  prelFitMeas.push_back(theMuonRecHitBuilder->build(&bestCSCSeg));
453  auto aSegRH = prelFitMeas.back();
454  auto uRes = updatorHandle->update(tsosCSClayer, *aSegRH);
455  if (uRes.isValid()) {
456  prelFitState = uRes;
457  } else {
458  prelFitMeas.pop_back();
459  }
460  }
461  }
462  if (!prelFitMeas.empty())
463  prelFitMeas.pop_back();
464  for (auto imrh = prelFitMeas.rbegin(); imrh != prelFitMeas.rend(); ++imrh) {
465  DetId id = (*imrh)->geographicalId();
467  if (tmp.isValid())
468  prelFitState = tmp;
469  }
472 }
473 
474 //===> chooseLayers
475 bool DynamicTruncation::chooseLayers(int &incompLayers,
476  double const &bestDTEstimator,
477  DTRecSegment4D const &bestDTSeg,
478  TrajectoryStateOnSurface const &tsosDT,
479  double const &bestCSCEstimator,
480  CSCSegment const &bestCSCSeg,
481  TrajectoryStateOnSurface const &tsosCSC) {
482  double initThr = MAX_THR;
483  if (bestDTEstimator == MAX_THR && bestCSCEstimator == MAX_THR)
484  return false;
485  if (bestDTEstimator <= bestCSCEstimator) {
486  // Get threshold for the chamber
487  if (useDBforThr)
488  getThresholdFromDB(initThr, DetId(bestDTSeg.chamberId()));
489  else
490  getThresholdFromCFG(initThr, DetId(bestDTSeg.chamberId()));
491  if (DYTselector == 0 || (DYTselector == 1 && bestDTEstimator < initThr) ||
492  (DYTselector == 2 && incompLayers < 2 && bestDTEstimator < initThr)) {
493  useSegment(bestDTSeg, tsosDT);
494  return true;
495  }
496  } else {
497  // Get threshold for the chamber
498  if (useDBforThr)
499  getThresholdFromDB(initThr, DetId(bestCSCSeg.cscDetId()));
500  else
501  getThresholdFromCFG(initThr, DetId(bestCSCSeg.cscDetId()));
502  if (DYTselector == 0 || (DYTselector == 1 && bestCSCEstimator < initThr) ||
503  (DYTselector == 2 && incompLayers < 2 && bestCSCEstimator < initThr)) {
504  useSegment(bestCSCSeg, tsosCSC);
505  return true;
506  }
507  }
508  return false;
509 }
510 
511 //===> getThresholdFromDB
512 void DynamicTruncation::getThresholdFromDB(double &thr, DetId const &id) {
513  vector<DYTThrObject::DytThrStruct> thrvector = dytThresholds->thrsVec;
514  for (vector<DYTThrObject::DytThrStruct>::const_iterator it = thrvector.begin(); it != thrvector.end(); it++) {
516  if (obj.id == id) {
517  thr = obj.thr;
518  break;
519  }
520  }
521  if (useParametrizedThr)
522  correctThrByPAndEta(thr);
523 }
524 
525 //===> correctThrByPAndEta
527  auto parametricThreshold = [this] {
528  double thr50 = this->parameters[this->region].at(0);
529  double p0 = this->parameters[this->region].at(1);
530  double p1 = this->parameters[this->region].at(2);
531  return thr50 * (1 + p0 * p_reco + std::pow(this->p_reco, p1));
532  };
533 
534  std::set<dyt_utils::etaRegion> regionsToExclude = {
536 
537  if (!regionsToExclude.count(this->region))
538  thr = parametricThreshold();
539 }
540 
542  float absEta = std::abs(eta_reco);
543  // Defaul value for muons with abs(eta) > 2.4
545 
546  if (absEta <= 0.8)
548  else if (absEta <= 1.2)
550  else if (absEta <= 2.0)
552  else if (absEta <= 2.2)
554  else if (absEta <= 2.4)
556 }
557 
558 //===> getThresholdFromCFG
559 void DynamicTruncation::getThresholdFromCFG(double &thr, DetId const &id) {
560  if (id.subdetId() == MuonSubdetId::DT) {
561  thr = Thrs[0];
562  }
563  if (id.subdetId() == MuonSubdetId::CSC) {
564  thr = Thrs[1];
565  }
566 
567  if (useParametrizedThr)
568  correctThrByPAndEta(thr);
569 }
570 
571 //===> sort
573  unsigned int i = 0;
574  unsigned int j = 0;
576  for (i = 1; i < n; ++i)
577  for (j = n - 1; j >= i; --j)
578  if (recHits[j - 1]->globalPosition().mag() > recHits[j]->globalPosition().mag())
579  swap(recHits[j - 1], recHits[j]);
580 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
static GlobalError transform(const LocalError &le, const Surface &surf)
dyt_utils::etaRegion region
DynamicTruncation(Config const &, const edm::EventSetup &, const MuonServiceProxy &)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESHandle< Propagator > propagatorPF
T perp() const
Definition: PV3DBase.h:69
Config(edm::ConsumesCollector)
void sort(ConstRecHitContainer &)
TrajectoryStateOnSurface currentState
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
edm::ESHandle< Propagator > propagatorCompatibleDet
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
T eta() const
Definition: PV3DBase.h:73
void useSegment(DTRecSegment4D const &, TrajectoryStateOnSurface const &)
void getThresholdFromDB(double &, DetId const &)
Definition: config.py:1
void updateWithCSChits(TrajectoryStateOnSurface &, CSCSegment const &)
void testDTstation(TrajectoryStateOnSurface &, std::vector< DTRecSegment4D > const &, double &, DTRecSegment4D &, TrajectoryStateOnSurface &)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const GeomDet * idToDet(DetId) const override
uint16_t size_type
std::map< int, bool > usedStationMap
std::unique_ptr< ChamberSegmentUtility > getSegs
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
DataContainer const & measurements() const
Definition: Trajectory.h:178
void preliminaryFit(std::map< int, std::vector< DetId >>, std::map< int, std::vector< DTRecSegment4D >>, std::map< int, std::vector< CSCSegment >>)
TrajectoryStateOnSurface prelFitState
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
GlobalPoint globalPosition() const
edm::ESHandle< MuonDetLayerGeometry > navMuon
ConstRecHitContainer result
std::map< int, DetId > idChamberMap
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
void compatibleDets(TrajectoryStateOnSurface &, std::map< int, std::vector< DetId >> &)
T mag() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< ThrParameters > thrManager
void correctThrByPAndEta(double &)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
std::vector< DytThrStruct > thrsVec
Definition: DYTThrObject.h:19
void testCSCstation(TrajectoryStateOnSurface &, std::vector< CSCSegment > const &, double &, CSCSegment &, TrajectoryStateOnSurface &)
edm::ESHandle< TrajectoryStateUpdator > updatorHandle
ConstRecHitContainer prelFitMeas
TransientTrackingRecHit::ConstRecHitContainer filter(const Trajectory &)
void fillSegmentMaps(std::map< int, std::vector< DetId >> &, std::map< int, std::vector< DTRecSegment4D >> &, std::map< int, std::vector< CSCSegment >> &)
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
std::map< dyt_utils::etaRegion, std::vector< double > > parameters
#define MAX_THR
std::vector< int > Thrs
std::unique_ptr< DirectMuonNavigation > navigation
std::vector< ConstRecHitPointer > ConstRecHitContainer
void setThrsMap(const edm::ParameterSet &)
Definition: DetId.h:17
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
int station() const
Definition: CSCDetId.h:79
std::map< DTChamberId, GlobalError > dtApeMap
void update(TrajectoryStateOnSurface &, ConstRecHitPointer)
CSCDetId cscDetId() const
Definition: CSCSegment.h:70
GlobalVector globalMomentum() const
const DYTThrObject * dytThresholds
void fillDYTInfos(int const &, bool const &, int &, double const &, double const &, DTRecSegment4D const &, CSCSegment const &)
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
edm::ESHandle< Propagator > propagator
fixed size matrix
HLT enums.
Definition: Config.py:1
FreeTrajectoryState const * freeState(bool withErrors=true) const
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
std::map< int, double > estimatorMap
bool chooseLayers(int &, double const &, DTRecSegment4D const &, TrajectoryStateOnSurface const &, double const &, CSCSegment const &, TrajectoryStateOnSurface const &)
int stationfromDet(DetId const &)
static const std::map< etaRegion, std::string > etaRegionStr
static constexpr int DT
Definition: MuonSubdetId.h:11
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
Definition: CSCGeometry.cc:105
tmp
align.sh
Definition: createJobs.py:716
void updateWithDThits(TrajectoryStateOnSurface &, DTRecSegment4D const &)
static constexpr int CSC
Definition: MuonSubdetId.h:12
edm::ESHandle< MagneticField > magfield
void setThr(const std::vector< int > &)
std::map< CSCDetId, GlobalError > cscApeMap
edm::ESHandle< GlobalTrackingGeometry > theG
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
edm::ESHandle< CSCGeometry > cscGeom
ConstRecHitPointer const & recHit() const
void getThresholdFromCFG(double &, DetId const &)