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 ( )

◆ 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")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307

◆ ~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.

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

Referenced by makeStubs().

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 }
int position(const int i) const
string quality
int quality(const int i) const

◆ buildStubNoEta()

L1MuKBMTCombinedStub L1TMuonBarrelKalmanStubProcessor::buildStubNoEta ( const L1MuDTChambPhDigi phiS)
private

Definition at line 74 of file L1TMuonBarrelKalmanStubProcessor.cc.

References nano_mu_digi_cff::bx, L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhDigi::code(), HLT_2023v12_cff::eta1, HLT_2023v12_cff::eta2, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), quality, L1MuDTChambPhDigi::scNum(), nano_mu_digi_cff::sector, relativeConstraints::station, L1MuDTChambPhDigi::stNum(), makeGlobalPositionRcd_cfg::tag, L1MuDTChambPhDigi::Ts2Tag(), makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Referenced by makeStubs().

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 }
string quality

◆ calculateEta()

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

Definition at line 189 of file L1TMuonBarrelKalmanStubProcessor.cc.

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

Referenced by buildStub().

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 }

◆ isGoodPhiStub()

bool L1TMuonBarrelKalmanStubProcessor::isGoodPhiStub ( const L1MuDTChambPhDigi stub)
private

Definition at line 27 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::code(), and minPhiQuality_.

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

◆ makeInputPattern()

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

Definition at line 212 of file L1TMuonBarrelKalmanStubProcessor.cc.

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

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  const L1MuDTChambPhDigi* seg8 = phiContainer->chPhiSegm2(wheel, 4, previousSector, -1);
306  if (seg8 && seg8->phi() > 111) {
307  os << seg8->phi() - 2144 << " " << seg8->phiB() << " " << seg8->code() << " 1 5 ";
308  } else {
309  os << "-2048 0 0 0 15 ";
310  }
311  if (eta1) {
312  int etaPos = eta1->quality(0) + (eta1->quality(1) << 1) + (eta1->quality(2) << 2) + (eta1->quality(3) << 3) +
313  (eta1->quality(4) << 4) + (eta1->quality(5) << 5) + (eta1->quality(6) << 6);
314  os << etaPos << " ";
315  } else {
316  os << " 0 ";
317  }
318  if (eta2) {
319  int etaPos = eta2->quality(0) + (eta2->quality(1) << 1) + (eta2->quality(2) << 2) + (eta2->quality(3) << 3) +
320  (eta2->quality(4) << 4) + (eta2->quality(5) << 5) + (eta2->quality(6) << 6);
321  os << etaPos << " ";
322  } else {
323  os << " 0 ";
324  }
325  if (eta3) {
326  int etaPos = eta3->quality(0) + (eta3->quality(1) << 1) + (eta3->quality(2) << 2) + (eta3->quality(3) << 3) +
327  (eta3->quality(4) << 4) + (eta3->quality(5) << 5) + (eta3->quality(6) << 6);
328  os << etaPos << " ";
329  } else {
330  os << " 0 ";
331  }
332 
334  const L1MuDTChambPhDigi* seg9 = phiContainer->chPhiSegm1(wheel, 1, sector, 0);
335  if (seg9) {
336  os << seg9->phi() << " " << seg9->phiB() << " " << seg9->code() << " 1 0 ";
337  } else {
338  os << "-2048 0 0 0 15 ";
339  }
340  const L1MuDTChambPhDigi* seg10 = phiContainer->chPhiSegm1(wheel, 2, sector, 0);
341  if (seg10) {
342  hasStub = true;
343  os << seg10->phi() << " " << seg10->phiB() << " " << seg10->code() << " 1 0 ";
344  } else {
345  os << "-2048 0 0 0 15 ";
346  }
347  const L1MuDTChambPhDigi* seg11 = phiContainer->chPhiSegm1(wheel, 3, sector, 0);
348  if (seg11) {
349  hasStub = true;
350  os << seg11->phi() << " " << seg11->phiB() << " " << seg11->code() << " 1 0 ";
351  } else {
352  os << "-2048 0 0 0 15 ";
353  }
354  const L1MuDTChambPhDigi* seg12 = phiContainer->chPhiSegm1(wheel, 4, sector, 0);
355  if (seg12) {
356  hasStub = true;
357  os << seg12->phi() << " " << seg12->phiB() << " " << seg12->code() << " 1 2 ";
358  } else {
359  os << "-2048 0 0 0 15 ";
360  }
361  const L1MuDTChambThDigi* eta4 = etaContainer->chThetaSegm(wheel, 1, sector, 0);
362  if (eta4) {
363  int etaPos = eta4->position(0) + (eta4->position(1) << 1) + (eta4->position(2) << 2) + (eta4->position(3) << 3) +
364  (eta4->position(4) << 4) + (eta4->position(5) << 5) + (eta4->position(6) << 6);
365  os << etaPos << " ";
366  } else {
367  os << " 0 ";
368  }
369 
370  const L1MuDTChambThDigi* eta5 = etaContainer->chThetaSegm(wheel, 2, sector, 0);
371  if (eta5) {
372  int etaPos = eta5->position(0) + (eta5->position(1) << 1) + (eta5->position(2) << 2) + (eta5->position(3) << 3) +
373  (eta5->position(4) << 4) + (eta5->position(5) << 5) + (eta5->position(6) << 6);
374  os << etaPos << " ";
375  } else {
376  os << " 0 ";
377  }
378  const L1MuDTChambThDigi* eta6 = etaContainer->chThetaSegm(wheel, 3, sector, 0);
379  if (eta6) {
380  int etaPos = eta6->position(0) + (eta6->position(1) << 1) + (eta6->position(2) << 2) + (eta6->position(3) << 3) +
381  (eta6->position(4) << 4) + (eta6->position(5) << 5) + (eta6->position(6) << 6);
382  os << etaPos << " ";
383  } else {
384  os << " 0 ";
385  }
386 
387  const L1MuDTChambPhDigi* seg13 = phiContainer->chPhiSegm2(wheel, 1, sector, -1);
388  if (seg13) {
389  os << seg13->phi() << " " << seg13->phiB() << " " << seg13->code() << " 1 1 ";
390  } else {
391  os << "-2048 0 0 0 15 ";
392  }
393 
394  const L1MuDTChambPhDigi* seg14 = phiContainer->chPhiSegm2(wheel, 2, sector, -1);
395  if (seg14) {
396  hasStub = true;
397 
398  os << seg14->phi() << " " << seg14->phiB() << " " << seg14->code() << " 1 1 ";
399  } else {
400  os << "-2048 0 0 0 15 ";
401  }
402 
403  const L1MuDTChambPhDigi* seg15 = phiContainer->chPhiSegm2(wheel, 3, sector, -1);
404  if (seg15) {
405  hasStub = true;
406 
407  os << seg15->phi() << " " << seg15->phiB() << " " << seg15->code() << " 1 1 ";
408  } else {
409  os << "-2048 0 0 0 15 ";
410  }
411  const L1MuDTChambPhDigi* seg16 = phiContainer->chPhiSegm2(wheel, 4, sector, -1);
412  if (seg16) {
413  hasStub = true;
414 
415  os << seg16->phi() << " " << seg16->phiB() << " " << seg16->code() << " 1 1 ";
416  } else {
417  os << "-2048 0 0 0 15 ";
418  }
419 
420  if (eta4) {
421  int etaPos = eta4->quality(0) + (eta4->quality(1) << 1) + (eta4->quality(2) << 2) + (eta4->quality(3) << 3) +
422  (eta4->quality(4) << 4) + (eta4->quality(5) << 5) + (eta4->quality(6) << 6);
423  os << etaPos << " ";
424  } else {
425  os << " 0 ";
426  }
427 
428  if (eta5) {
429  int etaPos = eta5->quality(0) + (eta5->quality(1) << 1) + (eta5->quality(2) << 2) + (eta5->quality(3) << 3) +
430  (eta5->quality(4) << 4) + (eta5->quality(5) << 5) + (eta5->quality(6) << 6);
431  os << etaPos << " ";
432  } else {
433  os << " 0 ";
434  }
435  if (eta6) {
436  int etaPos = eta6->quality(0) + (eta6->quality(1) << 1) + (eta6->quality(2) << 2) + (eta6->quality(3) << 3) +
437  (eta6->quality(4) << 4) + (eta6->quality(5) << 5) + (eta6->quality(6) << 6);
438  os << etaPos << " ";
439  } else {
440  os << " 0 ";
441  }
443  const L1MuDTChambPhDigi* seg17 = phiContainer->chPhiSegm1(wheel, 1, nextSector, 0);
444  if (seg17 && seg17->phi() < -112) {
445  os << seg17->phi() + 2144 << " " << seg17->phiB() << " " << seg17->code() << " 1 2 ";
446  } else {
447  os << "-2048 0 0 0 15 ";
448  }
449  const L1MuDTChambPhDigi* seg18 = phiContainer->chPhiSegm1(wheel, 2, nextSector, 0);
450  if (seg18 && seg18->phi() < -112) {
451  os << seg18->phi() + 2144 << " " << seg18->phiB() << " " << seg18->code() << " 1 2 ";
452  } else {
453  os << "-2048 0 0 0 15 ";
454  }
455  const L1MuDTChambPhDigi* seg19 = phiContainer->chPhiSegm1(wheel, 3, nextSector, 0);
456  if (seg19 && seg19->phi() < -112) {
457  os << seg19->phi() + 2144 << " " << seg19->phiB() << " " << seg19->code() << " 1 2 ";
458  } else {
459  os << "-2048 0 0 0 15 ";
460  }
461  const L1MuDTChambPhDigi* seg20 = phiContainer->chPhiSegm1(wheel, 4, nextSector, 0);
462  if (seg20 && seg20->phi() < -112) {
463  os << seg20->phi() + 2144 << " " << seg20->phiB() << " " << seg20->code() << " 1 2 ";
464  } else {
465  os << "-2048 0 0 0 15 ";
466  }
467  const L1MuDTChambThDigi* eta7 = etaContainer->chThetaSegm(wheel, 1, nextSector, 0);
468  if (eta7) {
469  int etaPos = eta7->position(0) + (eta7->position(1) << 1) + (eta7->position(2) << 2) + (eta7->position(3) << 3) +
470  (eta7->position(4) << 4) + (eta7->position(5) << 5) + (eta7->position(6) << 6);
471  os << etaPos << " ";
472  } else {
473  os << " 0 ";
474  }
475  const L1MuDTChambThDigi* eta8 = etaContainer->chThetaSegm(wheel, 2, nextSector, 0);
476  if (eta8) {
477  int etaPos = eta8->position(0) + (eta8->position(1) << 1) + (eta8->position(2) << 2) + (eta8->position(3) << 3) +
478  (eta8->position(4) << 4) + (eta8->position(5) << 5) + (eta8->position(6) << 6);
479  os << etaPos << " ";
480  } else {
481  os << " 0 ";
482  }
483  const L1MuDTChambThDigi* eta9 = etaContainer->chThetaSegm(wheel, 3, nextSector, 0);
484  if (eta9) {
485  int etaPos = eta9->position(0) + (eta9->position(1) << 1) + (eta9->position(2) << 2) + (eta9->position(3) << 3) +
486  (eta9->position(4) << 4) + (eta9->position(5) << 5) + (eta9->position(6) << 6);
487  os << etaPos << " ";
488  } else {
489  os << " 0 ";
490  }
491  const L1MuDTChambPhDigi* seg21 = phiContainer->chPhiSegm2(wheel, 1, nextSector, -1);
492  if (seg21 && seg21->phi() < -112) {
493  os << seg21->phi() + 2144 << " " << seg21->phiB() << " " << seg21->code() << " 1 3 ";
494  } else {
495  os << "-2048 0 0 0 15 ";
496  }
497 
498  const L1MuDTChambPhDigi* seg22 = phiContainer->chPhiSegm2(wheel, 2, nextSector, -1);
499  if (seg22 && seg22->phi() < -112) {
500  os << seg22->phi() + 2144 << " " << seg22->phiB() << " " << seg22->code() << " 1 3 ";
501  } else {
502  os << "-2048 0 0 0 15 ";
503  }
504  const L1MuDTChambPhDigi* seg23 = phiContainer->chPhiSegm2(wheel, 3, nextSector, -1);
505  if (seg23 && seg23->phi() < -112) {
506  os << seg23->phi() + 2144 << " " << seg23->phiB() << " " << seg23->code() << " 1 3 ";
507  } else {
508  os << "-2048 0 0 0 15 ";
509  }
510  const L1MuDTChambPhDigi* seg24 = phiContainer->chPhiSegm2(wheel, 4, nextSector, -1);
511  if (seg24 && seg24->phi() < -112) {
512  os << seg24->phi() + 2144 << " " << seg24->phiB() << " " << seg24->code() << " 1 3 ";
513  } else {
514  os << "-2048 0 0 0 15 ";
515  }
516  if (eta7) {
517  int etaPos = eta7->quality(0) + (eta7->quality(1) << 1) + (eta7->quality(2) << 2) + (eta7->quality(3) << 3) +
518  (eta7->quality(4) << 4) + (eta7->quality(5) << 5) + (eta7->quality(6) << 6);
519  os << etaPos << " ";
520  } else {
521  os << " 0 ";
522  }
523  if (eta8) {
524  int etaPos = eta8->quality(0) + (eta8->quality(1) << 1) + (eta8->quality(2) << 2) + (eta8->quality(3) << 3) +
525  (eta8->quality(4) << 4) + (eta8->quality(5) << 5) + (eta8->quality(6) << 6);
526  os << etaPos << " ";
527  } else {
528  os << " 0 ";
529  }
530  if (eta9) {
531  int etaPos = eta9->quality(0) + (eta9->quality(1) << 1) + (eta9->quality(2) << 2) + (eta9->quality(3) << 3) +
532  (eta9->quality(4) << 4) + (eta9->quality(5) << 5) + (eta9->quality(6) << 6);
533  os << etaPos << " ";
534  } else {
535  os << " 0 ";
536  }
537  }
538  if (hasStub) {
539  std::cout << os.str() << std::endl;
540  }
541 }
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
int position(const int i) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
int quality(const int i) const
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const

◆ makeStubs()

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

Definition at line 94 of file L1TMuonBarrelKalmanStubProcessor.cc.

References buildStub(), buildStubNoEta(), nano_mu_digi_cff::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, submitPVValidationJobs::params, nano_mu_digi_cff::sector, relativeConstraints::station, parallelization::uint, and makeMuonMisalignmentScenario::wheel.

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 }
L1MuKBMTCombinedStub buildStub(const L1MuDTChambPhDigi &, const L1MuDTChambThDigi *)
L1MuKBMTCombinedStub buildStubNoEta(const L1MuDTChambPhDigi &)
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
bool get_etsoc_chdis_st2(int wh, int sc) const
bool get_inrec_chdis_st4(int wh, int sc) const
bool get_etsoc_chdis_st1(int wh, int sc) const
bool get_inrec_chdis_st1(int wh, int sc) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
bool get_etsoc_chdis_st3(int wh, int sc) const
bool get_inrec_chdis_st2(int wh, int sc) const
bool get_inrec_chdis_st3(int wh, int sc) const
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const

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.