CMS 3D CMS Logo

L1TMuonBarrelKalmanSectorProcessor.cc
Go to the documentation of this file.
2 
3 
4 
6  verbose_(iConfig.getParameter<int>("verbose")),
7  sector_(sector)
8 {
9  std::vector<int> wheels = iConfig.getParameter<std::vector<int> >("wheelsToProcess");
10  for (const auto wheel : wheels)
11  regions_.push_back(L1TMuonBarrelKalmanRegionModule(iConfig.getParameter<edm::ParameterSet>("regionSettings"),wheel,sector));
12 }
13 
14 
15 
17 
19 
20 
21  L1MuKBMTrackCollection pretracks;
22  for (auto& region: regions_) {
23  L1MuKBMTrackCollection tmp = region.process(trackMaker,stubsAll,bx);
24  if (!tmp.empty())
25  pretracks.insert(pretracks.end(),tmp.begin(),tmp.end());
26  }
27 
28  L1MuKBMTrackCollection out =trackMaker->cleanAndSort(pretracks,3);
29  if (verbose_==1)
30  verbose(trackMaker,out);
31 
32  return out;
33 
34 }
35 
36 
37 
38 
41  out.pt_1=0;
42  out.qual_1=0;
43  out.eta_1=0;
44  out.HF_1=0;
45  out.phi_1=0;
46  out.bx0_1=0;
47  out.charge_1=0;
48  out.chargeValid_1=0;
49  out.dxy_1=0;
50  out.addr1_1=0;
51  out.addr2_1=0;
52  out.addr3_1=0;
53  out.addr4_1=0;
54  out.reserved_1=0;
55  out.wheel_1=0;
56  out.ptSTA_1=0;
57  out.SE_1=0;
58 
59  out.pt_2=0;
60  out.qual_2=0;
61  out.eta_2=0;
62  out.HF_2=0;
63  out.phi_2=0;
64  out.bx0_2=0;
65  out.charge_2=0;
66  out.chargeValid_2=0;
67  out.dxy_2=0;
68  out.addr1_2=0;
69  out.addr2_2=0;
70  out.addr3_2=0;
71  out.addr4_2=0;
72  out.reserved_2=0;
73  out.wheel_2=0;
74  out.ptSTA_2=0;
75  out.SE_2=0;
76 
77  out.pt_3=0;
78  out.qual_3=0;
79  out.eta_3=0;
80  out.HF_3=0;
81  out.phi_3=0;
82  out.bx0_3=0;
83  out.charge_3=0;
84  out.chargeValid_3=0;
85  out.dxy_3=0;
86  out.addr1_3=0;
87  out.addr2_3=0;
88  out.addr3_3=0;
89  out.addr4_3=0;
90  out.reserved_3=0;
91  out.wheel_3=0;
92  out.ptSTA_3=0;
93  out.SE_3=0;
94 
95  if (!tracks.empty()) {
96  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[0]);
97  out.pt_1=mu.hwPt();
98  out.qual_1=mu.hwQual();
99  out.eta_1=mu.hwEta();
100  out.HF_1=mu.hwHF();
101  out.phi_1=mu.hwPhi();
102  out.bx0_1=0;
103  out.charge_1=mu.hwSign();
104  out.chargeValid_1=mu.hwSignValid();
105  out.dxy_1=mu.hwDXY();
111  out.ptSTA_1=mu.hwPt2();
112  }
113 
114  if (tracks.size()>1) {
115  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[1]);
116  out.pt_2=mu.hwPt();
117  out.qual_2=mu.hwQual();
118  out.eta_2=mu.hwEta();
119  out.HF_2=mu.hwHF();
120  out.phi_2=mu.hwPhi();
121  out.bx0_2=0;
122  out.charge_2=mu.hwSign();
123  out.chargeValid_2=mu.hwSignValid();
124  out.dxy_2=mu.hwDXY();
130  out.ptSTA_2=mu.hwPt2();
131  }
132 
133  if (tracks.size()>2) {
134  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[2]);
135  out.pt_3=mu.hwPt();
136  out.qual_3=mu.hwQual();
137  out.eta_3=mu.hwEta();
138  out.HF_3=mu.hwHF();
139  out.phi_3=mu.hwPhi();
140  out.bx0_3=0;
141  out.charge_3=mu.hwSign();
142  out.chargeValid_3=mu.hwSignValid();
143  out.dxy_3=mu.hwDXY();
149  out.ptSTA_3=mu.hwPt2();
150  }
151  return out;
152 
153 }
154 
155 
156 
157 
158 
161  if (!tracks.empty())
162  std::cout << "O "<<sector_<<" "<< out.pt_1 << " " << out.qual_1 << " " << out.eta_1 << " " << out.HF_1 << " " << out.phi_1 << " " << out.charge_1 << " " << out.chargeValid_1 << " " << out.dxy_1 <<" " << out.addr1_1<< " " << out.addr2_1 <<" " << out.addr3_1 << " " << out.addr4_1 << " " << out.wheel_1 << " " << out.ptSTA_1 << " " << out.pt_2 << " " << out.qual_2 << " " << out.eta_2 << " " << out.HF_2 << " " << out.phi_2 << " " << out.charge_2 << " " << out.chargeValid_2 << " " << out.dxy_2 <<" " << out.addr1_2<< " " << out.addr2_2 <<" " << out.addr3_2 << " " << out.addr4_2 << " " << out.wheel_2 << " " << out.ptSTA_2 << " " << out.pt_3 << " " << out.qual_3 << " " << out.eta_3 << " " << out.HF_3 << " " << out.phi_3 << " " << out.charge_3 << " " << out.chargeValid_3 << " " << out.dxy_3 <<" " << out.addr1_3<< " " << out.addr2_3 <<" " << out.addr3_3 << " " << out.addr4_3 << " " << out.wheel_3 << " " << out.ptSTA_3 << std::endl;
163 
164 
165 }
166 
167 
168 
T getParameter(std::string const &) const
l1t::RegionalMuonCand convertToBMTF(const L1MuKBMTrack &track)
std::vector< L1TMuonBarrelKalmanRegionModule > regions_
const int hwSignValid() const
Get charge sign valid bit (0 - not valid (high pT muon); 1 - valid)
const int hwDXY() const
Get compressed impact parameter (4 bits)
void verbose(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
const int hwQual() const
Get quality code.
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
const int mu
Definition: Constants.h:22
bmtf_out makeWord(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
L1MuKBMTrackCollection process(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTCombinedStubRefVector &stubs, int bx)
L1MuKBMTrackCollection cleanAndSort(const L1MuKBMTrackCollection &, uint)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int trackSubAddress(bmtfAddress subAddress) const
Get part of track address (identifies track primitives used for reconstruction)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
L1TMuonBarrelKalmanSectorProcessor(const edm::ParameterSet &, int sector)
const int hwPt2() const
Get second compressed pT (returned int * 1.0 = pT (GeV))