6 verbose_(iConfig.getParameter<
int>(
"verbose")),
9 std::vector<int> wheels = iConfig.
getParameter<std::vector<int> >(
"wheelsToProcess");
10 for (
const auto wheel : wheels)
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());
109 if (!tracks.empty()) {
128 if (tracks.size()>1) {
149 if (tracks.size()>2) {
237 for(
const auto& track1 : coll1) {
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());
242 for(
const auto& track2 : coll2) {
243 if (!track1.overlapTrack(track2))
246 if (track1.rank()<track2.rank())
249 if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
253 out.push_back(track1);
262 for(
const auto& track1 : coll1) {
267 for(
const auto& track2 : coll2) {
268 if (!track1.overlapTrack(track2))
271 if (track1.rank()<track2.rank())
274 if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
278 for(
const auto& track2 : coll3) {
279 if (!track1.overlapTrack(track2))
282 if (track1.rank()<track2.rank())
285 if ((track1.rank()==track2.rank()) && (fabs(track1.stubs()[0]->whNum())<fabs(track2.stubs()[0]->whNum())))
290 out.push_back(track1);
297 double pt1 = info[
i];
298 double pt2 = info[j];
305 if (pt1!=0.0 && pt2!=0.0) {
307 trackInfo[
i] = trackInfo[j];
310 if (pt2!=0.0 && pt1==0.0) {
311 trackInfo[
i] = trackInfo[j];
331 std::map<uint,L1MuKBMTrack> trackInfo;
332 std::map<uint,double> ptInfo;
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];
347 else if (minus2.size()==1) {
348 if (minus2[0].stubs()[0]->tag()) {
349 ptInfo[1] = minus2[0].pt();
350 trackInfo[1] = minus2[0];
353 ptInfo[0] = minus2[0].pt();
354 trackInfo[0] = minus2[0];
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];
364 else if (minus1.size()==1) {
365 if (minus1[0].stubs()[0]->tag()) {
366 ptInfo[3] = minus1[0].pt();
367 trackInfo[3] = minus1[0];
370 ptInfo[2] = minus1[0].pt();
371 trackInfo[2] = minus1[0];
376 ptInfo[4] = zero[0].pt();
377 trackInfo[4] = zero[0];
378 ptInfo[5] = zero[1].pt();
379 trackInfo[5] = zero[1];
381 else if (zero.size()==1) {
382 if (zero[0].stubs()[0]->tag()) {
383 ptInfo[5] = zero[0].pt();
384 trackInfo[5] = zero[0];
387 ptInfo[4] = zero[0].pt();
388 trackInfo[4] = zero[0];
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];
399 else if (plus1.size()==1) {
400 if (plus1[0].stubs()[0]->tag()) {
401 ptInfo[7] = plus1[0].pt();
402 trackInfo[7] = plus1[0];
405 ptInfo[6] = plus1[0].pt();
406 trackInfo[6] = plus1[0];
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];
416 else if (plus2.size()==1) {
417 if (plus2[0].stubs()[0]->tag()) {
418 ptInfo[9] = plus2[0].pt();
419 trackInfo[9] = plus2[0];
422 ptInfo[8] = plus2[0].pt();
423 trackInfo[8] = plus2[0];
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);
437 swap(ptInfo,trackInfo,0,3);
438 swap(ptInfo,trackInfo,1,4);
439 swap(ptInfo,trackInfo,5,8);
440 swap(ptInfo,trackInfo,6,9);
442 swap(ptInfo,trackInfo,0,2);
443 swap(ptInfo,trackInfo,3,6);
444 swap(ptInfo,trackInfo,7,9);
446 swap(ptInfo,trackInfo,0,1);
447 swap(ptInfo,trackInfo,2,4);
448 swap(ptInfo,trackInfo,5,7);
449 swap(ptInfo,trackInfo,8,9);
452 swap(ptInfo,trackInfo,1,2);
453 swap(ptInfo,trackInfo,3,5);
454 swap(ptInfo,trackInfo,4,6);
455 swap(ptInfo,trackInfo,7,8);
457 swap(ptInfo,trackInfo,1,3);
458 swap(ptInfo,trackInfo,2,5);
459 swap(ptInfo,trackInfo,4,7);
460 swap(ptInfo,trackInfo,6,8);
462 swap(ptInfo,trackInfo,2,3);
468 out.push_back(trackInfo[0]);
470 out.push_back(trackInfo[1]);
472 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 &)
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)
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 &)
std::vector< std::vector< double > > tmp
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()