CMS 3D CMS Logo

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