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