CMS 3D CMS Logo

MuonTrackLoader.cc
Go to the documentation of this file.
1 
9 #include <memory>
10 
12 
16 
26 
28 
32 
37 
40 
43 
44 using namespace edm;
45 using namespace std;
46 using namespace reco;
47 
48 std::vector<const TrackingRecHit*> MuonTrackLoader::unpackHit(const TrackingRecHit& hit) {
49  // get rec hit det id and rec hit type
50  DetId id = hit.geographicalId();
51  uint16_t detid = id.det();
52 
53  std::vector<const TrackingRecHit*> hits;
54 
55  if (detid == DetId::Tracker) {
56  hits.push_back(&hit);
57  } else if (detid == DetId::Muon) {
58  uint16_t subdet = id.subdetId();
59  if (subdet == (uint16_t)MuonSubdetId::DT) {
60  if (hit.dimension() == 1) { // DT rechit (granularity 2)
61  hits.push_back(&hit);
62  } else if (hit.dimension() > 1) { // 4D segment (granularity 0).
63  // Both 2 and 4 dim cases. MB4s have 2D, but formatted in 4D segment
64  // 4D --> 2D
65  std::vector<const TrackingRecHit*> seg2D = hit.recHits();
66  // load 1D hits (2D --> 1D)
67  for (std::vector<const TrackingRecHit*>::const_iterator it = seg2D.begin(); it != seg2D.end(); ++it) {
68  std::vector<const TrackingRecHit*> hits1D = (*it)->recHits();
69  copy(hits1D.begin(), hits1D.end(), back_inserter(hits));
70  }
71  }
72  } else if (subdet == (uint16_t)MuonSubdetId::CSC) {
73  if (hit.dimension() == 2) { // CSC rechit (granularity 2)
74  hits.push_back(&hit);
75  } else if (hit.dimension() == 4) { // 4D segment (granularity 0)
76  // load 2D hits (4D --> 1D)
77  hits = hit.recHits();
78  }
79  } else if (subdet == (uint16_t)MuonSubdetId::RPC) {
80  hits.push_back(&hit);
81  } else if (subdet == (uint16_t)MuonSubdetId::GEM) {
82  if (hit.dimension() == 2) { // GEM rechit
83  hits.push_back(&hit);
84  } else if (hit.dimension() == 4) { // GEM segment
85  hits = hit.recHits();
86  }
87  } else if (subdet == (uint16_t)MuonSubdetId::ME0) { //segment
88  hits = hit.recHits();
89  }
90  }
91  return hits;
92 }
93 
94 // constructor (obsolete, should use eventSetUp not service..)
98  : theService(service) {
99  // option to do or not the smoothing step.
100  // the trajectories which are passed to the track loader are supposed to be non-smoothed
101  theSmoothingStep = parameterSet.getParameter<bool>("DoSmoothing");
102  if (theSmoothingStep)
103  theSmootherName = parameterSet.getParameter<string>("Smoother");
104 
106 
107  // update at vertex
108  theUpdatingAtVtx = parameterSet.getParameter<bool>("VertexConstraint");
109 
110  // beam spot input tag
113 
114  // Flag to put the trajectory into the event
115  theTrajectoryFlag = parameterSet.getUntrackedParameter<bool>("PutTrajectoryIntoEvent", true);
116 
117  theL2SeededTkLabel = parameterSet.getUntrackedParameter<string>("MuonSeededTracksInstance", string());
118 
119  ParameterSet updatorPar = parameterSet.getParameter<ParameterSet>("MuonUpdatorAtVertexParameters");
120  theUpdatorAtVtx = std::make_unique<MuonUpdatorAtVertex>(updatorPar, service);
121 
122  thePutTkTrackFlag = parameterSet.getUntrackedParameter<bool>("PutTkTrackIntoEvent", false);
123  theSmoothTkTrackFlag = parameterSet.getUntrackedParameter<bool>("SmoothTkTrack", false);
124  theAllowNoVtxFlag = parameterSet.getUntrackedParameter<bool>("AllowNoVertex", false);
125 }
126 
128 
130  Event& event,
131  const TrackerTopology& ttopo,
132  const string& instance,
133  bool reallyDoSmoothing) {
134  std::vector<bool> dummyVecBool;
135  return loadTracks(trajectories, event, dummyVecBool, ttopo, instance, reallyDoSmoothing);
136 }
137 
139  Event& event,
140  std::vector<bool>& tkBoolVec,
141  const TrackerTopology& ttopo,
142  const string& instance,
143  bool reallyDoSmoothing) {
144  const bool doSmoothing = theSmoothingStep && reallyDoSmoothing;
145 
146  const string metname = "Muon|RecoMuon|MuonTrackLoader";
147 
148  // the track collectios; they will be loaded in the event
149  auto trackCollection = std::make_unique<reco::TrackCollection>();
150  // ... and its reference into the event
151  reco::TrackRefProd trackCollectionRefProd = event.getRefBeforePut<reco::TrackCollection>(instance);
152 
153  // track collection for the tracks updated at vertex
154  auto updatedAtVtxTrackCollection = std::make_unique<reco::TrackCollection>();
155  // ... and its (eventually) reference into the event
156  reco::TrackRefProd trackUpdatedCollectionRefProd;
157  if (theUpdatingAtVtx)
158  trackUpdatedCollectionRefProd = event.getRefBeforePut<reco::TrackCollection>(instance + "UpdatedAtVtx");
159 
160  // Association map between updated and non updated at vtx tracks
161  auto trackToTrackmap = std::make_unique<reco::TrackToTrackMap>(trackCollectionRefProd, trackUpdatedCollectionRefProd);
162 
163  // the track extra collection, it will be loaded in the event
164  auto trackExtraCollection = std::make_unique<reco::TrackExtraCollection>();
165  // ... and its reference into the event
166  reco::TrackExtraRefProd trackExtraCollectionRefProd = event.getRefBeforePut<reco::TrackExtraCollection>(instance);
167 
168  // the rechit collection, it will be loaded in the event
169  auto recHitCollection = std::make_unique<TrackingRecHitCollection>();
170  // ... and its reference into the event
171  TrackingRecHitRefProd recHitCollectionRefProd = event.getRefBeforePut<TrackingRecHitCollection>(instance);
172 
173  // Collection of Trajectory
174  auto trajectoryCollection = std::make_unique<vector<Trajectory>>();
175 
176  // don't waste any time...
177  if (trajectories.empty()) {
178  event.put(std::move(recHitCollection), instance);
179  event.put(std::move(trackExtraCollection), instance);
180  if (theTrajectoryFlag) {
181  event.put(std::move(trajectoryCollection), instance);
182 
183  // Association map between track and trajectory
184  auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>();
185  event.put(std::move(trajTrackMap), instance);
186  }
187  if (theUpdatingAtVtx) {
188  event.put(std::move(trackToTrackmap));
189  event.put(std::move(updatedAtVtxTrackCollection), instance + "UpdatedAtVtx");
190  }
191  return event.put(std::move(trackCollection), instance);
192  }
193 
195  event.getByToken(theBeamSpotToken, beamSpot);
196 
197  LogTrace(metname) << "Create the collection of Tracks";
198 
199  reco::TrackRef::key_type trackIndex = 0;
200  reco::TrackRef::key_type trackUpdatedIndex = 0;
201 
202  reco::TrackExtraRef::key_type trackExtraIndex = 0;
203 
205  edm::Ref<std::vector<Trajectory>>::key_type iTjRef = 0;
206  std::map<unsigned int, unsigned int> tjTkMap;
207 
208  if (doSmoothing) {
210  theService->eventSetup().get<TrajectoryFitter::Record>().get(theSmootherName, aSmoother);
211  theSmoother.reset(aSmoother->clone());
212  edm::ESHandle<TransientTrackingRecHitBuilder> theTrackerRecHitBuilder;
213  theService->eventSetup().get<TransientRecHitRecord>().get(theTrackerRecHitBuilderName, theTrackerRecHitBuilder);
214  theTrackerRecHitBuilder.product();
215  hitCloner = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder.product())->cloner();
216  theSmoother->setHitCloner(&hitCloner);
217  }
218 
219  unsigned int tjCnt = 0;
220  for (TrajectoryContainer::iterator itRawTrajectory = trajectories.begin(); itRawTrajectory != trajectories.end();
221  ++itRawTrajectory, ++tjCnt) {
222  auto rawTrajectory = std::move(*itRawTrajectory);
223  Trajectory& trajectory = *rawTrajectory;
224 
225  if (doSmoothing) {
226  vector<Trajectory> trajectoriesSM = theSmoother->trajectories(*rawTrajectory);
227 
228  if (!trajectoriesSM.empty()) {
229  const edm::RefToBase<TrajectorySeed> tmpSeedRef = (*rawTrajectory).seedRef();
230  trajectory = trajectoriesSM.front();
231  trajectory.setSeedRef(tmpSeedRef);
232  LogDebug(metname) << "theSeedRef.isNonnull " << trajectory.seedRef().isNonnull();
233  } else
234  LogInfo(metname) << "The trajectory has not been smoothed!" << endl;
235  }
236 
237  if (theTrajectoryFlag) {
238  trajectoryCollection->push_back(trajectory);
239  iTjRef++;
240  }
241 
242  // build the "bare" track from the trajectory.
243  // This track has the parameters defined at PCA (no update)
244  pair<bool, reco::Track> resultOfTrackExtrapAtPCA = buildTrackAtPCA(trajectory, *beamSpot);
245 
246  // Check if the extrapolation went well
247  if (!resultOfTrackExtrapAtPCA.first) {
248  continue;
249  }
250 
251  // take the "bare" track at PCA
252  reco::Track& track = resultOfTrackExtrapAtPCA.second;
253 
254  // build the "bare" track extra from the trajectory
255  reco::TrackExtra trackExtra = buildTrackExtra(trajectory);
256 
257  // get the TrackExtraRef (persitent reference of the track extra)
258  reco::TrackExtraRef trackExtraRef(trackExtraCollectionRefProd, trackExtraIndex++);
259 
260  // set the persistent track-extra reference to the Track
261  track.setExtra(trackExtraRef);
262 
263  // build the updated-at-vertex track, starting from the previous track
264  pair<bool, reco::Track> updateResult(false, reco::Track());
265 
266  if (theUpdatingAtVtx) {
267  // build the "bare" track UPDATED at vtx
268  updateResult = buildTrackUpdatedAtPCA(track, *beamSpot);
269 
270  if (!updateResult.first)
271  ++trackIndex;
272  else {
273  // set the persistent track-extra reference to the Track
274  updateResult.second.setExtra(trackExtraRef);
275 
276  // Fill the map
277  trackToTrackmap->insert(reco::TrackRef(trackCollectionRefProd, trackIndex++),
278  reco::TrackRef(trackUpdatedCollectionRefProd, trackUpdatedIndex++));
279  }
280  }
281 
282  // get the transient rechit and co from the trajectory
283  reco::TrackExtra::TrajParams trajParams;
285  Traj2TrackHits t2t;
286  auto ih = recHitCollection->size();
287  t2t(trajectory, *recHitCollection, trajParams, chi2s);
288  auto ie = recHitCollection->size();
289  // set the TrackingRecHitRef (persitent reference of the tracking rec hits)
290  trackExtra.setHits(recHitCollectionRefProd, ih, ie - ih);
291  trackExtra.setTrajParams(std::move(trajParams), std::move(chi2s));
292  assert(trackExtra.trajParams().size() == trackExtra.recHitsSize());
293 
294  // Fill the hit pattern
295  for (; ih < ie; ++ih) {
296  auto const& hit = (*recHitCollection)[ih];
298  for (auto hh : hits) {
299  if UNLIKELY (!track.appendHitPattern(*hh, ttopo))
300  break;
301  }
302 
303  if (theUpdatingAtVtx && updateResult.first) {
304  for (auto hh : hits) {
305  if UNLIKELY (!updateResult.second.appendHitPattern(*hh, ttopo))
306  break;
307  }
308  }
309  }
310 
311  // fill the TrackExtraCollection
312  trackExtraCollection->push_back(trackExtra);
313 
314  // fill the TrackCollection
315  trackCollection->push_back(track);
316  iTkRef++;
317  LogTrace(metname) << "Debug Track being loaded pt " << track.pt();
318  // fill the TrackCollection updated at vtx
319  if (theUpdatingAtVtx && updateResult.first)
320  updatedAtVtxTrackCollection->push_back(updateResult.second);
321 
322  if (tkBoolVec.size() > tjCnt)
323  tkBoolVec[tjCnt] = true;
324  if (theTrajectoryFlag)
325  tjTkMap[iTjRef - 1] = iTkRef - 1;
326  }
327 
328  // Put the Collections in the event
329  LogTrace(metname) << "put the Collections in the event";
330  event.put(std::move(recHitCollection), instance);
331  event.put(std::move(trackExtraCollection), instance);
332 
333  OrphanHandle<reco::TrackCollection> returnTrackHandle;
334  OrphanHandle<reco::TrackCollection> nonUpdatedHandle;
335  if (theUpdatingAtVtx) {
336  nonUpdatedHandle = event.put(std::move(trackCollection), instance);
337  event.put(std::move(trackToTrackmap));
338  returnTrackHandle = event.put(std::move(updatedAtVtxTrackCollection), instance + "UpdatedAtVtx");
339  } else {
340  returnTrackHandle = event.put(std::move(trackCollection), instance);
341  nonUpdatedHandle = returnTrackHandle;
342  }
343 
344  if (theTrajectoryFlag) {
345  OrphanHandle<std::vector<Trajectory>> rTrajs = event.put(std::move(trajectoryCollection), instance);
346 
347  // Association map between track and trajectory
348  auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>(rTrajs, nonUpdatedHandle);
349 
350  // Now Create traj<->tracks association map
351  for (std::map<unsigned int, unsigned int>::iterator i = tjTkMap.begin(); i != tjTkMap.end(); i++) {
352  trajTrackMap->insert(edm::Ref<std::vector<Trajectory>>(rTrajs, (*i).first),
353  edm::Ref<reco::TrackCollection>(nonUpdatedHandle, (*i).second));
354  }
355  event.put(std::move(trajTrackMap), instance);
356  }
357 
358  return returnTrackHandle;
359 }
360 
362  Event& event,
363  const TrackerTopology& ttopo) {
364  const string metname = "Muon|RecoMuon|MuonTrackLoader";
365 
366  // the muon collection, it will be loaded in the event
367  auto trackLinksCollection = std::make_unique<reco::MuonTrackLinksCollection>();
368 
369  // don't waste any time...
370  if (muonCands.empty()) {
371  auto trackExtraCollection = std::make_unique<reco::TrackExtraCollection>();
372  auto recHitCollection = std::make_unique<TrackingRecHitCollection>();
373  auto trackCollection = std::make_unique<reco::TrackCollection>();
374 
375  event.put(std::move(recHitCollection));
376  event.put(std::move(trackExtraCollection));
377  event.put(std::move(trackCollection));
378 
379  //need to also put the tracker tracks collection if requested
380  if (thePutTkTrackFlag) {
381  //will take care of putting nothing in the event but the empty collection
382  TrajectoryContainer trackerTrajs;
384  }
385 
386  return event.put(std::move(trackLinksCollection));
387  }
388 
389  // get combined Trajectories
390  TrajectoryContainer combinedTrajs;
391  TrajectoryContainer trackerTrajs;
392  for (CandidateContainer::iterator it = muonCands.begin(); it != muonCands.end(); ++it) {
393  LogDebug(metname) << "Loader glbSeedRef " << (*it)->trajectory()->seedRef().isNonnull();
394  if ((*it)->trackerTrajectory())
395  LogDebug(metname) << " "
396  << "tkSeedRef " << (*it)->trackerTrajectory()->seedRef().isNonnull();
397 
398  combinedTrajs.push_back((*it)->releaseTrajectory());
399  {
400  auto tt = (*it)->releaseTrackerTrajectory();
401  if (thePutTkTrackFlag)
402  trackerTrajs.push_back(std::move(tt));
403  }
404 
405  // // Create the links between sta and tracker tracks
406  // reco::MuonTrackLinks links;
407  // links.setStandAloneTrack((*it)->muonTrack());
408  // links.setTrackerTrack((*it)->trackerTrack());
409  // trackLinksCollection->push_back(links);
410  // delete *it;
411  }
412 
413  // create the TrackCollection of combined Trajectories
414  // FIXME: could this be done one track at a time in the previous loop?
415  LogTrace(metname) << "Build combinedTracks";
416  std::vector<bool> combTksVec(combinedTrajs.size(), false);
417  OrphanHandle<reco::TrackCollection> combinedTracks = loadTracks(combinedTrajs, event, combTksVec, ttopo);
418 
420  std::vector<bool> trackerTksVec(trackerTrajs.size(), false);
421  if (thePutTkTrackFlag) {
422  LogTrace(metname) << "Build trackerTracks: " << trackerTrajs.size();
423  trackerTracks = loadTracks(trackerTrajs, event, trackerTksVec, ttopo, theL2SeededTkLabel, theSmoothTkTrackFlag);
424  }
425 
426  trackerTrajs.clear();
427 
428  LogTrace(metname) << "Set the final links in the MuonTrackLinks collection";
429 
430  unsigned int candposition(0), position(0), tkposition(0);
431  //reco::TrackCollection::const_iterator glIt = combinedTracks->begin(),
432  // glEnd = combinedTracks->end();
433 
434  for (CandidateContainer::const_iterator it = muonCands.begin(); it != muonCands.end(); ++it, ++candposition) {
435  // The presence of the global track determines whether to fill the MuonTrackLinks or not
436  // N.B. We are assuming here that the global tracks in "combinedTracks"
437  // have the same order as the muon candidates in "muonCands"
438  // (except for possible missing tracks), which should always be the case...
439  //if( glIt == glEnd ) break;
440  if (combTksVec[candposition]) {
441  reco::TrackRef combinedTR(combinedTracks, position++);
442  //++glIt;
443 
444  // Create the links between sta and tracker tracks
446  links.setStandAloneTrack((*it)->muonTrack());
447  links.setTrackerTrack((*it)->trackerTrack());
448  links.setGlobalTrack(combinedTR);
449 
450  if (thePutTkTrackFlag && trackerTksVec[candposition]) {
451  reco::TrackRef trackerTR(trackerTracks, tkposition++);
452  links.setTrackerTrack(trackerTR);
453  }
454 
455  trackLinksCollection->push_back(links);
456  }
457 
458  else { // if no global track, still increment the tracker-track counter when appropriate
459  if (thePutTkTrackFlag && trackerTksVec[candposition])
460  tkposition++;
461  }
462  }
463 
464  if (thePutTkTrackFlag && trackerTracks.isValid() && !(!combinedTracks->empty() && !trackerTracks->empty()))
465  LogWarning(metname) << "The MuonTrackLinkCollection is incomplete";
466 
467  // put the MuonCollection in the event
468  LogTrace(metname) << "put the MuonCollection in the event"
469  << "\n";
470 
471  return event.put(std::move(trackLinksCollection));
472 }
473 
475  TrajectoryContainer& trajectories,
476  Event& event,
477  const std::vector<std::pair<Trajectory*, reco::TrackRef>>& miniMap,
478  Handle<reco::TrackCollection> const& trackHandle,
479  const TrackerTopology& ttopo,
480  const string& instance,
481  bool reallyDoSmoothing) {
482  const bool doSmoothing = theSmoothingStep && reallyDoSmoothing;
483 
484  const string metname = "Muon|RecoMuon|MuonTrackLoader|TevMuonTrackLoader";
485 
486  LogDebug(metname) << "TeV LoadTracks instance: " << instance;
487 
488  // the track collectios; they will be loaded in the event
489  auto trackCollection = std::make_unique<reco::TrackCollection>();
490  // ... and its reference into the event
491  reco::TrackRefProd trackCollectionRefProd = event.getRefBeforePut<reco::TrackCollection>(instance);
492 
493  // Association map between GlobalMuons and TeVMuons
494  auto trackToTrackmap = std::make_unique<reco::TrackToTrackMap>(trackHandle, trackCollectionRefProd);
495 
496  // the track extra collection, it will be loaded in the event
497  auto trackExtraCollection = std::make_unique<reco::TrackExtraCollection>();
498  // ... and its reference into the event
499  reco::TrackExtraRefProd trackExtraCollectionRefProd = event.getRefBeforePut<reco::TrackExtraCollection>(instance);
500 
501  // the rechit collection, it will be loaded in the event
502  auto recHitCollection = std::make_unique<TrackingRecHitCollection>();
503  // ... and its reference into the event
504  TrackingRecHitRefProd recHitCollectionRefProd = event.getRefBeforePut<TrackingRecHitCollection>(instance);
505 
506  // Collection of Trajectory
507  auto trajectoryCollection = std::make_unique<std::vector<Trajectory>>();
508 
509  // don't waste any time...
510  if (trajectories.empty()) {
511  event.put(std::move(recHitCollection), instance);
512  event.put(std::move(trackExtraCollection), instance);
513  if (theTrajectoryFlag) {
514  event.put(std::move(trajectoryCollection), instance);
515 
516  // Association map between track and trajectory
517  auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>();
518  event.put(std::move(trajTrackMap), instance);
519  }
520  event.put(std::move(trackToTrackmap), instance);
521  return event.put(std::move(trackCollection), instance);
522  }
523 
524  LogTrace(metname) << "Create the collection of Tracks";
525 
527  event.getByToken(theBeamSpotToken, beamSpot);
528 
529  reco::TrackRef::key_type trackIndex = 0;
530 
531  reco::TrackExtraRef::key_type trackExtraIndex = 0;
532 
534  edm::Ref<std::vector<Trajectory>>::key_type iTjRef = 0;
535  std::map<unsigned int, unsigned int> tjTkMap;
536 
537  if (doSmoothing) {
539  theService->eventSetup().get<TrajectoryFitter::Record>().get(theSmootherName, aSmoother);
540  theSmoother.reset(aSmoother->clone());
541  edm::ESHandle<TransientTrackingRecHitBuilder> theTrackerRecHitBuilder;
542  theService->eventSetup().get<TransientRecHitRecord>().get(theTrackerRecHitBuilderName, theTrackerRecHitBuilder);
543  hitCloner = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder.product())->cloner();
544  theSmoother->setHitCloner(&hitCloner);
545  }
546 
547  for (TrajectoryContainer::iterator itRawTrajectory = trajectories.begin(); itRawTrajectory != trajectories.end();
548  ++itRawTrajectory) {
549  auto rawTrajectory = std::move(*itRawTrajectory);
550  reco::TrackRef glbRef;
551  std::vector<std::pair<Trajectory*, reco::TrackRef>>::const_iterator mmit;
552  for (mmit = miniMap.begin(); mmit != miniMap.end(); ++mmit) {
553  if (mmit->first == rawTrajectory.get())
554  glbRef = mmit->second;
555  }
556 
557  Trajectory& trajectory = *rawTrajectory;
558 
559  if (doSmoothing) {
560  vector<Trajectory> trajectoriesSM = theSmoother->trajectories(*rawTrajectory);
561 
562  if (!trajectoriesSM.empty()) {
563  const edm::RefToBase<TrajectorySeed> tmpSeedRef = (*rawTrajectory).seedRef();
564  trajectory = trajectoriesSM.front();
565  trajectory.setSeedRef(tmpSeedRef);
566  } else
567  LogInfo(metname) << "The trajectory has not been smoothed!" << endl;
568  }
569 
570  if (theTrajectoryFlag) {
571  trajectoryCollection->push_back(trajectory);
572  iTjRef++;
573  }
574 
575  // build the "bare" track from the trajectory.
576  // This track has the parameters defined at PCA (no update)
577  pair<bool, reco::Track> resultOfTrackExtrapAtPCA = buildTrackAtPCA(trajectory, *beamSpot);
578 
579  // Check if the extrapolation went well
580  if (!resultOfTrackExtrapAtPCA.first) {
581  continue;
582  }
583 
584  // take the "bare" track at PCA
585  reco::Track& track = resultOfTrackExtrapAtPCA.second;
586 
587  // build the "bare" track extra from the trajectory
588  reco::TrackExtra trackExtra = buildTrackExtra(trajectory);
589 
590  // get the TrackExtraRef (persitent reference of the track extra)
591  reco::TrackExtraRef trackExtraRef(trackExtraCollectionRefProd, trackExtraIndex++);
592 
593  // set the persistent track-extra reference to the Track
594  track.setExtra(trackExtraRef);
595 
596  // Fill the map
597  trackToTrackmap->insert(glbRef, reco::TrackRef(trackCollectionRefProd, trackIndex++));
598 
599  // build the updated-at-vertex track, starting from the previous track
600  pair<bool, reco::Track> updateResult(false, reco::Track());
601 
602  // get the transient rechit and co from the trajectory
603  reco::TrackExtra::TrajParams trajParams;
605  Traj2TrackHits t2t;
606  auto ih = recHitCollection->size();
607  t2t(trajectory, *recHitCollection, trajParams, chi2s);
608  auto ie = recHitCollection->size();
609  // set the TrackingRecHitRef (persitent reference of the tracking rec hits)
610  trackExtra.setHits(recHitCollectionRefProd, ih, ie - ih);
611  trackExtra.setTrajParams(std::move(trajParams), std::move(chi2s));
612  assert(trackExtra.trajParams().size() == trackExtra.recHitsSize());
613 
614  // Fill the hit pattern
615  for (; ih < ie; ++ih) {
616  auto const& hit = (*recHitCollection)[ih];
618  for (auto hh : hits) {
619  if UNLIKELY (!track.appendHitPattern(*hh, ttopo))
620  break;
621  }
622 
623  if (theUpdatingAtVtx && updateResult.first) {
624  for (auto hh : hits) {
625  if UNLIKELY (!updateResult.second.appendHitPattern(*hh, ttopo))
626  break;
627  }
628  }
629  }
630 
631  // fill the TrackExtraCollection
632  trackExtraCollection->push_back(trackExtra);
633 
634  // fill the TrackCollection
635  trackCollection->push_back(track);
636  iTkRef++;
637  LogTrace(metname) << "Debug Track being loaded pt " << track.pt();
638 
639  if (theTrajectoryFlag)
640  tjTkMap[iTjRef - 1] = iTkRef - 1;
641  }
642 
643  // Put the Collections in the event
644  LogTrace(metname) << "put the Collections in the event";
645  event.put(std::move(recHitCollection), instance);
646  event.put(std::move(trackExtraCollection), instance);
647 
648  OrphanHandle<reco::TrackCollection> returnTrackHandle;
649  OrphanHandle<reco::TrackCollection> nonUpdatedHandle;
650  if (theUpdatingAtVtx) {
651  } else {
652  event.put(std::move(trackToTrackmap), instance);
653  returnTrackHandle = event.put(std::move(trackCollection), instance);
654  nonUpdatedHandle = returnTrackHandle;
655  }
656 
657  if (theTrajectoryFlag) {
658  OrphanHandle<std::vector<Trajectory>> rTrajs = event.put(std::move(trajectoryCollection), instance);
659 
660  // Association map between track and trajectory
661  auto trajTrackMap = std::make_unique<TrajTrackAssociationCollection>(rTrajs, nonUpdatedHandle);
662 
663  // Now Create traj<->tracks association map
664  for (std::map<unsigned int, unsigned int>::iterator i = tjTkMap.begin(); i != tjTkMap.end(); i++) {
665  trajTrackMap->insert(edm::Ref<std::vector<Trajectory>>(rTrajs, (*i).first),
666  edm::Ref<reco::TrackCollection>(nonUpdatedHandle, (*i).second));
667  }
668  event.put(std::move(trajTrackMap), instance);
669  }
670 
671  return returnTrackHandle;
672 }
673 
674 pair<bool, reco::Track> MuonTrackLoader::buildTrackAtPCA(const Trajectory& trajectory,
675  const reco::BeamSpot& beamSpot) const {
676  const string metname = "Muon|RecoMuon|MuonTrackLoader";
677 
679 
680  // FIXME: check the prop direction
681  TrajectoryStateOnSurface innerTSOS = trajectory.geometricalInnermostState();
682 
683  // This is needed to extrapolate the tsos at vertex
684  LogTrace(metname) << "Propagate to PCA...";
685  pair<bool, FreeTrajectoryState> extrapolationResult = theUpdatorAtVtx->propagate(innerTSOS, beamSpot);
686  FreeTrajectoryState ftsAtVtx;
687 
688  if (extrapolationResult.first)
689  ftsAtVtx = extrapolationResult.second;
690  else {
691  if (TrackerBounds::isInside(innerTSOS.globalPosition())) {
692  LogInfo(metname) << "Track in the Tracker: taking the innermost state instead of the state at PCA";
693  ftsAtVtx = *innerTSOS.freeState();
694  } else {
695  if (theAllowNoVtxFlag) {
696  LogInfo(metname) << "Propagation to PCA failed, taking the innermost state instead of the state at PCA";
697  ftsAtVtx = *innerTSOS.freeState();
698  } else {
699  LogInfo(metname) << "Stand Alone track: this track will be rejected";
700  return pair<bool, reco::Track>(false, reco::Track());
701  }
702  }
703  }
704 
705  LogTrace(metname) << "TSOS after the extrapolation at vtx";
706  LogTrace(metname) << debug.dumpFTS(ftsAtVtx);
707 
708  GlobalPoint pca = ftsAtVtx.position();
709  math::XYZPoint persistentPCA(pca.x(), pca.y(), pca.z());
710  GlobalVector p = ftsAtVtx.momentum();
711  math::XYZVector persistentMomentum(p.x(), p.y(), p.z());
712 
713  bool bon = true;
714  if (fabs(theService->magneticField()->inTesla(GlobalPoint(0, 0, 0)).z()) < 0.01)
715  bon = false;
716  double ndof = trajectory.ndof(bon);
717 
719  trajectory.chiSquared(), ndof, persistentPCA, persistentMomentum, ftsAtVtx.charge(), ftsAtVtx.curvilinearError());
720 
721  return pair<bool, reco::Track>(true, track);
722 }
723 
725  const reco::BeamSpot& beamSpot) const {
726  const string metname = "Muon|RecoMuon|MuonTrackLoader";
728 
729  // build the transient track
730  reco::TransientTrack transientTrack(track, &*theService->magneticField(), theService->trackingGeometry());
731 
732  LogTrace(metname) << "Apply the vertex constraint";
733  pair<bool, FreeTrajectoryState> updateResult = theUpdatorAtVtx->update(transientTrack, beamSpot);
734 
735  if (!updateResult.first) {
736  return pair<bool, reco::Track>(false, reco::Track());
737  }
738 
739  LogTrace(metname) << "FTS after the vertex constraint";
740  FreeTrajectoryState& ftsAtVtx = updateResult.second;
741 
742  LogTrace(metname) << debug.dumpFTS(ftsAtVtx);
743 
744  GlobalPoint pca = ftsAtVtx.position();
745  math::XYZPoint persistentPCA(pca.x(), pca.y(), pca.z());
746  GlobalVector p = ftsAtVtx.momentum();
747  math::XYZVector persistentMomentum(p.x(), p.y(), p.z());
748 
749  reco::Track updatedTrack(
750  track.chi2(), track.ndof(), persistentPCA, persistentMomentum, ftsAtVtx.charge(), ftsAtVtx.curvilinearError());
751 
752  return pair<bool, reco::Track>(true, updatedTrack);
753 }
754 
756  const string metname = "Muon|RecoMuon|MuonTrackLoader";
757 
758  const Trajectory::RecHitContainer transRecHits = trajectory.recHits();
759 
760  // put the collection of TrackingRecHit in the event
761 
762  // sets the outermost and innermost TSOSs
763  // FIXME: check it!
764  TrajectoryStateOnSurface outerTSOS;
765  TrajectoryStateOnSurface innerTSOS;
766  unsigned int innerId = 0, outerId = 0;
768  DetId outerDetId;
769 
770  if (trajectory.direction() == alongMomentum) {
771  LogTrace(metname) << "alongMomentum";
772  outerTSOS = trajectory.lastMeasurement().updatedState();
773  innerTSOS = trajectory.firstMeasurement().updatedState();
774  outerId = trajectory.lastMeasurement().recHit()->geographicalId().rawId();
775  innerId = trajectory.firstMeasurement().recHit()->geographicalId().rawId();
776  outerRecHit = trajectory.lastMeasurement().recHit();
777  outerDetId = trajectory.lastMeasurement().recHit()->geographicalId();
778  } else if (trajectory.direction() == oppositeToMomentum) {
779  LogTrace(metname) << "oppositeToMomentum";
780  outerTSOS = trajectory.firstMeasurement().updatedState();
781  innerTSOS = trajectory.lastMeasurement().updatedState();
782  outerId = trajectory.firstMeasurement().recHit()->geographicalId().rawId();
783  innerId = trajectory.lastMeasurement().recHit()->geographicalId().rawId();
784  outerRecHit = trajectory.firstMeasurement().recHit();
785  outerDetId = trajectory.firstMeasurement().recHit()->geographicalId();
786  } else
787  LogError(metname) << "Wrong propagation direction!";
788 
789  const GeomDet* outerDet = theService->trackingGeometry()->idToDet(outerDetId);
790  GlobalPoint outerTSOSPos = outerTSOS.globalParameters().position();
791  bool inside = outerDet->surface().bounds().inside(outerDet->toLocal(outerTSOSPos));
792 
793  GlobalPoint hitPos =
794  (outerRecHit->isValid()) ? outerRecHit->globalPosition() : outerTSOS.globalParameters().position();
795 
796  if (!inside) {
797  LogTrace(metname) << "The Global Muon outerMostMeasurementState is not compatible with the recHit detector! "
798  "Setting outerMost postition to recHit position if recHit isValid: "
799  << outerRecHit->isValid();
800  LogTrace(metname) << "From " << outerTSOSPos << " to " << hitPos;
801  }
802 
803  //build the TrackExtra
804  GlobalPoint v = (inside) ? outerTSOSPos : hitPos;
805  GlobalVector p = outerTSOS.globalParameters().momentum();
806  math::XYZPoint outpos(v.x(), v.y(), v.z());
807  math::XYZVector outmom(p.x(), p.y(), p.z());
808 
809  v = innerTSOS.globalParameters().position();
810  p = innerTSOS.globalParameters().momentum();
811  math::XYZPoint inpos(v.x(), v.y(), v.z());
812  math::XYZVector inmom(p.x(), p.y(), p.z());
813 
814  reco::TrackExtra trackExtra(outpos,
815  outmom,
816  true,
817  inpos,
818  inmom,
819  true,
820  outerTSOS.curvilinearError(),
821  outerId,
822  innerTSOS.curvilinearError(),
823  innerId,
824  trajectory.direction(),
825  trajectory.seedRef());
826 
827  return trackExtra;
828 }
Vector3DBase
Definition: Vector3DBase.h:8
edm::RefProd< TrackCollection >
MuonUpdatorAtVertex.h
MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
TrajectorySmoother::clone
virtual TrajectorySmoother * clone() const =0
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TrackExtra.h
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
service
Definition: service.py:1
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
mps_fire.i
i
Definition: mps_fire.py:428
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
MessageLogger.h
MuonPatternRecoDumper.h
GeomDet
Definition: GeomDet.h:27
MuonTrackLoader::theUpdatingAtVtx
bool theUpdatingAtVtx
Definition: MuonTrackLoader.h:95
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
MuonTrackLoader::MuonTrackLoader
MuonTrackLoader(edm::ParameterSet &parameterSet, edm::ConsumesCollector &iC, const MuonServiceProxy *service=nullptr)
Constructor for the STA reco the args must be specify!
Definition: MuonTrackLoader.cc:95
Trajectory::seedRef
edm::RefToBase< TrajectorySeed > seedRef(void) const
Definition: Trajectory.h:303
Trajectory::chiSquared
float chiSquared() const
Definition: Trajectory.h:241
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
Trajectory::direction
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
MuonTrackLoader::buildTrackAtPCA
std::pair< bool, reco::Track > buildTrackAtPCA(const Trajectory &trajectory, const reco::BeamSpot &) const
Build a track at the PCA WITHOUT any vertex constriant.
Definition: MuonTrackLoader.cc:674
MuonTrackLoader::thePutTkTrackFlag
bool thePutTkTrackFlag
Definition: MuonTrackLoader.h:111
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TransientRecHitRecord.h
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
oppositeToMomentum
Definition: PropagationDirection.h:4
cms::cuda::assert
assert(be >=bs)
FastTrackerRecHitMaskProducer_cfi.trajectories
trajectories
Definition: FastTrackerRecHitMaskProducer_cfi.py:7
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
TransientTrack.h
findQualityFiles.v
v
Definition: findQualityFiles.py:179
MuonTrackLoader::theSmoothTkTrackFlag
bool theSmoothTkTrackFlag
Definition: MuonTrackLoader.h:112
edm::Handle< reco::BeamSpot >
MuonTrackLoader::theAllowNoVtxFlag
bool theAllowNoVtxFlag
Definition: MuonTrackLoader.h:113
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
MuonTrackLoader::hitCloner
TkClonerImpl hitCloner
Definition: MuonTrackLoader.h:104
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
Trajectory::geometricalInnermostState
TrajectoryStateOnSurface geometricalInnermostState() const
Definition: Trajectory.cc:217
TrackerBounds::isInside
static bool isInside(const GlobalPoint &)
Definition: TrackerBounds.cc:37
edm::Ref
Definition: AssociativeIterator.h:58
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
ndof
Definition: HIMultiTrackSelector.h:49
DetId
Definition: DetId.h:17
reco::TrackExtra
Definition: TrackExtra.h:26
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
debug
#define debug
Definition: HDRShower.cc:19
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
Track.h
TrackerBounds.h
MuonTrackLoader::buildTrackUpdatedAtPCA
std::pair< bool, reco::Track > buildTrackUpdatedAtPCA(const reco::Track &trackAtPCA, const reco::BeamSpot &) const
Takes a track at the PCA and applies the vertex constriant.
Definition: MuonTrackLoader.cc:724
MuonPatternRecoDumper
Definition: MuonPatternRecoDumper.h:18
MuonTrackLoader.h
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
MuonTrackLoader::loadTracks
edm::OrphanHandle< reco::TrackCollection > loadTracks(TrajectoryContainer &, edm::Event &, const TrackerTopology &ttopo, const std::string &="", bool=true)
Convert the trajectories into tracks and load the tracks in the event.
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
MuonTrackLoader::buildTrackExtra
reco::TrackExtra buildTrackExtra(const Trajectory &) const
Definition: MuonTrackLoader.cc:755
MuonFwd.h
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
reco::BeamSpot
Definition: BeamSpot.h:21
reco::Track
Definition: Track.h:27
edm::ESHandle< TrajectorySmoother >
MuonSegmentMatcher::theService
const MuonServiceProxy * theService
Definition: MuonSegmentMatcher.h:46
TrajectoryFitterRecord
Definition: TrajectoryFitterRecord.h:12
reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
TrajectoryFitter.h
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
MuonTrackLoader::theTrajectoryFlag
bool theTrajectoryFlag
Definition: MuonTrackLoader.h:98
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Traj2TrackHits.h
Point3DBase< float, GlobalTag >
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
TrajTrackAssociation.h
GlobalTrajectoryParameters::momentum
GlobalVector momentum() const
Definition: GlobalTrajectoryParameters.h:65
MuonTrackLoader::theBeamSpotInputTag
edm::InputTag theBeamSpotInputTag
Definition: MuonTrackLoader.h:106
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonTrackLoader::theService
const MuonServiceProxy * theService
Definition: MuonTrackLoader.h:93
reco::TrackExtraBase::setTrajParams
void setTrajParams(TrajParams tmps, Chi2sFive chi2s)
Definition: TrackExtraBase.h:36
hh
const auto & hh
Definition: CAHitNtupletGeneratorKernelsImpl.h:455
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Trajectory::ndof
int ndof(bool bon=true) const
Definition: Trajectory.cc:97
Trajectory::RecHitContainer
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
DetId::Tracker
Definition: DetId.h:25
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
Event.h
MuonTrackLoader::theL2SeededTkLabel
std::string theL2SeededTkLabel
Label for L2SeededTracks.
Definition: MuonTrackLoader.h:110
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
MuonTrackLoader::theSmoother
std::unique_ptr< TrajectorySmoother > theSmoother
Definition: MuonTrackLoader.h:103
Traj2TrackHits
Definition: Traj2TrackHits.h:16
MuonTrackLoader::unpackHit
static std::vector< const TrackingRecHit * > unpackHit(const TrackingRecHit &hit)
Definition: MuonTrackLoader.cc:48
MuonTrackLoader::CandidateContainer
MuonCandidate::CandidateContainer CandidateContainer
Definition: MuonTrackLoader.h:46
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
LorentzVector.h
reco::TrackExtraBase::trajParams
TrajParams const & trajParams() const
Definition: TrackExtraBase.h:76
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
BarrelDetLayer.h
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
TrajectorySmoother.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
MuonTrackLoader::theUpdatorAtVtx
std::unique_ptr< MuonUpdatorAtVertex > theUpdatorAtVtx
Definition: MuonTrackLoader.h:96
edm::Ref< TrackCollection >::key_type
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
Definition: Ref.h:164
edm::OrphanHandleBase::isValid
bool isValid() const
Definition: OrphanHandleBase.h:53
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
reco::TrackExtraBase::setHits
void setHits(TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
Definition: TrackExtraBase.h:30
TrackingRecHit
Definition: TrackingRecHit.h:21
reco::TrackExtraBase::recHitsSize
unsigned int recHitsSize() const
number of RecHits
Definition: TrackExtraBase.h:44
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
MuonTrackLoader::theSmootherName
std::string theSmootherName
Definition: MuonTrackLoader.h:101
Trajectory.h
MuonTrackLoader::~MuonTrackLoader
virtual ~MuonTrackLoader()
Destructor.
Definition: MuonTrackLoader.cc:127
GeomDet.h
Trajectory::recHits
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::OrphanHandle< reco::TrackCollection >
Trajectory::firstMeasurement
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
reco::TransientTrack
Definition: TransientTrack.h:19
MuonTrackLoader::theTrackerRecHitBuilderName
std::string theTrackerRecHitBuilderName
Definition: MuonTrackLoader.h:102
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
MuonTrackLoader::theBeamSpotToken
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
Definition: MuonTrackLoader.h:107
reco::TrackExtraBase::Chi2sFive
std::vector< unsigned char > Chi2sFive
Definition: TrackExtraBase.h:25
TrajectoryMeasurement::ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
Definition: TrajectoryMeasurement.h:28
Trajectory
Definition: Trajectory.h:38
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
Trajectory::setSeedRef
void setSeedRef(const edm::RefToBase< TrajectorySeed > &seedRef)
Definition: Trajectory.h:305
TrackingComponentsRecord.h
edm::RefToBase::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:301
ForwardDetLayer.h
TrajectoryStateOnSurface::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: TrajectoryStateOnSurface.h:72
MuonServiceProxy.h
electronStore.links
links
Definition: electronStore.py:149
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< TrajectorySeed >
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
MuonTrackLoader::TrajectoryContainer
MuonCandidate::TrajectoryContainer TrajectoryContainer
Definition: MuonTrackLoader.h:45
DetId::Muon
Definition: DetId.h:26
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
MuonTrackLoader::theSmoothingStep
bool theSmoothingStep
Definition: MuonTrackLoader.h:100
reco::TrackExtraBase::TrajParams
std::vector< LocalTrajectoryParameters > TrajParams
Definition: TrackExtraBase.h:24
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
alongMomentum
Definition: PropagationDirection.h:4
TrackToTrackMap.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40