CMS 3D CMS Logo

ResidualRefitting.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include "ResidualRefitting.h"
3 #include <iomanip>
4 
5 //framework includes
12 
19 
23 
27 
29 
33 
35 
37  : magFieldToken_(esConsumes()),
38  topoToken_(esConsumes()),
39  trackingGeometryToken_(esConsumes()),
40  propagatorToken_(esConsumes(edm::ESInputTag("", cfg.getParameter<std::string>("propagator")))),
41  outputFileName_(cfg.getUntrackedParameter<std::string>("histoutputFile")),
42  muons_(cfg.getParameter<edm::InputTag>("muons")),
43  muonsRemake_(cfg.getParameter<edm::InputTag>("muonsRemake")), //This Feels Misalignment
44  muonsNoStation1_(cfg.getParameter<edm::InputTag>("muonsNoStation1")),
45  muonsNoStation2_(cfg.getParameter<edm::InputTag>("muonsNoStation2")),
46  muonsNoStation3_(cfg.getParameter<edm::InputTag>("muonsNoStation3")),
47  muonsNoStation4_(cfg.getParameter<edm::InputTag>("muonsNoStation4")),
48  debug_(cfg.getUntrackedParameter<bool>("doDebug")),
49  muonsToken_(consumes<reco::MuonCollection>(muons_)),
50  muonTracksToken_(consumes<reco::TrackCollection>(muonsRemake_)),
51  muonsNoSt1Token_(consumes<reco::TrackCollection>(muonsNoStation1_)),
52  muonsNoSt2Token_(consumes<reco::TrackCollection>(muonsNoStation2_)),
53  muonsNoSt3Token_(consumes<reco::TrackCollection>(muonsNoStation3_)),
54  muonsNoSt4Token_(consumes<reco::TrackCollection>(muonsNoStation4_)),
55  outputFile_(nullptr),
56  outputTree_(nullptr),
57  outputBranch_(nullptr),
58  theField(nullptr) {
59  eventInfo_.evtNum_ = 0;
60  eventInfo_.evtNum_ = 0;
61 
62  // service parameters
63  edm::ParameterSet serviceParameters = cfg.getParameter<edm::ParameterSet>("ServiceParameters");
64 
65  // the services
66  theService = new MuonServiceProxy(serviceParameters, consumesCollector());
67 } //The constructor
68 
71  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
72  desc.add<edm::InputTag>("muonsRemake", edm::InputTag("globalMuons"));
73  desc.add<edm::InputTag>("muonsNoStation1", edm::InputTag("muonsNoSt1"));
74  desc.add<edm::InputTag>("muonsNoStation2", edm::InputTag("muonsNoSt2"));
75  desc.add<edm::InputTag>("muonsNoStation3", edm::InputTag("muonsNoSt3"));
76  desc.add<edm::InputTag>("muonsNoStation4", edm::InputTag("muonsNoSt4"));
77  desc.addUntracked<std::string>("histoutputFile", "histFile.root");
78  desc.addUntracked<bool>("doDebug", false);
79  descriptions.add("residualRefitting", desc);
80 }
81 
83  if (debug_)
84  printf("STARTING EVENT\n");
85 
86  eventInfo_.evtNum_ = (int)event.id().run();
87  eventInfo_.runNum_ = (int)event.id().event();
88 
89  // Generator Collection
90 
91  // The original muon collection that is sitting in memory
92  const edm::Handle<reco::MuonCollection>& muons = event.getHandle(muonsToken_);
94  const edm::Handle<reco::TrackCollection>& muonsNoSt1 = event.getHandle(muonsNoSt1Token_);
95  const edm::Handle<reco::TrackCollection>& muonsNoSt2 = event.getHandle(muonsNoSt2Token_);
96  const edm::Handle<reco::TrackCollection>& muonsNoSt3 = event.getHandle(muonsNoSt3Token_);
97  const edm::Handle<reco::TrackCollection>& muonsNoSt4 = event.getHandle(muonsNoSt4Token_);
98 
99  //magnetic field information
100  theField = &eventSetup.getData(magFieldToken_);
101  edm::ESHandle<GlobalTrackingGeometry> globalTrackingGeometry = eventSetup.getHandle(trackingGeometryToken_);
104 
105  //Zero storage
106  zero_storage();
107 
108  //Do the Gmr Muons from the unModified Collection
109 
110  //Refitted muons
111  if (debug_)
112  printf("Data Dump:: Rebuilt GMR Muon Track With TeV refitter default\n");
113  int iGmrRemake = 0;
114  for (reco::TrackCollection::const_iterator muon = muonTracks->begin(); muon != muonTracks->end();
115  muon++, iGmrRemake++) {
116  if (iGmrRemake >= ResidualRefitting::N_MAX_STORED)
117  break; // error checking
118  // from TrackInfoProducer/test/TrackInfoAnalyzerExample.cc
119  reco::TrackRef trackref = reco::TrackRef(muonTracks, iGmrRemake);
120 
121  if (debug_)
122  dumpTrackRef(trackref, "gmr");
123  muonInfo(storageGmrNew_, trackref, iGmrRemake);
124  }
125  storageGmrNew_.n_ = iGmrRemake;
126 
127  if (debug_)
128  printf("muons Remake");
129  if (debug_)
130  printf("-----------------------------------------\n");
132 
133  if (true) {
134  printf("muons No Station 1");
135  printf("-----------------------------------------\n");
136  }
138 
139  if (true) {
140  printf("muons No Station 2");
141  printf("-----------------------------------------\n");
142  }
144 
145  if (true) {
146  printf("muons No Station 3");
147  printf("-----------------------------------------\n");
148  }
150 
151  if (true) {
152  printf("muons No Station 4");
153  printf("-----------------------------------------\n");
154  }
156 
157  // dumpMuonRecHits(storageRecMuon_);
158 
159  /****************************************************************************************************************************************/
160 
161  /*
162  * extrapolates track to a cylinder.
163  * commented for cosmic runs with no tracker in reco muons!!
164  *
165 */
166 
167  int iGmrCyl = 0;
168  for (reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); muon++, iGmrCyl++) {
169  dumpTrackRef(muon->combinedMuon(), "cmb");
170  dumpTrackRef(muon->standAloneMuon(), "sam");
171  dumpTrackRef(muon->track(), "trk");
172 
173  cylExtrapTrkSam(iGmrCyl, muon->standAloneMuon(), samExtrap120_, 120.);
174  cylExtrapTrkSam(iGmrCyl, muon->track(), trackExtrap120_, 120.);
175  }
176  samExtrap120_.n_ = iGmrCyl;
177  trackExtrap120_.n_ = iGmrCyl;
178 
179  if (iGmrRemake > 0 || iGmrCyl > 0) {
180  outputTree_->Fill();
181  edm::LogVerbatim("ResidualRefitting") << "FILLING NTUPLE!";
182  edm::LogVerbatim("ResidualRefitting")
183  << "Entries Recorded: " << outputTree_->GetEntries() << " Branch :: " << outputBranch_->GetEntries();
184  } else
185  edm::LogVerbatim("ResidualRefitting") << "no tracks -- no fill!\n";
186 
187  // /*************************************************************************************************************/
188  // //END OF ntuple dumper
189  // //END OF ntuple dumper
190  // /***********************************************************************************************************/
191 }
192 //end Analyze() main function
193 
194 //------------------------------------------------------------------------------
195 //
196 // Destructor
197 //
199  delete outputFile_;
200  delete theService;
201 }
202 //
203 // Track Collection Analysis
204 //
207  const edm::EventSetup& eventSetup) {
208  //Retrieve tracker topology from geometry
209  const TrackerTopology* const tTopo = &eventSetup.getData(topoToken_);
210 
211  int iMuonHit = 0;
212  int iTrackHit = 0;
213  int numTracks = 0;
214 
215  for (reco::TrackCollection::const_iterator muon = trackColl->begin(); muon != trackColl->end(); muon++) {
216  int iTrack = muon - trackColl->begin();
217  reco::TrackRef trackref = reco::TrackRef(trackColl, iTrack);
219 
220  if (debug_)
221  dumpTrackRef(trackref, "CollectTrackHits Track");
222 
223  int iRec = 0;
224  for (auto const& rec : muon->recHits()) {
225  DetId detid = rec->geographicalId();
226 
227  if (detid.det() != DetId::Muon && detid.det() != DetId::Tracker) {
228  if (debug_)
229  printf("Rec Hit not from muon system or tracker... continuing...\n");
230  continue;
231  }
232  // numTracks++;
233  // Get Local and Global Position of Hits
234 
235  LocalPoint lp = rec->localPosition();
236  float lpX = lp.x();
237  float lpY = lp.y();
238  float lpZ = lp.z();
239 
241  theService->trackingGeometry()->idToDet(rec->geographicalId()), rec);
242 
243  GlobalPoint gp = mrhp->globalPosition();
244  float gpRecX = gp.x();
245  float gpRecY = gp.y();
246  float gpRecZ = gp.z();
247  float gpRecEta = gp.eta();
248  float gpRecPhi = gp.phi();
249 
250  if (detid.det() == DetId::Muon) {
251  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
252  int endcap = -999;
253  int station = -999;
254  int ring = -999;
255  int chamber = -999;
256  int layer = -999;
257  int superLayer = -999;
258  int wheel = -999;
259  int sector = -999;
260  if (systemMuon == MuonSubdetId::CSC) {
261  CSCDetId id(detid.rawId());
262  endcap = id.endcap();
263  station = id.station();
264  ring = id.ring();
265  chamber = id.chamber();
266  layer = id.layer();
267  if (debug_)
268  printf("CSC\t[endcap][station][ringN][chamber][layer]:[%d][%d][%d][%d][%d]\t",
269  endcap,
270  station,
271  ring,
272  chamber,
273  layer);
274 
275  } else if (systemMuon == MuonSubdetId::DT) {
276  DTWireId id(detid.rawId());
277  station = id.station();
278  layer = id.layer();
279  superLayer = id.superLayer();
280  wheel = id.wheel();
281  sector = id.sector();
282  if (debug_)
283  printf("DT \t[station][layer][superlayer]:[%d][%d][%d]\n", station, layer, superLayer);
284 
285  } else if (systemMuon == MuonSubdetId::RPC) {
286  RPCDetId id(detid.rawId());
287  station = id.station();
288  if (debug_)
289  printf("RPC\t[station]:[%d]\n", station);
290  }
291 
292  storageRecMuon_.muonLink_[iMuonHit] = iTrack;
293  storageRecMuon_.system_[iMuonHit] = systemMuon;
294  storageRecMuon_.endcap_[iMuonHit] = endcap;
295  storageRecMuon_.station_[iMuonHit] = station;
296  storageRecMuon_.ring_[iMuonHit] = ring;
297  storageRecMuon_.chamber_[iMuonHit] = chamber;
298  storageRecMuon_.layer_[iMuonHit] = layer;
300  storageRecMuon_.wheel_[iMuonHit] = wheel;
301  storageRecMuon_.sector_[iMuonHit] = sector;
302 
303  storageRecMuon_.gpX_[iMuonHit] = gpRecX;
304  storageRecMuon_.gpY_[iMuonHit] = gpRecY;
305  storageRecMuon_.gpZ_[iMuonHit] = gpRecZ;
306  storageRecMuon_.gpEta_[iMuonHit] = gpRecEta;
307  storageRecMuon_.gpPhi_[iMuonHit] = gpRecPhi;
308  storageRecMuon_.lpX_[iMuonHit] = lpX;
309  storageRecMuon_.lpY_[iMuonHit] = lpY;
310  storageRecMuon_.lpZ_[iMuonHit] = lpZ;
311  iMuonHit++;
312 
313  } else if (detid.det() == DetId::Tracker) {
314  if (debug_)
315  printf("Tracker\n");
316 
317  StoreTrackerRecHits(detid, tTopo, iTrack, iTrackHit);
318 
319  storageTrackHit_.gpX_[iTrackHit] = gpRecX;
320  storageTrackHit_.gpY_[iTrackHit] = gpRecY;
321  storageTrackHit_.gpZ_[iTrackHit] = gpRecZ;
322  storageTrackHit_.gpEta_[iTrackHit] = gpRecEta;
323  storageTrackHit_.gpPhi_[iTrackHit] = gpRecPhi;
324  storageTrackHit_.lpX_[iTrackHit] = lpX;
325  storageTrackHit_.lpY_[iTrackHit] = lpY;
326  storageTrackHit_.lpZ_[iTrackHit] = lpZ;
327  iTrackHit++;
328  } else
329  printf("THIS CAN NOT HAPPEN\n");
330 
331  trkExtrap(detid, numTracks, iTrack, iRec, recoStart, lp, trackExtrap);
332  numTracks++;
333 
334  if (debug_)
335  printf("\tLocal Positon: \tx = %2.2f\ty = %2.2f\tz = %2.2f\n", lpX, lpY, lpZ);
336  if (debug_)
337  printf("\tGlobal Position: \tx = %6.2f\ty = %6.2f\tz = %6.2f\teta = %4.2f\tphi = %3.2f\n",
338  gpRecX,
339  gpRecY,
340  gpRecZ,
341  gpRecEta,
342  gpRecPhi);
343 
344  ++iRec;
345  }
346  }
347 
348  storageRecMuon_.n_ = iMuonHit;
349  storageTrackHit_.n_ = iTrackHit;
350  trackExtrap.n_ = numTracks;
351 }
352 //
353 // Deal with Re-Fitted Track with some station omitted.
354 //
355 // This should take the new track, match it to its track before refitting with the hits dumped, and extrapolate out to the
356 // rec hits that were removed from the fit.
357 //
358 //
359 
363  int numTracks = 0;
364  int recCounter = 0;
365 
366  for (reco::TrackCollection::const_iterator muon = trackColl->begin(); muon != trackColl->end(); muon++) {
367  int iTrack = muon - trackColl->begin();
368 
369  reco::TrackRef trackref = reco::TrackRef(trackColl, iTrack);
371 
372  int iTrackLink = MatchTrackWithRecHits(muon, trackCollOrig);
373  reco::TrackRef ref = reco::TrackRef(trackCollOrig, iTrackLink);
374 
375  for (auto const& rec1 : ref->recHits()) {
376  bool unbiasedRec = true;
377 
378  for (auto const& rec2 : muon->recHits()) {
379  if (IsSameHit(*rec1, *rec2)) {
380  unbiasedRec = false;
381  break;
382  }
383  }
384  if (!unbiasedRec)
385  continue;
386 
387  DetId detid = rec1->geographicalId();
388 
390  theService->trackingGeometry()->idToDet(rec1->geographicalId()), rec1);
391 
392  trkExtrap(detid, numTracks, iTrackLink, recCounter, recoStart, rec1->localPosition(), trackExtrap);
393  numTracks++;
394  }
395  }
396 
397  trackExtrap.n_ = numTracks;
398 }
399 //
400 // Find the original track that corresponds to the re-fitted track
401 //
402 int ResidualRefitting::MatchTrackWithRecHits(reco::TrackCollection::const_iterator trackIt,
404  if (debug_)
405  printf("Matching a re-fitted track to the original track.\n");
406 
407  int TrackMatch = -1;
408 
409  for (auto const& rec : trackIt->recHits()) {
410  bool foundMatch = false;
411  for (reco::TrackCollection::const_iterator refIt = ref->begin(); refIt != ref->end(); refIt++) {
412  int iTrackMatch = refIt - ref->begin();
413  if (foundMatch && TrackMatch != iTrackMatch)
414  break;
415  for (auto const& recRef : refIt->recHits()) {
416  if (!IsSameHit(*rec, *recRef))
417  continue;
418 
419  foundMatch = true;
420  TrackMatch = iTrackMatch;
421  // printf("Rec hit match for original track %d\n", iTrackMatch);
422  }
423  }
424  if (!foundMatch) {
425  printf("SOMETHING WENT WRONG! Could not match Track with original track!");
426  exit(1);
427  }
428  }
429  if (debug_)
430  printf("Rec hit match for original track %d\n", TrackMatch);
431 
432  // reco::TrackRef trackref=reco::TrackRef(ref,TrackMatch);
433  return TrackMatch;
434 }
435 /*
436 //
437 // Match two tracks to see if one is a subset of the other
438 //
439 
440 bool ResidualRefitting::TrackSubset(reco::TrackRef trackSub, reco::TrackRef trackTop) {
441 
442 
443  bool matchAll = true;
444 
445  for (trackingRecHit_iterator recSub = trackSub->recHits().begin(); recSub!=trackSub->recHits().end(); recSub++) {
446 
447  bool matchSub = false;
448 
449 
450  for (trackingRecHit_iterator recTop = trackTop->recHits().begin(); recTop!=trackTop->recHits().end(); recTop++) {
451 
452  if ( recSub == recTop ) matchSub = true;
453  if (matchSub) break;
454 
455  }
456  if (!matchSub) return false;
457 
458  }
459 
460  return matchAll;
461 
462 }
463 */
464 
465 //
466 // Check to see if the rec hits are the same
467 //
469  double lpx1 = hit1.localPosition().x();
470  double lpy1 = hit1.localPosition().y();
471  double lpz1 = hit1.localPosition().z();
472 
473  double lpx2 = hit2.localPosition().x();
474  double lpy2 = hit2.localPosition().y();
475  double lpz2 = hit2.localPosition().z();
476  if (fabs(lpx1 - lpx2) > 1e-3)
477  return false;
478  // printf("Match lpx...\n");
479  if (fabs(lpy1 - lpy2) > 1e-3)
480  return false;
481  // printf("Match lpy...\n");
482  if (fabs(lpz1 - lpz2) > 1e-3)
483  return false;
484  // printf("Match lpz...\n");
485 
486  return true;
487 }
488 
489 //
490 // Store Tracker Rec Hits
491 //
492 void ResidualRefitting::StoreTrackerRecHits(DetId detid, const TrackerTopology* tTopo, int iTrack, int iRec) {
493  int detector = -1;
494  int subdetector = -1;
495  int blade = -1;
496  int disk = -1;
497  int ladder = -1;
498  int layer = -1;
499  int module = -1;
500  int panel = -1;
501  int ring = -1;
502  int side = -1;
503  int wheel = -1;
504 
505  //Detector Info
506 
507  detector = detid.det();
508  subdetector = detid.subdetId();
509 
510  if (detector != DetId::Tracker) {
511  edm::LogVerbatim("ResidualRefitting") << "OMFG NOT THE TRACKER\n";
512  return;
513  }
514 
515  if (debug_)
516  edm::LogVerbatim("ResidualRefitting") << "Tracker:: ";
518  layer = tTopo->pxbLayer(detid.rawId());
519  ladder = tTopo->pxbLadder(detid.rawId());
520  module = tTopo->pxbModule(detid.rawId());
521  if (debug_)
522  edm::LogVerbatim("ResidualRefitting")
523  << "PXB"
524  << "\tlayer = " << layer << "\tladder = " << ladder << "\tmodule = " << module;
525 
526  } else if (subdetector == ResidualRefitting::PXF) {
527  side = tTopo->pxfSide(detid.rawId());
528  disk = tTopo->pxfDisk(detid.rawId());
529  blade = tTopo->pxfBlade(detid.rawId());
530  panel = tTopo->pxfPanel(detid.rawId());
531  module = tTopo->pxfModule(detid.rawId());
532  if (debug_)
533  edm::LogVerbatim("ResidualRefitting") << "PXF"
534  << "\tside = " << side << "\tdisk = " << disk << "\tblade = " << blade
535  << "\tpanel = " << panel << "\tmodule = " << module;
536 
537  } else if (subdetector == ResidualRefitting::TIB) {
538  layer = tTopo->tibLayer(detid.rawId());
539  module = tTopo->tibModule(detid.rawId());
540  if (debug_)
541  edm::LogVerbatim("ResidualRefitting") << "TIB"
542  << "\tlayer = " << layer << "\tmodule = " << module;
543  } else if (subdetector == ResidualRefitting::TID) {
544  side = tTopo->tidSide(detid.rawId());
545  wheel = tTopo->tidWheel(detid.rawId());
546  ring = tTopo->tidRing(detid.rawId());
547  if (debug_)
548  edm::LogVerbatim("ResidualRefitting") << "TID"
549  << "\tside = " << side << "\twheel = " << wheel << "\tring = " << ring;
550 
551  } else if (subdetector == ResidualRefitting::TOB) {
552  layer = tTopo->tobLayer(detid.rawId());
553  module = tTopo->tobModule(detid.rawId());
554  if (debug_)
555  edm::LogVerbatim("ResidualRefitting") << "TOB"
556  << "\tlayer = " << layer << "\tmodule = " << module;
557 
558  } else if (subdetector == ResidualRefitting::TEC) {
559  ring = tTopo->tecRing(detid.rawId());
560  module = tTopo->tecModule(detid.rawId());
561  if (debug_)
562  edm::LogVerbatim("ResidualRefitting") << "TEC"
563  << "\tring = " << ring << "\tmodule = " << module;
564  }
565 
566  //Do Storage
567 
568  storageTrackHit_.muonLink_[iRec] = iTrack;
571  storageTrackHit_.blade_[iRec] = blade;
572  storageTrackHit_.disk_[iRec] = disk;
574  storageTrackHit_.layer_[iRec] = layer;
576  storageTrackHit_.panel_[iRec] = panel;
577  storageTrackHit_.ring_[iRec] = ring;
578  storageTrackHit_.side_[iRec] = side;
579  storageTrackHit_.wheel_[iRec] = wheel;
580 }
581 
582 //
583 // Store Muon info on P, Pt, eta, phi
584 //
586  storeMuon.pt_[val] = muon->pt();
587  storeMuon.p_[val] = muon->p();
588  storeMuon.eta_[val] = muon->eta();
589  storeMuon.phi_[val] = muon->phi();
590  storeMuon.charge_[val] = muon->charge();
591  storeMuon.numRecHits_[val] = muon->numberOfValidHits();
592  storeMuon.chiSq_[val] = muon->chi2();
593  storeMuon.ndf_[val] = muon->ndof();
594  storeMuon.chiSqOvrNdf_[val] = muon->normalizedChi2();
595 }
596 //
597 // Fill a track extrapolation
598 //
600  int iTrk,
601  int iTrkLink,
602  int iRec,
603  const FreeTrajectoryState& freeTrajState,
604  const LocalPoint& recPoint,
605  storage_trackExtrap& storeTemp) {
606  bool dump_ = debug_;
607 
608  if (dump_)
609  edm::LogVerbatim("ResidualRefitting") << "In the trkExtrap function";
610 
611  float gpExtrapX = -99999;
612  float gpExtrapY = -99999;
613  float gpExtrapZ = -99999;
614  float gpExtrapEta = -99999;
615  float gpExtrapPhi = -99999;
616 
617  float lpX = -99999;
618  float lpY = -99999;
619  float lpZ = -99999;
620 
621  //
622  // Get the local positions for the recHits
623  //
624 
625  float recLpX = recPoint.x();
626  float recLpY = recPoint.y();
627  float recLpZ = recPoint.z();
628 
629  float resX = -9999;
630  float resY = -9999;
631  float resZ = -9999;
632 
633  const GeomDet* gdet = theService->trackingGeometry()->idToDet(detid);
634 
635  // TrajectoryStateOnSurface surfTest = prop.propagate(freeTrajState, gdet->surface());
636  TrajectoryStateOnSurface surfTest = thePropagator->propagate(freeTrajState, gdet->surface());
637 
638  if (surfTest.isValid()) {
639  GlobalPoint globTest = surfTest.globalPosition();
640  gpExtrapX = globTest.x();
641  gpExtrapY = globTest.y();
642  gpExtrapZ = globTest.z();
643  gpExtrapEta = globTest.eta();
644  gpExtrapPhi = globTest.phi();
645  LocalPoint loc = surfTest.localPosition();
646  if (detid.det() == DetId::Muon || detid.det() == DetId::Tracker) {
647  lpX = loc.x();
648  lpY = loc.y();
649  lpZ = loc.z();
650 
651  resX = lpX - recLpX;
652  resY = lpY - recLpY;
653  resZ = lpZ - recLpZ;
654  }
655  }
656  storeTemp.muonLink_[iTrk] = iTrkLink;
657  storeTemp.recLink_[iTrk] = iRec;
658  storeTemp.gpX_[iTrk] = gpExtrapX;
659  storeTemp.gpY_[iTrk] = gpExtrapY;
660  storeTemp.gpZ_[iTrk] = gpExtrapZ;
661  storeTemp.gpEta_[iTrk] = gpExtrapEta;
662  storeTemp.gpPhi_[iTrk] = gpExtrapPhi;
663  storeTemp.lpX_[iTrk] = lpX;
664  storeTemp.lpY_[iTrk] = lpY;
665  storeTemp.lpZ_[iTrk] = lpZ;
666  storeTemp.resX_[iTrk] = resX;
667  storeTemp.resY_[iTrk] = resY;
668  storeTemp.resZ_[iTrk] = resZ;
669 
670  printf("station: %d\tsector: %d\tresX storage: %4.2f\n", ReturnStation(detid), ReturnSector(detid), resX);
671 }
672 //
673 // Return the station
674 //
676  int station = -999;
677 
678  if (detid.det() == DetId::Muon) {
679  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
680  if (systemMuon == MuonSubdetId::CSC) {
681  CSCDetId id(detid.rawId());
682  station = id.station();
683 
684  } else if (systemMuon == MuonSubdetId::DT) {
685  DTWireId id(detid.rawId());
686  station = id.station();
687 
688  } else if (systemMuon == MuonSubdetId::RPC) {
689  RPCDetId id(detid.rawId());
690  station = id.station();
691  }
692  }
693 
694  return station;
695 }
696 //
697 // Return the sector
698 //
700  int sector = -999;
701 
702  if (detid.det() == DetId::Muon) {
703  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
704  if (systemMuon == MuonSubdetId::DT) {
705  DTWireId id(detid.rawId());
706  sector = id.sector();
707  }
708  }
709 
710  return sector;
711 }
712 
713 //
714 // Store the SAM and Track position info at a particular rho
715 //
719  double rho) {
720  Cylinder::PositionType pos(0, 0, 0);
722 
724  // SteppingHelixPropagator inwardProp ( theField, oppositeToMomentum );
725  // SteppingHelixPropagator outwardProp ( theField, alongMomentum );
727  // TrajectoryStateOnSurface recoProp = outwardProp.propagate(recoStart, *myCylinder);
728  TrajectoryStateOnSurface recoProp = thePropagator->propagate(recoStart, *myCylinder);
729 
730  double xVal = -9999;
731  double yVal = -9999;
732  double zVal = -9999;
733  double phiVal = -9999;
734  double etaVal = -9999;
735 
736  if (recoProp.isValid()) {
737  GlobalPoint recoPoint = recoProp.globalPosition();
738  xVal = recoPoint.x();
739  yVal = recoPoint.y();
740  zVal = recoPoint.z();
741  phiVal = recoPoint.phi();
742  etaVal = recoPoint.eta();
743  }
744  storage.muonLink_[recNum] = recNum;
745  storage.gpX_[recNum] = xVal;
746  storage.gpY_[recNum] = yVal;
747  storage.gpZ_[recNum] = zVal;
748  storage.gpEta_[recNum] = etaVal;
749  storage.gpPhi_[recNum] = phiVal;
750 
751  float rhoVal = sqrt(xVal * xVal + yVal * yVal);
752 
753  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
754  if (debug_)
755  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
756 }
758 //Pre-Job junk
760 
761 //
762 // zero storage
763 //
765  if (debug_)
766  printf("zero_storage\n");
767 
780  //zero out the tracker
784 
786 
791 
793 
800 
802 
806 
808 
813 
815 
822 
824 
831 
833 
835 
839 
841 
846 
853 
855 
857 
858  storageRecMuon_.n_ = 0;
859  storageTrackHit_.n_ = 0;
860 }
861 //
862 // Zero out a muon reference
863 //
865  str->n_ = 0;
866 
867  for (int i = 0; i < ResidualRefitting::N_MAX_STORED; i++) {
868  str->pt_[i] = -9999;
869  str->eta_[i] = -9999;
870  str->p_[i] = -9999;
871  str->phi_[i] = -9999;
872  str->numRecHits_[i] = -9999;
873  str->chiSq_[i] = -9999;
874  str->ndf_[i] = -9999;
875  str->chiSqOvrNdf_[i] = -9999;
876  }
877 }
878 //
879 // Zero track extrapolation
880 //
882  str->n_ = 0;
883  for (int i = 0; i < ResidualRefitting::N_MAX_STORED_HIT; i++) {
884  str->muonLink_[i] = -9999;
885  str->recLink_[i] = -9999;
886  str->gpX_[i] = -9999;
887  str->gpY_[i] = -9999;
888  str->gpZ_[i] = -9999;
889  str->gpEta_[i] = -9999;
890  str->gpPhi_[i] = -9999;
891  str->lpX_[i] = -9999;
892  str->lpY_[i] = -9999;
893  str->lpZ_[i] = -9999;
894  str->resX_[i] = -9999;
895  str->resY_[i] = -9999;
896  str->resZ_[i] = -9999;
897  }
898 }
899 //
900 // Begin Job
901 //
903  edm::LogVerbatim("ResidualRefitting") << "Creating file " << outputFileName_.c_str();
904 
905  outputFile_ = new TFile(outputFileName_.c_str(), "RECREATE");
906 
907  outputTree_ = new TTree("outputTree", "outputTree");
908 
909  outputTree_->Branch("eventInfo",
910  &eventInfo_,
911  "evtNum_/I:"
912  "runNum_/I");
913 
920 
926 
944 
961 
962  outputBranch_ = outputTree_->Branch("recHitsNew",
964 
965  "n_/I:"
966  "muonLink_[1000]/I:"
967 
968  "system_[1000]/I:"
969  "endcap_[1000]/I:"
970  "station_[1000]/I:"
971  "ring_[1000]/I:"
972  "chamber_[1000]/I:"
973  "layer_[1000]/I:"
974  "superLayer_[1000]/I:"
975  "wheel_[1000]/I:"
976  "sector_[1000]/I:"
977 
978  "gpX_[1000]/F:"
979  "gpY_[1000]/F:"
980  "gpZ_[1000]/F:"
981  "gpEta_[1000]/F:"
982  "gpPhi_[1000]/F:"
983  "lpX_[1000]/F:"
984  "lpY_[1000]/F:"
985  "lpZ_[1000]/F");
986 
987  outputBranch_ = outputTree_->Branch("recHitsTracker",
989 
990  "n_/I:"
991 
992  "muonLink_[1000]/I:"
993  "detector_[1000]/I:"
994  "subdetector_[1000]/I:"
995  "blade_[1000]/I:"
996  "disk_[1000]/I:"
997  "ladder_[1000]/I:"
998  "layer_[1000]/I:"
999  "module_[1000]/I:"
1000  "panel_[1000]/I:"
1001  "ring_[1000]/I:"
1002  "side_[1000]/I:"
1003  "wheel_[1000]/I:"
1004 
1005  "gpX_[1000]/F:"
1006  "gpY_[1000]/F:"
1007  "gpZ_[1000]/F:"
1008  "gpEta_[1000]/F:"
1009  "gpPhi_[1000]/F:"
1010  "lpX_[1000]/F:"
1011  "lpY_[1000]/F:"
1012  "lpZ_[1000]/F");
1013 
1019 
1037 
1040 }
1041 //
1042 // Set the Muon Branches
1043 //
1045  outputBranch_ = outputTree_->Branch(branchName.c_str(),
1046  &storageTmp,
1047  "n_/I:"
1048  "charge_[10]/I:"
1049  "pt_[10]/F:"
1050  "eta_[10]/F:"
1051  "p_[10]/F:"
1052  "phi_[10]/F:"
1053  "numRecHits_[10]/I:"
1054  "chiSq_[10]/F:"
1055  "ndf_[10]/F:"
1056  "chiSqOvrNdf_[10]/F"
1057 
1058  );
1059 }
1060 //
1061 // Set the Branches for Track Extrapolations
1062 //
1064  outputBranch_ = outputTree_->Branch(branchName.c_str(),
1065  &storageTmp,
1066  "n_/I:"
1067  "muonLink_[1000]/I:"
1068  "recLink_[1000]/I:"
1069  "gpX_[1000]/F:"
1070  "gpY_[1000]/F:"
1071  "gpZ_[1000]/F:"
1072  "gpEta_[1000]/F:"
1073  "gpPhi_[1000]/F:"
1074  "lpX_[1000]/F:"
1075  "lpY_[1000]/F:"
1076  "lpZ_[1000]/F:"
1077  "resX_[1000]/F:"
1078  "resY_[1000]/F:"
1079  "resZ_[1000]/F"
1080 
1081  );
1082 }
1083 //
1084 // End Job
1085 //
1087  outputFile_->Write();
1088 
1089  outputFile_->Close();
1090 }
1091 //
1092 // Return a Free Trajectory state for a muon track
1093 //
1095  math::XYZPoint innerPos = muon->referencePoint();
1096  math::XYZVector innerMom = muon->momentum();
1097  if (debug_)
1098  edm::LogVerbatim("ResidualRefitting")
1099  << "Inner Pos: "
1100  << "\tx = " << innerPos.X() << "\ty = " << innerPos.Y() << "\tz = " << innerPos.Z();
1101 
1102  GlobalPoint innerPoint(innerPos.X(), innerPos.Y(), innerPos.Z());
1103  GlobalVector innerVec(innerMom.X(), innerMom.Y(), innerMom.Z());
1104 
1105  FreeTrajectoryState recoStart(innerPoint, innerVec, muon->charge(), theField);
1106  return recoStart;
1107 }
1108 
1110 // nTuple value Dumps
1112 
1113 //
1114 // dump Track Extrapolation
1115 //
1117  edm::LogVerbatim("ResidualRefitting") << "\n\nExtrapolation Dump:\n";
1118  for (unsigned int i = 0; i < (unsigned int)track.n_; i++) {
1119  // double rho = sqrt( (float)track.gpX_[i] * (float)track.gpX_[i] + (float)track.gpY_[i] * (float)track.gpY_[i] );
1120 
1121  printf("%d\tmuonLink= %d", i, (int)track.muonLink_[i]);
1122  printf("\trecLink = %d", (int)track.recLink_[i]);
1123  // printf ("\tGlobal\tx = %0.3f" , (float)track.gpX_[i] );
1124  // printf ("\ty = %0.3f" , (float)track.gpY_[i] );
1125  // printf ("\tz = %0.3f" , (float)track.gpZ_[i] );
1126  // printf ("\trho =%0.3f" , rho );
1127  // printf ("\teta = %0.3f" , (float)track.gpEta_[i] );
1128  // printf ("\tphi = %0.3f" , (float)track.gpPhi_[i] );
1129  printf("\t\tLocal\tx = %0.3f", (float)track.lpX_[i]);
1130  printf("\ty = %0.3f", (float)track.lpY_[i]);
1131  printf("\tz = %0.3f\n", (float)track.lpZ_[i]);
1132  }
1133 }
1134 //
1135 // dump Muon Rec Hits
1136 //
1138  edm::LogVerbatim("ResidualRefitting") << "Muon Rec Hits Dump:\n";
1139  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1140  // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1141 
1142  printf("%d\tsubdetector = %d\t superLayer =%d", i, (int)hit.system_[i], (int)hit.superLayer_[i]);
1143  // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1144  // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1145  // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1146  // printf ("\trho =%0.3f" , rho );
1147  // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1148  // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1149  printf("\t\tLocal\tx = %0.3f", (float)hit.lpX_[i]);
1150  printf("\ty = %0.3f", (float)hit.lpY_[i]);
1151  printf("\tz = %0.3f\n", (float)hit.lpZ_[i]);
1152  }
1153 }
1154 //
1155 // dump Tracker Rec Hits
1156 //
1158  edm::LogVerbatim("ResidualRefitting") << "Tracker Rec Hits Dump:\n";
1159  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1160  // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1161 
1162  printf("%d\tsubdetector = %d", i, (int)hit.subdetector_[i]);
1163  printf("\tlayer = %d", (int)hit.layer_[i]);
1164  // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1165  // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1166  // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1167  // printf ("\trho =%0.3f" , rho );
1168  // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1169  // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1170  printf("\t\tLocal\tx = %0.3f", (float)hit.lpX_[i]);
1171  printf("\ty = %0.3f", (float)hit.lpY_[i]);
1172  printf("\tz = %0.3f\n", (float)hit.lpZ_[i]);
1173  }
1174 }
1175 //
1176 //Dump a TrackRef
1177 //
1179  float pt = muon->pt();
1180  float p = muon->p();
1181  float eta = muon->eta();
1182  float phi = muon->phi();
1183  printf("\t%s: \tp = %4.2f \t pt = %4.2f \t eta = %4.2f \t phi = %4.2f\n", str.c_str(), p, pt, eta, phi);
1184 }
1185 
1187 
1189 //Deprecated
void CollectTrackHits(edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap, const edm::EventSetup &eventSetup)
ResidualRefitting::storage_muon storageGmrNoTIBLayer4
int endcap_[N_MAX_STORED_HIT]
Log< level::Info, true > LogVerbatim
static const int TIB
ResidualRefitting::storage_muon storageTrkNoTOBLayer4
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
unsigned int tobLayer(const DetId &id) const
void zero_muon(ResidualRefitting::storage_muon *str)
unsigned int pxbLayer(const DetId &id) const
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
static const int N_MAX_STORED
int ReturnStation(DetId detid)
void dumpTrackRef(reco::TrackRef muon, std::string str)
ResidualRefitting::storage_muon storageGmrNoTOBLayer1
void dumpMuonRecHits(const ResidualRefitting::storage_hit &hit)
ResidualRefitting::storage_trackExtrap storageTrackNoTEC
unsigned int pxfBlade(const DetId &id) const
ResidualRefitting::storage_muon storageGmrNoPXBLayer1
float lpZ_[N_MAX_STORED_HIT]
bool IsSameHit(TrackingRecHit const &hit1, TrackingRecHit const &hit2)
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer1
T z() const
Definition: PV3DBase.h:61
ResidualRefitting::storage_muon storageGmrNoTID
ResidualRefitting::storage_muon storageTrkNoTOBLayer6
unsigned int tibModule(const DetId &id) const
unsigned int tidSide(const DetId &id) const
TString subdetector
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
int ReturnSector(DetId detid)
unsigned int pxfModule(const DetId &id) const
ResidualRefitting::storage_muon storageGmrNoTIBLayer1
static const int PXB
ResidualRefitting::storage_trackHit storageTrackHit_
unsigned int tidWheel(const DetId &id) const
T eta() const
Definition: PV3DBase.h:73
const MagneticField * theField
void zero_trackExtrap(ResidualRefitting::storage_trackExtrap *str)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
void analyze(const edm::Event &, const edm::EventSetup &) override
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt3_
ResidualRefitting::storage_muon storageTrkNoTOBLayer5
static const int TOB
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer2
const edm::EDGetTokenT< reco::TrackCollection > muonsNoSt4Token_
static const int N_MAX_STORED_HIT
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer4
ResidualRefitting::storage_muon storageTrkNoTIBLayer2
int sector_[N_MAX_STORED_HIT]
ResidualRefitting::storage_muon storageGmrNoTOBLayer2
void endJob() override
unsigned int pxbLadder(const DetId &id) const
ResidualRefitting::storage_muon storageGmrNoSt1_
int layer_[N_MAX_STORED_HIT]
int chamber_[N_MAX_STORED_HIT]
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer6
float lpY_[N_MAX_STORED_HIT]
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt1_
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const GeomDet * idToDet(DetId) const override
void trkExtrap(const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
ResidualRefitting::storage_muon storageGmrNoTOBLayer6
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
unsigned int tecRing(const DetId &id) const
ring id
int muonLink_[N_MAX_STORED_HIT]
ResidualRefitting::storage_muon storageSamNew_
static const int TEC
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer4
float gpEta_[N_MAX_STORED_HIT]
ResidualRefitting::storage_muon storageTrkNoTID
ResidualRefitting::storage_trackExtrap storageTrackExtrapTracker_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRec_
static const int TID
ResidualRefitting::storage_muon storageGmrNoTOBLayer4
ResidualRefitting::storage_muon storageGmrNoSt4_
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt4_
unsigned int tecModule(const DetId &id) const
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer2
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
void branchMuon(ResidualRefitting::storage_muon &storageTmp, std::string branchName)
int MatchTrackWithRecHits(reco::TrackCollection::const_iterator trackIt, edm::Handle< reco::TrackCollection > ref)
GlobalPoint globalPosition() const
float lpX_[N_MAX_STORED_HIT]
ResidualRefitting::storage_muon storageSamNoSt4_
int wheel_[N_MAX_STORED_HIT]
void muonInfo(ResidualRefitting::storage_muon &storeMuon, reco::TrackRef muon, int val)
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt2_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
T sqrt(T t)
Definition: SSEVec.h:19
ResidualRefitting::storage_muon storageTrkNoPXBLayer2
ResidualRefitting::storage_muon storageGmrNoSt2_
float gpY_[N_MAX_STORED_HIT]
unsigned int pxfDisk(const DetId &id) const
ResidualRefitting::storage_muon storageGmrNoSt3_
MuonServiceProxy * theService
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
ResidualRefitting::storage_muon storageGmrNoPXBLayer2
void dumpTrackExtrap(const ResidualRefitting::storage_trackExtrap &track)
ResidualRefitting(const edm::ParameterSet &)
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
~ResidualRefitting() override
ResidualRefitting::storage_muon storageGmrOld_
ResidualRefitting::storage_muon storageTrkNoPXF
ResidualRefitting::storage_muon storageGmrNoTEC
ResidualRefitting::storage_trackExtrap trackExtrap120_
const edm::EDGetTokenT< reco::TrackCollection > muonsNoSt1Token_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
unsigned int pxfPanel(const DetId &id) const
const edm::EDGetTokenT< reco::TrackCollection > muonsNoSt2Token_
Definition: DetId.h:17
ResidualRefitting::storage_muon storageGmrNoTIBLayer3
ResidualRefitting::storage_muon storageGmrNew_
unsigned int pxfSide(const DetId &id) const
float gpX_[N_MAX_STORED_HIT]
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
std::string outputFileName_
ResidualRefitting::storage_muon storageGmrNoTIBLayer2
int station_[N_MAX_STORED_HIT]
void cylExtrapTrkSam(int recNum, reco::TrackRef track, ResidualRefitting::storage_trackExtrap &storage, double rho)
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
Definition: Cylinder.h:45
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
float gpPhi_[N_MAX_STORED_HIT]
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
static constexpr int RPC
Definition: MuonSubdetId.h:13
static const int PXF
ResidualRefitting::storage_muon storageTrkNoTIBLayer3
int ring_[N_MAX_STORED_HIT]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ResidualRefitting::storage_trackExtrap storageTrackNoTID
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeometryToken_
ResidualRefitting::storage_muon storageTrkNoTOBLayer2
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer5
ResidualRefitting::storage_muon storageSamNoSt2_
void dumpTrackHits(const ResidualRefitting::storage_trackHit &hit)
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer3
fixed size matrix
ResidualRefitting::storage_muon storageTrkNoTOBLayer1
HLT enums.
float chiSqOvrNdf_[N_MAX_STORED]
ResidualRefitting::storage_muon storageGmrNoPXBLayer3
ResidualRefitting::storage_muon storageTrkNoTEC
ResidualRefitting::storage_muon storageSamNoSt3_
ResidualRefitting::storage_muon storageTrkNoPXBLayer1
float gpZ_[N_MAX_STORED_HIT]
const edm::EDGetTokenT< reco::TrackCollection > muonsNoSt3Token_
ResidualRefitting::storage_muon storageTrkNoTIBLayer1
ResidualRefitting::storage_muon storageGmrNoTOBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer1
unsigned int tidRing(const DetId &id) const
int superLayer_[N_MAX_STORED_HIT]
ResidualRefitting::storage_event eventInfo_
ResidualRefitting::storage_hit storageRecMuon_
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
unsigned int tibLayer(const DetId &id) const
ResidualRefitting::storage_muon storageTrkNoTOBLayer3
edm::ESHandle< Propagator > thePropagator
unsigned int tobModule(const DetId &id) const
void NewTrackMeasurements(const edm::Handle< reco::TrackCollection > &trackCollOrig, const edm::Handle< reco::TrackCollection > &trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap)
void StoreTrackerRecHits(DetId detid, const TrackerTopology *tTopo, int iTrack, int iRec)
static constexpr int DT
Definition: MuonSubdetId.h:11
unsigned int pxbModule(const DetId &id) const
ResidualRefitting::storage_muon storageTrkNew_
ResidualRefitting::storage_trackExtrap storageTrackNoPXF
ResidualRefitting::storage_muon storageSamNoSt1_
#define str(s)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr int CSC
Definition: MuonSubdetId.h:12
virtual LocalPoint localPosition() const =0
ResidualRefitting::storage_muon storageGmrNoTOBLayer5
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer3
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
void beginJob() override
int system_[N_MAX_STORED_HIT]
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer1
void branchTrackExtrap(ResidualRefitting::storage_trackExtrap &storageTmp, std::string branchName)
ResidualRefitting::storage_muon storageGmrNoPXF
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer2
const edm::EDGetTokenT< reco::TrackCollection > muonTracksToken_
Definition: event.py:1
ResidualRefitting::storage_muon storageTrkNoPXBLayer3
const edm::EDGetTokenT< reco::MuonCollection > muonsToken_
ResidualRefitting::storage_muon storageTrkNoTIBLayer4
def exit(msg="")
ResidualRefitting::storage_trackExtrap samExtrap120_