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 
)

Definition at line 5 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References edm::ParameterSet::getParameter(), regions_, and makeMuonMisalignmentScenario::wheel.

5  :
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 }
T getParameter(std::string const &) const
std::vector< L1TMuonBarrelKalmanRegionModule > regions_
L1TMuonBarrelKalmanSectorProcessor::~L1TMuonBarrelKalmanSectorProcessor ( )

Definition at line 16 of file L1TMuonBarrelKalmanSectorProcessor.cc.

16 {}

Member Function Documentation

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

Definition at line 234 of file L1TMuonBarrelKalmanSectorProcessor.cc.

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

Referenced by wedgeSort().

234  {
236 
237  for(const auto& track1 : coll1) {
238  if (verbose_)
239  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());
240 
241  bool keep=true;
242  for(const auto& track2 : coll2) {
243  if (!track1.overlapTrack(track2))
244  continue;
245 
246  if (track1.rank()<track2.rank())
247  keep=false;
248 
249  if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
250  keep=false;
251  }
252  if (keep)
253  out.push_back(track1);
254  }
255 
256  return out;
257 }
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 259 of file L1TMuonBarrelKalmanSectorProcessor.cc.

References keep, and MillePedeFileConverter_cfg::out.

Referenced by wedgeSort().

259  {
261 
262  for(const auto& track1 : coll1) {
263  // if (verbose_)
264  // 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());
265 
266  bool keep=true;
267  for(const auto& track2 : coll2) {
268  if (!track1.overlapTrack(track2))
269  continue;
270 
271  if (track1.rank()<track2.rank())
272  keep=false;
273 
274  if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
275  keep=false;
276  }
277 
278  for(const auto& track2 : coll3) {
279  if (!track1.overlapTrack(track2))
280  continue;
281 
282  if (track1.rank()<track2.rank())
283  keep=false;
284 
285  if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
286  keep=false;
287  }
288 
289  if (keep)
290  out.push_back(track1);
291  }
292 
293  return out;
294 }
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 53 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, RPCpg::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().

53  {
55  out.pt_1=0;
56  out.qual_1=0;
57  out.eta_1=0;
58  out.HF_1=0;
59  out.phi_1=0;
60  out.bx0_1=0;
61  out.charge_1=0;
62  out.chargeValid_1=0;
63  out.dxy_1=0;
64  out.addr1_1=3;
65  out.addr2_1=15;
66  out.addr3_1=15;
67  out.addr4_1=15;
68  out.reserved_1=0;
69  out.wheel_1=0;
70  out.ptSTA_1=0;
71  out.SE_1=0;
72 
73  out.pt_2=0;
74  out.qual_2=0;
75  out.eta_2=0;
76  out.HF_2=0;
77  out.phi_2=0;
78  out.bx0_2=0;
79  out.charge_2=0;
80  out.chargeValid_2=0;
81  out.dxy_2=0;
82  out.addr1_2=3;
83  out.addr2_2=15;
84  out.addr3_2=15;
85  out.addr4_2=15;
86  out.reserved_2=0;
87  out.wheel_2=0;
88  out.ptSTA_2=0;
89  out.SE_2=0;
90 
91  out.pt_3=0;
92  out.qual_3=0;
93  out.eta_3=0;
94  out.HF_3=0;
95  out.phi_3=0;
96  out.bx0_3=0;
97  out.charge_3=0;
98  out.chargeValid_3=0;
99  out.dxy_3=0;
100  out.addr1_3=3;
101  out.addr2_3=15;
102  out.addr3_3=15;
103  out.addr4_3=15;
104  out.reserved_3=0;
105  out.wheel_3=0;
106  out.ptSTA_3=0;
107  out.SE_3=0;
108 
109  if (!tracks.empty()) {
110  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[0]);
111  out.pt_1=mu.hwPt();
112  out.qual_1=mu.hwQual();
113  out.eta_1=mu.hwEta();
114  out.HF_1=mu.hwHF();
115  out.phi_1=mu.hwPhi();
116  out.bx0_1=0;
117  out.charge_1=mu.hwSign();
118  out.chargeValid_1=mu.hwSignValid();
119  out.dxy_1=mu.hwDXY();
125  out.ptSTA_1=mu.hwPt2();
126  }
127 
128  if (tracks.size()>1) {
129  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[1]);
130  out.pt_2=mu.hwPt();
131  out.qual_2=mu.hwQual();
132  out.eta_2=mu.hwEta();
133  out.HF_2=mu.hwHF();
134  out.phi_2=mu.hwPhi();
135  out.bx0_2=0;
136  out.charge_2=mu.hwSign();
137  out.chargeValid_2=mu.hwSignValid();
138  out.dxy_2=mu.hwDXY();
144 
145 
146  out.ptSTA_2=mu.hwPt2();
147  }
148 
149  if (tracks.size()>2) {
150  l1t::RegionalMuonCand mu = trackMaker->convertToBMTF(tracks[2]);
151  out.pt_3=mu.hwPt();
152  out.qual_3=mu.hwQual();
153  out.eta_3=mu.hwEta();
154  out.HF_3=mu.hwHF();
155  out.phi_3=mu.hwPhi();
156  out.bx0_3=0;
157  out.charge_3=mu.hwSign();
158  out.chargeValid_3=mu.hwSignValid();
159  out.dxy_3=mu.hwDXY();
165  out.ptSTA_3=mu.hwPt2();
166  }
167  return out;
168 
169 }
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 mu
Definition: Constants.h:22
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 18 of file L1TMuonBarrelKalmanSectorProcessor.cc.

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

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

Definition at line 175 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().

175  {
177  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;
178 
179 
180 }
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 321 of file L1TMuonBarrelKalmanSectorProcessor.cc.

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

Referenced by process().

321  {
322 
323  //first clean
324 
325  L1MuKBMTrackCollection minus2 = cleanNeighbor(preminus2,preminus1);
326  L1MuKBMTrackCollection minus1 = cleanNeighbors(preminus1,preminus2,prezero);
327  L1MuKBMTrackCollection zero = cleanNeighbors(prezero,preminus1,preone);
328  L1MuKBMTrackCollection plus1 = cleanNeighbors(preone,prezero,pretwo);
329  L1MuKBMTrackCollection plus2 = cleanNeighbor(pretwo,preone);
330 
331  std::map<uint,L1MuKBMTrack> trackInfo;
332  std::map<uint,double> ptInfo;
333 
334 
335 
336 
337  for (uint i=0;i<10;++i)
338  ptInfo[i]=0.0;
339 
340 
341  if (minus2.size()>1) {
342  ptInfo[0] = minus2[0].pt();
343  trackInfo[0] = minus2[0];
344  ptInfo[1] = minus2[1].pt();
345  trackInfo[1] = minus2[1];
346  }
347  else if (minus2.size()==1) {
348  if (minus2[0].stubs()[0]->tag()) {
349  ptInfo[1] = minus2[0].pt();
350  trackInfo[1] = minus2[0];
351  }
352  else {
353  ptInfo[0] = minus2[0].pt();
354  trackInfo[0] = minus2[0];
355  }
356  }
357 
358  if (minus1.size()>1) {
359  ptInfo[2] = minus1[0].pt();
360  trackInfo[2] = minus1[0];
361  ptInfo[3] = minus1[1].pt();
362  trackInfo[3] = minus1[1];
363  }
364  else if (minus1.size()==1) {
365  if (minus1[0].stubs()[0]->tag()) {
366  ptInfo[3] = minus1[0].pt();
367  trackInfo[3] = minus1[0];
368  }
369  else {
370  ptInfo[2] = minus1[0].pt();
371  trackInfo[2] = minus1[0];
372  }
373  }
374 
375  if (zero.size()>1) {
376  ptInfo[4] = zero[0].pt();
377  trackInfo[4] = zero[0];
378  ptInfo[5] = zero[1].pt();
379  trackInfo[5] = zero[1];
380  }
381  else if (zero.size()==1) {
382  if (zero[0].stubs()[0]->tag()) {
383  ptInfo[5] = zero[0].pt();
384  trackInfo[5] = zero[0];
385  }
386  else {
387  ptInfo[4] = zero[0].pt();
388  trackInfo[4] = zero[0];
389  }
390  }
391 
392 
393  if (plus1.size()>1) {
394  ptInfo[6] = plus1[0].pt();
395  trackInfo[6] = plus1[0];
396  ptInfo[7] = plus1[1].pt();
397  trackInfo[7] = plus1[1];
398  }
399  else if (plus1.size()==1) {
400  if (plus1[0].stubs()[0]->tag()) {
401  ptInfo[7] = plus1[0].pt();
402  trackInfo[7] = plus1[0];
403  }
404  else {
405  ptInfo[6] = plus1[0].pt();
406  trackInfo[6] = plus1[0];
407  }
408  }
409 
410  if (plus2.size()>1) {
411  ptInfo[8] = plus2[0].pt();
412  trackInfo[8] = plus2[0];
413  ptInfo[9] = plus2[1].pt();
414  trackInfo[9] = plus2[1];
415  }
416  else if (plus2.size()==1) {
417  if (plus2[0].stubs()[0]->tag()) {
418  ptInfo[9] = plus2[0].pt();
419  trackInfo[9] = plus2[0];
420  }
421  else {
422  ptInfo[8] = plus2[0].pt();
423  trackInfo[8] = plus2[0];
424  }
425  }
426 
427 
428 
429 
430  //Now my glorious partial bitonic != power of two sorter
431  swap(ptInfo,trackInfo,0,5);
432  swap(ptInfo,trackInfo,1,6);
433  swap(ptInfo,trackInfo,2,7);
434  swap(ptInfo,trackInfo,3,8);
435  swap(ptInfo,trackInfo,4,9);
436 
437  swap(ptInfo,trackInfo,0,3);
438  swap(ptInfo,trackInfo,1,4);
439  swap(ptInfo,trackInfo,5,8);
440  swap(ptInfo,trackInfo,6,9);
441 
442  swap(ptInfo,trackInfo,0,2);
443  swap(ptInfo,trackInfo,3,6);
444  swap(ptInfo,trackInfo,7,9);
445 
446  swap(ptInfo,trackInfo,0,1);
447  swap(ptInfo,trackInfo,2,4);
448  swap(ptInfo,trackInfo,5,7);
449  swap(ptInfo,trackInfo,8,9);
450 
451 
452  swap(ptInfo,trackInfo,1,2);
453  swap(ptInfo,trackInfo,3,5);
454  swap(ptInfo,trackInfo,4,6);
455  swap(ptInfo,trackInfo,7,8);
456 
457  swap(ptInfo,trackInfo,1,3);
458  swap(ptInfo,trackInfo,2,5);
459  swap(ptInfo,trackInfo,4,7);
460  swap(ptInfo,trackInfo,6,8);
461 
462  swap(ptInfo,trackInfo,2,3);
463 
464 
465 
467  if (ptInfo[0]!=0.0)
468  out.push_back(trackInfo[0]);
469  if (ptInfo[1]!=0.0)
470  out.push_back(trackInfo[1]);
471  if (ptInfo[2]!=0.0)
472  out.push_back(trackInfo[2]);
473 
474  return out;
475 }
L1MuKBMTrackCollection cleanNeighbors(const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &, const L1MuKBMTrackCollection &)
void swap(std::map< uint, double > &info, std::map< uint, L1MuKBMTrack > &trackInfo, uint i, uint j)
def uint(string)
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 36 of file L1TMuonBarrelKalmanSectorProcessor.h.

Referenced by verbose().

int L1TMuonBarrelKalmanSectorProcessor::verbose_
private

Definition at line 35 of file L1TMuonBarrelKalmanSectorProcessor.h.

Referenced by cleanNeighbor(), and process().