CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
45 
47 
49 
54 
55 //
56 // class decleration
57 //
58 
59 class CosmicSplitterValidation : public edm::one::EDAnalyzer<edm::one::SharedResources> {
60 public:
62  ~CosmicSplitterValidation() override;
63 
64 private:
65  void beginJob() override;
66  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
67  void endJob() override;
68 
69  bool is_gold_muon(const edm::Event& e);
70 
76 
80  int goldenCtr;
84 
86  // ----------member data ---------------------------
87  //std::vector<AlignTransform> m_align;
88  // tree
89  TTree* splitterTree_;
90  // tree vars
92  // split track variables
107  // split track errors
115 
116  // original track variables
118  double dxy_org_, dz_org_;
121  double norchi2_org_;
124  // original track errors
128 
129  // split sta variables
140  // split sta_ errors
148 
149  // split glb_ variables
161  // split glb_ errors
169  // original glb muon variables
171  double dxy_orm_, dz_orm_;
174  double norchi2_orm_;
175  // original glb muon errors
179 
180  //consumes tokens
186 };
187 
188 //
189 // constants, enums and typedefs
190 //
191 
192 //
193 // static data member definitions
194 //
195 
196 //
197 // constructors and destructor
198 //
200  : compressionSettings_(iConfig.getUntrackedParameter<int>("compressionSettings", -1)),
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")),
207  totalTracksToAnalyzer_(0),
208  goldenCtr(0),
209  twoTracksCtr(0),
210  goldenPlusTwoTracksCtr(0),
211  _passesTracksPlusMuonsCuts(0),
212  splitterTree_(nullptr),
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) {
417  usesResource(TFileService::kSharedResource);
419  splitTracksToken_ = iC.consumes<std::vector<reco::Track>>(splitTracks_);
420  originalTracksToken_ = iC.consumes<std::vector<reco::Track>>(originalTracks_);
421  if (splitMuons_) {
424  }
425  if (checkIfGolden_)
427 }
428 
430 
431 //
432 // member functions
433 //
434 
435 // ------------ method called to for each event ------------
437  // check if golden muon
438  bool isGolden = true;
439  if (checkIfGolden_)
440  isGolden = is_gold_muon(iEvent);
441 
442  // grab collections
444  edm::Handle<std::vector<reco::Track>> originalTracks;
446  edm::Handle<reco::MuonCollection> originalGlobalMuons;
447  iEvent.getByToken(splitTracksToken_, tracks);
448  iEvent.getByToken(originalTracksToken_, originalTracks);
449  if (splitMuons_) {
450  iEvent.getByToken(splitGlobalMuonsToken_, globalMuons);
451  iEvent.getByToken(originalGlobalMuonsToken_, originalGlobalMuons);
452  }
453 
456 
458  if (isGolden)
459  goldenCtr++;
460  if (tracks->size() == 2)
461  twoTracksCtr++;
462  if (tracks->size() == 2 && originalTracks->size() == 1 && isGolden) {
464 
465  int gmCtr = 0;
466  bool topGlobalMuonFlag = false;
467  bool bottomGlobalMuonFlag = false;
468  int topGlobalMuon = -1;
469  int bottomGlobalMuon = -1;
470  double topGlobalMuonNorchi2 = 1e10;
471  double bottomGlobalMuonNorchi2 = 1e10;
472 
473  if (splitMuons_) {
474  // check if split global muons are good
475  for (std::vector<reco::Muon>::const_iterator gmI = globalMuons->begin(); gmI != globalMuons->end(); gmI++) {
476  if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
477  reco::TrackRef trackerTrackRef1(tracks, 0);
478  reco::TrackRef trackerTrackRef2(tracks, 1);
479 
480  if (gmI->innerTrack() == trackerTrackRef1) {
481  if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
482  topGlobalMuonFlag = true;
483  topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
484  topGlobalMuon = gmCtr;
485  }
486  }
487  if (gmI->innerTrack() == trackerTrackRef2) {
488  if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
489  bottomGlobalMuonFlag = true;
490  bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
491  bottomGlobalMuon = gmCtr;
492  }
493  }
494  }
495  gmCtr++;
496  }
497  }
498 
499  if ((!splitMuons_) || (splitMuons_ && bottomGlobalMuonFlag && topGlobalMuonFlag)) {
501 
502  // split tracks calculations
503  reco::Track track1 = tracks->at(0);
504  reco::Track track2 = tracks->at(1);
505 
506  const math::XYZPoint& dca1 = track1.referencePoint();
507  const math::XYZPoint& dca2 = track2.referencePoint();
508 
509  // looping through the hits for track 1
510  int Nrechits1 = 0;
511  int nhitinTIB1 = 0;
512  int nhitinTOB1 = 0;
513  int nhitinTID1 = 0;
514  int nhitinTEC1 = 0;
515  int nhitinBPIX1 = 0;
516  int nhitinFPIX1 = 0;
517  for (auto const& hit : track1.recHits()) {
518  if (hit->isValid()) {
519  Nrechits1++;
520 
521  int type = hit->geographicalId().subdetId();
522 
523  if (type == int(StripSubdetector::TIB)) {
524  ++nhitinTIB1;
525  }
526  if (type == int(StripSubdetector::TOB)) {
527  ++nhitinTOB1;
528  }
529  if (type == int(StripSubdetector::TID)) {
530  ++nhitinTID1;
531  }
532  if (type == int(StripSubdetector::TEC)) {
533  ++nhitinTEC1;
534  }
535  if (type == int(kBPIX)) {
536  ++nhitinBPIX1;
537  }
538  if (type == int(kFPIX)) {
539  ++nhitinFPIX1;
540  }
541  }
542  }
543  nHits1_spl_ = Nrechits1;
544  nHitsTIB1_spl_ = nhitinTIB1;
545  nHitsTOB1_spl_ = nhitinTOB1;
546  nHitsTID1_spl_ = nhitinTID1;
547  nHitsTEC1_spl_ = nhitinTEC1;
548  nHitsPXB1_spl_ = nhitinBPIX1;
549  nHitsPXF1_spl_ = nhitinFPIX1;
550 
551  // looping through the hits for track 2
552  int Nrechits2 = 0;
553  int nhitinTIB2 = 0;
554  int nhitinTOB2 = 0;
555  int nhitinTID2 = 0;
556  int nhitinTEC2 = 0;
557  int nhitinBPIX2 = 0;
558  int nhitinFPIX2 = 0;
559  for (auto const& hit : track2.recHits()) {
560  if (hit->isValid()) {
561  Nrechits2++;
562 
563  int type = hit->geographicalId().subdetId();
564 
565  if (type == int(StripSubdetector::TIB)) {
566  ++nhitinTIB2;
567  }
568  if (type == int(StripSubdetector::TOB)) {
569  ++nhitinTOB2;
570  }
571  if (type == int(StripSubdetector::TID)) {
572  ++nhitinTID2;
573  }
574  if (type == int(StripSubdetector::TEC)) {
575  ++nhitinTEC2;
576  }
577  if (type == int(kBPIX)) {
578  ++nhitinBPIX2;
579  }
580  if (type == int(kFPIX)) {
581  ++nhitinFPIX2;
582  }
583  }
584  }
585  nHits2_spl_ = Nrechits2;
586  nHitsTIB2_spl_ = nhitinTIB2;
587  nHitsTOB2_spl_ = nhitinTOB2;
588  nHitsTID2_spl_ = nhitinTID2;
589  nHitsTEC2_spl_ = nhitinTEC2;
590  nHitsPXB2_spl_ = nhitinBPIX2;
591  nHitsPXF2_spl_ = nhitinFPIX2;
592 
593  double ddxy_Val = track1.d0() - track2.d0();
594  double ddz_Val = track1.dz() - track2.dz();
595  double dtheta_Val = track1.theta() - track2.theta();
596  double deta_Val = track1.eta() - track2.eta();
597  double dphi_Val = track1.phi() - track2.phi();
598  double dpt_Val = track1.pt() - track2.pt();
599  double dp_Val = track1.p() - track2.p();
600  double dqoverpt_Val = track1.charge() / track1.pt() - track2.charge() / track2.pt();
601 
602  // original tracks calculations
603  reco::Track origTrack = originalTracks->at(0);
604  const math::XYZPoint& dca_org = origTrack.referencePoint();
605 
606  // looping through the hits for the original track
607  int Nrechitsorg = 0;
608  int nhitinTIBorg = 0;
609  int nhitinTOBorg = 0;
610  int nhitinTIDorg = 0;
611  int nhitinTECorg = 0;
612  int nhitinBPIXorg = 0;
613  int nhitinFPIXorg = 0;
614  for (auto const& hit : origTrack.recHits()) {
615  if (hit->isValid()) {
616  Nrechitsorg++;
617 
618  int type = hit->geographicalId().subdetId();
619 
620  if (type == int(StripSubdetector::TIB)) {
621  ++nhitinTIBorg;
622  }
623  if (type == int(StripSubdetector::TOB)) {
624  ++nhitinTOBorg;
625  }
626  if (type == int(StripSubdetector::TID)) {
627  ++nhitinTIDorg;
628  }
629  if (type == int(StripSubdetector::TEC)) {
630  ++nhitinTECorg;
631  }
632  if (type == int(kBPIX)) {
633  ++nhitinBPIXorg;
634  }
635  if (type == int(kFPIX)) {
636  ++nhitinFPIXorg;
637  }
638  }
639  }
640  nHits_org_ = Nrechitsorg;
641  nHitsTIB_org_ = nhitinTIBorg;
642  nHitsTOB_org_ = nhitinTOBorg;
643  nHitsTID_org_ = nhitinTIDorg;
644  nHitsTEC_org_ = nhitinTECorg;
645  nHitsPXB_org_ = nhitinBPIXorg;
646  nHitsPXF_org_ = nhitinFPIXorg;
647 
648  // fill tree
649  runNumber_ = iEvent.id().run();
650  luminosityBlock_ = iEvent.id().luminosityBlock();
651  eventNumber_ = iEvent.id().event();
652  // split tracks
653  dcaX1_spl_ = dca1.x();
654  dcaY1_spl_ = dca1.y();
655  dcaZ1_spl_ = dca1.z();
656  dcaX2_spl_ = dca2.x();
657  dcaY2_spl_ = dca2.y();
658  dcaZ2_spl_ = dca2.z();
659  dxy1_spl_ = track1.d0();
660  dxy2_spl_ = track2.d0();
661  ddxy_spl_ = ddxy_Val;
662  dz1_spl_ = track1.dz();
663  dz2_spl_ = track2.dz();
664  ddz_spl_ = ddz_Val;
665  theta1_spl_ = track1.theta();
666  theta2_spl_ = track2.theta();
667  dtheta_spl_ = dtheta_Val;
668  eta1_spl_ = track1.eta();
669  eta2_spl_ = track2.eta();
670  deta_spl_ = deta_Val;
671  phi1_spl_ = track1.phi();
672  phi2_spl_ = track2.phi();
673  dphi_spl_ = dphi_Val;
674  pt1_spl_ = track1.pt();
675  pt2_spl_ = track2.pt();
676  dpt_spl_ = dpt_Val;
677  p1_spl_ = track1.p();
678  p2_spl_ = track2.p();
679  dp_spl_ = dp_Val;
680  qoverpt1_spl_ = track1.charge() / track1.pt();
681  qoverpt2_spl_ = track2.charge() / track2.pt();
682  dqoverpt_spl_ = dqoverpt_Val;
683  dxy1Err_spl_ = track1.d0Error();
684  dxy2Err_spl_ = track2.d0Error();
685  dz1Err_spl_ = track1.dzError();
686  dz2Err_spl_ = track2.dzError();
687  theta1Err_spl_ = track1.thetaError();
688  theta2Err_spl_ = track2.thetaError();
689  eta1Err_spl_ = track1.etaError();
690  eta2Err_spl_ = track2.etaError();
691  phi1Err_spl_ = track1.phiError();
692  phi2Err_spl_ = track2.phiError();
693  pt1Err_spl_ = track1.ptError();
694  pt2Err_spl_ = track2.ptError();
697 
698  // original tracks
699  dcaX_org_ = dca_org.x();
700  dcaY_org_ = dca_org.y();
701  dcaZ_org_ = dca_org.z();
702  dxy_org_ = origTrack.d0();
703  dz_org_ = origTrack.dz();
704  theta_org_ = origTrack.theta();
705  eta_org_ = origTrack.eta();
706  phi_org_ = origTrack.phi();
707  pt_org_ = origTrack.pt();
708  p_org_ = origTrack.p();
709  qoverpt_org_ = origTrack.charge() / origTrack.pt();
710  norchi2_org_ = origTrack.normalizedChi2();
711 
712  dxyErr_org_ = origTrack.d0Error();
713  dzErr_org_ = origTrack.dzError();
714  thetaErr_org_ = origTrack.thetaError();
715  etaErr_org_ = origTrack.etaError();
716  phiErr_org_ = origTrack.phiError();
717  ptErr_org_ = origTrack.ptError();
719 
720  // split muons calculations
721  if (splitMuons_) {
722  reco::Muon muonTop = globalMuons->at(topGlobalMuon);
723  reco::Muon muonBottom = globalMuons->at(bottomGlobalMuon);
724 
725  reco::TrackRef glb1 = muonTop.globalTrack();
726  reco::TrackRef glb2 = muonBottom.globalTrack();
727  reco::TrackRef sta1 = muonTop.outerTrack();
728  reco::TrackRef sta2 = muonBottom.outerTrack();
729 
730  // standalone muon variables
731  dcaX1_sta_ = sta1->referencePoint().x();
732  dcaY1_sta_ = sta1->referencePoint().y();
733  dcaZ1_sta_ = sta1->referencePoint().z();
734  dcaX2_sta_ = sta2->referencePoint().x();
735  dcaY2_sta_ = sta2->referencePoint().y();
736  dcaZ2_sta_ = sta2->referencePoint().z();
737  dxy1_sta_ = sta1->d0();
738  dxy2_sta_ = sta2->d0();
739  ddxy_sta_ = sta1->d0() - sta2->d0();
740  dz1_sta_ = sta1->dz();
741  dz2_sta_ = sta2->dz();
742  ddz_sta_ = sta1->dz() - sta2->dz();
743  theta1_sta_ = sta1->theta();
744  theta2_sta_ = sta2->theta();
745  dtheta_sta_ = sta1->theta() - sta2->theta();
746  eta1_sta_ = sta1->eta();
747  eta2_sta_ = sta2->eta();
749  phi1_sta_ = sta1->phi();
750  phi2_sta_ = sta2->phi();
751  dphi_sta_ = sta1->phi() - sta2->phi();
752  pt1_sta_ = sta1->pt();
753  pt2_sta_ = sta2->pt();
754  dpt_sta_ = sta1->pt() - sta2->pt();
755  p1_sta_ = sta1->p();
756  p2_sta_ = sta2->p();
757  dp_sta_ = sta1->p() - sta2->p();
758  qoverpt1_sta_ = sta1->charge() / sta1->pt();
759  qoverpt2_sta_ = sta2->charge() / sta2->pt();
761  dxy1Err_sta_ = sta1->dxyError();
762  dxy2Err_sta_ = sta2->dxyError();
763  dz1Err_sta_ = sta1->dzError();
764  dz2Err_sta_ = sta2->dzError();
765  theta1Err_sta_ = sta1->thetaError();
766  theta2Err_sta_ = sta2->thetaError();
767  eta1Err_sta_ = sta1->etaError();
768  eta2Err_sta_ = sta2->etaError();
769  phi1Err_sta_ = sta1->phiError();
770  phi2Err_sta_ = sta2->phiError();
771  pt1Err_sta_ = sta1->ptError();
772  pt2Err_sta_ = sta2->ptError();
774  qoverpt2Err_sta_ = qoverpt2_sta_ * pt2Err_sta_ / pt2_sta_;
775 
776  // global muon variables
777  dcaX1_glb_ = glb1->referencePoint().x();
778  dcaY1_glb_ = glb1->referencePoint().y();
779  dcaZ1_glb_ = glb1->referencePoint().z();
780  dcaX2_glb_ = glb2->referencePoint().x();
781  dcaY2_glb_ = glb2->referencePoint().y();
782  dcaZ2_glb_ = glb2->referencePoint().z();
783  dxy1_glb_ = glb1->d0();
784  dxy2_glb_ = glb2->d0();
785  ddxy_glb_ = glb1->d0() - glb2->d0();
786  dz1_glb_ = glb1->dz();
787  dz2_glb_ = glb2->dz();
788  ddz_glb_ = glb1->dz() - glb2->dz();
789  theta1_glb_ = glb1->theta();
790  theta2_glb_ = glb2->theta();
791  dtheta_glb_ = glb1->theta() - glb2->theta();
792  eta1_glb_ = glb1->eta();
793  eta2_glb_ = glb2->eta();
795  phi1_glb_ = glb1->phi();
796  phi2_glb_ = glb2->phi();
797  dphi_glb_ = glb1->phi() - glb2->phi();
798  pt1_glb_ = glb1->pt();
799  pt2_glb_ = glb2->pt();
800  dpt_glb_ = glb1->pt() - glb2->pt();
801  p1_glb_ = glb1->p();
802  p2_glb_ = glb2->p();
803  dp_glb_ = glb1->p() - glb2->p();
804  qoverpt1_glb_ = glb1->charge() / glb1->pt();
805  qoverpt2_glb_ = glb2->charge() / glb2->pt();
807  norchi1_glb_ = glb1->normalizedChi2();
808  norchi2_glb_ = glb2->normalizedChi2();
809 
810  dxy1Err_glb_ = glb1->d0Error();
811  dxy2Err_glb_ = glb2->d0Error();
812  dz1Err_glb_ = glb1->dzError();
813  dz2Err_glb_ = glb2->dzError();
814  theta1Err_glb_ = glb1->thetaError();
815  theta2Err_glb_ = glb2->thetaError();
816  eta1Err_glb_ = glb1->etaError();
817  eta2Err_glb_ = glb2->etaError();
818  phi1Err_glb_ = glb1->phiError();
819  phi2Err_glb_ = glb2->phiError();
820  pt1Err_glb_ = glb1->ptError();
821  pt2Err_glb_ = glb2->ptError();
823  qoverpt2Err_glb_ = qoverpt2_glb_ * pt2Err_glb_ / pt2_glb_;
824  }
825 
826  splitterTree_->Fill();
827  }
828  }
829 }
830 
831 // ------------ method called once each job just before starting event loop ------------
833  edm::LogInfo("beginJob") << "Begin Job" << std::endl;
834 
835  if (compressionSettings_ > 0) {
836  tfile->file().SetCompressionSettings(compressionSettings_);
837  }
838 
839  splitterTree_ = tfile->make<TTree>("splitterTree", "splitterTree");
840 
841  splitterTree_->Branch("runNumber", &runNumber_, "runNumber/I");
842  splitterTree_->Branch("eventNumber", &eventNumber_, "eventNumber/I");
843  splitterTree_->Branch("luminosityBlock", &luminosityBlock_, "luminosityBlock/I");
844 
845  // split track variables
846  splitterTree_->Branch("dcaX1_spl", &dcaX1_spl_, "dcaX1_spl/D");
847  splitterTree_->Branch("dcaY1_spl", &dcaY1_spl_, "dcaY1_spl/D");
848  splitterTree_->Branch("dcaZ1_spl", &dcaZ1_spl_, "dcaZ1_spl/D");
849  splitterTree_->Branch("dcaX2_spl", &dcaX2_spl_, "dcaX2_spl/D");
850  splitterTree_->Branch("dcaY2_spl", &dcaY2_spl_, "dcaY2_spl/D");
851  splitterTree_->Branch("dcaZ2_spl", &dcaZ2_spl_, "dcaZ2_spl/D");
852  splitterTree_->Branch("dxy1_spl", &dxy1_spl_, "dxy1_spl/D");
853  splitterTree_->Branch("dxy2_spl", &dxy2_spl_, "dxy2_spl/D");
854  splitterTree_->Branch("dz1_spl", &dz1_spl_, "dz1_spl/D");
855  splitterTree_->Branch("dz2_spl", &dz2_spl_, "dz2_spl/D");
856  splitterTree_->Branch("theta1_spl", &theta1_spl_, "theta1_spl/D");
857  splitterTree_->Branch("theta2_spl", &theta2_spl_, "theta2_spl/D");
858  splitterTree_->Branch("eta1_spl", &eta1_spl_, "eta1_spl/D");
859  splitterTree_->Branch("eta2_spl", &eta2_spl_, "eta2_spl/D");
860  splitterTree_->Branch("phi1_spl", &phi1_spl_, "phi1_spl/D");
861  splitterTree_->Branch("phi2_spl", &phi2_spl_, "phi2_spl/D");
862  splitterTree_->Branch("pt1_spl", &pt1_spl_, "pt1_spl/D");
863  splitterTree_->Branch("pt2_spl", &pt2_spl_, "pt2_spl/D");
864  splitterTree_->Branch("p1_spl", &p1_spl_, "p1_spl/D");
865  splitterTree_->Branch("p2_spl", &p2_spl_, "p2_spl/D");
866  splitterTree_->Branch("qoverpt1_spl", &qoverpt1_spl_, "qoverpt1_spl/D");
867  splitterTree_->Branch("qoverpt2_spl", &qoverpt2_spl_, "qoverpt2_spl/D");
868  splitterTree_->Branch("nHits1_spl", &nHits1_spl_, "nHits1_spl/I");
869  splitterTree_->Branch("nHitsPXB1_spl", &nHitsPXB1_spl_, "nHitsPXB1_spl/I");
870  splitterTree_->Branch("nHitsPXF1_spl", &nHitsPXF1_spl_, "nHitsPXF1_spl/I");
871  splitterTree_->Branch("nHitsTIB1_spl", &nHitsTIB1_spl_, "nHitsTIB1_spl/I");
872  splitterTree_->Branch("nHitsTOB1_spl", &nHitsTOB1_spl_, "nHitsTOB1_spl/I");
873  splitterTree_->Branch("nHitsTID1_spl", &nHitsTID1_spl_, "nHitsTID1_spl/I");
874  splitterTree_->Branch("nHitsTEC1_spl", &nHitsTEC1_spl_, "nHitsTEC1_spl/I");
875  splitterTree_->Branch("nHits2_spl", &nHits2_spl_, "nHits2_spl/I");
876  splitterTree_->Branch("nHitsPXB2_spl", &nHitsPXB2_spl_, "nHitsPXB2_spl/I");
877  splitterTree_->Branch("nHitsPXF2_spl", &nHitsPXF2_spl_, "nHitsPXF2_spl/I");
878  splitterTree_->Branch("nHitsTIB2_spl", &nHitsTIB2_spl_, "nHitsTIB2_spl/I");
879  splitterTree_->Branch("nHitsTOB2_spl", &nHitsTOB2_spl_, "nHitsTOB2_spl/I");
880  splitterTree_->Branch("nHitsTID2_spl", &nHitsTID2_spl_, "nHitsTID2_spl/I");
881  splitterTree_->Branch("nHitsTEC2_spl", &nHitsTEC2_spl_, "nHitsTEC2_spl/I");
882 
883  splitterTree_->Branch("dxy1Err_spl", &dxy1Err_spl_, "dxy1Err_spl/D");
884  splitterTree_->Branch("dxy2Err_spl", &dxy2Err_spl_, "dxy2Err_spl/D");
885  splitterTree_->Branch("dz1Err_spl", &dz1Err_spl_, "dz1Err_spl/D");
886  splitterTree_->Branch("dz2Err_spl", &dz2Err_spl_, "dz2Err_spl/D");
887  splitterTree_->Branch("theta1Err_spl", &theta1Err_spl_, "theta1Err_spl/D");
888  splitterTree_->Branch("theta2Err_spl", &theta2Err_spl_, "theta2Err_spl/D");
889  splitterTree_->Branch("eta1Err_spl", &eta1Err_spl_, "eta1Err_spl/D");
890  splitterTree_->Branch("eta2Err_spl", &eta2Err_spl_, "eta2Err_spl/D");
891  splitterTree_->Branch("phi1Err_spl", &phi1Err_spl_, "phi1Err_spl/D");
892  splitterTree_->Branch("phi2Err_spl", &phi2Err_spl_, "phi2Err_spl/D");
893  splitterTree_->Branch("pt1Err_spl", &pt1Err_spl_, "pt1Err_spl/D");
894  splitterTree_->Branch("pt2Err_spl", &pt2Err_spl_, "pt2Err_spl/D");
895  splitterTree_->Branch("qoverpt1Err_spl", &qoverpt1Err_spl_, "qoverpt1Err_spl/D");
896  splitterTree_->Branch("qoverpt2Err_spl", &qoverpt2Err_spl_, "qoverpt2Err_spl/D");
897 
898  splitterTree_->Branch("dcaX_org", &dcaX_org_, "dcaX_org/D");
899  splitterTree_->Branch("dcaY_org", &dcaY_org_, "dcaY_org/D");
900  splitterTree_->Branch("dcaZ_org", &dcaZ_org_, "dcaZ_org/D");
901  splitterTree_->Branch("dxy_org", &dxy_org_, "dxy_org/D");
902  splitterTree_->Branch("dz_org", &dz_org_, "dz_org/D");
903  splitterTree_->Branch("theta_org", &theta_org_, "theta_org/D");
904  splitterTree_->Branch("eta_org", &eta_org_, "eta_org/D");
905  splitterTree_->Branch("phi_org", &phi_org_, "phi_org/D");
906  splitterTree_->Branch("pt_org", &pt_org_, "pt_org/D");
907  splitterTree_->Branch("p_org", &p_org_, "p_org/D");
908  splitterTree_->Branch("qoverpt_org", &qoverpt_org_, "qoverpt_org/D");
909  splitterTree_->Branch("norchi2_org", &norchi2_org_, "norchi2_org/D");
910 
911  splitterTree_->Branch("nHits_org", &nHits_org_, "nHits_org/I");
912  splitterTree_->Branch("nHitsPXB_org", &nHitsPXB_org_, "nHitsPXB_org/I");
913  splitterTree_->Branch("nHitsPXF_org", &nHitsPXF_org_, "nHitsPXF_org/I");
914  splitterTree_->Branch("nHitsTIB_org", &nHitsTIB_org_, "nHitsTIB_org/I");
915  splitterTree_->Branch("nHitsTOB_org", &nHitsTOB_org_, "nHitsTOB_org/I");
916  splitterTree_->Branch("nHitsTID_org", &nHitsTID_org_, "nHitsTID_org/I");
917  splitterTree_->Branch("nHitsTEC_org", &nHitsTEC_org_, "nHitsTEC_org/I");
918 
919  splitterTree_->Branch("dxyErr_org", &dxyErr_org_, "dxyErr_org/D");
920  splitterTree_->Branch("dzErr_org", &dzErr_org_, "dzErr_org/D");
921  splitterTree_->Branch("thetaErr_org", &thetaErr_org_, "thetaErr_org/D");
922  splitterTree_->Branch("etaErr_org", &etaErr_org_, "etaErr_org/D");
923  splitterTree_->Branch("phiErr_org", &phiErr_org_, "phiErr_org/D");
924  splitterTree_->Branch("ptErr_org", &ptErr_org_, "ptErr_org/D");
925  splitterTree_->Branch("qoverptErr_org", &qoverptErr_org_, "qoverptErr_org/D");
926 
927  //put the Deltas at the end of the tree, since they're the focus of the validation.
928  //this way, if you use splitterTree->Show(), they are immediately visible
929  splitterTree_->Branch("Delta_dxy", &ddxy_spl_, "Delta_dxy/D");
930  splitterTree_->Branch("Delta_dz", &ddz_spl_, "Delta_dz/D");
931  splitterTree_->Branch("Delta_theta", &dtheta_spl_, "Delta_theta/D");
932  splitterTree_->Branch("Delta_eta", &deta_spl_, "Delta_eta/D");
933  splitterTree_->Branch("Delta_phi", &dphi_spl_, "Delta_phi/D");
934  splitterTree_->Branch("Delta_pt", &dpt_spl_, "Delta_pt/D");
935  splitterTree_->Branch("Delta_p", &dp_spl_, "Delta_p/D");
936  splitterTree_->Branch("Delta_qoverpt", &dqoverpt_spl_, "Delta_qoverpt/D");
937 
938  if (splitMuons_) {
939  // standalone split
940  splitterTree_->Branch("dcaX1_sta", &dcaX1_sta_, "dcaX1_sta/D");
941  splitterTree_->Branch("dcaY1_sta", &dcaY1_sta_, "dcaY1_sta/D");
942  splitterTree_->Branch("dcaZ1_sta", &dcaZ1_sta_, "dcaZ1_sta/D");
943  splitterTree_->Branch("dcaX2_sta", &dcaX2_sta_, "dcaX2_sta/D");
944  splitterTree_->Branch("dcaY2_sta", &dcaY2_sta_, "dcaY2_sta/D");
945  splitterTree_->Branch("dcaZ2_sta", &dcaZ2_sta_, "dcaZ2_sta/D");
946  splitterTree_->Branch("dxy1_sta", &dxy1_sta_, "dxy1_sta/D");
947  splitterTree_->Branch("dxy2_sta", &dxy2_sta_, "dxy2_sta/D");
948  splitterTree_->Branch("ddxy_sta", &ddxy_sta_, "ddxy_sta/D");
949  splitterTree_->Branch("dz1_sta", &dz1_sta_, "dz1_sta/D");
950  splitterTree_->Branch("dz2_sta", &dz2_sta_, "dz2_sta/D");
951  splitterTree_->Branch("ddz_sta", &ddz_sta_, "ddz_sta/D");
952  splitterTree_->Branch("theta1_sta", &theta1_sta_, "theta1_sta/D");
953  splitterTree_->Branch("theta2_sta", &theta2_sta_, "theta2_sta/D");
954  splitterTree_->Branch("dtheta_sta", &dtheta_sta_, "dtheta_sta/D");
955  splitterTree_->Branch("eta1_sta", &eta1_sta_, "eta1_sta/D");
956  splitterTree_->Branch("eta2_sta", &eta2_sta_, "eta2_sta/D");
957  splitterTree_->Branch("deta_sta", &deta_sta_, "deta_sta/D");
958  splitterTree_->Branch("phi1_sta", &phi1_sta_, "phi1_sta/D");
959  splitterTree_->Branch("phi2_sta", &phi2_sta_, "phi2_sta/D");
960  splitterTree_->Branch("dphi_sta", &dphi_sta_, "dphi_sta/D");
961  splitterTree_->Branch("pt1_sta", &pt1_sta_, "pt1_sta/D");
962  splitterTree_->Branch("pt2_sta", &pt2_sta_, "pt2_sta/D");
963  splitterTree_->Branch("dpt_sta", &dpt_sta_, "dpt_sta/D");
964  splitterTree_->Branch("p1_sta", &p1_sta_, "p1_sta/D");
965  splitterTree_->Branch("p2_sta", &p2_sta_, "p2_sta/D");
966  splitterTree_->Branch("dp_sta", &dp_sta_, "dp_sta/D");
967 
968  splitterTree_->Branch("dxy1Err_sta", &dxy1Err_sta_, "dxy1Err_sta/D");
969  splitterTree_->Branch("dxy2Err_sta", &dxy2Err_sta_, "dxy2Err_sta/D");
970  splitterTree_->Branch("dz1Err_sta", &dz1Err_sta_, "dz1Err_sta/D");
971  splitterTree_->Branch("dz2Err_sta", &dz2Err_sta_, "dz2Err_sta/D");
972  splitterTree_->Branch("theta1Err_sta", &theta1Err_sta_, "theta1Err_sta/D");
973  splitterTree_->Branch("theta2Err_sta", &theta2Err_sta_, "theta2Err_sta/D");
974  splitterTree_->Branch("eta1Err_sta", &eta1Err_sta_, "eta1Err_sta/D");
975  splitterTree_->Branch("eta2Err_sta", &eta2Err_sta_, "eta2Err_sta/D");
976  splitterTree_->Branch("phi1Err_sta", &phi1Err_sta_, "phi1Err_sta/D");
977  splitterTree_->Branch("phi2Err_sta", &phi2Err_sta_, "phi2Err_sta/D");
978  splitterTree_->Branch("pt1Err_sta", &pt1Err_sta_, "pt1Err_sta/D");
979  splitterTree_->Branch("pt2Err_sta", &pt2Err_sta_, "pt2Err_sta/D");
980  splitterTree_->Branch("qoverpt1Err_sta", &qoverpt1Err_sta_, "qoverpt1Err_sta/D");
981  splitterTree_->Branch("qoverpt2Err_sta", &qoverpt2Err_sta_, "qoverpt2Err_sta/D");
982 
983  // global split
984  splitterTree_->Branch("dcaX1_glb", &dcaX1_glb_, "dcaX1_glb/D");
985  splitterTree_->Branch("dcaY1_glb", &dcaY1_glb_, "dcaY1_glb/D");
986  splitterTree_->Branch("dcaZ1_glb", &dcaZ1_glb_, "dcaZ1_glb/D");
987  splitterTree_->Branch("dcaX2_glb", &dcaX2_glb_, "dcaX2_glb/D");
988  splitterTree_->Branch("dcaY2_glb", &dcaY2_glb_, "dcaY2_glb/D");
989  splitterTree_->Branch("dcaZ2_glb", &dcaZ2_glb_, "dcaZ2_glb/D");
990  splitterTree_->Branch("dxy1_glb", &dxy1_glb_, "dxy1_glb/D");
991  splitterTree_->Branch("dxy2_glb", &dxy2_glb_, "dxy2_glb/D");
992  splitterTree_->Branch("ddxy_glb", &ddxy_glb_, "ddxy_glb/D");
993  splitterTree_->Branch("dz1_glb", &dz1_glb_, "dz1_glb/D");
994  splitterTree_->Branch("dz2_glb", &dz2_glb_, "dz2_glb/D");
995  splitterTree_->Branch("ddz_glb", &ddz_glb_, "ddz_glb/D");
996  splitterTree_->Branch("theta1_glb", &theta1_glb_, "theta1_glb/D");
997  splitterTree_->Branch("theta2_glb", &theta2_glb_, "theta2_glb/D");
998  splitterTree_->Branch("dtheta_glb", &dtheta_glb_, "dtheta_glb/D");
999  splitterTree_->Branch("eta1_glb", &eta1_glb_, "eta1_glb/D");
1000  splitterTree_->Branch("eta2_glb", &eta2_glb_, "eta2_glb/D");
1001  splitterTree_->Branch("deta_glb", &deta_glb_, "deta_glb/D");
1002  splitterTree_->Branch("phi1_glb", &phi1_glb_, "phi1_glb/D");
1003  splitterTree_->Branch("phi2_glb", &phi2_glb_, "phi2_glb/D");
1004  splitterTree_->Branch("dphi_glb", &dphi_glb_, "dphi_glb/D");
1005  splitterTree_->Branch("pt1_glb", &pt1_glb_, "pt1_glb/D");
1006  splitterTree_->Branch("pt2_glb", &pt2_glb_, "pt2_glb/D");
1007  splitterTree_->Branch("dpt_glb", &dpt_glb_, "dpt_glb/D");
1008  splitterTree_->Branch("p1_glb", &p1_glb_, "p1_glb/D");
1009  splitterTree_->Branch("p2_glb", &p2_glb_, "p2_glb/D");
1010  splitterTree_->Branch("dp_glb", &dp_glb_, "dp_glb/D");
1011  splitterTree_->Branch("qoverpt1_glb", &qoverpt1_glb_, "qoverpt1_glb/D");
1012  splitterTree_->Branch("qoverpt2_glb", &qoverpt2_glb_, "qoverpt2_glb/D");
1013  splitterTree_->Branch("dqoverpt_glb", &dqoverpt_glb_, "dqoverpt_glb/D");
1014  splitterTree_->Branch("norchi1_glb", &norchi1_glb_, "norchi1_glb/D");
1015  splitterTree_->Branch("norchi2_glb", &norchi2_glb_, "norchi2_glb/D");
1016 
1017  splitterTree_->Branch("dxy1Err_glb", &dxy1Err_glb_, "dxy1Err_glb/D");
1018  splitterTree_->Branch("dxy2Err_glb", &dxy2Err_glb_, "dxy2Err_glb/D");
1019  splitterTree_->Branch("dz1Err_glb", &dz1Err_glb_, "dz1Err_glb/D");
1020  splitterTree_->Branch("dz2Err_glb", &dz2Err_glb_, "dz2Err_glb/D");
1021  splitterTree_->Branch("theta1Err_glb", &theta1Err_glb_, "theta1Err_glb/D");
1022  splitterTree_->Branch("theta2Err_glb", &theta2Err_glb_, "theta2Err_glb/D");
1023  splitterTree_->Branch("eta1Err_glb", &eta1Err_glb_, "eta1Err_glb/D");
1024  splitterTree_->Branch("eta2Err_glb", &eta2Err_glb_, "eta2Err_glb/D");
1025  splitterTree_->Branch("phi1Err_glb", &phi1Err_glb_, "phi1Err_glb/D");
1026  splitterTree_->Branch("phi2Err_glb", &phi2Err_glb_, "phi2Err_glb/D");
1027  splitterTree_->Branch("pt1Err_glb", &pt1Err_glb_, "pt1Err_glb/D");
1028  splitterTree_->Branch("pt2Err_glb", &pt2Err_glb_, "pt2Err_glb/D");
1029  splitterTree_->Branch("qoverpt1Err_glb", &qoverpt1Err_glb_, "qoverpt1Err_glb/D");
1030  splitterTree_->Branch("qoverpt2Err_glb", &qoverpt2Err_glb_, "qoverpt2Err_glb/D");
1031  }
1032 
1034  goldenCtr = 0;
1035  twoTracksCtr = 0;
1038 }
1039 
1040 // ------------ method called once each job just after ending the event loop ------------
1042  //std::cout << "totalTracksToAnalyzer: " << totalTracksToAnalyzer_ << std::endl;
1043  std::cout << "golden: " << goldenCtr << ", two tracks: " << twoTracksCtr << ", "
1044  << "golden+twotracks: " << goldenPlusTwoTracksCtr << ", "
1045  << "tracks+muons cuts: " << _passesTracksPlusMuonsCuts << std::endl;
1046 }
1047 
1050  e.getByToken(STAMuonsToken_, muHandle);
1051  const reco::MuonCollection& muons = *(muHandle.product());
1052  // make sure there are 2 muons
1053  if (2 != muons.size())
1054  return false;
1055 
1056  double mudd0 = 0., mudphi = 0., muddsz = 0., mudeta = 0.;
1057  for (unsigned int bindex = 0; bindex < muons.size(); ++bindex) {
1058  reco::Muon mymuon = muons[bindex];
1059  // deprecated in 21x (now outerTrack)
1060  //reco::TrackRef mutrackref = mymuon.standAloneMuon();
1061  reco::TrackRef mutrackref = mymuon.outerTrack();
1062  const reco::Track* mutrack = mutrackref.get();
1063  if (0 == bindex) {
1064  mudd0 += mutrack->d0();
1065  mudphi += mutrack->phi();
1066  muddsz += mutrack->dsz();
1067  mudeta += mymuon.eta();
1068  }
1069  if (1 == bindex) {
1070  mudd0 -= mutrack->d0();
1071  mudphi -= mutrack->phi();
1072  muddsz -= mutrack->dsz();
1073  mudeta -= mymuon.eta();
1074  }
1075  }
1076  if ((fabs(mudd0) < 15.0) && (fabs(mudphi) < 0.045) && (fabs(muddsz) < 20.0) && (fabs(mudeta) < 0.060))
1077  return true;
1078  return false;
1079 }
1080 
1081 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:38
static const char runNumber_[]
static const std::string kSharedResource
Definition: TFileService.h:76
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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:667
double d0Error() const
error on d0
Definition: TrackBase.h:772
edm::EDGetTokenT< reco::MuonCollection > STAMuonsToken_
edm::EDGetTokenT< reco::MuonCollection > splitGlobalMuonsToken_
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:611
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:593
CosmicSplitterValidation(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
double theta() const
polar angle
Definition: TrackBase.h:602
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
double etaError() const
error on eta
Definition: TrackBase.h:763
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
auto const & tracks
cannot be loose
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:614
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
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
double pt() const
track transverse momentum
Definition: TrackBase.h:637
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:754
double phiError() const
error on phi
Definition: TrackBase.h:766
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:622
double dzError() const
error on dz
Definition: TrackBase.h:778
Log< level::Info, false > LogInfo
TFile & file() const
return opened TFile
Definition: TFileService.h:37
static constexpr auto TIB
T const * product() const
Definition: Handle.h:70
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::EventID id() const
Definition: EventBase.h:59
tuple muons
Definition: patZpeak.py:39
bool is_gold_muon(const edm::Event &e)
tuple cout
Definition: gather_cfg.py:144
int charge() const
track electric charge
Definition: TrackBase.h:596
edm::EDGetTokenT< std::vector< reco::Track > > originalTracksToken_
static constexpr auto TID
double thetaError() const
error on theta
Definition: TrackBase.h:757
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
const int kBPIX
double eta() const final
momentum pseudorapidity