CMS 3D CMS Logo

CosmicSplitterValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CosmicSplitterValidation
4 // Class: CosmicSplitterValidation
5 //
13 //
14 // Original Author: Nhan Tran
15 // Created: Mon Jul 16m 16:56:34 CDT 2007
16 // $Id: CosmicSplitterValidation.cc,v 1.11 2010/03/29 13:18:43 mussgill Exp $
17 //
18 //
19 
20 // system include files
21 #include <algorithm>
22 #include <TTree.h>
23 
25 
34 
47 
49 
51 
56 
57 //
58 // class decleration
59 //
60 
62 public:
64  ~CosmicSplitterValidation() override;
65 
66 private:
67  void beginJob() override;
68  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
69  void endJob() override;
70 
71  bool is_gold_muon(const edm::Event& e);
72 
77 
81  int goldenCtr;
85 
87  // ----------member data ---------------------------
88  //std::vector<AlignTransform> m_align;
89  // tree
90  TTree* splitterTree_;
91  // tree vars
93  // split track variables
108  // split track errors
116 
117  // original track variables
119  double dxy_org_, dz_org_;
122  double norchi2_org_;
125  // original track errors
129 
130  // split sta variables
141  // split sta_ errors
149 
150  // split glb_ variables
162  // split glb_ errors
170  // original glb muon variables
172  double dxy_orm_, dz_orm_;
175  double norchi2_orm_;
176  // original glb muon errors
180 
181  //consumes tokens
187 };
188 
189 //
190 // constants, enums and typedefs
191 //
192 
193 //
194 // static data member definitions
195 //
196 
197 //
198 // constructors and destructor
199 //
201  : splitTracks_(iConfig.getParameter<edm::InputTag>("splitTracks")),
202  splitGlobalMuons_(iConfig.getParameter<edm::InputTag>("splitGlobalMuons")),
203  originalTracks_(iConfig.getParameter<edm::InputTag>("originalTracks")),
204  originalGlobalMuons_(iConfig.getParameter<edm::InputTag>("originalGlobalMuons")),
205  checkIfGolden_(iConfig.getParameter<bool>("checkIfGolden")),
206  splitMuons_(iConfig.getParameter<bool>("ifSplitMuons")),
208  goldenCtr(0),
209  twoTracksCtr(0),
213  runNumber_(0),
214  eventNumber_(0),
215  luminosityBlock_(0),
216  dcaX1_spl_(0),
217  dcaY1_spl_(0),
218  dcaZ1_spl_(0),
219  dcaX2_spl_(0),
220  dcaY2_spl_(0),
221  dcaZ2_spl_(0),
222  dxy1_spl_(0),
223  dxy2_spl_(0),
224  ddxy_spl_(0),
225  dz1_spl_(0),
226  dz2_spl_(0),
227  ddz_spl_(0),
228  theta1_spl_(0),
229  theta2_spl_(0),
230  dtheta_spl_(0),
231  eta1_spl_(0),
232  eta2_spl_(0),
233  deta_spl_(0),
234  phi1_spl_(0),
235  phi2_spl_(0),
236  dphi_spl_(0),
237  pt1_spl_(0),
238  pt2_spl_(0),
239  dpt_spl_(0),
240  p1_spl_(0),
241  p2_spl_(0),
242  dp_spl_(0),
243  qoverpt1_spl_(0),
244  qoverpt2_spl_(0),
245  dqoverpt_spl_(0),
246  nHits1_spl_(0),
247  nHitsPXB1_spl_(0),
248  nHitsPXF1_spl_(0),
249  nHitsTIB1_spl_(0),
250  nHitsTOB1_spl_(0),
251  nHitsTID1_spl_(0),
252  nHitsTEC1_spl_(0),
253  nHits2_spl_(0),
254  nHitsPXB2_spl_(0),
255  nHitsPXF2_spl_(0),
256  nHitsTIB2_spl_(0),
257  nHitsTOB2_spl_(0),
258  nHitsTID2_spl_(0),
259  nHitsTEC2_spl_(0),
260 
261  dxy1Err_spl_(0),
262  dxy2Err_spl_(0),
263  dz1Err_spl_(0),
264  dz2Err_spl_(0),
265  theta1Err_spl_(0),
266  theta2Err_spl_(0),
267  eta1Err_spl_(0),
268  eta2Err_spl_(0),
269  phi1Err_spl_(0),
270  phi2Err_spl_(0),
271  pt1Err_spl_(0),
272  pt2Err_spl_(0),
273  qoverpt1Err_spl_(0),
274  qoverpt2Err_spl_(0),
275 
276  dcaX_org_(0),
277  dcaY_org_(0),
278  dcaZ_org_(0),
279  dxy_org_(0),
280  dz_org_(0),
281  theta_org_(0),
282  eta_org_(0),
283  phi_org_(0),
284  pt_org_(0),
285  p_org_(0),
286  qoverpt_org_(0),
287  norchi2_org_(0),
288  nHits_org_(0),
289  nHitsPXB_org_(0),
290  nHitsPXF_org_(0),
291  nHitsTIB_org_(0),
292  nHitsTOB_org_(0),
293  nHitsTID_org_(0),
294  nHitsTEC_org_(0),
295 
296  dxyErr_org_(0),
297  dzErr_org_(0),
298  thetaErr_org_(0),
299  etaErr_org_(0),
300  phiErr_org_(0),
301  ptErr_org_(0),
302  qoverptErr_org_(0),
303 
304  dcaX1_sta_(0),
305  dcaY1_sta_(0),
306  dcaZ1_sta_(0),
307  dcaX2_sta_(0),
308  dcaY2_sta_(0),
309  dcaZ2_sta_(0),
310  dxy1_sta_(0),
311  dxy2_sta_(0),
312  ddxy_sta_(0),
313  dz1_sta_(0),
314  dz2_sta_(0),
315  ddz_sta_(0),
316  theta1_sta_(0),
317  theta2_sta_(0),
318  dtheta_sta_(0),
319  eta1_sta_(0),
320  eta2_sta_(0),
321  deta_sta_(0),
322  phi1_sta_(0),
323  phi2_sta_(0),
324  dphi_sta_(0),
325  pt1_sta_(0),
326  pt2_sta_(0),
327  dpt_sta_(0),
328  p1_sta_(0),
329  p2_sta_(0),
330  dp_sta_(0),
331  qoverpt1_sta_(0),
332  qoverpt2_sta_(0),
333  dqoverpt_sta_(0),
334 
335  dxy1Err_sta_(0),
336  dxy2Err_sta_(0),
337  dz1Err_sta_(0),
338  dz2Err_sta_(0),
339  theta1Err_sta_(0),
340  theta2Err_sta_(0),
341  eta1Err_sta_(0),
342  eta2Err_sta_(0),
343  phi1Err_sta_(0),
344  phi2Err_sta_(0),
345  pt1Err_sta_(0),
346  pt2Err_sta_(0),
347  qoverpt1Err_sta_(0),
348  qoverpt2Err_sta_(0),
349 
350  dcaX1_glb_(0),
351  dcaY1_glb_(0),
352  dcaZ1_glb_(0),
353  dcaX2_glb_(0),
354  dcaY2_glb_(0),
355  dcaZ2_glb_(0),
356  dxy1_glb_(0),
357  dxy2_glb_(0),
358  ddxy_glb_(0),
359  dz1_glb_(0),
360  dz2_glb_(0),
361  ddz_glb_(0),
362  theta1_glb_(0),
363  theta2_glb_(0),
364  dtheta_glb_(0),
365  eta1_glb_(0),
366  eta2_glb_(0),
367  deta_glb_(0),
368  phi1_glb_(0),
369  phi2_glb_(0),
370  dphi_glb_(0),
371  pt1_glb_(0),
372  pt2_glb_(0),
373  dpt_glb_(0),
374  p1_glb_(0),
375  p2_glb_(0),
376  dp_glb_(0),
377  qoverpt1_glb_(0),
378  qoverpt2_glb_(0),
379  dqoverpt_glb_(0),
380  norchi1_glb_(0),
381  norchi2_glb_(0),
382 
383  dxy1Err_glb_(0),
384  dxy2Err_glb_(0),
385  dz1Err_glb_(0),
386  dz2Err_glb_(0),
387  theta1Err_glb_(0),
388  theta2Err_glb_(0),
389  eta1Err_glb_(0),
390  eta2Err_glb_(0),
391  phi1Err_glb_(0),
392  phi2Err_glb_(0),
393  pt1Err_glb_(0),
394  pt2Err_glb_(0),
395  qoverpt1Err_glb_(0),
396  qoverpt2Err_glb_(0),
397 
398  dcaX_orm_(0),
399  dcaY_orm_(0),
400  dcaZ_orm_(0),
401  dxy_orm_(0),
402  dz_orm_(0),
403  theta_orm_(0),
404  eta_orm_(0),
405  phi_orm_(0),
406  pt_orm_(0),
407  p_orm_(0),
408  qoverpt_orm_(0),
409  norchi2_orm_(0),
410  dxyErr_orm_(0),
411  dzErr_orm_(0),
412  thetaErr_orm_(0),
413  etaErr_orm_(0),
414  phiErr_orm_(0),
415  ptErr_orm_(0),
416  qoverptErr_orm_(0) {
418  splitTracksToken_ = iC.consumes<std::vector<reco::Track>>(splitTracks_);
419  originalTracksToken_ = iC.consumes<std::vector<reco::Track>>(originalTracks_);
420  if (splitMuons_) {
423  }
424  if (checkIfGolden_)
426 }
427 
429 
430 //
431 // member functions
432 //
433 
434 // ------------ method called to for each event ------------
436  // check if golden muon
437  bool isGolden = true;
438  if (checkIfGolden_)
439  isGolden = is_gold_muon(iEvent);
440 
441  // grab collections
445  edm::Handle<reco::MuonCollection> originalGlobalMuons;
446  iEvent.getByToken(splitTracksToken_, tracks);
447  iEvent.getByToken(originalTracksToken_, originalTracks);
448  if (splitMuons_) {
449  iEvent.getByToken(splitGlobalMuonsToken_, globalMuons);
450  iEvent.getByToken(originalGlobalMuonsToken_, originalGlobalMuons);
451  }
452 
455 
457  if (isGolden)
458  goldenCtr++;
459  if (tracks->size() == 2)
460  twoTracksCtr++;
461  if (tracks->size() == 2 && originalTracks->size() == 1 && isGolden) {
463 
464  int gmCtr = 0;
465  bool topGlobalMuonFlag = false;
466  bool bottomGlobalMuonFlag = false;
467  int topGlobalMuon = -1;
468  int bottomGlobalMuon = -1;
469  double topGlobalMuonNorchi2 = 1e10;
470  double bottomGlobalMuonNorchi2 = 1e10;
471 
472  if (splitMuons_) {
473  // check if split global muons are good
474  for (std::vector<reco::Muon>::const_iterator gmI = globalMuons->begin(); gmI != globalMuons->end(); gmI++) {
475  if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
476  reco::TrackRef trackerTrackRef1(tracks, 0);
477  reco::TrackRef trackerTrackRef2(tracks, 1);
478 
479  if (gmI->innerTrack() == trackerTrackRef1) {
480  if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
481  topGlobalMuonFlag = true;
482  topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
483  topGlobalMuon = gmCtr;
484  }
485  }
486  if (gmI->innerTrack() == trackerTrackRef2) {
487  if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
488  bottomGlobalMuonFlag = true;
489  bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
490  bottomGlobalMuon = gmCtr;
491  }
492  }
493  }
494  gmCtr++;
495  }
496  }
497 
498  if ((!splitMuons_) || (splitMuons_ && bottomGlobalMuonFlag && topGlobalMuonFlag)) {
500 
501  // split tracks calculations
502  reco::Track track1 = tracks->at(0);
503  reco::Track track2 = tracks->at(1);
504 
505  const math::XYZPoint& dca1 = track1.referencePoint();
506  const math::XYZPoint& dca2 = track2.referencePoint();
507 
508  // looping through the hits for track 1
509  int Nrechits1 = 0;
510  int nhitinTIB1 = 0;
511  int nhitinTOB1 = 0;
512  int nhitinTID1 = 0;
513  int nhitinTEC1 = 0;
514  int nhitinBPIX1 = 0;
515  int nhitinFPIX1 = 0;
516  for (auto const& hit : track1.recHits()) {
517  if (hit->isValid()) {
518  Nrechits1++;
519 
520  int type = hit->geographicalId().subdetId();
521 
522  if (type == int(StripSubdetector::TIB)) {
523  ++nhitinTIB1;
524  }
525  if (type == int(StripSubdetector::TOB)) {
526  ++nhitinTOB1;
527  }
528  if (type == int(StripSubdetector::TID)) {
529  ++nhitinTID1;
530  }
531  if (type == int(StripSubdetector::TEC)) {
532  ++nhitinTEC1;
533  }
534  if (type == int(kBPIX)) {
535  ++nhitinBPIX1;
536  }
537  if (type == int(kFPIX)) {
538  ++nhitinFPIX1;
539  }
540  }
541  }
542  nHits1_spl_ = Nrechits1;
543  nHitsTIB1_spl_ = nhitinTIB1;
544  nHitsTOB1_spl_ = nhitinTOB1;
545  nHitsTID1_spl_ = nhitinTID1;
546  nHitsTEC1_spl_ = nhitinTEC1;
547  nHitsPXB1_spl_ = nhitinBPIX1;
548  nHitsPXF1_spl_ = nhitinFPIX1;
549 
550  // looping through the hits for track 2
551  int Nrechits2 = 0;
552  int nhitinTIB2 = 0;
553  int nhitinTOB2 = 0;
554  int nhitinTID2 = 0;
555  int nhitinTEC2 = 0;
556  int nhitinBPIX2 = 0;
557  int nhitinFPIX2 = 0;
558  for (auto const& hit : track2.recHits()) {
559  if (hit->isValid()) {
560  Nrechits2++;
561 
562  int type = hit->geographicalId().subdetId();
563 
564  if (type == int(StripSubdetector::TIB)) {
565  ++nhitinTIB2;
566  }
567  if (type == int(StripSubdetector::TOB)) {
568  ++nhitinTOB2;
569  }
570  if (type == int(StripSubdetector::TID)) {
571  ++nhitinTID2;
572  }
573  if (type == int(StripSubdetector::TEC)) {
574  ++nhitinTEC2;
575  }
576  if (type == int(kBPIX)) {
577  ++nhitinBPIX2;
578  }
579  if (type == int(kFPIX)) {
580  ++nhitinFPIX2;
581  }
582  }
583  }
584  nHits2_spl_ = Nrechits2;
585  nHitsTIB2_spl_ = nhitinTIB2;
586  nHitsTOB2_spl_ = nhitinTOB2;
587  nHitsTID2_spl_ = nhitinTID2;
588  nHitsTEC2_spl_ = nhitinTEC2;
589  nHitsPXB2_spl_ = nhitinBPIX2;
590  nHitsPXF2_spl_ = nhitinFPIX2;
591 
592  double ddxy_Val = track1.d0() - track2.d0();
593  double ddz_Val = track1.dz() - track2.dz();
594  double dtheta_Val = track1.theta() - track2.theta();
595  double deta_Val = track1.eta() - track2.eta();
596  double dphi_Val = track1.phi() - track2.phi();
597  double dpt_Val = track1.pt() - track2.pt();
598  double dp_Val = track1.p() - track2.p();
599  double dqoverpt_Val = track1.charge() / track1.pt() - track2.charge() / track2.pt();
600 
601  // original tracks calculations
602  reco::Track origTrack = originalTracks->at(0);
603  const math::XYZPoint& dca_org = origTrack.referencePoint();
604 
605  // looping through the hits for the original track
606  int Nrechitsorg = 0;
607  int nhitinTIBorg = 0;
608  int nhitinTOBorg = 0;
609  int nhitinTIDorg = 0;
610  int nhitinTECorg = 0;
611  int nhitinBPIXorg = 0;
612  int nhitinFPIXorg = 0;
613  for (auto const& hit : origTrack.recHits()) {
614  if (hit->isValid()) {
615  Nrechitsorg++;
616 
617  int type = hit->geographicalId().subdetId();
618 
619  if (type == int(StripSubdetector::TIB)) {
620  ++nhitinTIBorg;
621  }
622  if (type == int(StripSubdetector::TOB)) {
623  ++nhitinTOBorg;
624  }
625  if (type == int(StripSubdetector::TID)) {
626  ++nhitinTIDorg;
627  }
628  if (type == int(StripSubdetector::TEC)) {
629  ++nhitinTECorg;
630  }
631  if (type == int(kBPIX)) {
632  ++nhitinBPIXorg;
633  }
634  if (type == int(kFPIX)) {
635  ++nhitinFPIXorg;
636  }
637  }
638  }
639  nHits_org_ = Nrechitsorg;
640  nHitsTIB_org_ = nhitinTIBorg;
641  nHitsTOB_org_ = nhitinTOBorg;
642  nHitsTID_org_ = nhitinTIDorg;
643  nHitsTEC_org_ = nhitinTECorg;
644  nHitsPXB_org_ = nhitinBPIXorg;
645  nHitsPXF_org_ = nhitinFPIXorg;
646 
647  // fill tree
648  runNumber_ = iEvent.id().run();
649  luminosityBlock_ = iEvent.id().luminosityBlock();
650  eventNumber_ = iEvent.id().event();
651  // split tracks
652  dcaX1_spl_ = dca1.x();
653  dcaY1_spl_ = dca1.y();
654  dcaZ1_spl_ = dca1.z();
655  dcaX2_spl_ = dca2.x();
656  dcaY2_spl_ = dca2.y();
657  dcaZ2_spl_ = dca2.z();
658  dxy1_spl_ = track1.d0();
659  dxy2_spl_ = track2.d0();
660  ddxy_spl_ = ddxy_Val;
661  dz1_spl_ = track1.dz();
662  dz2_spl_ = track2.dz();
663  ddz_spl_ = ddz_Val;
664  theta1_spl_ = track1.theta();
665  theta2_spl_ = track2.theta();
666  dtheta_spl_ = dtheta_Val;
667  eta1_spl_ = track1.eta();
668  eta2_spl_ = track2.eta();
669  deta_spl_ = deta_Val;
670  phi1_spl_ = track1.phi();
671  phi2_spl_ = track2.phi();
672  dphi_spl_ = dphi_Val;
673  pt1_spl_ = track1.pt();
674  pt2_spl_ = track2.pt();
675  dpt_spl_ = dpt_Val;
676  p1_spl_ = track1.p();
677  p2_spl_ = track2.p();
678  dp_spl_ = dp_Val;
679  qoverpt1_spl_ = track1.charge() / track1.pt();
680  qoverpt2_spl_ = track2.charge() / track2.pt();
681  dqoverpt_spl_ = dqoverpt_Val;
682  dxy1Err_spl_ = track1.d0Error();
683  dxy2Err_spl_ = track2.d0Error();
684  dz1Err_spl_ = track1.dzError();
685  dz2Err_spl_ = track2.dzError();
686  theta1Err_spl_ = track1.thetaError();
687  theta2Err_spl_ = track2.thetaError();
688  eta1Err_spl_ = track1.etaError();
689  eta2Err_spl_ = track2.etaError();
690  phi1Err_spl_ = track1.phiError();
691  phi2Err_spl_ = track2.phiError();
692  pt1Err_spl_ = track1.ptError();
693  pt2Err_spl_ = track2.ptError();
696 
697  // original tracks
698  dcaX_org_ = dca_org.x();
699  dcaY_org_ = dca_org.y();
700  dcaZ_org_ = dca_org.z();
701  dxy_org_ = origTrack.d0();
702  dz_org_ = origTrack.dz();
703  theta_org_ = origTrack.theta();
704  eta_org_ = origTrack.eta();
705  phi_org_ = origTrack.phi();
706  pt_org_ = origTrack.pt();
707  p_org_ = origTrack.p();
708  qoverpt_org_ = origTrack.charge() / origTrack.pt();
709  norchi2_org_ = origTrack.normalizedChi2();
710 
711  dxyErr_org_ = origTrack.d0Error();
712  dzErr_org_ = origTrack.dzError();
713  thetaErr_org_ = origTrack.thetaError();
714  etaErr_org_ = origTrack.etaError();
715  phiErr_org_ = origTrack.phiError();
716  ptErr_org_ = origTrack.ptError();
718 
719  // split muons calculations
720  if (splitMuons_) {
721  reco::Muon muonTop = globalMuons->at(topGlobalMuon);
722  reco::Muon muonBottom = globalMuons->at(bottomGlobalMuon);
723 
724  reco::TrackRef glb1 = muonTop.globalTrack();
725  reco::TrackRef glb2 = muonBottom.globalTrack();
726  reco::TrackRef sta1 = muonTop.outerTrack();
727  reco::TrackRef sta2 = muonBottom.outerTrack();
728 
729  // standalone muon variables
730  dcaX1_sta_ = sta1->referencePoint().x();
731  dcaY1_sta_ = sta1->referencePoint().y();
732  dcaZ1_sta_ = sta1->referencePoint().z();
733  dcaX2_sta_ = sta2->referencePoint().x();
734  dcaY2_sta_ = sta2->referencePoint().y();
735  dcaZ2_sta_ = sta2->referencePoint().z();
736  dxy1_sta_ = sta1->d0();
737  dxy2_sta_ = sta2->d0();
738  ddxy_sta_ = sta1->d0() - sta2->d0();
739  dz1_sta_ = sta1->dz();
740  dz2_sta_ = sta2->dz();
741  ddz_sta_ = sta1->dz() - sta2->dz();
742  theta1_sta_ = sta1->theta();
743  theta2_sta_ = sta2->theta();
744  dtheta_sta_ = sta1->theta() - sta2->theta();
745  eta1_sta_ = sta1->eta();
746  eta2_sta_ = sta2->eta();
748  phi1_sta_ = sta1->phi();
749  phi2_sta_ = sta2->phi();
750  dphi_sta_ = sta1->phi() - sta2->phi();
751  pt1_sta_ = sta1->pt();
752  pt2_sta_ = sta2->pt();
753  dpt_sta_ = sta1->pt() - sta2->pt();
754  p1_sta_ = sta1->p();
755  p2_sta_ = sta2->p();
756  dp_sta_ = sta1->p() - sta2->p();
757  qoverpt1_sta_ = sta1->charge() / sta1->pt();
758  qoverpt2_sta_ = sta2->charge() / sta2->pt();
760  dxy1Err_sta_ = sta1->dxyError();
761  dxy2Err_sta_ = sta2->dxyError();
762  dz1Err_sta_ = sta1->dzError();
763  dz2Err_sta_ = sta2->dzError();
764  theta1Err_sta_ = sta1->thetaError();
765  theta2Err_sta_ = sta2->thetaError();
766  eta1Err_sta_ = sta1->etaError();
767  eta2Err_sta_ = sta2->etaError();
768  phi1Err_sta_ = sta1->phiError();
769  phi2Err_sta_ = sta2->phiError();
770  pt1Err_sta_ = sta1->ptError();
771  pt2Err_sta_ = sta2->ptError();
773  qoverpt2Err_sta_ = qoverpt2_sta_ * pt2Err_sta_ / pt2_sta_;
774 
775  // global muon variables
776  dcaX1_glb_ = glb1->referencePoint().x();
777  dcaY1_glb_ = glb1->referencePoint().y();
778  dcaZ1_glb_ = glb1->referencePoint().z();
779  dcaX2_glb_ = glb2->referencePoint().x();
780  dcaY2_glb_ = glb2->referencePoint().y();
781  dcaZ2_glb_ = glb2->referencePoint().z();
782  dxy1_glb_ = glb1->d0();
783  dxy2_glb_ = glb2->d0();
784  ddxy_glb_ = glb1->d0() - glb2->d0();
785  dz1_glb_ = glb1->dz();
786  dz2_glb_ = glb2->dz();
787  ddz_glb_ = glb1->dz() - glb2->dz();
788  theta1_glb_ = glb1->theta();
789  theta2_glb_ = glb2->theta();
790  dtheta_glb_ = glb1->theta() - glb2->theta();
791  eta1_glb_ = glb1->eta();
792  eta2_glb_ = glb2->eta();
794  phi1_glb_ = glb1->phi();
795  phi2_glb_ = glb2->phi();
796  dphi_glb_ = glb1->phi() - glb2->phi();
797  pt1_glb_ = glb1->pt();
798  pt2_glb_ = glb2->pt();
799  dpt_glb_ = glb1->pt() - glb2->pt();
800  p1_glb_ = glb1->p();
801  p2_glb_ = glb2->p();
802  dp_glb_ = glb1->p() - glb2->p();
803  qoverpt1_glb_ = glb1->charge() / glb1->pt();
804  qoverpt2_glb_ = glb2->charge() / glb2->pt();
806  norchi1_glb_ = glb1->normalizedChi2();
807  norchi2_glb_ = glb2->normalizedChi2();
808 
809  dxy1Err_glb_ = glb1->d0Error();
810  dxy2Err_glb_ = glb2->d0Error();
811  dz1Err_glb_ = glb1->dzError();
812  dz2Err_glb_ = glb2->dzError();
813  theta1Err_glb_ = glb1->thetaError();
814  theta2Err_glb_ = glb2->thetaError();
815  eta1Err_glb_ = glb1->etaError();
816  eta2Err_glb_ = glb2->etaError();
817  phi1Err_glb_ = glb1->phiError();
818  phi2Err_glb_ = glb2->phiError();
819  pt1Err_glb_ = glb1->ptError();
820  pt2Err_glb_ = glb2->ptError();
822  qoverpt2Err_glb_ = qoverpt2_glb_ * pt2Err_glb_ / pt2_glb_;
823  }
824 
825  splitterTree_->Fill();
826  }
827  }
828 }
829 
830 // ------------ method called once each job just before starting event loop ------------
832  edm::LogInfo("beginJob") << "Begin Job" << std::endl;
833 
834  splitterTree_ = tfile->make<TTree>("splitterTree", "splitterTree");
835 
836  splitterTree_->Branch("runNumber", &runNumber_, "runNumber/I");
837  splitterTree_->Branch("eventNumber", &eventNumber_, "eventNumber/I");
838  splitterTree_->Branch("luminosityBlock", &luminosityBlock_, "luminosityBlock/I");
839 
840  // split track variables
841  splitterTree_->Branch("dcaX1_spl", &dcaX1_spl_, "dcaX1_spl/D");
842  splitterTree_->Branch("dcaY1_spl", &dcaY1_spl_, "dcaY1_spl/D");
843  splitterTree_->Branch("dcaZ1_spl", &dcaZ1_spl_, "dcaZ1_spl/D");
844  splitterTree_->Branch("dcaX2_spl", &dcaX2_spl_, "dcaX2_spl/D");
845  splitterTree_->Branch("dcaY2_spl", &dcaY2_spl_, "dcaY2_spl/D");
846  splitterTree_->Branch("dcaZ2_spl", &dcaZ2_spl_, "dcaZ2_spl/D");
847  splitterTree_->Branch("dxy1_spl", &dxy1_spl_, "dxy1_spl/D");
848  splitterTree_->Branch("dxy2_spl", &dxy2_spl_, "dxy2_spl/D");
849  splitterTree_->Branch("dz1_spl", &dz1_spl_, "dz1_spl/D");
850  splitterTree_->Branch("dz2_spl", &dz2_spl_, "dz2_spl/D");
851  splitterTree_->Branch("theta1_spl", &theta1_spl_, "theta1_spl/D");
852  splitterTree_->Branch("theta2_spl", &theta2_spl_, "theta2_spl/D");
853  splitterTree_->Branch("eta1_spl", &eta1_spl_, "eta1_spl/D");
854  splitterTree_->Branch("eta2_spl", &eta2_spl_, "eta2_spl/D");
855  splitterTree_->Branch("phi1_spl", &phi1_spl_, "phi1_spl/D");
856  splitterTree_->Branch("phi2_spl", &phi2_spl_, "phi2_spl/D");
857  splitterTree_->Branch("pt1_spl", &pt1_spl_, "pt1_spl/D");
858  splitterTree_->Branch("pt2_spl", &pt2_spl_, "pt2_spl/D");
859  splitterTree_->Branch("p1_spl", &p1_spl_, "p1_spl/D");
860  splitterTree_->Branch("p2_spl", &p2_spl_, "p2_spl/D");
861  splitterTree_->Branch("qoverpt1_spl", &qoverpt1_spl_, "qoverpt1_spl/D");
862  splitterTree_->Branch("qoverpt2_spl", &qoverpt2_spl_, "qoverpt2_spl/D");
863  splitterTree_->Branch("nHits1_spl", &nHits1_spl_, "nHits1_spl/I");
864  splitterTree_->Branch("nHitsPXB1_spl", &nHitsPXB1_spl_, "nHitsPXB1_spl/I");
865  splitterTree_->Branch("nHitsPXF1_spl", &nHitsPXF1_spl_, "nHitsPXF1_spl/I");
866  splitterTree_->Branch("nHitsTIB1_spl", &nHitsTIB1_spl_, "nHitsTIB1_spl/I");
867  splitterTree_->Branch("nHitsTOB1_spl", &nHitsTOB1_spl_, "nHitsTOB1_spl/I");
868  splitterTree_->Branch("nHitsTID1_spl", &nHitsTID1_spl_, "nHitsTID1_spl/I");
869  splitterTree_->Branch("nHitsTEC1_spl", &nHitsTEC1_spl_, "nHitsTEC1_spl/I");
870  splitterTree_->Branch("nHits2_spl", &nHits2_spl_, "nHits2_spl/I");
871  splitterTree_->Branch("nHitsPXB2_spl", &nHitsPXB2_spl_, "nHitsPXB2_spl/I");
872  splitterTree_->Branch("nHitsPXF2_spl", &nHitsPXF2_spl_, "nHitsPXF2_spl/I");
873  splitterTree_->Branch("nHitsTIB2_spl", &nHitsTIB2_spl_, "nHitsTIB2_spl/I");
874  splitterTree_->Branch("nHitsTOB2_spl", &nHitsTOB2_spl_, "nHitsTOB2_spl/I");
875  splitterTree_->Branch("nHitsTID2_spl", &nHitsTID2_spl_, "nHitsTID2_spl/I");
876  splitterTree_->Branch("nHitsTEC2_spl", &nHitsTEC2_spl_, "nHitsTEC2_spl/I");
877 
878  splitterTree_->Branch("dxy1Err_spl", &dxy1Err_spl_, "dxy1Err_spl/D");
879  splitterTree_->Branch("dxy2Err_spl", &dxy2Err_spl_, "dxy2Err_spl/D");
880  splitterTree_->Branch("dz1Err_spl", &dz1Err_spl_, "dz1Err_spl/D");
881  splitterTree_->Branch("dz2Err_spl", &dz2Err_spl_, "dz2Err_spl/D");
882  splitterTree_->Branch("theta1Err_spl", &theta1Err_spl_, "theta1Err_spl/D");
883  splitterTree_->Branch("theta2Err_spl", &theta2Err_spl_, "theta2Err_spl/D");
884  splitterTree_->Branch("eta1Err_spl", &eta1Err_spl_, "eta1Err_spl/D");
885  splitterTree_->Branch("eta2Err_spl", &eta2Err_spl_, "eta2Err_spl/D");
886  splitterTree_->Branch("phi1Err_spl", &phi1Err_spl_, "phi1Err_spl/D");
887  splitterTree_->Branch("phi2Err_spl", &phi2Err_spl_, "phi2Err_spl/D");
888  splitterTree_->Branch("pt1Err_spl", &pt1Err_spl_, "pt1Err_spl/D");
889  splitterTree_->Branch("pt2Err_spl", &pt2Err_spl_, "pt2Err_spl/D");
890  splitterTree_->Branch("qoverpt1Err_spl", &qoverpt1Err_spl_, "qoverpt1Err_spl/D");
891  splitterTree_->Branch("qoverpt2Err_spl", &qoverpt2Err_spl_, "qoverpt2Err_spl/D");
892 
893  splitterTree_->Branch("dcaX_org", &dcaX_org_, "dcaX_org/D");
894  splitterTree_->Branch("dcaY_org", &dcaY_org_, "dcaY_org/D");
895  splitterTree_->Branch("dcaZ_org", &dcaZ_org_, "dcaZ_org/D");
896  splitterTree_->Branch("dxy_org", &dxy_org_, "dxy_org/D");
897  splitterTree_->Branch("dz_org", &dz_org_, "dz_org/D");
898  splitterTree_->Branch("theta_org", &theta_org_, "theta_org/D");
899  splitterTree_->Branch("eta_org", &eta_org_, "eta_org/D");
900  splitterTree_->Branch("phi_org", &phi_org_, "phi_org/D");
901  splitterTree_->Branch("pt_org", &pt_org_, "pt_org/D");
902  splitterTree_->Branch("p_org", &p_org_, "p_org/D");
903  splitterTree_->Branch("qoverpt_org", &qoverpt_org_, "qoverpt_org/D");
904  splitterTree_->Branch("norchi2_org", &norchi2_org_, "norchi2_org/D");
905 
906  splitterTree_->Branch("nHits_org", &nHits_org_, "nHits_org/I");
907  splitterTree_->Branch("nHitsPXB_org", &nHitsPXB_org_, "nHitsPXB_org/I");
908  splitterTree_->Branch("nHitsPXF_org", &nHitsPXF_org_, "nHitsPXF_org/I");
909  splitterTree_->Branch("nHitsTIB_org", &nHitsTIB_org_, "nHitsTIB_org/I");
910  splitterTree_->Branch("nHitsTOB_org", &nHitsTOB_org_, "nHitsTOB_org/I");
911  splitterTree_->Branch("nHitsTID_org", &nHitsTID_org_, "nHitsTID_org/I");
912  splitterTree_->Branch("nHitsTEC_org", &nHitsTEC_org_, "nHitsTEC_org/I");
913 
914  splitterTree_->Branch("dxyErr_org", &dxyErr_org_, "dxyErr_org/D");
915  splitterTree_->Branch("dzErr_org", &dzErr_org_, "dzErr_org/D");
916  splitterTree_->Branch("thetaErr_org", &thetaErr_org_, "thetaErr_org/D");
917  splitterTree_->Branch("etaErr_org", &etaErr_org_, "etaErr_org/D");
918  splitterTree_->Branch("phiErr_org", &phiErr_org_, "phiErr_org/D");
919  splitterTree_->Branch("ptErr_org", &ptErr_org_, "ptErr_org/D");
920  splitterTree_->Branch("qoverptErr_org", &qoverptErr_org_, "qoverptErr_org/D");
921 
922  //put the Deltas at the end of the tree, since they're the focus of the validation.
923  //this way, if you use splitterTree->Show(), they are immediately visible
924  splitterTree_->Branch("Delta_dxy", &ddxy_spl_, "Delta_dxy/D");
925  splitterTree_->Branch("Delta_dz", &ddz_spl_, "Delta_dz/D");
926  splitterTree_->Branch("Delta_theta", &dtheta_spl_, "Delta_theta/D");
927  splitterTree_->Branch("Delta_eta", &deta_spl_, "Delta_eta/D");
928  splitterTree_->Branch("Delta_phi", &dphi_spl_, "Delta_phi/D");
929  splitterTree_->Branch("Delta_pt", &dpt_spl_, "Delta_pt/D");
930  splitterTree_->Branch("Delta_p", &dp_spl_, "Delta_p/D");
931  splitterTree_->Branch("Delta_qoverpt", &dqoverpt_spl_, "Delta_qoverpt/D");
932 
933  if (splitMuons_) {
934  // standalone split
935  splitterTree_->Branch("dcaX1_sta", &dcaX1_sta_, "dcaX1_sta/D");
936  splitterTree_->Branch("dcaY1_sta", &dcaY1_sta_, "dcaY1_sta/D");
937  splitterTree_->Branch("dcaZ1_sta", &dcaZ1_sta_, "dcaZ1_sta/D");
938  splitterTree_->Branch("dcaX2_sta", &dcaX2_sta_, "dcaX2_sta/D");
939  splitterTree_->Branch("dcaY2_sta", &dcaY2_sta_, "dcaY2_sta/D");
940  splitterTree_->Branch("dcaZ2_sta", &dcaZ2_sta_, "dcaZ2_sta/D");
941  splitterTree_->Branch("dxy1_sta", &dxy1_sta_, "dxy1_sta/D");
942  splitterTree_->Branch("dxy2_sta", &dxy2_sta_, "dxy2_sta/D");
943  splitterTree_->Branch("ddxy_sta", &ddxy_sta_, "ddxy_sta/D");
944  splitterTree_->Branch("dz1_sta", &dz1_sta_, "dz1_sta/D");
945  splitterTree_->Branch("dz2_sta", &dz2_sta_, "dz2_sta/D");
946  splitterTree_->Branch("ddz_sta", &ddz_sta_, "ddz_sta/D");
947  splitterTree_->Branch("theta1_sta", &theta1_sta_, "theta1_sta/D");
948  splitterTree_->Branch("theta2_sta", &theta2_sta_, "theta2_sta/D");
949  splitterTree_->Branch("dtheta_sta", &dtheta_sta_, "dtheta_sta/D");
950  splitterTree_->Branch("eta1_sta", &eta1_sta_, "eta1_sta/D");
951  splitterTree_->Branch("eta2_sta", &eta2_sta_, "eta2_sta/D");
952  splitterTree_->Branch("deta_sta", &deta_sta_, "deta_sta/D");
953  splitterTree_->Branch("phi1_sta", &phi1_sta_, "phi1_sta/D");
954  splitterTree_->Branch("phi2_sta", &phi2_sta_, "phi2_sta/D");
955  splitterTree_->Branch("dphi_sta", &dphi_sta_, "dphi_sta/D");
956  splitterTree_->Branch("pt1_sta", &pt1_sta_, "pt1_sta/D");
957  splitterTree_->Branch("pt2_sta", &pt2_sta_, "pt2_sta/D");
958  splitterTree_->Branch("dpt_sta", &dpt_sta_, "dpt_sta/D");
959  splitterTree_->Branch("p1_sta", &p1_sta_, "p1_sta/D");
960  splitterTree_->Branch("p2_sta", &p2_sta_, "p2_sta/D");
961  splitterTree_->Branch("dp_sta", &dp_sta_, "dp_sta/D");
962 
963  splitterTree_->Branch("dxy1Err_sta", &dxy1Err_sta_, "dxy1Err_sta/D");
964  splitterTree_->Branch("dxy2Err_sta", &dxy2Err_sta_, "dxy2Err_sta/D");
965  splitterTree_->Branch("dz1Err_sta", &dz1Err_sta_, "dz1Err_sta/D");
966  splitterTree_->Branch("dz2Err_sta", &dz2Err_sta_, "dz2Err_sta/D");
967  splitterTree_->Branch("theta1Err_sta", &theta1Err_sta_, "theta1Err_sta/D");
968  splitterTree_->Branch("theta2Err_sta", &theta2Err_sta_, "theta2Err_sta/D");
969  splitterTree_->Branch("eta1Err_sta", &eta1Err_sta_, "eta1Err_sta/D");
970  splitterTree_->Branch("eta2Err_sta", &eta2Err_sta_, "eta2Err_sta/D");
971  splitterTree_->Branch("phi1Err_sta", &phi1Err_sta_, "phi1Err_sta/D");
972  splitterTree_->Branch("phi2Err_sta", &phi2Err_sta_, "phi2Err_sta/D");
973  splitterTree_->Branch("pt1Err_sta", &pt1Err_sta_, "pt1Err_sta/D");
974  splitterTree_->Branch("pt2Err_sta", &pt2Err_sta_, "pt2Err_sta/D");
975  splitterTree_->Branch("qoverpt1Err_sta", &qoverpt1Err_sta_, "qoverpt1Err_sta/D");
976  splitterTree_->Branch("qoverpt2Err_sta", &qoverpt2Err_sta_, "qoverpt2Err_sta/D");
977 
978  // global split
979  splitterTree_->Branch("dcaX1_glb", &dcaX1_glb_, "dcaX1_glb/D");
980  splitterTree_->Branch("dcaY1_glb", &dcaY1_glb_, "dcaY1_glb/D");
981  splitterTree_->Branch("dcaZ1_glb", &dcaZ1_glb_, "dcaZ1_glb/D");
982  splitterTree_->Branch("dcaX2_glb", &dcaX2_glb_, "dcaX2_glb/D");
983  splitterTree_->Branch("dcaY2_glb", &dcaY2_glb_, "dcaY2_glb/D");
984  splitterTree_->Branch("dcaZ2_glb", &dcaZ2_glb_, "dcaZ2_glb/D");
985  splitterTree_->Branch("dxy1_glb", &dxy1_glb_, "dxy1_glb/D");
986  splitterTree_->Branch("dxy2_glb", &dxy2_glb_, "dxy2_glb/D");
987  splitterTree_->Branch("ddxy_glb", &ddxy_glb_, "ddxy_glb/D");
988  splitterTree_->Branch("dz1_glb", &dz1_glb_, "dz1_glb/D");
989  splitterTree_->Branch("dz2_glb", &dz2_glb_, "dz2_glb/D");
990  splitterTree_->Branch("ddz_glb", &ddz_glb_, "ddz_glb/D");
991  splitterTree_->Branch("theta1_glb", &theta1_glb_, "theta1_glb/D");
992  splitterTree_->Branch("theta2_glb", &theta2_glb_, "theta2_glb/D");
993  splitterTree_->Branch("dtheta_glb", &dtheta_glb_, "dtheta_glb/D");
994  splitterTree_->Branch("eta1_glb", &eta1_glb_, "eta1_glb/D");
995  splitterTree_->Branch("eta2_glb", &eta2_glb_, "eta2_glb/D");
996  splitterTree_->Branch("deta_glb", &deta_glb_, "deta_glb/D");
997  splitterTree_->Branch("phi1_glb", &phi1_glb_, "phi1_glb/D");
998  splitterTree_->Branch("phi2_glb", &phi2_glb_, "phi2_glb/D");
999  splitterTree_->Branch("dphi_glb", &dphi_glb_, "dphi_glb/D");
1000  splitterTree_->Branch("pt1_glb", &pt1_glb_, "pt1_glb/D");
1001  splitterTree_->Branch("pt2_glb", &pt2_glb_, "pt2_glb/D");
1002  splitterTree_->Branch("dpt_glb", &dpt_glb_, "dpt_glb/D");
1003  splitterTree_->Branch("p1_glb", &p1_glb_, "p1_glb/D");
1004  splitterTree_->Branch("p2_glb", &p2_glb_, "p2_glb/D");
1005  splitterTree_->Branch("dp_glb", &dp_glb_, "dp_glb/D");
1006  splitterTree_->Branch("qoverpt1_glb", &qoverpt1_glb_, "qoverpt1_glb/D");
1007  splitterTree_->Branch("qoverpt2_glb", &qoverpt2_glb_, "qoverpt2_glb/D");
1008  splitterTree_->Branch("dqoverpt_glb", &dqoverpt_glb_, "dqoverpt_glb/D");
1009  splitterTree_->Branch("norchi1_glb", &norchi1_glb_, "norchi1_glb/D");
1010  splitterTree_->Branch("norchi2_glb", &norchi2_glb_, "norchi2_glb/D");
1011 
1012  splitterTree_->Branch("dxy1Err_glb", &dxy1Err_glb_, "dxy1Err_glb/D");
1013  splitterTree_->Branch("dxy2Err_glb", &dxy2Err_glb_, "dxy2Err_glb/D");
1014  splitterTree_->Branch("dz1Err_glb", &dz1Err_glb_, "dz1Err_glb/D");
1015  splitterTree_->Branch("dz2Err_glb", &dz2Err_glb_, "dz2Err_glb/D");
1016  splitterTree_->Branch("theta1Err_glb", &theta1Err_glb_, "theta1Err_glb/D");
1017  splitterTree_->Branch("theta2Err_glb", &theta2Err_glb_, "theta2Err_glb/D");
1018  splitterTree_->Branch("eta1Err_glb", &eta1Err_glb_, "eta1Err_glb/D");
1019  splitterTree_->Branch("eta2Err_glb", &eta2Err_glb_, "eta2Err_glb/D");
1020  splitterTree_->Branch("phi1Err_glb", &phi1Err_glb_, "phi1Err_glb/D");
1021  splitterTree_->Branch("phi2Err_glb", &phi2Err_glb_, "phi2Err_glb/D");
1022  splitterTree_->Branch("pt1Err_glb", &pt1Err_glb_, "pt1Err_glb/D");
1023  splitterTree_->Branch("pt2Err_glb", &pt2Err_glb_, "pt2Err_glb/D");
1024  splitterTree_->Branch("qoverpt1Err_glb", &qoverpt1Err_glb_, "qoverpt1Err_glb/D");
1025  splitterTree_->Branch("qoverpt2Err_glb", &qoverpt2Err_glb_, "qoverpt2Err_glb/D");
1026  }
1027 
1029  goldenCtr = 0;
1030  twoTracksCtr = 0;
1033 }
1034 
1035 // ------------ method called once each job just after ending the event loop ------------
1037  //std::cout << "totalTracksToAnalyzer: " << totalTracksToAnalyzer_ << std::endl;
1038  std::cout << "golden: " << goldenCtr << ", two tracks: " << twoTracksCtr << ", "
1039  << "golden+twotracks: " << goldenPlusTwoTracksCtr << ", "
1040  << "tracks+muons cuts: " << _passesTracksPlusMuonsCuts << std::endl;
1041 }
1042 
1045  e.getByToken(STAMuonsToken_, muHandle);
1046  const reco::MuonCollection& muons = *(muHandle.product());
1047  // make sure there are 2 muons
1048  if (2 != muons.size())
1049  return false;
1050 
1051  double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
1052  for (unsigned int bindex = 0; bindex < muons.size(); ++bindex) {
1053  reco::Muon mymuon = muons[bindex];
1054  // deprecated in 21x (now outerTrack)
1055  //reco::TrackRef mutrackref = mymuon.standAloneMuon();
1056  reco::TrackRef mutrackref = mymuon.outerTrack();
1057  const reco::Track* mutrack = mutrackref.get();
1058  if (0 == bindex) {
1059  mudd0 += mutrack->d0();
1060  mudphi += mutrack->phi();
1061  muddsz += mutrack->dsz();
1062  mudeta += mymuon.eta();
1063  }
1064  if (1 == bindex) {
1065  mudd0 -= mutrack->d0();
1066  mudphi -= mutrack->phi();
1067  muddsz -= mutrack->dsz();
1068  mudeta -= mymuon.eta();
1069  }
1070  }
1071  if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
1072  return true;
1073  return false;
1074 }
1075 
1076 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:38
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
type
Definition: HCALResponse.h:21
edm::Service< TFileService > tfile
EventNumber_t event() const
Definition: EventID.h:40
static constexpr auto TEC
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:632
double d0Error() const
error on d0
Definition: TrackBase.h:719
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< reco::MuonCollection > STAMuonsToken_
edm::EDGetTokenT< reco::MuonCollection > splitGlobalMuonsToken_
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:590
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:572
CosmicSplitterValidation(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
double theta() const
polar angle
Definition: TrackBase.h:581
#define nullptr
double etaError() const
error on eta
Definition: TrackBase.h:710
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
double dsz() const
dsz parameter (THIS IS NOT the SZ impact parameter to (0,0,0) if refPoint is far from (0...
Definition: TrackBase.h:593
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
const int kFPIX
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
double pt() const
track transverse momentum
Definition: TrackBase.h:602
Definition: tfile.py:1
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:696
double phiError() const
error on phi
Definition: TrackBase.h:713
auto recHits() const
Access to reconstructed hits on the track.
Definition: Track.h:85
edm::EDGetTokenT< reco::MuonCollection > originalGlobalMuonsToken_
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
static constexpr auto TOB
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:48
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:596
double dzError() const
error on dz
Definition: TrackBase.h:725
static constexpr auto TIB
T const * product() const
Definition: Handle.h:69
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::EventID id() const
Definition: EventBase.h:59
HLT enums.
bool is_gold_muon(const edm::Event &e)
int charge() const
track electric charge
Definition: TrackBase.h:575
edm::EDGetTokenT< std::vector< reco::Track > > originalTracksToken_
static constexpr auto TID
double thetaError() const
error on theta
Definition: TrackBase.h:704
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
const int kBPIX