4 : verbose_(iConfig.getParameter<
int>(
"verbose")), sector_(sector) {
6 for (
const auto wheel : wheels)
25 tracksM2.insert(tracksM2.end(), tmp.begin(), tmp.end());
27 tracksM1.insert(tracksM1.end(), tmp.begin(), tmp.end());
29 tracks0.insert(tracks0.end(), tmp.begin(), tmp.end());
31 tracksP1.insert(tracksP1.end(), tmp.begin(), tmp.end());
33 tracksP2.insert(tracksP2.end(), tmp.begin(), tmp.end());
100 if (!tracks.empty()) {
120 if (tracks.size() > 1) {
141 if (tracks.size() > 2) {
225 for (
const auto& track1 : coll1) {
228 "Pre Track charge=%d pt=%f eta=%f phi=%f curvature=%d curvature STA =%d stubs=%d bitmask=%d rank=%d chi=%d " 234 track1.curvatureAtVertex(),
235 track1.curvatureAtMuon(),
236 int(track1.stubs().size()),
241 track1.ptUnconstrained());
244 for (
const auto& track2 : coll2) {
245 if (!track1.overlapTrack(track2))
248 if (track1.rank() < track2.rank())
251 if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
255 out.push_back(track1);
266 for (
const auto& track1 : coll1) {
271 for (
const auto& track2 : coll2) {
272 if (!track1.overlapTrack(track2))
275 if (track1.rank() < track2.rank())
278 if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
282 for (
const auto& track2 : coll3) {
283 if (!track1.overlapTrack(track2))
286 if (track1.rank() < track2.rank())
289 if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
294 out.push_back(track1);
301 double pt1 = info[
i];
302 double pt2 = info[
j];
308 if (pt1 != 0.0 && pt2 != 0.0) {
310 trackInfo[
i] = trackInfo[
j];
313 if (pt2 != 0.0 && pt1 == 0.0) {
314 trackInfo[
i] = trackInfo[
j];
332 std::map<uint, L1MuKBMTrack> trackInfo;
333 std::map<uint, double> ptInfo;
338 if (minus2.size() > 1) {
339 ptInfo[0] = minus2[0].pt();
340 trackInfo[0] = minus2[0];
341 ptInfo[1] = minus2[1].pt();
342 trackInfo[1] = minus2[1];
343 }
else if (minus2.size() == 1) {
344 if (minus2[0].stubs()[0]->tag()) {
345 ptInfo[1] = minus2[0].pt();
346 trackInfo[1] = minus2[0];
348 ptInfo[0] = minus2[0].pt();
349 trackInfo[0] = minus2[0];
353 if (minus1.size() > 1) {
354 ptInfo[2] = minus1[0].pt();
355 trackInfo[2] = minus1[0];
356 ptInfo[3] = minus1[1].pt();
357 trackInfo[3] = minus1[1];
358 }
else if (minus1.size() == 1) {
359 if (minus1[0].stubs()[0]->tag()) {
360 ptInfo[3] = minus1[0].pt();
361 trackInfo[3] = minus1[0];
363 ptInfo[2] = minus1[0].pt();
364 trackInfo[2] = minus1[0];
368 if (zero.size() > 1) {
369 ptInfo[4] = zero[0].pt();
370 trackInfo[4] = zero[0];
371 ptInfo[5] = zero[1].pt();
372 trackInfo[5] = zero[1];
373 }
else if (zero.size() == 1) {
374 if (zero[0].stubs()[0]->tag()) {
375 ptInfo[5] = zero[0].pt();
376 trackInfo[5] = zero[0];
378 ptInfo[4] = zero[0].pt();
379 trackInfo[4] = zero[0];
383 if (plus1.size() > 1) {
384 ptInfo[6] = plus1[0].pt();
385 trackInfo[6] = plus1[0];
386 ptInfo[7] = plus1[1].pt();
387 trackInfo[7] = plus1[1];
388 }
else if (plus1.size() == 1) {
389 if (plus1[0].stubs()[0]->tag()) {
390 ptInfo[7] = plus1[0].pt();
391 trackInfo[7] = plus1[0];
393 ptInfo[6] = plus1[0].pt();
394 trackInfo[6] = plus1[0];
398 if (plus2.size() > 1) {
399 ptInfo[8] = plus2[0].pt();
400 trackInfo[8] = plus2[0];
401 ptInfo[9] = plus2[1].pt();
402 trackInfo[9] = plus2[1];
403 }
else if (plus2.size() == 1) {
404 if (plus2[0].stubs()[0]->tag()) {
405 ptInfo[9] = plus2[0].pt();
406 trackInfo[9] = plus2[0];
408 ptInfo[8] = plus2[0].pt();
409 trackInfo[8] = plus2[0];
414 swap(ptInfo, trackInfo, 0, 5);
415 swap(ptInfo, trackInfo, 1, 6);
416 swap(ptInfo, trackInfo, 2, 7);
417 swap(ptInfo, trackInfo, 3, 8);
418 swap(ptInfo, trackInfo, 4, 9);
420 swap(ptInfo, trackInfo, 0, 3);
421 swap(ptInfo, trackInfo, 1, 4);
422 swap(ptInfo, trackInfo, 5, 8);
423 swap(ptInfo, trackInfo, 6, 9);
425 swap(ptInfo, trackInfo, 0, 2);
426 swap(ptInfo, trackInfo, 3, 6);
427 swap(ptInfo, trackInfo, 7, 9);
429 swap(ptInfo, trackInfo, 0, 1);
430 swap(ptInfo, trackInfo, 2, 4);
431 swap(ptInfo, trackInfo, 5, 7);
432 swap(ptInfo, trackInfo, 8, 9);
434 swap(ptInfo, trackInfo, 1, 2);
435 swap(ptInfo, trackInfo, 3, 5);
436 swap(ptInfo, trackInfo, 4, 6);
437 swap(ptInfo, trackInfo, 7, 8);
439 swap(ptInfo, trackInfo, 1, 3);
440 swap(ptInfo, trackInfo, 2, 5);
441 swap(ptInfo, trackInfo, 4, 7);
442 swap(ptInfo, trackInfo, 6, 8);
444 swap(ptInfo, trackInfo, 2, 3);
447 if (ptInfo[0] != 0.0)
448 out.push_back(trackInfo[0]);
449 if (ptInfo[1] != 0.0)
450 out.push_back(trackInfo[1]);
451 if (ptInfo[2] != 0.0)
452 out.push_back(trackInfo[2]);
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)
L1MuKBMTrackCollection cleanNeighbors(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
std::vector< edm::Ref< L1MuKBMTCombinedStubCollection > > L1MuKBMTCombinedStubRefVector
void verbose(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
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)
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)
void swap(std::map< uint, double > &info, std::map< uint, L1MuKBMTrack > &trackInfo, uint i, uint j)
L1MuKBMTrackCollection cleanNeighbor(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
int trackSubAddress(bmtfAddress subAddress) const
Get part of track address (identifies track primitives used for reconstruction)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
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)
L1MuKBMTrackCollection wedgeSort(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
const int hwPt2() const
Get second compressed pT (returned int * 1.0 = pT (GeV))
~L1TMuonBarrelKalmanSectorProcessor()