CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
L1TMuonBarrelKalmanSectorProcessor Class Reference

#include <L1TMuonBarrelKalmanSectorProcessor.h>

Classes

struct  bmtf_out
 
class  TrackSorter
 

Public Member Functions

 L1TMuonBarrelKalmanSectorProcessor (const edm::ParameterSet &, int sector)
 
L1MuKBMTrackCollection process (L1TMuonBarrelKalmanAlgo *, const L1MuKBMTCombinedStubRefVector &stubs, int bx)
 
void verbose (L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
 
 ~L1TMuonBarrelKalmanSectorProcessor ()
 

Private Member Functions

L1MuKBMTrackCollection cleanNeighbor (const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
 
L1MuKBMTrackCollection cleanNeighbors (const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
 
bmtf_out makeWord (L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
 
L1MuKBMTrackCollection wedgeSort (const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
 

Private Attributes

std::vector< L1TMuonBarrelKalmanRegionModuleregions_
 
int sector_
 
int verbose_
 

Detailed Description

Definition at line 10 of file L1TMuonBarrelKalmanSectorProcessor.h.

Constructor & Destructor Documentation

L1TMuonBarrelKalmanSectorProcessor::L1TMuonBarrelKalmanSectorProcessor ( const edm::ParameterSet iConfig,
int  sector 
)
L1TMuonBarrelKalmanSectorProcessor::~L1TMuonBarrelKalmanSectorProcessor ( )

Definition at line 11 of file L1TMuonBarrelKalmanSectorProcessor.cc.

11 {}

Member Function Documentation

L1MuKBMTrackCollection L1TMuonBarrelKalmanSectorProcessor::cleanNeighbor ( const L1MuKBMTrackCollection coll1,
const L1MuKBMTrackCollection coll2 
)
private

Definition at line 221 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References createfilelist::int, keep, MillePedeFileConverter_cfg::out, and verbose_.

Referenced by wedgeSort().

222  {
224 
225  for (const auto& track1 : coll1) {
226  if (verbose_)
227  printf(
228  "Pre Track charge=%d pt=%f eta=%f phi=%f curvature=%d curvature STA =%d stubs=%d bitmask=%d rank=%d chi=%d "
229  "pts=%f %f\n",
230  track1.charge(),
231  track1.pt(),
232  track1.eta(),
233  track1.phi(),
234  track1.curvatureAtVertex(),
235  track1.curvatureAtMuon(),
236  int(track1.stubs().size()),
237  track1.hitPattern(),
238  track1.rank(),
239  track1.approxChi2(),
240  track1.pt(),
241  track1.ptUnconstrained());
242 
243  bool keep = true;
244  for (const auto& track2 : coll2) {
245  if (!track1.overlapTrack(track2))
246  continue;
247 
248  if (track1.rank() < track2.rank())
249  keep = false;
250 
251  if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
252  keep = false;
253  }
254  if (keep)
255  out.push_back(track1);
256  }
257 
258  return out;
259 }
const int keep
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
L1MuKBMTrackCollection L1TMuonBarrelKalmanSectorProcessor::cleanNeighbors ( const L1MuKBMTrackCollection coll1,
const L1MuKBMTrackCollection coll2,
const L1MuKBMTrackCollection coll3 
)
private

Definition at line 261 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References keep, and MillePedeFileConverter_cfg::out.

Referenced by wedgeSort().

263  {
265 
266  for (const auto& track1 : coll1) {
267  // if (verbose_)
268  // printf("Pre Track charge=%d pt=%f eta=%f phi=%f curvature=%d curvature STA =%d stubs=%d bitmask=%d rank=%d chi=%d pts=%f %f\n",track1.charge(),track1.pt(),track1.eta(),track1.phi(),track1.curvatureAtVertex(),track1.curvatureAtMuon(),int(track1.stubs().size()),track1.hitPattern(),track1.rank(),track1.approxChi2(),track1.pt(),track1.ptUnconstrained());
269 
270  bool keep = true;
271  for (const auto& track2 : coll2) {
272  if (!track1.overlapTrack(track2))
273  continue;
274 
275  if (track1.rank() < track2.rank())
276  keep = false;
277 
278  if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
279  keep = false;
280  }
281 
282  for (const auto& track2 : coll3) {
283  if (!track1.overlapTrack(track2))
284  continue;
285 
286  if (track1.rank() < track2.rank())
287  keep = false;
288 
289  if ((track1.rank() == track2.rank()) && (fabs(track1.stubs()[0]->whNum()) < fabs(track2.stubs()[0]->whNum())))
290  keep = false;
291  }
292 
293  if (keep)
294  out.push_back(track1);
295  }
296 
297  return out;
298 }
const int keep
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
L1TMuonBarrelKalmanSectorProcessor::bmtf_out L1TMuonBarrelKalmanSectorProcessor::makeWord ( L1TMuonBarrelKalmanAlgo trackMaker,
const L1MuKBMTrackCollection tracks 
)
private

Definition at line 43 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::bx0_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::bx0_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::bx0_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_3, L1TMuonBarrelKalmanAlgo::convertToBMTF(), L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_3, l1t::RegionalMuonCand::hwDXY(), l1t::RegionalMuonCand::hwEta(), l1t::RegionalMuonCand::hwHF(), l1t::RegionalMuonCand::hwPhi(), l1t::RegionalMuonCand::hwPt(), l1t::RegionalMuonCand::hwPt2(), l1t::RegionalMuonCand::hwQual(), l1t::RegionalMuonCand::hwSign(), l1t::RegionalMuonCand::hwSignValid(), l1t::RegionalMuonCand::kStat1, l1t::RegionalMuonCand::kStat2, l1t::RegionalMuonCand::kStat3, l1t::RegionalMuonCand::kStat4, l1t::RegionalMuonCand::kWheelNum, l1t::RegionalMuonCand::kWheelSide, amptDefaultParameters_cff::mu, MillePedeFileConverter_cfg::out, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::reserved_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::reserved_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::reserved_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::SE_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::SE_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::SE_3, l1t::RegionalMuonCand::trackSubAddress(), L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_2, and L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_3.

Referenced by verbose().

44  {
46  out.pt_1 = 0;
47  out.qual_1 = 0;
48  out.eta_1 = 0;
49  out.HF_1 = 0;
50  out.phi_1 = 0;
51  out.bx0_1 = 0;
52  out.charge_1 = 0;
53  out.chargeValid_1 = 0;
54  out.dxy_1 = 0;
55  out.addr1_1 = 3;
56  out.addr2_1 = 15;
57  out.addr3_1 = 15;
58  out.addr4_1 = 15;
59  out.reserved_1 = 0;
60  out.wheel_1 = 0;
61  out.ptSTA_1 = 0;
62  out.SE_1 = 0;
63 
64  out.pt_2 = 0;
65  out.qual_2 = 0;
66  out.eta_2 = 0;
67  out.HF_2 = 0;
68  out.phi_2 = 0;
69  out.bx0_2 = 0;
70  out.charge_2 = 0;
71  out.chargeValid_2 = 0;
72  out.dxy_2 = 0;
73  out.addr1_2 = 3;
74  out.addr2_2 = 15;
75  out.addr3_2 = 15;
76  out.addr4_2 = 15;
77  out.reserved_2 = 0;
78  out.wheel_2 = 0;
79  out.ptSTA_2 = 0;
80  out.SE_2 = 0;
81 
82  out.pt_3 = 0;
83  out.qual_3 = 0;
84  out.eta_3 = 0;
85  out.HF_3 = 0;
86  out.phi_3 = 0;
87  out.bx0_3 = 0;
88  out.charge_3 = 0;
89  out.chargeValid_3 = 0;
90  out.dxy_3 = 0;
91  out.addr1_3 = 3;
92  out.addr2_3 = 15;
93  out.addr3_3 = 15;
94  out.addr4_3 = 15;
95  out.reserved_3 = 0;
96  out.wheel_3 = 0;
97  out.ptSTA_3 = 0;
98  out.SE_3 = 0;
99 
100  if (!tracks.empty()) {
101  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[0]);
102  out.pt_1 = mu.hwPt();
103  out.qual_1 = mu.hwQual();
104  out.eta_1 = mu.hwEta();
105  out.HF_1 = mu.hwHF();
106  out.phi_1 = mu.hwPhi();
107  out.bx0_1 = 0;
108  out.charge_1 = mu.hwSign();
109  out.chargeValid_1 = mu.hwSignValid();
110  out.dxy_1 = mu.hwDXY();
117  out.ptSTA_1 = mu.hwPt2();
118  }
119 
120  if (tracks.size() > 1) {
121  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[1]);
122  out.pt_2 = mu.hwPt();
123  out.qual_2 = mu.hwQual();
124  out.eta_2 = mu.hwEta();
125  out.HF_2 = mu.hwHF();
126  out.phi_2 = mu.hwPhi();
127  out.bx0_2 = 0;
128  out.charge_2 = mu.hwSign();
129  out.chargeValid_2 = mu.hwSignValid();
130  out.dxy_2 = mu.hwDXY();
137 
138  out.ptSTA_2 = mu.hwPt2();
139  }
140 
141  if (tracks.size() > 2) {
142  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[2]);
143  out.pt_3 = mu.hwPt();
144  out.qual_3 = mu.hwQual();
145  out.eta_3 = mu.hwEta();
146  out.HF_3 = mu.hwHF();
147  out.phi_3 = mu.hwPhi();
148  out.bx0_3 = 0;
149  out.charge_3 = mu.hwSign();
150  out.chargeValid_3 = mu.hwSignValid();
151  out.dxy_3 = mu.hwDXY();
158  out.ptSTA_3 = mu.hwPt2();
159  }
160  return out;
161 }
l1t::RegionalMuonCand convertToBMTF(const L1MuKBMTrack &track)
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)
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 hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
int trackSubAddress(bmtfAddress subAddress) const
Get part of track address (identifies track primitives used for reconstruction)
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
const int hwPt2() const
Get second compressed pT (returned int * 1.0 = pT (GeV))
L1MuKBMTrackCollection L1TMuonBarrelKalmanSectorProcessor::process ( L1TMuonBarrelKalmanAlgo trackMaker,
const L1MuKBMTCombinedStubRefVector stubs,
int  bx 
)

Definition at line 13 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References MillePedeFileConverter_cfg::out, HLT_2018_cff::region, regions_, createJobs::tmp, verbose(), verbose_, and wedgeSort().

15  {
16  L1MuKBMTrackCollection tracksM2;
17  L1MuKBMTrackCollection tracksM1;
18  L1MuKBMTrackCollection tracks0;
19  L1MuKBMTrackCollection tracksP1;
20  L1MuKBMTrackCollection tracksP2;
21 
22  for (auto& region : regions_) {
23  L1MuKBMTrackCollection tmp = region.process(trackMaker, stubsAll, bx);
24  if (region.wheel() == -2)
25  tracksM2.insert(tracksM2.end(), tmp.begin(), tmp.end());
26  if (region.wheel() == -1)
27  tracksM1.insert(tracksM1.end(), tmp.begin(), tmp.end());
28  if (region.wheel() == 0)
29  tracks0.insert(tracks0.end(), tmp.begin(), tmp.end());
30  if (region.wheel() == 1)
31  tracksP1.insert(tracksP1.end(), tmp.begin(), tmp.end());
32  if (region.wheel() == 2)
33  tracksP2.insert(tracksP2.end(), tmp.begin(), tmp.end());
34  }
35 
36  L1MuKBMTrackCollection out = wedgeSort(tracksM2, tracksM1, tracks0, tracksP1, tracksP2);
37  if (verbose_ == 1)
38  verbose(trackMaker, out);
39 
40  return out;
41 }
std::vector< L1TMuonBarrelKalmanRegionModule > regions_
void verbose(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15
L1MuKBMTrackCollection wedgeSort(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
tmp
align.sh
Definition: createJobs.py:716
void L1TMuonBarrelKalmanSectorProcessor::verbose ( L1TMuonBarrelKalmanAlgo algo,
const L1MuKBMTrackCollection tracks 
)

Definition at line 163 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr1_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr2_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr3_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::addr4_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::charge_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::chargeValid_3, gather_cfg::cout, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::dxy_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::eta_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::HF_3, makeWord(), MillePedeFileConverter_cfg::out, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::phi_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::pt_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::ptSTA_3, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_2, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::qual_3, sector_, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_1, L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_2, and L1TMuonBarrelKalmanSectorProcessor::bmtf_out::wheel_3.

Referenced by process().

163  {
165  std::cout << "O " << sector_ << " " << out.pt_1 << " " << out.qual_1 << " " << out.eta_1 << " " << out.HF_1 << " "
166  << out.phi_1 << " " << out.charge_1 << " " << out.chargeValid_1 << " " << out.dxy_1 << " " << out.addr1_1
167  << " " << out.addr2_1 << " " << out.addr3_1 << " " << out.addr4_1 << " " << out.wheel_1 << " "
168  << out.ptSTA_1 << " " << out.pt_2 << " " << out.qual_2 << " " << out.eta_2 << " " << out.HF_2 << " "
169  << out.phi_2 << " " << out.charge_2 << " " << out.chargeValid_2 << " " << out.dxy_2 << " " << out.addr1_2
170  << " " << out.addr2_2 << " " << out.addr3_2 << " " << out.addr4_2 << " " << out.wheel_2 << " "
171  << out.ptSTA_2 << " " << out.pt_3 << " " << out.qual_3 << " " << out.eta_3 << " " << out.HF_3 << " "
172  << out.phi_3 << " " << out.charge_3 << " " << out.chargeValid_3 << " " << out.dxy_3 << " " << out.addr1_3
173  << " " << out.addr2_3 << " " << out.addr3_3 << " " << out.addr4_3 << " " << out.wheel_3 << " "
174  << out.ptSTA_3 << std::endl;
175 }
bmtf_out makeWord(L1TMuonBarrelKalmanAlgo *, const L1MuKBMTrackCollection &)
L1MuKBMTrackCollection L1TMuonBarrelKalmanSectorProcessor::wedgeSort ( const L1MuKBMTrackCollection preminus2,
const L1MuKBMTrackCollection preminus1,
const L1MuKBMTrackCollection prezero,
const L1MuKBMTrackCollection preone,
const L1MuKBMTrackCollection pretwo 
)
private

Definition at line 319 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References cleanNeighbor(), cleanNeighbors(), mps_fire::i, MillePedeFileConverter_cfg::out, swap(), and parallelization::uint.

Referenced by process().

323  {
324  //first clean
325 
326  L1MuKBMTrackCollection minus2 = cleanNeighbor(preminus2, preminus1);
327  L1MuKBMTrackCollection minus1 = cleanNeighbors(preminus1, preminus2, prezero);
328  L1MuKBMTrackCollection zero = cleanNeighbors(prezero, preminus1, preone);
329  L1MuKBMTrackCollection plus1 = cleanNeighbors(preone, prezero, pretwo);
330  L1MuKBMTrackCollection plus2 = cleanNeighbor(pretwo, preone);
331 
332  std::map<uint, L1MuKBMTrack> trackInfo;
333  std::map<uint, double> ptInfo;
334 
335  for (uint i = 0; i < 10; ++i)
336  ptInfo[i] = 0.0;
337 
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];
347  } else {
348  ptInfo[0] = minus2[0].pt();
349  trackInfo[0] = minus2[0];
350  }
351  }
352 
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];
362  } else {
363  ptInfo[2] = minus1[0].pt();
364  trackInfo[2] = minus1[0];
365  }
366  }
367 
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];
377  } else {
378  ptInfo[4] = zero[0].pt();
379  trackInfo[4] = zero[0];
380  }
381  }
382 
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];
392  } else {
393  ptInfo[6] = plus1[0].pt();
394  trackInfo[6] = plus1[0];
395  }
396  }
397 
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];
407  } else {
408  ptInfo[8] = plus2[0].pt();
409  trackInfo[8] = plus2[0];
410  }
411  }
412 
413  //Now my glorious partial bitonic != power of two sorter
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);
419 
420  swap(ptInfo, trackInfo, 0, 3);
421  swap(ptInfo, trackInfo, 1, 4);
422  swap(ptInfo, trackInfo, 5, 8);
423  swap(ptInfo, trackInfo, 6, 9);
424 
425  swap(ptInfo, trackInfo, 0, 2);
426  swap(ptInfo, trackInfo, 3, 6);
427  swap(ptInfo, trackInfo, 7, 9);
428 
429  swap(ptInfo, trackInfo, 0, 1);
430  swap(ptInfo, trackInfo, 2, 4);
431  swap(ptInfo, trackInfo, 5, 7);
432  swap(ptInfo, trackInfo, 8, 9);
433 
434  swap(ptInfo, trackInfo, 1, 2);
435  swap(ptInfo, trackInfo, 3, 5);
436  swap(ptInfo, trackInfo, 4, 6);
437  swap(ptInfo, trackInfo, 7, 8);
438 
439  swap(ptInfo, trackInfo, 1, 3);
440  swap(ptInfo, trackInfo, 2, 5);
441  swap(ptInfo, trackInfo, 4, 7);
442  swap(ptInfo, trackInfo, 6, 8);
443 
444  swap(ptInfo, trackInfo, 2, 3);
445 
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]);
453 
454  return out;
455 }
L1MuKBMTrackCollection cleanNeighbors(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
void swap(std::map< uint, double > &info, std::map< uint, L1MuKBMTrack > &trackInfo, uint i, uint j)
L1MuKBMTrackCollection cleanNeighbor(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
std::vector< L1MuKBMTrack > L1MuKBMTrackCollection
Definition: L1MuKBMTrack.h:15

Member Data Documentation

std::vector<L1TMuonBarrelKalmanRegionModule> L1TMuonBarrelKalmanSectorProcessor::regions_
private
int L1TMuonBarrelKalmanSectorProcessor::sector_
private

Definition at line 31 of file L1TMuonBarrelKalmanSectorProcessor.h.

Referenced by verbose().

int L1TMuonBarrelKalmanSectorProcessor::verbose_
private

Definition at line 30 of file L1TMuonBarrelKalmanSectorProcessor.h.

Referenced by cleanNeighbor(), and process().