CMS 3D CMS Logo

L1TMuonBarrelKalmanRegionModule.cc
Go to the documentation of this file.
2 
3 
4 
6  verbose_(iConfig.getParameter<int>("verbose")),
7  sector_(sector),
8  wheel_(wheel)
9 {
10 
11  if (sector==11) {
12  nextSector_=0;
13  previousSector_ = 10;
14  }
15  else if (sector==0) {
16  nextSector_=1;
17  previousSector_ = 11;
18  }
19  else {
20  nextSector_= sector+1;
21  previousSector_ = sector-1;
22  }
23 
24  switch(wheel) {
25 
26  case -2:
27  nextWheel_=-1;
28  break;
29 
30  case -1:
31  nextWheel_=0;
32  break;
33 
34  case 0:
35  nextWheel_=999;
36  break;
37 
38  case 1:
39  nextWheel_=0;
40  break;
41 
42  case 2:
43  nextWheel_=1;
44  break;
45 
46  default:
47  nextWheel_=999;
48  break;
49  }
50 }
51 
52 
53 
55 
59  L1MuKBMTrackCollection pretracks;
60  for (const auto& stub : stubsAll) {
61  if (stub->bxNum()!=bx)
62  continue;
63 
64  if (stub->whNum()==wheel_ && stub->scNum()==sector_) {
65  seeds.push_back(stub);
66  stubs.push_back(stub);
67  }
68  else if (stub->whNum()==wheel_ && (stub->scNum()==nextSector_||stub->scNum()==previousSector_ )) {
69  stubs.push_back(stub);
70  }
71  else if (stub->whNum()==nextWheel_ && (stub->scNum()==nextSector_||stub->scNum()==previousSector_||stub->scNum()==sector_) ) {
72  stubs.push_back(stub);
73  }
74  }
75 
76  for (const auto seed : seeds) {
77  std::pair<bool,L1MuKBMTrack> trackInfo = trackMaker->chain(seed,stubs);
78  if (trackInfo.first)
79  pretracks.push_back(trackInfo.second);
80  }
81 
82  trackMaker->resolveEtaUnit(pretracks);
83  L1MuKBMTrackCollection out =trackMaker->cleanAndSort(pretracks,2);
84  if (verbose_) {
85  printf(" -----Sector Processor Kalman Tracks-----\n");
86  for (const auto& track1 :out)
87  printf("Kalman Track charge=%d pt=%f eta=%f phi=%f curvature=%d curvature STA =%d stubs=%d chi2=%d pts=%f %f\n",track1.charge(),track1.pt(),track1.eta(),track1.phi(),track1.curvatureAtVertex(),track1.curvatureAtMuon(),int(track1.stubs().size()),track1.approxChi2(),track1.pt(),track1.ptUnconstrained());
88  }
89 
90 
91  return out;
92 }
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
L1MuKBMTrackCollection process(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTCombinedStubRefVector &stubs, int bx)
std::pair< bool, L1MuKBMTrack > chain(const L1MuKBMTCombinedStubRef &, const L1MuKBMTCombinedStubRefVector &)
L1MuKBMTrackCollection cleanAndSort(const L1MuKBMTrackCollection &, uint)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:14
L1TMuonBarrelKalmanRegionModule(const edm::ParameterSet &, int wheel, int sector)
void resolveEtaUnit(L1MuKBMTrackCollection &)