CMS 3D CMS Logo

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

#include <L1TMuonBarrelKalmanStubProcessor.h>

Public Member Functions

 L1TMuonBarrelKalmanStubProcessor ()
 
 L1TMuonBarrelKalmanStubProcessor (const edm::ParameterSet &)
 
void makeInputPattern (const L1MuDTChambPhContainer *phiContainer, const L1MuDTChambThContainer *etaContainer, int sector)
 
L1MuKBMTCombinedStubCollection makeStubs (const L1MuDTChambPhContainer *, const L1MuDTChambThContainer *, const L1TMuonBarrelParams &)
 
 ~L1TMuonBarrelKalmanStubProcessor ()
 

Private Member Functions

L1MuKBMTCombinedStub buildStub (const L1MuDTChambPhDigi &, const L1MuDTChambThDigi *)
 
L1MuKBMTCombinedStub buildStubNoEta (const L1MuDTChambPhDigi &)
 
int calculateEta (uint, int, uint, uint)
 
bool isGoodPhiStub (const L1MuDTChambPhDigi *)
 

Private Attributes

bool disableMasks_
 
std::vector< int > eta1_
 
std::vector< int > eta2_
 
std::vector< int > eta3_
 
int maxBX_
 
int minBX_
 
int minPhiQuality_
 
int verbose_
 

Detailed Description

Definition at line 15 of file L1TMuonBarrelKalmanStubProcessor.h.

Constructor & Destructor Documentation

◆ L1TMuonBarrelKalmanStubProcessor() [1/2]

L1TMuonBarrelKalmanStubProcessor::L1TMuonBarrelKalmanStubProcessor ( )

Definition at line 13 of file L1TMuonBarrelKalmanStubProcessor.cc.

13 : minPhiQuality_(0), minBX_(-3), maxBX_(3) {}

◆ L1TMuonBarrelKalmanStubProcessor() [2/2]

L1TMuonBarrelKalmanStubProcessor::L1TMuonBarrelKalmanStubProcessor ( const edm::ParameterSet iConfig)

Definition at line 15 of file L1TMuonBarrelKalmanStubProcessor.cc.

16  : minPhiQuality_(iConfig.getParameter<int>("minPhiQuality")),
17  minBX_(iConfig.getParameter<int>("minBX")),
18  maxBX_(iConfig.getParameter<int>("maxBX")),
19  eta1_(iConfig.getParameter<std::vector<int> >("cotTheta_1")),
20  eta2_(iConfig.getParameter<std::vector<int> >("cotTheta_2")),
21  eta3_(iConfig.getParameter<std::vector<int> >("cotTheta_3")),
22  disableMasks_(iConfig.getParameter<bool>("disableMasks")),
23  verbose_(iConfig.getParameter<int>("verbose")) {}

◆ ~L1TMuonBarrelKalmanStubProcessor()

L1TMuonBarrelKalmanStubProcessor::~L1TMuonBarrelKalmanStubProcessor ( )

Definition at line 25 of file L1TMuonBarrelKalmanStubProcessor.cc.

25 {}

Member Function Documentation

◆ buildStub()

L1MuKBMTCombinedStub L1TMuonBarrelKalmanStubProcessor::buildStub ( const L1MuDTChambPhDigi phiS,
const L1MuDTChambThDigi etaS 
)
private

Definition at line 33 of file L1TMuonBarrelKalmanStubProcessor.cc.

34  {
35  int wheel = phiS.whNum();
36  int sector = phiS.scNum();
37  int station = phiS.stNum();
38  int phi = phiS.phi();
39  int phiB = phiS.phiB();
40  bool tag = (phiS.Ts2Tag() == 1);
41  int bx = phiS.bxNum();
42  int quality = phiS.code();
43 
44  //Now full eta
45  int qeta1 = 0;
46  int qeta2 = 0;
47  int eta1 = 255;
48  int eta2 = 255;
49 
50  bool hasEta = false;
51  for (uint i = 0; i < 7; ++i) {
52  if (etaS->position(i) == 0)
53  continue;
54  if (!hasEta) {
55  hasEta = true;
56  eta1 = calculateEta(i, etaS->whNum(), etaS->scNum(), etaS->stNum());
57  if (etaS->quality(i) == 1)
58  qeta1 = 2;
59  else
60  qeta1 = 1;
61  } else {
62  eta2 = calculateEta(i, etaS->whNum(), etaS->scNum(), etaS->stNum());
63  if (etaS->quality(i) == 1)
64  qeta2 = 2;
65  else
66  qeta2 = 1;
67  }
68  }
69  L1MuKBMTCombinedStub stub(wheel, sector, station, phi, phiB, tag, bx, quality, eta1, eta2, qeta1, qeta2);
70 
71  return stub;
72 }

References l1GtPatternGenerator_cfi::bx, L1MuDTChambPhDigi::bxNum(), calculateEta(), L1MuDTChambPhDigi::code(), HLT_FULL_cff::eta1, HLT_FULL_cff::eta2, mps_fire::i, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), qcdUeDQM_cfi::quality, L1MuDTChambThDigi::quality(), L1MuDTChambPhDigi::scNum(), L1MuDTChambThDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), L1MuDTChambThDigi::stNum(), GlobalPosition_Frontier_DevDB_cff::tag, L1MuDTChambPhDigi::Ts2Tag(), parallelization::uint, makeMuonMisalignmentScenario::wheel, L1MuDTChambPhDigi::whNum(), and L1MuDTChambThDigi::whNum().

Referenced by makeStubs().

◆ buildStubNoEta()

L1MuKBMTCombinedStub L1TMuonBarrelKalmanStubProcessor::buildStubNoEta ( const L1MuDTChambPhDigi phiS)
private

Definition at line 74 of file L1TMuonBarrelKalmanStubProcessor.cc.

74  {
75  int wheel = phiS.whNum();
76  int sector = phiS.scNum();
77  int station = phiS.stNum();
78  int phi = phiS.phi();
79  int phiB = phiS.phiB();
80  bool tag = (phiS.Ts2Tag() == 1);
81  int bx = phiS.bxNum();
82  int quality = phiS.code();
83 
84  //Now full eta
85  int qeta1 = 0;
86  int qeta2 = 0;
87  int eta1 = 7;
88  int eta2 = 7;
89  L1MuKBMTCombinedStub stub(wheel, sector, station, phi, phiB, tag, bx, quality, eta1, eta2, qeta1, qeta2);
90 
91  return stub;
92 }

References l1GtPatternGenerator_cfi::bx, L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhDigi::code(), HLT_FULL_cff::eta1, HLT_FULL_cff::eta2, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), qcdUeDQM_cfi::quality, L1MuDTChambPhDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), GlobalPosition_Frontier_DevDB_cff::tag, L1MuDTChambPhDigi::Ts2Tag(), makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Referenced by makeStubs().

◆ calculateEta()

int L1TMuonBarrelKalmanStubProcessor::calculateEta ( uint  i,
int  wheel,
uint  sector,
uint  station 
)
private

Definition at line 189 of file L1TMuonBarrelKalmanStubProcessor.cc.

189  {
190  int eta = 0;
191  if (wheel > 0) {
192  eta = 7 * wheel + 3 - i;
193  } else if (wheel < 0) {
194  eta = 7 * wheel + i - 3;
195  } else {
196  if (sector == 0 || sector == 3 || sector == 4 || sector == 7 || sector == 8 || sector == 11)
197  eta = i - 3;
198  else
199  eta = 3 - i;
200  }
201 
202  if (station == 1)
203  eta = -eta1_[eta + 17];
204  else if (station == 2)
205  eta = -eta2_[eta + 17];
206  else
207  eta = -eta3_[eta + 17];
208 
209  return eta;
210 }

References PVValHelper::eta, eta1_, eta2_, eta3_, mps_fire::i, relativeConstraints::station, and makeMuonMisalignmentScenario::wheel.

Referenced by buildStub().

◆ isGoodPhiStub()

bool L1TMuonBarrelKalmanStubProcessor::isGoodPhiStub ( const L1MuDTChambPhDigi stub)
private

Definition at line 27 of file L1TMuonBarrelKalmanStubProcessor.cc.

27  {
28  if (stub->code() < minPhiQuality_)
29  return false;
30  return true;
31 }

References L1MuDTChambPhDigi::code(), and minPhiQuality_.

◆ makeInputPattern()

void L1TMuonBarrelKalmanStubProcessor::makeInputPattern ( const L1MuDTChambPhContainer phiContainer,
const L1MuDTChambThContainer etaContainer,
int  sector 
)

Definition at line 212 of file L1TMuonBarrelKalmanStubProcessor.cc.

214  {
215  int previousSector;
216  int nextSector;
217 
218  if (sector == 11)
219  nextSector = 0;
220  else
221  nextSector = sector + 1;
222 
223  if (sector == 0)
224  previousSector = 11;
225  else
226  previousSector = sector - 1;
227 
228  ostringstream os;
229  os << "I " << sector << " ";
230 
231  bool hasStub = false;
232 
233  //start by previous sector
234  for (int wheel = -2; wheel < 3; ++wheel) {
235  const L1MuDTChambPhDigi* seg1 = phiContainer->chPhiSegm1(wheel, 1, previousSector, 0);
236  if (seg1 && seg1->phi() > 111) {
237  os << seg1->phi() - 2144 << " " << seg1->phiB() << " " << seg1->code() << " 1 4 ";
238  } else {
239  os << "-2048 0 0 0 15 ";
240  }
241  const L1MuDTChambPhDigi* seg2 = phiContainer->chPhiSegm1(wheel, 2, previousSector, 0);
242  if (seg2 && seg2->phi() > 111) {
243  os << seg2->phi() - 2144 << " " << seg2->phiB() << " " << seg2->code() << " 1 4 ";
244  } else {
245  os << "-2048 0 0 0 15 ";
246  }
247  const L1MuDTChambPhDigi* seg3 = phiContainer->chPhiSegm1(wheel, 3, previousSector, 0);
248  if (seg3 && seg3->phi() > 111) {
249  os << seg3->phi() - 2144 << " " << seg3->phiB() << " " << seg3->code() << " 1 4 ";
250  } else {
251  os << "-2048 0 0 0 15 ";
252  }
253  const L1MuDTChambPhDigi* seg4 = phiContainer->chPhiSegm1(wheel, 4, previousSector, 0);
254  if (seg4 && seg4->phi() > 111) {
255  os << seg4->phi() - 2144 << " " << seg4->phiB() << " " << seg4->code() << " 1 4 ";
256  } else {
257  os << "-2048 0 0 0 15 ";
258  }
259 
260  const L1MuDTChambThDigi* eta1 = etaContainer->chThetaSegm(wheel, 1, previousSector, 0);
261  if (eta1) {
262  int etaPos = eta1->position(0) + (eta1->position(1) << 1) + (eta1->position(2) << 2) + (eta1->position(3) << 3) +
263  (eta1->position(4) << 4) + (eta1->position(5) << 5) + (eta1->position(6) << 6);
264  os << etaPos << " ";
265  } else {
266  os << " 0 ";
267  }
268  const L1MuDTChambThDigi* eta2 = etaContainer->chThetaSegm(wheel, 2, previousSector, 0);
269  if (eta2) {
270  int etaPos = eta2->position(0) + (eta2->position(1) << 1) + (eta2->position(2) << 2) + (eta2->position(3) << 3) +
271  (eta2->position(4) << 4) + (eta2->position(5) << 5) + (eta2->position(6) << 6);
272  os << etaPos << " ";
273  } else {
274  os << " 0 ";
275  }
276 
277  const L1MuDTChambThDigi* eta3 = etaContainer->chThetaSegm(wheel, 3, previousSector, 0);
278  if (eta3) {
279  int etaPos = eta3->position(0) + (eta3->position(1) << 1) + (eta3->position(2) << 2) + (eta3->position(3) << 3) +
280  (eta3->position(4) << 4) + (eta3->position(5) << 5) + (eta3->position(6) << 6);
281  os << etaPos << " ";
282  } else {
283  os << " 0 ";
284  }
285  const L1MuDTChambPhDigi* seg5 = phiContainer->chPhiSegm2(wheel, 1, previousSector, -1);
286  if (seg5 && seg5->phi() > 111) {
287  os << seg5->phi() - 2144 << " " << seg5->phiB() << " " << seg5->code() << " 1 5 ";
288  } else {
289  os << "-2048 0 0 0 15 ";
290  }
291 
292  const L1MuDTChambPhDigi* seg6 = phiContainer->chPhiSegm2(wheel, 2, previousSector, -1);
293  if (seg6 && seg6->phi() > 111) {
294  os << seg6->phi() - 2144 << " " << seg6->phiB() << " " << seg6->code() << " 1 5 ";
295  } else {
296  os << "-2048 0 0 0 15 ";
297  }
298  const L1MuDTChambPhDigi* seg7 = phiContainer->chPhiSegm2(wheel, 3, previousSector, -1);
299  if (seg7 && seg7->phi() > 111) {
300  os << seg7->phi() - 2144 << " " << seg7->phiB() << " " << seg7->code() << " 1 5 ";
301  } else {
302  os << "-2048 0 0 0 15 ";
303  }
304  const L1MuDTChambPhDigi* seg8 = phiContainer->chPhiSegm2(wheel, 4, previousSector, 1);
305  if (seg8 && seg8->phi() > 111) {
306  os << seg8->phi() - 2144 << " " << seg8->phiB() << " " << seg8->code() << " 1 5 ";
307  } else {
308  os << "-2048 0 0 0 15 ";
309  }
310  if (eta1) {
311  int etaPos = eta1->quality(0) + (eta1->quality(1) << 1) + (eta1->quality(2) << 2) + (eta1->quality(3) << 3) +
312  (eta1->quality(4) << 4) + (eta1->quality(5) << 5) + (eta1->quality(6) << 6);
313  os << etaPos << " ";
314  } else {
315  os << " 0 ";
316  }
317  if (eta2) {
318  int etaPos = eta2->quality(0) + (eta2->quality(1) << 1) + (eta2->quality(2) << 2) + (eta2->quality(3) << 3) +
319  (eta2->quality(4) << 4) + (eta2->quality(5) << 5) + (eta2->quality(6) << 6);
320  os << etaPos << " ";
321  } else {
322  os << " 0 ";
323  }
324  if (eta3) {
325  int etaPos = eta3->quality(0) + (eta3->quality(1) << 1) + (eta3->quality(2) << 2) + (eta3->quality(3) << 3) +
326  (eta3->quality(4) << 4) + (eta3->quality(5) << 5) + (eta3->quality(6) << 6);
327  os << etaPos << " ";
328  } else {
329  os << " 0 ";
330  }
331 
333  const L1MuDTChambPhDigi* seg9 = phiContainer->chPhiSegm1(wheel, 1, sector, 0);
334  if (seg9) {
335  os << seg9->phi() << " " << seg9->phiB() << " " << seg9->code() << " 1 0 ";
336  } else {
337  os << "-2048 0 0 0 15 ";
338  }
339  const L1MuDTChambPhDigi* seg10 = phiContainer->chPhiSegm1(wheel, 2, sector, 0);
340  if (seg10) {
341  hasStub = true;
342  os << seg10->phi() << " " << seg10->phiB() << " " << seg10->code() << " 1 0 ";
343  } else {
344  os << "-2048 0 0 0 15 ";
345  }
346  const L1MuDTChambPhDigi* seg11 = phiContainer->chPhiSegm1(wheel, 3, sector, 0);
347  if (seg11) {
348  hasStub = true;
349  os << seg11->phi() << " " << seg11->phiB() << " " << seg11->code() << " 1 0 ";
350  } else {
351  os << "-2048 0 0 0 15 ";
352  }
353  const L1MuDTChambPhDigi* seg12 = phiContainer->chPhiSegm1(wheel, 4, sector, 0);
354  if (seg12) {
355  hasStub = true;
356  os << seg12->phi() << " " << seg12->phiB() << " " << seg12->code() << " 1 2 ";
357  } else {
358  os << "-2048 0 0 0 15 ";
359  }
360  const L1MuDTChambThDigi* eta4 = etaContainer->chThetaSegm(wheel, 1, sector, 0);
361  if (eta4) {
362  int etaPos = eta4->position(0) + (eta4->position(1) << 1) + (eta4->position(2) << 2) + (eta4->position(3) << 3) +
363  (eta4->position(4) << 4) + (eta4->position(5) << 5) + (eta4->position(6) << 6);
364  os << etaPos << " ";
365  } else {
366  os << " 0 ";
367  }
368 
369  const L1MuDTChambThDigi* eta5 = etaContainer->chThetaSegm(wheel, 2, sector, 0);
370  if (eta5) {
371  int etaPos = eta5->position(0) + (eta5->position(1) << 1) + (eta5->position(2) << 2) + (eta5->position(3) << 3) +
372  (eta5->position(4) << 4) + (eta5->position(5) << 5) + (eta5->position(6) << 6);
373  os << etaPos << " ";
374  } else {
375  os << " 0 ";
376  }
377  const L1MuDTChambThDigi* eta6 = etaContainer->chThetaSegm(wheel, 3, sector, 0);
378  if (eta6) {
379  int etaPos = eta6->position(0) + (eta6->position(1) << 1) + (eta6->position(2) << 2) + (eta6->position(3) << 3) +
380  (eta6->position(4) << 4) + (eta6->position(5) << 5) + (eta6->position(6) << 6);
381  os << etaPos << " ";
382  } else {
383  os << " 0 ";
384  }
385 
386  const L1MuDTChambPhDigi* seg13 = phiContainer->chPhiSegm2(wheel, 1, sector, -1);
387  if (seg13) {
388  os << seg13->phi() << " " << seg13->phiB() << " " << seg13->code() << " 1 1 ";
389  } else {
390  os << "-2048 0 0 0 15 ";
391  }
392 
393  const L1MuDTChambPhDigi* seg14 = phiContainer->chPhiSegm2(wheel, 2, sector, -1);
394  if (seg14) {
395  hasStub = true;
396 
397  os << seg14->phi() << " " << seg14->phiB() << " " << seg14->code() << " 1 1 ";
398  } else {
399  os << "-2048 0 0 0 15 ";
400  }
401 
402  const L1MuDTChambPhDigi* seg15 = phiContainer->chPhiSegm2(wheel, 3, sector, -1);
403  if (seg15) {
404  hasStub = true;
405 
406  os << seg15->phi() << " " << seg15->phiB() << " " << seg15->code() << " 1 1 ";
407  } else {
408  os << "-2048 0 0 0 15 ";
409  }
410  const L1MuDTChambPhDigi* seg16 = phiContainer->chPhiSegm2(wheel, 4, sector, -1);
411  if (seg16) {
412  hasStub = true;
413 
414  os << seg16->phi() << " " << seg16->phiB() << " " << seg16->code() << " 1 1 ";
415  } else {
416  os << "-2048 0 0 0 15 ";
417  }
418 
419  if (eta4) {
420  int etaPos = eta4->quality(0) + (eta4->quality(1) << 1) + (eta4->quality(2) << 2) + (eta4->quality(3) << 3) +
421  (eta4->quality(4) << 4) + (eta4->quality(5) << 5) + (eta4->quality(6) << 6);
422  os << etaPos << " ";
423  } else {
424  os << " 0 ";
425  }
426 
427  if (eta5) {
428  int etaPos = eta5->quality(0) + (eta5->quality(1) << 1) + (eta5->quality(2) << 2) + (eta5->quality(3) << 3) +
429  (eta5->quality(4) << 4) + (eta5->quality(5) << 5) + (eta5->quality(6) << 6);
430  os << etaPos << " ";
431  } else {
432  os << " 0 ";
433  }
434  if (eta6) {
435  int etaPos = eta6->quality(0) + (eta6->quality(1) << 1) + (eta6->quality(2) << 2) + (eta6->quality(3) << 3) +
436  (eta6->quality(4) << 4) + (eta6->quality(5) << 5) + (eta6->quality(6) << 6);
437  os << etaPos << " ";
438  } else {
439  os << " 0 ";
440  }
442  const L1MuDTChambPhDigi* seg17 = phiContainer->chPhiSegm1(wheel, 1, nextSector, 0);
443  if (seg17 && seg17->phi() < -112) {
444  os << seg17->phi() + 2144 << " " << seg17->phiB() << " " << seg17->code() << " 1 2 ";
445  } else {
446  os << "-2048 0 0 0 15 ";
447  }
448  const L1MuDTChambPhDigi* seg18 = phiContainer->chPhiSegm1(wheel, 2, nextSector, 0);
449  if (seg18 && seg18->phi() < -112) {
450  os << seg18->phi() + 2144 << " " << seg18->phiB() << " " << seg18->code() << " 1 2 ";
451  } else {
452  os << "-2048 0 0 0 15 ";
453  }
454  const L1MuDTChambPhDigi* seg19 = phiContainer->chPhiSegm1(wheel, 3, nextSector, 0);
455  if (seg19 && seg19->phi() < -112) {
456  os << seg19->phi() + 2144 << " " << seg19->phiB() << " " << seg19->code() << " 1 2 ";
457  } else {
458  os << "-2048 0 0 0 15 ";
459  }
460  const L1MuDTChambPhDigi* seg20 = phiContainer->chPhiSegm1(wheel, 4, nextSector, 0);
461  if (seg20 && seg20->phi() < -112) {
462  os << seg20->phi() + 2144 << " " << seg20->phiB() << " " << seg20->code() << " 1 2 ";
463  } else {
464  os << "-2048 0 0 0 15 ";
465  }
466  const L1MuDTChambThDigi* eta7 = etaContainer->chThetaSegm(wheel, 1, nextSector, 0);
467  if (eta7) {
468  int etaPos = eta7->position(0) + (eta7->position(1) << 1) + (eta7->position(2) << 2) + (eta7->position(3) << 3) +
469  (eta7->position(4) << 4) + (eta7->position(5) << 5) + (eta7->position(6) << 6);
470  os << etaPos << " ";
471  } else {
472  os << " 0 ";
473  }
474  const L1MuDTChambThDigi* eta8 = etaContainer->chThetaSegm(wheel, 2, nextSector, 0);
475  if (eta8) {
476  int etaPos = eta8->position(0) + (eta8->position(1) << 1) + (eta8->position(2) << 2) + (eta8->position(3) << 3) +
477  (eta8->position(4) << 4) + (eta8->position(5) << 5) + (eta8->position(6) << 6);
478  os << etaPos << " ";
479  } else {
480  os << " 0 ";
481  }
482  const L1MuDTChambThDigi* eta9 = etaContainer->chThetaSegm(wheel, 3, nextSector, 0);
483  if (eta9) {
484  int etaPos = eta9->position(0) + (eta9->position(1) << 1) + (eta9->position(2) << 2) + (eta9->position(3) << 3) +
485  (eta9->position(4) << 4) + (eta9->position(5) << 5) + (eta9->position(6) << 6);
486  os << etaPos << " ";
487  } else {
488  os << " 0 ";
489  }
490  const L1MuDTChambPhDigi* seg21 = phiContainer->chPhiSegm2(wheel, 1, nextSector, -1);
491  if (seg21 && seg21->phi() < -112) {
492  os << seg21->phi() + 2144 << " " << seg21->phiB() << " " << seg21->code() << " 1 3 ";
493  } else {
494  os << "-2048 0 0 0 15 ";
495  }
496 
497  const L1MuDTChambPhDigi* seg22 = phiContainer->chPhiSegm2(wheel, 2, nextSector, -1);
498  if (seg22 && seg22->phi() < -112) {
499  os << seg22->phi() + 2144 << " " << seg22->phiB() << " " << seg22->code() << " 1 3 ";
500  } else {
501  os << "-2048 0 0 0 15 ";
502  }
503  const L1MuDTChambPhDigi* seg23 = phiContainer->chPhiSegm2(wheel, 3, nextSector, -1);
504  if (seg23 && seg23->phi() < -112) {
505  os << seg23->phi() + 2144 << " " << seg23->phiB() << " " << seg23->code() << " 1 3 ";
506  } else {
507  os << "-2048 0 0 0 15 ";
508  }
509  const L1MuDTChambPhDigi* seg24 = phiContainer->chPhiSegm2(wheel, 4, nextSector, -1);
510  if (seg24 && seg24->phi() < -112) {
511  os << seg24->phi() + 2144 << " " << seg24->phiB() << " " << seg24->code() << " 1 3 ";
512  } else {
513  os << "-2048 0 0 0 15 ";
514  }
515  if (eta7) {
516  int etaPos = eta7->quality(0) + (eta7->quality(1) << 1) + (eta7->quality(2) << 2) + (eta7->quality(3) << 3) +
517  (eta7->quality(4) << 4) + (eta7->quality(5) << 5) + (eta7->quality(6) << 6);
518  os << etaPos << " ";
519  } else {
520  os << " 0 ";
521  }
522  if (eta8) {
523  int etaPos = eta8->quality(0) + (eta8->quality(1) << 1) + (eta8->quality(2) << 2) + (eta8->quality(3) << 3) +
524  (eta8->quality(4) << 4) + (eta8->quality(5) << 5) + (eta8->quality(6) << 6);
525  os << etaPos << " ";
526  } else {
527  os << " 0 ";
528  }
529  if (eta9) {
530  int etaPos = eta9->quality(0) + (eta9->quality(1) << 1) + (eta9->quality(2) << 2) + (eta9->quality(3) << 3) +
531  (eta9->quality(4) << 4) + (eta9->quality(5) << 5) + (eta9->quality(6) << 6);
532  os << etaPos << " ";
533  } else {
534  os << " 0 ";
535  }
536  }
537  if (hasStub) {
538  std::cout << os.str() << std::endl;
539  }
540 }

References L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), L1MuDTChambPhDigi::code(), gather_cfg::cout, HLT_FULL_cff::eta1, HLT_FULL_cff::eta2, HLT_FULL_cff::eta3, HLT_FULL_cff::eta4, HLT_FULL_cff::eta5, HLT_FULL_cff::eta6, HLT_FULL_cff::eta7, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), L1MuDTChambThDigi::quality(), and makeMuonMisalignmentScenario::wheel.

Referenced by L1TMuonBarrelKalmanStubProducer::produce().

◆ makeStubs()

L1MuKBMTCombinedStubCollection L1TMuonBarrelKalmanStubProcessor::makeStubs ( const L1MuDTChambPhContainer phiContainer,
const L1MuDTChambThContainer etaContainer,
const L1TMuonBarrelParams params 
)

Definition at line 94 of file L1TMuonBarrelKalmanStubProcessor.cc.

96  {
97  //get the masks from th standard BMTF setup!
98  // const L1TMuonBarrelParamsRcd& bmtfParamsRcd = setup.get<L1TMuonBarrelParamsRcd>();
99  // bmtfParamsRcd.get(bmtfParamsHandle);
100  // const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
101  // masks_ = bmtfParams.l1mudttfmasks;
102 
103  //get the masks!
104  L1MuDTTFMasks msks = params.l1mudttfmasks;
105 
107  for (int bx = minBX_; bx <= maxBX_; bx++) {
108  for (int wheel = -2; wheel <= 2; wheel++) {
109  for (uint sector = 0; sector < 12; sector++) {
110  for (uint station = 1; station < 5; station++) {
111  //Have to cook up something for the fact that KMTF doesnt use 2 SP at whel=0
112  int lwheel1;
113  int lwheel2;
114  if (wheel < 0) {
115  lwheel1 = wheel - 1;
116  lwheel2 = wheel - 1;
117  } else if (wheel > 0) {
118  lwheel1 = wheel + 1;
119  lwheel2 = wheel + 1;
120  } else {
121  lwheel1 = -1;
122  lwheel2 = +1;
123  }
124 
125  bool phiMask = false;
126  bool etaMask = false;
127  if (station == 1) {
128  phiMask = msks.get_inrec_chdis_st1(lwheel1, sector) | msks.get_inrec_chdis_st1(lwheel2, sector);
129  etaMask = msks.get_etsoc_chdis_st1(lwheel1, sector) | msks.get_etsoc_chdis_st1(lwheel2, sector);
130  }
131  if (station == 2) {
132  phiMask = msks.get_inrec_chdis_st2(lwheel1, sector) | msks.get_inrec_chdis_st2(lwheel2, sector);
133  etaMask = msks.get_etsoc_chdis_st2(lwheel1, sector) | msks.get_etsoc_chdis_st2(lwheel2, sector);
134  }
135  if (station == 3) {
136  phiMask = msks.get_inrec_chdis_st3(lwheel1, sector) | msks.get_inrec_chdis_st3(lwheel2, sector);
137  etaMask = msks.get_etsoc_chdis_st3(lwheel1, sector) | msks.get_etsoc_chdis_st3(lwheel2, sector);
138  }
139  if (station == 4) {
140  phiMask = msks.get_inrec_chdis_st4(lwheel1, sector) | msks.get_inrec_chdis_st4(lwheel2, sector);
141  }
142 
143  if (disableMasks_) {
144  phiMask = false;
145  etaMask = false;
146  }
147 
148  bool hasEta = false;
149  L1MuDTChambThDigi const* tseta = etaContainer->chThetaSegm(wheel, station, sector, bx);
150  if (tseta && (!etaMask)) {
151  hasEta = true;
152  }
153 
154  // printf("Wheel=%d LWheel=%d,%d sector=%d station=%d phiMask=%d etaMask=%d\n",wheel,lwheel1,lwheel2,sector,station,phiMask,etaMask);
155  // if (abs(wheel)==2 && station==1)
156  // continue;
157 
158  L1MuDTChambPhDigi const* high = phiContainer->chPhiSegm1(wheel, station, sector, bx);
159  if (high && (!phiMask)) {
160  if (high->code() >= minPhiQuality_) {
161  const L1MuDTChambPhDigi& stubPhi = *high;
162  if (hasEta) {
163  out.push_back(buildStub(stubPhi, tseta));
164  } else {
165  out.push_back(buildStubNoEta(stubPhi));
166  }
167  }
168  }
169 
170  L1MuDTChambPhDigi const* low = phiContainer->chPhiSegm2(wheel, station, sector, bx - 1);
171  if (low && !(phiMask)) {
172  if (low->code() >= minPhiQuality_) {
173  const L1MuDTChambPhDigi& stubPhi = *low;
174  if (hasEta) {
175  out.push_back(buildStub(stubPhi, tseta));
176  } else {
177  out.push_back(buildStubNoEta(stubPhi));
178  }
179  }
180  }
181  }
182  }
183  }
184  }
185 
186  return out;
187 }

References buildStub(), buildStubNoEta(), l1GtPatternGenerator_cfi::bx, L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), disableMasks_, L1MuDTTFMasks::get_etsoc_chdis_st1(), L1MuDTTFMasks::get_etsoc_chdis_st2(), L1MuDTTFMasks::get_etsoc_chdis_st3(), L1MuDTTFMasks::get_inrec_chdis_st1(), L1MuDTTFMasks::get_inrec_chdis_st2(), L1MuDTTFMasks::get_inrec_chdis_st3(), L1MuDTTFMasks::get_inrec_chdis_st4(), LaserClient_cfi::high, LaserClient_cfi::low, maxBX_, minBX_, minPhiQuality_, MillePedeFileConverter_cfg::out, CalibrationSummaryClient_cfi::params, relativeConstraints::station, parallelization::uint, and makeMuonMisalignmentScenario::wheel.

Referenced by L1TMuonBarrelKalmanStubProducer::produce().

Member Data Documentation

◆ disableMasks_

bool L1TMuonBarrelKalmanStubProcessor::disableMasks_
private

Definition at line 42 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

◆ eta1_

std::vector<int> L1TMuonBarrelKalmanStubProcessor::eta1_
private

Definition at line 38 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

◆ eta2_

std::vector<int> L1TMuonBarrelKalmanStubProcessor::eta2_
private

Definition at line 39 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

◆ eta3_

std::vector<int> L1TMuonBarrelKalmanStubProcessor::eta3_
private

Definition at line 40 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

◆ maxBX_

int L1TMuonBarrelKalmanStubProcessor::maxBX_
private

Definition at line 37 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

◆ minBX_

int L1TMuonBarrelKalmanStubProcessor::minBX_
private

Definition at line 36 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

◆ minPhiQuality_

int L1TMuonBarrelKalmanStubProcessor::minPhiQuality_
private

Definition at line 35 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by isGoodPhiStub(), and makeStubs().

◆ verbose_

int L1TMuonBarrelKalmanStubProcessor::verbose_
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProcessor.h.

L1TMuonBarrelKalmanStubProcessor::minPhiQuality_
int minPhiQuality_
Definition: L1TMuonBarrelKalmanStubProcessor.h:35
mps_fire.i
i
Definition: mps_fire.py:428
L1MuDTChambThDigi::position
int position(const int i) const
Definition: L1MuDTChambThDigi.cc:90
L1MuDTChambPhDigi::stNum
int stNum() const
Definition: L1MuDTChambPhDigi.cc:72
L1MuDTTFMasks::get_etsoc_chdis_st3
bool get_etsoc_chdis_st3(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:153
L1MuDTChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:67
L1MuDTTFMasks::get_inrec_chdis_st1
bool get_inrec_chdis_st1(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:69
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
relativeConstraints.station
station
Definition: relativeConstraints.py:67
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuKBMTCombinedStubCollection
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection
Definition: L1MuKBMTCombinedStub.h:39
L1MuDTChambPhDigi::whNum
int whNum() const
Definition: L1MuDTChambPhDigi.cc:70
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1TMuonBarrelKalmanStubProcessor::buildStubNoEta
L1MuKBMTCombinedStub buildStubNoEta(const L1MuDTChambPhDigi &)
Definition: L1TMuonBarrelKalmanStubProcessor.cc:74
HLT_FULL_cff.eta5
eta5
Definition: HLT_FULL_cff.py:9615
L1MuDTTFMasks
Definition: L1MuDTTFMasks.h:36
L1MuDTChambThDigi::whNum
int whNum() const
Definition: L1MuDTChambThDigi.cc:79
L1TMuonBarrelKalmanStubProcessor::eta2_
std::vector< int > eta2_
Definition: L1TMuonBarrelKalmanStubProcessor.h:39
HLT_FULL_cff.eta3
eta3
Definition: HLT_FULL_cff.py:9609
L1MuDTChambPhDigi::phiB
int phiB() const
Definition: L1MuDTChambPhDigi.cc:76
parallelization.uint
uint
Definition: parallelization.py:124
L1TMuonBarrelKalmanStubProcessor::eta1_
std::vector< int > eta1_
Definition: L1TMuonBarrelKalmanStubProcessor.h:38
L1TMuonBarrelKalmanStubProcessor::disableMasks_
bool disableMasks_
Definition: L1TMuonBarrelKalmanStubProcessor.h:42
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuDTChambPhDigi::phi
int phi() const
Definition: L1MuDTChambPhDigi.cc:74
L1MuKBMTCombinedStub
Definition: L1MuKBMTCombinedStub.h:45
HLT_FULL_cff.eta2
eta2
Definition: HLT_FULL_cff.py:9608
L1MuDTChambThDigi::scNum
int scNum() const
Definition: L1MuDTChambThDigi.cc:80
L1MuDTTFMasks::get_inrec_chdis_st2
bool get_inrec_chdis_st2(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:81
L1TMuonBarrelKalmanStubProcessor::calculateEta
int calculateEta(uint, int, uint, uint)
Definition: L1TMuonBarrelKalmanStubProcessor.cc:189
L1MuDTTFMasks::get_inrec_chdis_st3
bool get_inrec_chdis_st3(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:93
L1TMuonBarrelKalmanStubProcessor::maxBX_
int maxBX_
Definition: L1TMuonBarrelKalmanStubProcessor.h:37
HLT_FULL_cff.eta1
eta1
Definition: HLT_FULL_cff.py:9607
L1TMuonBarrelKalmanStubProcessor::buildStub
L1MuKBMTCombinedStub buildStub(const L1MuDTChambPhDigi &, const L1MuDTChambThDigi *)
Definition: L1TMuonBarrelKalmanStubProcessor.cc:33
L1MuDTChambPhDigi::bxNum
int bxNum() const
Definition: L1MuDTChambPhDigi.cc:68
L1MuDTTFMasks::get_etsoc_chdis_st2
bool get_etsoc_chdis_st2(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:141
HLT_FULL_cff.eta7
eta7
Definition: HLT_FULL_cff.py:9606
L1MuDTChambPhContainer::chPhiSegm2
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:78
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
L1TMuonBarrelKalmanStubProcessor::minBX_
int minBX_
Definition: L1TMuonBarrelKalmanStubProcessor.h:36
L1MuDTChambThDigi::quality
int quality(const int i) const
Definition: L1MuDTChambThDigi.cc:97
L1MuDTChambPhDigi::scNum
int scNum() const
Definition: L1MuDTChambPhDigi.cc:71
L1TMuonBarrelKalmanStubProcessor::eta3_
std::vector< int > eta3_
Definition: L1TMuonBarrelKalmanStubProcessor.h:40
L1MuDTTFMasks::get_inrec_chdis_st4
bool get_inrec_chdis_st4(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:105
L1MuDTChambThContainer::chThetaSegm
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambThContainer.cc:65
L1MuDTChambThDigi::stNum
int stNum() const
Definition: L1MuDTChambThDigi.cc:81
DDAxes::phi
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
L1TMuonBarrelKalmanStubProcessor::verbose_
int verbose_
Definition: L1TMuonBarrelKalmanStubProcessor.h:43
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
L1MuDTChambThDigi
Definition: L1MuDTChambThDigi.h:33
L1MuDTTFMasks::get_etsoc_chdis_st1
bool get_etsoc_chdis_st1(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:129
HLT_FULL_cff.eta4
eta4
Definition: HLT_FULL_cff.py:9603
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
L1MuDTChambPhDigi::Ts2Tag
int Ts2Tag() const
Definition: L1MuDTChambPhDigi.cc:80
L1MuDTChambPhDigi::code
int code() const
Definition: L1MuDTChambPhDigi.cc:78
HLT_FULL_cff.eta6
eta6
Definition: HLT_FULL_cff.py:9605
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31