CMS 3D CMS Logo

TrackEfficiencyMonitor.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Jeremy Andrea
5  */
6 
13 
18 #include <string>
19 
20 // needed to compute the efficiency
36 
37 //-----------------------------------------------------------------------------------
39  : ttbToken_(esConsumes(edm::ESInputTag("", "TransientTrackBuilder"))),
40  propToken_(esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))),
41  navToken_(esConsumes(edm::ESInputTag("", "CosmicNavigationSchool"))),
42  gstToken_(esConsumes()),
43  mfToken_(esConsumes()),
44  mtToken_(esConsumes())
45 //-----------------------------------------------------------------------------------
46 {
48 
49  theRadius_ = iConfig.getParameter<double>("theRadius");
50  theMaxZ_ = iConfig.getParameter<double>("theMaxZ");
51  isBFieldOff_ = iConfig.getParameter<bool>("isBFieldOff");
52  trackEfficiency_ = iConfig.getParameter<bool>("trackEfficiency");
53  theTKTracksLabel_ = iConfig.getParameter<edm::InputTag>("TKTrackCollection");
54  theSTATracksLabel_ = iConfig.getParameter<edm::InputTag>("STATrackCollection");
55  muonToken_ = consumes<edm::View<reco::Muon> >(iConfig.getParameter<edm::InputTag>("muoncoll"));
56 
57  theTKTracksToken_ = consumes<reco::TrackCollection>(theTKTracksLabel_);
58  theSTATracksToken_ = consumes<reco::TrackCollection>(theSTATracksLabel_);
59 
60  conf_ = iConfig;
61 }
62 
63 //-----------------------------------------------------------------------------------
65 //-----------------------------------------------------------------------------------
66 {}
67 
68 //-----------------------------------------------------------------------------------
70  edm::Run const& /* iRun */,
71  edm::EventSetup const& /* iSetup */)
72 //-----------------------------------------------------------------------------------
73 {
74  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
76 
77  ibooker.setCurrentFolder(MEFolderName);
78 
79  //
80  int muonXBin = conf_.getParameter<int>("muonXBin");
81  double muonXMin = conf_.getParameter<double>("muonXMin");
82  double muonXMax = conf_.getParameter<double>("muonXMax");
83 
84  histname = "muonX_";
86  muonX->setAxisTitle("");
87 
88  //
89  int muonYBin = conf_.getParameter<int>("muonYBin");
90  double muonYMin = conf_.getParameter<double>("muonYMin");
91  double muonYMax = conf_.getParameter<double>("muonYMax");
92 
93  histname = "muonY_";
95  muonY->setAxisTitle("");
96 
97  //
98  int muonZBin = conf_.getParameter<int>("muonZBin");
99  double muonZMin = conf_.getParameter<double>("muonZMin");
100  double muonZMax = conf_.getParameter<double>("muonZMax");
101 
102  histname = "muonZ_";
104  muonZ->setAxisTitle("");
105 
106  //
107  int muonEtaBin = conf_.getParameter<int>("muonEtaBin");
108  double muonEtaMin = conf_.getParameter<double>("muonEtaMin");
109  double muonEtaMax = conf_.getParameter<double>("muonEtaMax");
110 
111  histname = "muonEta_";
113  muonEta->setAxisTitle("");
114 
115  //
116  int muonPhiBin = conf_.getParameter<int>("muonPhiBin");
117  double muonPhiMin = conf_.getParameter<double>("muonPhiMin");
118  double muonPhiMax = conf_.getParameter<double>("muonPhiMax");
119 
120  histname = "muonPhi_";
122  muonPhi->setAxisTitle("");
123 
124  //
125  int muonD0Bin = conf_.getParameter<int>("muonD0Bin");
126  double muonD0Min = conf_.getParameter<double>("muonD0Min");
127  double muonD0Max = conf_.getParameter<double>("muonD0Max");
128 
129  histname = "muonD0_";
131  muonD0->setAxisTitle("");
132 
133  //
134  int muonCompatibleLayersBin = conf_.getParameter<int>("muonCompatibleLayersBin");
135  double muonCompatibleLayersMin = conf_.getParameter<double>("muonCompatibleLayersMin");
136  double muonCompatibleLayersMax = conf_.getParameter<double>("muonCompatibleLayersMax");
137 
138  histname = "muonCompatibleLayers_";
140  histname + AlgoName,
145 
146  //------------------------------------------------------------------------------------
147 
148  //
149  int trackXBin = conf_.getParameter<int>("trackXBin");
150  double trackXMin = conf_.getParameter<double>("trackXMin");
151  double trackXMax = conf_.getParameter<double>("trackXMax");
152 
153  histname = "trackX_";
155  trackX->setAxisTitle("");
156 
157  //
158  int trackYBin = conf_.getParameter<int>("trackYBin");
159  double trackYMin = conf_.getParameter<double>("trackYMin");
160  double trackYMax = conf_.getParameter<double>("trackYMax");
161 
162  histname = "trackY_";
164  trackY->setAxisTitle("");
165 
166  //
167  int trackZBin = conf_.getParameter<int>("trackZBin");
168  double trackZMin = conf_.getParameter<double>("trackZMin");
169  double trackZMax = conf_.getParameter<double>("trackZMax");
170 
171  histname = "trackZ_";
173  trackZ->setAxisTitle("");
174 
175  //
176  int trackEtaBin = conf_.getParameter<int>("trackEtaBin");
177  double trackEtaMin = conf_.getParameter<double>("trackEtaMin");
178  double trackEtaMax = conf_.getParameter<double>("trackEtaMax");
179 
180  histname = "trackEta_";
182  trackEta->setAxisTitle("");
183 
184  //
185  int trackPhiBin = conf_.getParameter<int>("trackPhiBin");
186  double trackPhiMin = conf_.getParameter<double>("trackPhiMin");
187  double trackPhiMax = conf_.getParameter<double>("trackPhiMax");
188 
189  histname = "trackPhi_";
191  trackPhi->setAxisTitle("");
192 
193  //
194  int trackD0Bin = conf_.getParameter<int>("trackD0Bin");
195  double trackD0Min = conf_.getParameter<double>("trackD0Min");
196  double trackD0Max = conf_.getParameter<double>("trackD0Max");
197 
198  histname = "trackD0_";
200  trackD0->setAxisTitle("");
201 
202  //
203  int trackCompatibleLayersBin = conf_.getParameter<int>("trackCompatibleLayersBin");
204  double trackCompatibleLayersMin = conf_.getParameter<double>("trackCompatibleLayersMin");
205  double trackCompatibleLayersMax = conf_.getParameter<double>("trackCompatibleLayersMax");
206 
207  histname = "trackCompatibleLayers_";
209  histname + AlgoName,
214 
215  //------------------------------------------------------------------------------------
216 
217  //
218  int deltaXBin = conf_.getParameter<int>("deltaXBin");
219  double deltaXMin = conf_.getParameter<double>("deltaXMin");
220  double deltaXMax = conf_.getParameter<double>("deltaXMax");
221 
222  histname = "deltaX_";
224  deltaX->setAxisTitle("");
225 
226  //
227  int deltaYBin = conf_.getParameter<int>("deltaYBin");
228  double deltaYMin = conf_.getParameter<double>("deltaYMin");
229  double deltaYMax = conf_.getParameter<double>("deltaYMax");
230 
231  histname = "deltaY_";
233  deltaY->setAxisTitle("");
234 
235  //
236  int signDeltaXBin = conf_.getParameter<int>("signDeltaXBin");
237  double signDeltaXMin = conf_.getParameter<double>("signDeltaXMin");
238  double signDeltaXMax = conf_.getParameter<double>("signDeltaXMax");
239 
240  histname = "signDeltaX_";
243 
244  //
245  int signDeltaYBin = conf_.getParameter<int>("signDeltaYBin");
246  double signDeltaYMin = conf_.getParameter<double>("signDeltaYMin");
247  double signDeltaYMax = conf_.getParameter<double>("signDeltaYMax");
248 
249  histname = "signDeltaY_";
252 
253  histname = "GlobalMuonPtEtaPhi_LowPt_";
254  GlobalMuonPtEtaPhiLowPt = ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
256 
257  histname = "StandaloneMuonPtEtaPhi_LowPt_";
259  ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
261 
262  histname = "GlobalMuonPtEtaPhi_HighPt_";
263  GlobalMuonPtEtaPhiHighPt = ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
265 
266  histname = "StandaloneMuonPtEtaPhi_HighPt_";
268  ibooker.book2D(histname + AlgoName, histname + AlgoName, 20, -2.4, 2.4, 20, -3.25, 3.25);
270 }
271 
272 //-----------------------------------------------------------------------------------
274 //-----------------------------------------------------------------------------------
275 {
278 
279  //initialize values
280  failedToPropagate = 0;
281  nCompatibleLayers = 0;
282  findDetLayer = false;
283 
284  const NavigationSchool& nav = iSetup.getData(navToken_);
287  thePropagator = &iSetup.getData(propToken_);
288  bField = &iSetup.getData(mfToken_);
289  theTracker = &iSetup.getData(gstToken_);
291 
293  if (!muons.isValid())
294  return;
295  for (edm::View<reco::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
296  if ((*muon).pt() < 5)
297  continue;
298  if (fabs((*muon).eta()) > 2.4)
299  continue;
300  if ((*muon).vertexNormalizedChi2() > 10)
301  continue;
302  if ((*muon).isStandAloneMuon() and (*muon).isGlobalMuon()) {
303  if ((*muon).pt() < 20)
304  GlobalMuonPtEtaPhiLowPt->Fill((*muon).eta(), (*muon).phi());
305  else
306  GlobalMuonPtEtaPhiHighPt->Fill((*muon).eta(), (*muon).phi());
307  }
308  if ((*muon).isStandAloneMuon()) {
309  if ((*muon).pt() < 20)
310  StandaloneMuonPtEtaPhiLowPt->Fill((*muon).eta(), (*muon).phi());
311  else
312  StandaloneMuonPtEtaPhiHighPt->Fill((*muon).eta(), (*muon).phi());
313  }
314  }
315  if (trackEfficiency_) {
316  //---------------------------------------------------
317  // Select muons with good quality
318  // If B field is on, no up-down matching between the muons
319  //---------------------------------------------------
320  bool isGoodMuon = false;
321  double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
322  if (isBFieldOff_) {
323  if (staTracks->size() == 2) {
324  for (unsigned int bindex = 0; bindex < staTracks->size(); ++bindex) {
325  if (0 == bindex) {
326  mudd0 += (*staTracks)[bindex].d0();
327  mudphi += (*staTracks)[bindex].phi();
328  muddsz += (*staTracks)[bindex].dsz();
329  mudeta += (*staTracks)[bindex].eta();
330  }
331  if (1 == bindex) {
332  mudd0 -= (*staTracks)[bindex].d0();
333  mudphi -= (*staTracks)[bindex].phi();
334  muddsz -= (*staTracks)[bindex].dsz();
335  mudeta -= (*staTracks)[bindex].eta();
336  }
337  }
338  if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
339  isGoodMuon = true;
340  }
341 
342  if (isGoodMuon)
343  testTrackerTracks(tkTracks, staTracks, nav);
344 
345  } else if (staTracks->size() == 1 || staTracks->size() == 2)
346  testTrackerTracks(tkTracks, staTracks, nav);
347  }
348 
349  if (!trackEfficiency_ && tkTracks->size() == 1) {
350  if ((tkTracks->front()).normalizedChi2() < 5 && (tkTracks->front()).hitPattern().numberOfValidHits() > 8)
351  testSTATracks(tkTracks, staTracks);
352  }
353 
354  delete theNavigation;
355 }
356 
357 //-----------------------------------------------------------------------------------
360  const NavigationSchool& navigationSchool)
361 //-----------------------------------------------------------------------------------
362 {
363  const std::string metname = "testStandAloneMuonTracks";
364 
365  //---------------------------------------------------
366  // get the index of the "up" muon
367  // histograms will only be computed for the "up" muon
368  //---------------------------------------------------
369 
370  int nUpMuon = 0;
371  int idxUpMuon = -1;
372  for (unsigned int i = 0; i < staTracks->size(); i++) {
374  nUpMuon++;
375  idxUpMuon = i;
376  }
377  }
378 
379  if (nUpMuon == 1) {
380  //---------------------------------------------------
381  //get the muon informations
382  //---------------------------------------------------
383 
384  reco::TransientTrack staTT = theTTrackBuilder->build((*staTracks)[idxUpMuon]);
385  double ipX = staTT.impactPointState().globalPosition().x();
386  double ipY = staTT.impactPointState().globalPosition().y();
387  double ipZ = staTT.impactPointState().globalPosition().z();
388  double eta = staTT.impactPointState().globalDirection().eta();
389  double phi = staTT.impactPointState().globalDirection().phi();
390  double d0 = (*staTracks)[idxUpMuon].d0();
391 
393  TrajectoryStateOnSurface theTSOSCompLayers = staTT.outermostMeasurementState();
394 
395  //---------------------------------------------------
396  //check if the muon is in the tracker acceptance
397  //---------------------------------------------------
398  bool isInTrackerAcceptance = false;
399  isInTrackerAcceptance = trackerAcceptance(theTSOS, theRadius_, theMaxZ_);
400 
401  //---------------------------------------------------st
402  //count the number of compatible layers
403  //---------------------------------------------------
404  nCompatibleLayers = compatibleLayers(navigationSchool, theTSOSCompLayers);
405 
406  if (isInTrackerAcceptance && (*staTracks)[idxUpMuon].hitPattern().numberOfValidHits() > 28) {
407  //---------------------------------------------------
408  //count the number of good muon candidates
409  //---------------------------------------------------
410 
411  TrajectoryStateOnSurface staState;
412  LocalVector diffLocal;
413 
414  bool isTrack = false;
415  if (!tkTracks->empty()) {
416  //---------------------------------------------------
417  //look for associated tracks
418  //---------------------------------------------------
419  float DR2min = 1000;
420  reco::TrackCollection::const_iterator closestTrk = tkTracks->end();
421 
422  for (reco::TrackCollection::const_iterator tkTrack = tkTracks->begin(); tkTrack != tkTracks->end(); ++tkTrack) {
423  reco::TransientTrack tkTT = theTTrackBuilder->build(*tkTrack);
425  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
426  failedToPropagate = 1;
427 
428  if (staState.isValid()) {
429  failedToPropagate = 0;
430  diffLocal = tkInner.localPosition() - staState.localPosition();
431  double DR2 = diffLocal.x() * diffLocal.x() + diffLocal.y() * diffLocal.y();
432  if (DR2 < DR2min) {
433  DR2min = DR2;
434  closestTrk = tkTrack;
435  }
436  if (pow(DR2, 0.5) < 100.)
437  isTrack = true;
438  }
439  }
440 
441  if (DR2min != 1000) {
442  reco::TransientTrack tkTT = theTTrackBuilder->build(*closestTrk);
444  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
445  deltaX->Fill(diffLocal.x());
446  deltaY->Fill(diffLocal.y());
447  signDeltaX->Fill(diffLocal.x() /
448  (tkInner.localError().positionError().xx() + staState.localError().positionError().xx()));
449  signDeltaY->Fill(diffLocal.y() /
450  (tkInner.localError().positionError().yy() + staState.localError().positionError().yy()));
451  }
452  }
453 
454  if (failedToPropagate == 0) {
455  muonX->Fill(ipX);
456  muonY->Fill(ipY);
457  muonZ->Fill(ipZ);
458  muonEta->Fill(eta);
459  muonPhi->Fill(phi);
460  muonD0->Fill(d0);
462 
463  if (isTrack) {
464  trackX->Fill(ipX);
465  trackY->Fill(ipY);
466  trackZ->Fill(ipZ);
467  trackEta->Fill(eta);
468  trackPhi->Fill(phi);
469  trackD0->Fill(d0);
471  }
472  }
473  }
474  }
475 }
476 
477 //-----------------------------------------------------------------------------------
480 //-----------------------------------------------------------------------------------
481 {
482  reco::TransientTrack tkTT = theTTrackBuilder->build(tkTracks->front());
483  double ipX = tkTT.impactPointState().globalPosition().x();
484  double ipY = tkTT.impactPointState().globalPosition().y();
485  double ipZ = tkTT.impactPointState().globalPosition().z();
486  double eta = tkTT.impactPointState().globalDirection().eta();
487  double phi = tkTT.impactPointState().globalDirection().phi();
488  double d0 = (*tkTracks)[0].d0();
489 
491  LocalVector diffLocal;
492  TrajectoryStateOnSurface staState;
493  bool isTrack = false;
494 
495  if (!staTracks->empty()) {
496  //---------------------------------------------------
497  //look for associated muons
498  //---------------------------------------------------
499 
500  float DR2min = 1000;
501  reco::TrackCollection::const_iterator closestTrk = staTracks->end();
502  //----------------------loop on tracker tracks:
503  for (reco::TrackCollection::const_iterator staTrack = staTracks->begin(); staTrack != staTracks->end();
504  ++staTrack) {
505  if (checkSemiCylinder(*staTrack) == TrackEfficiencyMonitor::Up) {
506  reco::TransientTrack staTT = theTTrackBuilder->build(*staTrack);
507  failedToPropagate = 1;
508  staState = thePropagator->propagate(staTT.outermostMeasurementState(), tkInner.surface());
509 
510  if (staState.isValid()) {
511  failedToPropagate = 0;
512  diffLocal = tkInner.localPosition() - staState.localPosition();
513 
514  double DR2 = diffLocal.x() * diffLocal.x() + diffLocal.y() * diffLocal.y();
515  if (DR2 < DR2min) {
516  DR2min = DR2;
517  closestTrk = staTrack;
518  }
519  if (pow(DR2, 0.5) < 100.)
520  isTrack = true;
521  }
522  }
523  }
524  }
525 
526  if (failedToPropagate == 0) {
527  trackX->Fill(ipX);
528  trackY->Fill(ipY);
529  trackZ->Fill(ipZ);
530  trackEta->Fill(eta);
531  trackPhi->Fill(phi);
532  trackD0->Fill(d0);
533 
534  if (isTrack) {
535  muonX->Fill(ipX);
536  muonY->Fill(ipY);
537  muonZ->Fill(ipZ);
538  muonEta->Fill(eta);
539  muonPhi->Fill(phi);
540  muonD0->Fill(d0);
541  }
542  }
543 }
544 
545 //-----------------------------------------------------------------------------------
547 //-----------------------------------------------------------------------------------
548 {
550 }
551 
552 //-----------------------------------------------------------------------------------
554 //-----------------------------------------------------------------------------------
555 {
556  //---------------------------------------------------
557  // check if the muon is in the tracker acceptance
558  // check the compatibility with a cylinder of radius "theRadius"
559  //---------------------------------------------------
560 
561  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
562 
563  //Propagator* theTmpPropagator = &*thePropagator;
564  Propagator* theTmpPropagator = thePropagator->clone();
565 
566  if (theTSOS.globalPosition().y() < 0)
567  theTmpPropagator->setPropagationDirection(oppositeToMomentum);
568  else
569  theTmpPropagator->setPropagationDirection(alongMomentum);
570 
573  const Cylinder::CylinderPointer cyl = Cylinder::build(pos0, rot0, theRadius);
574  TrajectoryStateOnSurface tsosAtCyl = theTmpPropagator->propagate(*theTSOS.freeState(), *cyl);
575  double accept = false;
576  if (tsosAtCyl.isValid()) {
577  if (fabs(tsosAtCyl.globalPosition().z()) < theMaxZ) {
580  const Cylinder::CylinderPointer cyl2 = Cylinder::build(pos02, rot02, theRadius - 10);
581  TrajectoryStateOnSurface tsosAtCyl2 = theTmpPropagator->propagate(*tsosAtCyl.freeState(), *cyl2);
582  if (tsosAtCyl2.isValid()) {
585  const Cylinder::CylinderPointer cyl3 = Cylinder::build(pos03, rot03, theRadius);
586  TrajectoryStateOnSurface tsosAtCyl3 = theTmpPropagator->propagate(*tsosAtCyl2.freeState(), *cyl3);
587  if (tsosAtCyl3.isValid()) {
588  accept = true;
589  }
590  }
591  }
592  }
593  delete theTmpPropagator;
594  //muon propagated to the barrel cylinder
595  return accept;
596 }
597 
598 //-----------------------------------------------------------------------------------
600 //-----------------------------------------------------------------------------------
601 {
602  //---------------------------------------------------
603  // check the number of compatible layers
604  //---------------------------------------------------
605 
606  std::vector<const BarrelDetLayer*> barrelTOBLayers = measurementTracker->geometricSearchTracker()->tobLayers();
607 
608  unsigned int layers = 0;
609  for (unsigned int k = 0; k < barrelTOBLayers.size(); k++) {
610  const DetLayer* firstLay = barrelTOBLayers[barrelTOBLayers.size() - 1 - k];
611 
612  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
613 
614  Propagator* theTmpPropagator = thePropagator->clone();
615  theTmpPropagator->setPropagationDirection(alongMomentum);
616 
617  TrajectoryStateOnSurface startTSOS = theTmpPropagator->propagate(*theTSOS.freeState(), firstLay->surface());
618 
619  std::vector<const DetLayer*> trackCompatibleLayers;
620 
621  findDetLayer = true;
622  bool isUpMuon = false;
623  bool firstdtep = true;
624 
625  if (startTSOS.isValid()) {
626  if (firstdtep)
627  layers++;
628 
629  int nwhile = 0;
630 
631  //for other compatible layers
632  while (startTSOS.isValid() && firstLay && findDetLayer) {
633  if (firstdtep && startTSOS.globalPosition().y() > 0)
634  isUpMuon = true;
635 
636  if (firstdtep) {
637  std::vector<const DetLayer*> firstCompatibleLayers;
638  firstCompatibleLayers.push_back(firstLay);
639  std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
640  findNextLayer(theTSOS, firstCompatibleLayers, isUpMuon);
641  firstdtep = false;
642  } else {
643  trackCompatibleLayers = navigationSchool.nextLayers(*firstLay, *(startTSOS.freeState()), alongMomentum);
644  if (!trackCompatibleLayers.empty()) {
645  std::pair<TrajectoryStateOnSurface, const DetLayer*> nextLayer =
646  findNextLayer(startTSOS, trackCompatibleLayers, isUpMuon);
647  if (firstLay != nextLayer.second) {
648  firstLay = nextLayer.second;
649  startTSOS = nextLayer.first;
650  layers++;
651  } else
652  firstLay = nullptr;
653  }
654  }
655  nwhile++;
656  if (nwhile > 100)
657  break;
658  }
659  delete theTmpPropagator;
660  break;
661  }
662  delete theTmpPropagator;
663  }
664  return layers;
665 }
666 
667 //-----------------------------------------------------------------------------------
668 std::pair<TrajectoryStateOnSurface, const DetLayer*> TrackEfficiencyMonitor::findNextLayer(
669  TrajectoryStateOnSurface sTSOS, const std::vector<const DetLayer*>& trackCompatibleLayers, bool isUpMuon)
670 //-----------------------------------------------------------------------------------
671 {
672  //Propagator* theTmpPropagator = new SteppingHelixPropagator(&*bField,anyDirection);
673 
674  Propagator* theTmpPropagator = thePropagator->clone();
675  theTmpPropagator->setPropagationDirection(alongMomentum);
676 
677  std::vector<const DetLayer*>::const_iterator itl;
678  findDetLayer = false;
679  for (itl = trackCompatibleLayers.begin(); itl != trackCompatibleLayers.end(); ++itl) {
680  TrajectoryStateOnSurface tsos = theTmpPropagator->propagate(*(sTSOS.freeState()), (**itl).surface());
681  if (tsos.isValid()) {
682  sTSOS = tsos;
683  findDetLayer = true;
684 
685  break;
686  }
687  }
688  std::pair<TrajectoryStateOnSurface, const DetLayer*> blabla;
689  blabla.first = sTSOS;
690  blabla.second = &**itl;
691  delete theTmpPropagator;
692  return blabla;
693 }
694 
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::pair< TrajectoryStateOnSurface, const DetLayer * > findNextLayer(TrajectoryStateOnSurface startTSOS, const std::vector< const DetLayer *> &trackCompatibleLayers, bool isUpMuon)
const LocalTrajectoryError & localError() const
const MagneticField * bField
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
T z() const
Definition: PV3DBase.h:61
const std::string metname
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
virtual Propagator * clone() const =0
const edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > navToken_
MonitorElement * GlobalMuonPtEtaPhiHighPt
LocalError positionError() const
const SurfaceType & surface() const
void testTrackerTracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks, const NavigationSchool &navigationSchool)
MonitorElement * GlobalMuonPtEtaPhiLowPt
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
const GeometricSearchTracker * geometricSearchTracker() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttbToken_
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > gstToken_
reco::TransientTrack build(const reco::Track *p) const
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
void Fill(long long x)
const edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > mtToken_
float yy() const
Definition: LocalError.h:24
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
MonitorElement * muonCompatibleLayers
int iEvent
Definition: GenABIO.cc:224
GlobalPoint globalPosition() const
TrajectoryStateOnSurface outermostMeasurementState() const
const GeometricSearchTracker * theTracker
MonitorElement * StandaloneMuonPtEtaPhiLowPt
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&... args) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const TransientTrackBuilder * theTTrackBuilder
TrajectoryStateOnSurface innermostMeasurementState() const
bool getData(T &iHolder) const
Definition: EventSetup.h:122
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
edm::EDGetTokenT< reco::TrackCollection > theTKTracksToken_
static constexpr float d0
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
Definition: Cylinder.h:45
GlobalVector globalDirection() const
MonitorElement * StandaloneMuonPtEtaPhiHighPt
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
const Propagator * thePropagator
const DirectTrackerNavigation * theNavigation
void analyze(const edm::Event &, const edm::EventSetup &) override
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
bool trackerAcceptance(TrajectoryStateOnSurface theTSOS, double theRadius, double theMaxZ)
std::vector< BarrelDetLayer const * > const & tobLayers() const
int compatibleLayers(const NavigationSchool &navigationSchool, TrajectoryStateOnSurface theTSOS)
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrackEfficiencyMonitor(const edm::ParameterSet &)
const MeasurementTracker * measurementTracker
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
SemiCylinder checkSemiCylinder(const Track &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * trackCompatibleLayers
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propToken_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
float xx() const
Definition: LocalError.h:22
TrajectoryStateOnSurface impactPointState() const
void testSTATracks(edm::Handle< TrackCollection > tkTracks, edm::Handle< TrackCollection > staTracks)
edm::EDGetTokenT< reco::TrackCollection > theSTATracksToken_
Definition: Run.h:45
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)