CMS 3D CMS Logo

GlobalCosmicMuonTrajectoryBuilder.cc
Go to the documentation of this file.
1 
11 
14 
22 
23 using namespace std;
24 using namespace edm;
25 
26 //
27 // constructor
28 //
32  : theService(service),
33  theTrackerRecHitBuilderToken(
34  iC.esConsumes(edm::ESInputTag("", par.getParameter<string>("TrackerRecHitBuilder")))),
35  theMuonRecHitBuilderToken(iC.esConsumes(edm::ESInputTag("", par.getParameter<string>("MuonRecHitBuilder")))) {
36  ParameterSet smootherPSet = par.getParameter<ParameterSet>("SmootherParameters");
37  theSmoother = new CosmicMuonSmoother(smootherPSet, theService);
38 
39  ParameterSet trackMatcherPSet = par.getParameter<ParameterSet>("GlobalMuonTrackMatcher");
40  theTrackMatcher = new GlobalMuonTrackMatcher(trackMatcherPSet, theService);
41 
42  theTkTrackToken = iC.consumes<reco::TrackCollection>(par.getParameter<InputTag>("TkTrackCollectionLabel"));
43 
44  thePropagatorName = par.getParameter<string>("Propagator");
45  category_ = "Muon|RecoMuon|CosmicMuon|GlobalCosmicMuonTrajectoryBuilder";
46 }
47 
48 //
49 // destructor
50 //
51 
53  if (theSmoother)
54  delete theSmoother;
55  if (theTrackMatcher)
56  delete theTrackMatcher;
57 }
58 
59 //
60 // set Event
61 //
63  event.getByToken(theTkTrackToken, theTrackerTracks);
64 
65  // edm::Handle<std::vector<Trajectory> > handleTrackerTrajs;
66  // if ( event.getByLabel(theTkTrackLabel,handleTrackerTrajs) && handleTrackerTrajs.isValid() ) {
67  // tkTrajsAvailable = true;
68  // allTrackerTrajs = &*handleTrackerTrajs;
69  // LogInfo("GlobalCosmicMuonTrajectoryBuilder")
70  // << "Tk Trajectories Found! " << endl;
71  // } else {
72  // LogInfo("GlobalCosmicMuonTrajectoryBuilder")
73  // << "No Tk Trajectories Found! " << endl;
74  // tkTrajsAvailable = false;
75  // }
76 
79 }
80 
81 //
82 // reconstruct trajectories
83 //
86 
87  if (!theTrackerTracks.isValid()) {
88  LogTrace(category_) << "Tracker Track collection is invalid!!!";
89  return result;
90  }
91 
92  LogTrace(category_) << "Found " << theTrackerTracks->size() << " tracker Tracks";
93  if (theTrackerTracks->empty())
94  return result;
95 
96  vector<TrackCand> matched = match(muCand, theTrackerTracks);
97 
98  LogTrace(category_) << "TrackMatcher found " << matched.size() << "tracker tracks matched";
99 
100  if (matched.empty())
101  return result;
102  reco::TrackRef tkTrack = matched.front().second;
103 
104  if (tkTrack.isNull())
105  return result;
106  reco::TrackRef muTrack = muCand.second;
107 
108  ConstRecHitContainer muRecHits;
109 
110  if (muCand.first == nullptr || !muCand.first->isValid()) {
111  muRecHits = getTransientRecHits(*muTrack);
112  } else {
113  muRecHits = muCand.first->recHits();
114  }
115 
116  LogTrace(category_) << "mu RecHits: " << muRecHits.size();
117 
118  ConstRecHitContainer tkRecHits = getTransientRecHits(*tkTrack);
119 
120  // if ( !tkTrajsAvailable ) {
121  // tkRecHits = getTransientRecHits(*tkTrack);
122  // } else {
123  // tkRecHits = allTrackerTrajs->front().recHits();
124  // }
125 
126  ConstRecHitContainer hits; //= tkRecHits;
127  LogTrace(category_) << "tk RecHits: " << tkRecHits.size();
128 
129  // hits.insert(hits.end(), muRecHits.begin(), muRecHits.end());
130  // stable_sort(hits.begin(), hits.end(), DecreasingGlobalY());
131 
132  sortHits(hits, muRecHits, tkRecHits);
133 
134  // LogTrace(category_)<< "Used RecHits after sort: "<<hits.size()<<endl;;
135  // LogTrace(category_) <<utilities()->print(hits)<<endl;
136  // LogTrace(category_) << "== End of Used RecHits == "<<endl;
137 
139  *muTrack, *theService->trackingGeometry(), &*theService->magneticField());
141  *tkTrack, *theService->trackingGeometry(), &*theService->magneticField());
142 
144  *muTrack, *theService->trackingGeometry(), &*theService->magneticField());
146  *tkTrack, *theService->trackingGeometry(), &*theService->magneticField());
147 
148  TrajectoryStateOnSurface firstState1 =
149  (muonState1.globalPosition().y() > tkState1.globalPosition().y()) ? muonState1 : tkState1;
150  TrajectoryStateOnSurface firstState2 =
151  (muonState2.globalPosition().y() > tkState2.globalPosition().y()) ? muonState2 : tkState2;
152 
153  TrajectoryStateOnSurface firstState =
154  (firstState1.globalPosition().y() > firstState2.globalPosition().y()) ? firstState1 : firstState2;
155 
156  GlobalPoint front, back;
157  if (!hits.empty()) {
158  front = hits.front()->globalPosition();
159  back = hits.back()->globalPosition();
160  if ((front.perp() < 130 && fabs(front.z()) < 300) || (back.perp() < 130 && fabs(back.z()) < 300)) {
161  if (hits.front()->globalPosition().perp() > hits.back()->globalPosition().perp())
162  reverse(hits.begin(), hits.end());
164  *tkTrack, *theService->trackingGeometry(), &*theService->magneticField());
166  *tkTrack, *theService->trackingGeometry(), &*theService->magneticField());
167  firstState = (tkState1.globalPosition().perp() < tkState2.globalPosition().perp()) ? tkState1 : tkState2;
168  }
169  }
170  if (!firstState.isValid())
171  return result;
172  LogTrace(category_) << "firstTSOS pos: " << firstState.globalPosition() << "mom: " << firstState.globalMomentum();
173 
174  // begin refitting
175 
177  vector<Trajectory> refitted = theSmoother->trajectories(seed, hits, firstState);
178 
179  if (refitted.empty()) {
180  LogTrace(category_) << "smoothing trajectories fail";
181  refitted = theSmoother->fit(seed, hits, firstState); //FIXME
182  }
183 
184  if (refitted.empty()) {
185  LogTrace(category_) << "refit fail";
186  return result;
187  }
188 
189  auto myTraj = std::make_unique<Trajectory>(refitted.front());
190 
191  const std::vector<TrajectoryMeasurement>& mytms = myTraj->measurements();
192  LogTrace(category_) << "measurements in final trajectory " << mytms.size();
193  LogTrace(category_) << "Orignally there are " << tkTrack->found() << " tk rhs and " << muTrack->found() << " mu rhs.";
194 
195  if (mytms.size() <= tkTrack->found()) {
196  LogTrace(category_) << "insufficient measurements. skip... ";
197  return result;
198  }
199 
200  result.push_back(std::make_unique<MuonCandidate>(std::move(myTraj), muTrack, tkTrack));
201  LogTrace(category_) << "final global cosmic muon: ";
202  for (std::vector<TrajectoryMeasurement>::const_iterator itm = mytms.begin(); itm != mytms.end(); ++itm) {
203  LogTrace(category_) << "updated pos " << itm->updatedState().globalPosition() << "mom "
204  << itm->updatedState().globalMomentum();
205  }
206  return result;
207 }
208 
210  ConstRecHitContainer& muonHits,
211  ConstRecHitContainer& tkHits) {
212  if (tkHits.empty()) {
213  LogTrace(category_) << "No valid tracker hits";
214  return;
215  }
216  if (muonHits.empty()) {
217  LogTrace(category_) << "No valid muon hits";
218  return;
219  }
220 
221  ConstRecHitContainer::const_iterator frontTkHit = tkHits.begin();
222  ConstRecHitContainer::const_iterator backTkHit = tkHits.end() - 1;
223  while (!(*frontTkHit)->isValid() && frontTkHit != backTkHit) {
224  frontTkHit++;
225  }
226  while (!(*backTkHit)->isValid() && backTkHit != frontTkHit) {
227  backTkHit--;
228  }
229 
230  ConstRecHitContainer::const_iterator frontMuHit = muonHits.begin();
231  ConstRecHitContainer::const_iterator backMuHit = muonHits.end() - 1;
232  while (!(*frontMuHit)->isValid() && frontMuHit != backMuHit) {
233  frontMuHit++;
234  }
235  while (!(*backMuHit)->isValid() && backMuHit != frontMuHit) {
236  backMuHit--;
237  }
238 
239  if (frontTkHit == backTkHit) {
240  LogTrace(category_) << "No valid tracker hits";
241  return;
242  }
243  if (frontMuHit == backMuHit) {
244  LogTrace(category_) << "No valid muon hits";
245  return;
246  }
247 
248  GlobalPoint frontTkPos = (*frontTkHit)->globalPosition();
249  GlobalPoint backTkPos = (*backTkHit)->globalPosition();
250 
251  GlobalPoint frontMuPos = (*frontMuHit)->globalPosition();
252  GlobalPoint backMuPos = (*backMuHit)->globalPosition();
253 
254  //sort hits going from higher to lower positions
255  if (frontTkPos.y() < backTkPos.y()) { //check if tk hits order same direction
256  reverse(tkHits.begin(), tkHits.end());
257  }
258 
259  if (frontMuPos.y() < backMuPos.y()) {
260  reverse(muonHits.begin(), muonHits.end());
261  }
262 
263  // LogTrace(category_)<< "tkHits after sort: "<<tkHits.size()<<endl;;
264  // LogTrace(category_) <<utilities()->print(tkHits)<<endl;
265  // LogTrace(category_) << "== End of tkHits == "<<endl;
266 
267  // LogTrace(category_)<< "muonHits after sort: "<<muonHits.size()<<endl;;
268  // LogTrace(category_) <<utilities()->print(muonHits)<<endl;
269  // LogTrace(category_)<< "== End of muonHits == "<<endl;
270 
271  //separate muon hits into 2 different hemisphere
272  ConstRecHitContainer::iterator middlepoint = muonHits.begin();
273  bool insertInMiddle = false;
274 
275  for (ConstRecHitContainer::iterator ihit = muonHits.begin(); ihit != muonHits.end() - 1; ihit++) {
276  GlobalPoint ipos = (*ihit)->globalPosition();
277  GlobalPoint nextpos = (*(ihit + 1))->globalPosition();
278  if ((ipos - nextpos).mag() < 100.0)
279  continue;
280 
281  GlobalPoint middle((ipos.x() + nextpos.x()) / 2, (ipos.y() + nextpos.y()) / 2, (ipos.z() + nextpos.z()) / 2);
282  LogTrace(category_) << "ipos " << ipos << "nextpos" << nextpos << " middle " << middle << endl;
283  if ((middle.perp() < ipos.perp()) && (middle.perp() < nextpos.perp())) {
284  LogTrace(category_) << "found middlepoint" << endl;
285  middlepoint = ihit;
286  insertInMiddle = true;
287  break;
288  }
289  }
290 
291  //insert track hits in correct order
292  if (insertInMiddle) { //if tk hits should be sandwich
293  GlobalPoint jointpointpos = (*middlepoint)->globalPosition();
294  LogTrace(category_) << "jointpoint " << jointpointpos << endl;
295  if ((frontTkPos - jointpointpos).mag() >
296  (backTkPos - jointpointpos).mag()) { //check if tk hits order same direction
297  reverse(tkHits.begin(), tkHits.end());
298  }
299  muonHits.insert(middlepoint + 1, tkHits.begin(), tkHits.end());
300  hits = muonHits;
301  } else { // append at one end
302  if (frontTkPos.y() < frontMuPos.y()) { //insert at the end
303  LogTrace(category_) << "insert at the end " << frontTkPos << frontMuPos << endl;
304 
305  hits = muonHits;
306  hits.insert(hits.end(), tkHits.begin(), tkHits.end());
307  } else { //insert at the beginning
308  LogTrace(category_) << "insert at the beginning " << frontTkPos << frontMuPos << endl;
309  hits = tkHits;
310  hits.insert(hits.end(), muonHits.begin(), muonHits.end());
311  }
312  }
313 }
314 
316 
318  const reco::Track& track) const {
320 
321  auto hitCloner = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder.product())->cloner();
323  track, *theService->trackingGeometry(), &*theService->magneticField());
324  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit) {
325  if ((*hit)->isValid()) {
326  DetId recoid = (*hit)->geographicalId();
327  if (recoid.det() == DetId::Tracker) {
328  TrajectoryStateOnSurface predTsos =
329  theService->propagator(thePropagatorName)
330  ->propagate(currTsos, theService->trackingGeometry()->idToDet(recoid)->surface());
331  LogTrace(category_) << "predtsos " << predTsos.isValid();
332  if (predTsos.isValid()) {
333  currTsos = predTsos;
334  result.emplace_back(hitCloner(**hit, predTsos));
335  }
336  } else if (recoid.det() == DetId::Muon) {
337  result.push_back(theMuonRecHitBuilder->build(&**hit));
338  }
339  }
340  }
341  return result;
342 }
343 
344 std::vector<GlobalCosmicMuonTrajectoryBuilder::TrackCand> GlobalCosmicMuonTrajectoryBuilder::match(
345  const TrackCand& mu, const edm::Handle<reco::TrackCollection>& tktracks) {
346  std::vector<TrackCand> result;
347 
349  *(mu.second), *theService->trackingGeometry(), &*theService->magneticField());
351  *(mu.second), *theService->trackingGeometry(), &*theService->magneticField());
352  //build tracker TrackCands and pick the best match if size greater than 2
353  vector<TrackCand> tkTrackCands;
354  for (reco::TrackCollection::size_type i = 0; i < theTrackerTracks->size(); ++i) {
356  TrackCand tkCand = TrackCand((Trajectory*)nullptr, tkTrack);
357  tkTrackCands.push_back(tkCand);
358  LogTrace(category_) << "chisq is " << theTrackMatcher->match(mu, tkCand, 0, 0);
359  LogTrace(category_) << "d is " << theTrackMatcher->match(mu, tkCand, 1, 0);
360  LogTrace(category_) << "r_pos is " << theTrackMatcher->match(mu, tkCand, 2, 0);
361  }
362 
363  // now if only 1 tracker tracks, return it
364  if (tkTrackCands.size() <= 1) {
365  return tkTrackCands;
366  }
367 
368  // if there're many tracker tracks
369 
370  // if muon is only on one side
371  GlobalPoint innerPos = innerTsos.globalPosition();
372  GlobalPoint outerPos = outerTsos.globalPosition();
373 
374  if ((innerPos.basicVector().dot(innerTsos.globalMomentum().basicVector()) *
375  outerPos.basicVector().dot(outerTsos.globalMomentum().basicVector()) >
376  0)) {
377  GlobalPoint geoInnerPos = (innerPos.mag() < outerPos.mag()) ? innerPos : outerPos;
378  LogTrace(category_) << "geoInnerPos Mu " << geoInnerPos << endl;
379 
380  // if there're tracker tracks totally on the other half
381  // and there're tracker tracks on the same half
382  // remove the tracks on the other half
383  for (vector<TrackCand>::const_iterator itkCand = tkTrackCands.begin(); itkCand != tkTrackCands.end(); ++itkCand) {
384  reco::TrackRef tkTrack = itkCand->second;
385 
386  GlobalPoint tkInnerPos(tkTrack->innerPosition().x(), tkTrack->innerPosition().y(), tkTrack->innerPosition().z());
387  GlobalPoint tkOuterPos(tkTrack->outerPosition().x(), tkTrack->outerPosition().y(), tkTrack->outerPosition().z());
388  LogTrace(category_) << "tkTrack " << tkInnerPos << " " << tkOuterPos << endl;
389 
390  float closetDistance11 = (geoInnerPos - tkInnerPos).mag();
391  float closetDistance12 = (geoInnerPos - tkOuterPos).mag();
392  float closetDistance1 = (closetDistance11 < closetDistance12) ? closetDistance11 : closetDistance12;
393  LogTrace(category_) << "closetDistance1 " << closetDistance1 << endl;
394 
395  if (true || !isTraversing(*tkTrack)) {
396  bool keep = true;
397  for (vector<TrackCand>::const_iterator itkCand2 = tkTrackCands.begin(); itkCand2 != tkTrackCands.end();
398  ++itkCand2) {
399  if (itkCand2 == itkCand)
400  continue;
401  reco::TrackRef tkTrack2 = itkCand2->second;
402 
403  GlobalPoint tkInnerPos2(
404  tkTrack2->innerPosition().x(), tkTrack2->innerPosition().y(), tkTrack2->innerPosition().z());
405  GlobalPoint tkOuterPos2(
406  tkTrack2->outerPosition().x(), tkTrack2->outerPosition().y(), tkTrack2->outerPosition().z());
407  LogTrace(category_) << "tkTrack2 " << tkInnerPos2 << " " << tkOuterPos2 << endl;
408 
409  float farthestDistance21 = (geoInnerPos - tkInnerPos2).mag();
410  float farthestDistance22 = (geoInnerPos - tkOuterPos2).mag();
411  float farthestDistance2 = (farthestDistance21 > farthestDistance22) ? farthestDistance21 : farthestDistance22;
412  LogTrace(category_) << "farthestDistance2 " << farthestDistance2 << endl;
413 
414  if (closetDistance1 > farthestDistance2 - 1e-3) {
415  keep = false;
416  break;
417  }
418  }
419  if (keep)
420  result.push_back(*itkCand);
421  else
422  LogTrace(category_) << "The Track is on different hemisphere" << endl;
423  } else {
424  result.push_back(*itkCand);
425  }
426  }
427  if (result.empty()) {
428  //if all tk tracks on the other side, still keep them
429  result = tkTrackCands;
430  }
431  } else { // muon is traversing
432  result = tkTrackCands;
433  }
434 
435  // match muCand to tkTrackCands
436  vector<TrackCand> matched_trackerTracks = theTrackMatcher->match(mu, result);
437 
438  LogTrace(category_) << "TrackMatcher found " << matched_trackerTracks.size() << "tracker tracks matched";
439 
440  //now pick the best matched one
441  if (matched_trackerTracks.size() < 2) {
442  return matched_trackerTracks;
443  } else {
444  // in case of more than 1 tkTrack,
445  // select the best-one based on distance (matchOption==1)
446  // at innermost Mu hit surface. (surfaceOption == 0)
447  result.clear();
449 
450  double quality = 1e6;
451  double max_quality = 1e6;
452  for (vector<TrackCand>::const_iterator iter = matched_trackerTracks.begin(); iter != matched_trackerTracks.end();
453  iter++) {
454  quality = theTrackMatcher->match(mu, *iter, 1, 0);
455  LogTrace(category_) << " quality of tracker track is " << quality;
456  if (quality < max_quality) {
457  max_quality = quality;
458  bestMatch = (*iter);
459  }
460  }
461  LogTrace(category_) << " Picked tracker track with quality " << max_quality;
462  result.push_back(bestMatch);
463  return result;
464  }
465 }
466 
469  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit) {
470  if ((*hit)->isValid()) {
471  firstValid = hit;
472  break;
473  }
474  }
475 
476  trackingRecHit_iterator lastValid;
477  for (trackingRecHit_iterator hit = track.recHitsEnd() - 1; hit != track.recHitsBegin() - 1; --hit) {
478  if ((*hit)->isValid()) {
479  lastValid = hit;
480  break;
481  }
482  }
483 
484  GlobalPoint posFirst = theService->trackingGeometry()->idToDet((*firstValid)->geographicalId())->position();
485 
486  GlobalPoint posLast = theService->trackingGeometry()->idToDet((*lastValid)->geographicalId())->position();
487 
488  GlobalPoint middle(
489  (posFirst.x() + posLast.x()) / 2, (posFirst.y() + posLast.y()) / 2, (posFirst.z() + posLast.z()) / 2);
490 
491  if ((middle.mag() < posFirst.mag()) && (middle.mag() < posLast.mag())) {
492  return true;
493  }
494  return false;
495 }
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
CosmicMuonSmoother::trajectories
TrajectoryContainer trajectories(const Trajectory &traj) const override
Definition: CosmicMuonSmoother.h:45
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TrajectoryStateOnSurface.h
service
Definition: service.py:1
CosmicMuonSmoother::fit
std::vector< Trajectory > fit(const Trajectory &) const
Definition: CosmicMuonSmoother.cc:93
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
MessageLogger.h
TrackExtraFwd.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
CosmicMuonSmoother
Definition: CosmicMuonSmoother.h:38
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
GlobalCosmicMuonTrajectoryBuilder::theTrackerRecHitBuilderToken
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
Definition: GlobalCosmicMuonTrajectoryBuilder.h:91
deltaPhi.h
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
edm
HLT enums.
Definition: AlignableModifier.h:19
GlobalMuonTrackMatcher::match
double match(const TrackCand &sta, const TrackCand &track, int matchOption=0, int surfaceOption=1) const
Definition: GlobalMuonTrackMatcher.cc:100
GlobalCosmicMuonTrajectoryBuilder::sortHits
void sortHits(ConstRecHitContainer &, ConstRecHitContainer &, ConstRecHitContainer &)
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:209
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
TrajectoryMeasurement.h
align_cfg.firstValid
firstValid
Definition: align_cfg.py:68
GlobalCosmicMuonTrajectoryBuilder::getTransientRecHits
ConstRecHitContainer getTransientRecHits(const reco::Track &) const
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:317
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
deltar.bestMatch
def bestMatch(object, matchCollection)
Definition: deltar.py:138
edm::Handle< reco::TrackCollection >
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
TkTransientTrackingRecHitBuilder.h
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
edm::Ref< TrackCollection >
trajectoryStateTransform::outerStateOnSurface
TrajectoryStateOnSurface outerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:118
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:122
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
fileCollector.seed
seed
Definition: fileCollector.py:127
DetId
Definition: DetId.h:17
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
Track.h
TrackFwd.h
GlobalCosmicMuonTrajectoryBuilder::isTraversing
bool isTraversing(const reco::Track &tk) const
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:467
reco::Track
Definition: Track.h:27
Basic3DVector::dot
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic3DVector.h:189
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
runTheMatrix.keep
keep
Definition: runTheMatrix.py:345
GlobalCosmicMuonTrajectoryBuilder::TrackCand
std::pair< const Trajectory *, reco::TrackRef > TrackCand
Definition: GlobalCosmicMuonTrajectoryBuilder.h:48
Point3DBase< float, GlobalTag >
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
GlobalCosmicMuonTrajectoryBuilder::ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition: GlobalCosmicMuonTrajectoryBuilder.h:40
GlobalCosmicMuonTrajectoryBuilder::theMuonRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
Definition: GlobalCosmicMuonTrajectoryBuilder.h:95
edm::ParameterSet
Definition: ParameterSet.h:47
DetId::Tracker
Definition: DetId.h:25
GlobalCosmicMuonTrajectoryBuilder::~GlobalCosmicMuonTrajectoryBuilder
~GlobalCosmicMuonTrajectoryBuilder() override
Destructor.
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:52
Event.h
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
GlobalCosmicMuonTrajectoryBuilder::theService
const MuonServiceProxy * theService
Definition: GlobalCosmicMuonTrajectoryBuilder.h:82
GlobalCosmicMuonTrajectoryBuilder::match
std::vector< TrackCand > match(const TrackCand &, const edm::Handle< reco::TrackCollection > &)
check if tk and muon Tracks are matched
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:344
GlobalCosmicMuonTrajectoryBuilder::theTrackMatcher
GlobalMuonTrackMatcher * theTrackMatcher
Definition: GlobalCosmicMuonTrajectoryBuilder.h:86
GlobalCosmicMuonTrajectoryBuilder.h
MuonCandidate::CandidateContainer
std::vector< std::unique_ptr< MuonCandidate > > CandidateContainer
Definition: MuonCandidate.h:18
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
GlobalCosmicMuonTrajectoryBuilder::theMuonRecHitBuilderToken
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
Definition: GlobalCosmicMuonTrajectoryBuilder.h:94
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
HLT_FULL_cff.GlobalMuonTrackMatcher
GlobalMuonTrackMatcher
Definition: HLT_FULL_cff.py:9674
GlobalCosmicMuonTrajectoryBuilder::setEvent
void setEvent(const edm::Event &) override
pass the Event to the algo at each event
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:62
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
GlobalCosmicMuonTrajectoryBuilder::category_
std::string category_
Definition: GlobalCosmicMuonTrajectoryBuilder.h:103
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
GlobalCosmicMuonTrajectoryBuilder::theTrackerTracks
edm::Handle< reco::TrackCollection > theTrackerTracks
Definition: GlobalCosmicMuonTrajectoryBuilder.h:97
GlobalCosmicMuonTrajectoryBuilder::theTkTrackToken
edm::EDGetTokenT< reco::TrackCollection > theTkTrackToken
Definition: GlobalCosmicMuonTrajectoryBuilder.h:89
Trajectory
Definition: Trajectory.h:38
GlobalCosmicMuonTrajectoryBuilder::thePropagatorName
std::string thePropagatorName
Definition: GlobalCosmicMuonTrajectoryBuilder.h:88
GlobalCosmicMuonTrajectoryBuilder::theSmoother
CosmicMuonSmoother * theSmoother
Definition: GlobalCosmicMuonTrajectoryBuilder.h:84
TrajectorySeed
Definition: TrajectorySeed.h:18
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrajectoryStateTransform.h
GlobalCosmicMuonTrajectoryBuilder::trajectories
TrajectoryContainer trajectories(const TrajectorySeed &) override
dummy implementation, unused in this class
Definition: GlobalCosmicMuonTrajectoryBuilder.h:59
TransientTrackingRecHitBuilder.h
mps_fire.result
result
Definition: mps_fire.py:311
DetId::Muon
Definition: DetId.h:26
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
ParameterSet.h
StateOnTrackerBound.h
trajectoryStateTransform::innerStateOnSurface
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:110
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
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
GlobalCosmicMuonTrajectoryBuilder::GlobalCosmicMuonTrajectoryBuilder
GlobalCosmicMuonTrajectoryBuilder(const edm::ParameterSet &, const MuonServiceProxy *service, edm::ConsumesCollector &iC)
Constructor.
Definition: GlobalCosmicMuonTrajectoryBuilder.cc:29
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
hit
Definition: SiStripHitEffFromCalibTree.cc:88
GlobalCosmicMuonTrajectoryBuilder::theTrackerRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
Definition: GlobalCosmicMuonTrajectoryBuilder.h:92
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37