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 16 of file L1TMuonBarrelKalmanStubProcessor.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file L1TMuonBarrelKalmanStubProcessor.cc.

23  :
24  minPhiQuality_(iConfig.getParameter<int>("minPhiQuality")),
25  minBX_(iConfig.getParameter<int>("minBX")),
26  maxBX_(iConfig.getParameter<int>("maxBX")),
27  eta1_(iConfig.getParameter<std::vector<int> >("cotTheta_1")),
28  eta2_(iConfig.getParameter<std::vector<int> >("cotTheta_2")),
29  eta3_(iConfig.getParameter<std::vector<int> >("cotTheta_3")),
30  disableMasks_(iConfig.getParameter<bool>("disableMasks")),
31  verbose_(iConfig.getParameter<int>("verbose"))
32 {
33 
34 }
T getParameter(std::string const &) const
L1TMuonBarrelKalmanStubProcessor::~L1TMuonBarrelKalmanStubProcessor ( )

Definition at line 38 of file L1TMuonBarrelKalmanStubProcessor.cc.

38 {}

Member Function Documentation

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

Definition at line 52 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::bxNum(), calculateEta(), L1MuDTChambPhDigi::code(), mps_fire::i, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), jets_cff::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().

52  {
53  int wheel = phiS.whNum();
54  int sector = phiS.scNum();
55  int station = phiS.stNum();
56  int phi = phiS.phi();
57  int phiB = phiS.phiB();
58  bool tag = (phiS.Ts2Tag()==1);
59  int bx=phiS.bxNum();
60  int quality=phiS.code();
61 
62 
63 
64  //Now full eta
65  int qeta1=0;
66  int qeta2=0;
67  int eta1=255;
68  int eta2=255;
69 
70 
71  bool hasEta=false;
72  for (uint i=0;i<7;++i) {
73  if (etaS->position(i)==0)
74  continue;
75  if (!hasEta) {
76  hasEta=true;
77  eta1=calculateEta(i,etaS->whNum(),etaS->scNum(),etaS->stNum());
78  if (etaS->quality(i)==1)
79  qeta1=2;
80  else
81  qeta1=1;
82  }
83  else {
84  eta2=calculateEta(i,etaS->whNum(),etaS->scNum(),etaS->stNum());
85  if (etaS->quality(i)==1)
86  qeta2=2;
87  else
88  qeta2=1;
89  }
90  }
91  L1MuKBMTCombinedStub stub(wheel,sector,station,phi,phiB,tag,
92  bx,quality,eta1,eta2,qeta1,qeta2);
93 
94  return stub;
95 
96  }
int quality(const int i) const
int position(const int i) const
def uint(string)
L1MuKBMTCombinedStub L1TMuonBarrelKalmanStubProcessor::buildStubNoEta ( const L1MuDTChambPhDigi phiS)
private

Definition at line 102 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhDigi::code(), phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), jets_cff::quality, L1MuDTChambPhDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), GlobalPosition_Frontier_DevDB_cff::tag, L1MuDTChambPhDigi::Ts2Tag(), makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Referenced by makeStubs().

102  {
103  int wheel = phiS.whNum();
104  int sector = phiS.scNum();
105  int station = phiS.stNum();
106  int phi = phiS.phi();
107  int phiB = phiS.phiB();
108  bool tag = (phiS.Ts2Tag()==1);
109  int bx=phiS.bxNum();
110  int quality=phiS.code();
111 
112 
113  //Now full eta
114  int qeta1=0;
115  int qeta2=0;
116  int eta1=7;
117  int eta2=7;
118  L1MuKBMTCombinedStub stub(wheel,sector,station,phi,phiB,tag,
119  bx,quality,eta1,eta2,qeta1,qeta2);
120 
121  return stub;
122 
123 }
int L1TMuonBarrelKalmanStubProcessor::calculateEta ( uint  i,
int  wheel,
uint  sector,
uint  station 
)
private

Definition at line 244 of file L1TMuonBarrelKalmanStubProcessor.cc.

References PVValHelper::eta, eta1_, eta2_, eta3_, and mps_fire::i.

Referenced by buildStub().

244  {
245  int eta=0;
246  if (wheel>0) {
247  eta=7*wheel+3-i;
248  }
249  else if (wheel<0) {
250  eta=7*wheel+i-3;
251  }
252  else {
253  if (sector==0 || sector==3 ||sector==4 ||sector==7 ||sector==8 ||sector==11)
254  eta=i-3;
255  else
256  eta=3-i;
257  }
258 
259 
260  if (station==1)
261  eta=-eta1_[eta+17];
262  else if (station==2)
263  eta=-eta2_[eta+17];
264  else
265  eta=-eta3_[eta+17];
266 
267 
268 
269  return eta;
270 
271 
272 
273 }
bool L1TMuonBarrelKalmanStubProcessor::isGoodPhiStub ( const L1MuDTChambPhDigi stub)
private

Definition at line 42 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::code(), and minPhiQuality_.

42  {
43  if (stub->code()<minPhiQuality_)
44  return false;
45  return true;
46 }
void L1TMuonBarrelKalmanStubProcessor::makeInputPattern ( const L1MuDTChambPhContainer phiContainer,
const L1MuDTChambThContainer etaContainer,
int  sector 
)

Definition at line 277 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), L1MuDTChambPhDigi::code(), gather_cfg::cout, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), L1MuDTChambThDigi::quality(), and makeMuonMisalignmentScenario::wheel.

Referenced by L1TMuonBarrelKalmanStubProducer::produce().

277  {
278 
279  int previousSector;
280  int nextSector;
281 
282  if (sector==11)
283  nextSector=0;
284  else
285  nextSector=sector+1;
286 
287  if (sector==0)
288  previousSector=11;
289  else
290  previousSector=sector-1;
291 
292 
293  ostringstream os;
294  os<<"I "<<sector<<" ";
295 
296 
297  bool hasStub=false;
298 
299  //start by previous sector
300  for (int wheel=-2;wheel<3;++wheel) {
301  const L1MuDTChambPhDigi* seg1 = phiContainer->chPhiSegm1(wheel,1,previousSector,0);
302  if (seg1 && seg1->phi()>111) {
303  os<<seg1->phi()-2144<<" "<<seg1->phiB()<<" "<<seg1->code()<<" 1 4 " ;
304  }
305  else {
306  os<<"-2048 0 0 0 15 ";
307  }
308  const L1MuDTChambPhDigi* seg2 = phiContainer->chPhiSegm1(wheel,2,previousSector,0);
309  if (seg2 && seg2->phi()>111) {
310  os<<seg2->phi()-2144<<" "<<seg2->phiB()<<" "<<seg2->code()<<" 1 4 " ;
311  }
312  else {
313  os<<"-2048 0 0 0 15 ";
314  }
315  const L1MuDTChambPhDigi* seg3 = phiContainer->chPhiSegm1(wheel,3,previousSector,0);
316  if (seg3 && seg3->phi()>111) {
317  os<<seg3->phi()-2144<<" "<<seg3->phiB()<<" "<<seg3->code()<<" 1 4 " ;
318  }
319  else {
320  os<<"-2048 0 0 0 15 ";
321  }
322  const L1MuDTChambPhDigi* seg4 = phiContainer->chPhiSegm1(wheel,4,previousSector,0);
323  if (seg4 && seg4->phi()>111) {
324  os<<seg4->phi()-2144<<" "<<seg4->phiB()<<" "<<seg4->code()<<" 1 4 " ;
325  }
326  else {
327  os<<"-2048 0 0 0 15 ";
328  }
329 
330  const L1MuDTChambThDigi* eta1 = etaContainer->chThetaSegm(wheel,1,previousSector,0);
331  if (eta1) {
332  int etaPos=eta1->position(0)+(eta1->position(1)<<1) +(eta1->position(2)<<2) +(eta1->position(3)<<3) +(eta1->position(4)<<4)+(eta1->position(5)<<5)+(eta1->position(6)<<6);
333  os<< etaPos<<" ";
334  }
335  else {
336  os<< " 0 ";
337  }
338  const L1MuDTChambThDigi* eta2 = etaContainer->chThetaSegm(wheel,2,previousSector,0);
339  if (eta2) {
340  int etaPos=eta2->position(0)+(eta2->position(1)<<1) +(eta2->position(2)<<2) +(eta2->position(3)<<3) +(eta2->position(4)<<4)+(eta2->position(5)<<5)+(eta2->position(6)<<6);
341  os<< etaPos<<" ";
342  }
343  else {
344  os<< " 0 ";
345  }
346 
347  const L1MuDTChambThDigi* eta3 = etaContainer->chThetaSegm(wheel,3,previousSector,0);
348  if (eta3) {
349  int etaPos=eta3->position(0)+(eta3->position(1)<<1) +(eta3->position(2)<<2) +(eta3->position(3)<<3) +(eta3->position(4)<<4)+(eta3->position(5)<<5)+(eta3->position(6)<<6);
350  os<< etaPos<<" ";
351  }
352  else {
353  os<< " 0 ";
354  }
355  const L1MuDTChambPhDigi* seg5 = phiContainer->chPhiSegm2(wheel,1,previousSector,-1);
356  if (seg5 && seg5->phi()>111) {
357  os<<seg5->phi()-2144<<" "<<seg5->phiB()<<" "<<seg5->code()<<" 1 5 " ;
358  }
359  else {
360  os<<"-2048 0 0 0 15 ";
361  }
362 
363  const L1MuDTChambPhDigi* seg6 = phiContainer->chPhiSegm2(wheel,2,previousSector,-1);
364  if (seg6 && seg6->phi()>111) {
365  os<<seg6->phi()-2144<<" "<<seg6->phiB()<<" "<<seg6->code()<<" 1 5 " ;
366  }
367  else {
368  os<<"-2048 0 0 0 15 ";
369  }
370  const L1MuDTChambPhDigi* seg7 = phiContainer->chPhiSegm2(wheel,3,previousSector,-1);
371  if (seg7 && seg7->phi()>111) {
372  os<<seg7->phi()-2144<<" "<<seg7->phiB()<<" "<<seg7->code()<<" 1 5 " ;
373  }
374  else {
375  os<<"-2048 0 0 0 15 ";
376  }
377  const L1MuDTChambPhDigi* seg8 = phiContainer->chPhiSegm2(wheel,4,previousSector,1);
378  if (seg8 && seg8->phi()>111) {
379  os<<seg8->phi()-2144<<" "<<seg8->phiB()<<" "<<seg8->code()<<" 1 5 " ;
380  }
381  else {
382  os<<"-2048 0 0 0 15 ";
383  }
384  if (eta1) {
385  int etaPos=eta1->quality(0)+(eta1->quality(1)<<1) +(eta1->quality(2)<<2) +(eta1->quality(3)<<3) +(eta1->quality(4)<<4)+(eta1->quality(5)<<5)+(eta1->quality(6)<<6);
386  os<< etaPos<<" ";
387  }
388  else {
389  os<< " 0 ";
390  }
391  if (eta2) {
392  int etaPos=eta2->quality(0)+(eta2->quality(1)<<1) +(eta2->quality(2)<<2) +(eta2->quality(3)<<3) +(eta2->quality(4)<<4)+(eta2->quality(5)<<5)+(eta2->quality(6)<<6);
393  os<< etaPos<<" ";
394  }
395  else {
396  os<< " 0 ";
397  }
398  if (eta3) {
399  int etaPos=eta3->quality(0)+(eta3->quality(1)<<1) +(eta3->quality(2)<<2) +(eta3->quality(3)<<3) +(eta3->quality(4)<<4)+(eta3->quality(5)<<5)+(eta3->quality(6)<<6);
400  os<< etaPos<<" ";
401  }
402  else {
403  os<< " 0 ";
404  }
405 
407  const L1MuDTChambPhDigi* seg9 = phiContainer->chPhiSegm1(wheel,1,sector,0);
408  if (seg9 ) {
409  os<<seg9->phi()<<" "<<seg9->phiB()<<" "<<seg9->code()<<" 1 0 " ;
410  }
411  else {
412  os<<"-2048 0 0 0 15 ";
413  }
414  const L1MuDTChambPhDigi* seg10 = phiContainer->chPhiSegm1(wheel,2,sector,0);
415  if (seg10 ) {
416  hasStub=true;
417  os<<seg10->phi()<<" "<<seg10->phiB()<<" "<<seg10->code()<<" 1 0 " ;
418  }
419  else {
420  os<<"-2048 0 0 0 15 ";
421  }
422  const L1MuDTChambPhDigi* seg11 = phiContainer->chPhiSegm1(wheel,3,sector,0);
423  if (seg11 ) {
424  hasStub=true;
425  os<<seg11->phi()<<" "<<seg11->phiB()<<" "<<seg11->code()<<" 1 0 " ;
426  }
427  else {
428  os<<"-2048 0 0 0 15 ";
429  }
430  const L1MuDTChambPhDigi* seg12 = phiContainer->chPhiSegm1(wheel,4,sector,0);
431  if (seg12 ) {
432  hasStub=true;
433  os<<seg12->phi()<<" "<<seg12->phiB()<<" "<<seg12->code()<<" 1 0 " ;
434  }
435  else {
436  os<<"-2048 0 0 0 15 ";
437  }
438  const L1MuDTChambThDigi* eta4 = etaContainer->chThetaSegm(wheel,1,sector,0);
439  if (eta4) {
440  int etaPos=eta4->position(0)+(eta4->position(1)<<1) +(eta4->position(2)<<2) +(eta4->position(3)<<3) +(eta4->position(4)<<4)+(eta4->position(5)<<5)+(eta4->position(6)<<6);
441  os<< etaPos<<" ";
442  }
443  else {
444  os<< " 0 ";
445  }
446 
447  const L1MuDTChambThDigi* eta5 = etaContainer->chThetaSegm(wheel,2,sector,0);
448  if (eta5) {
449  int etaPos=eta5->position(0)+(eta5->position(1)<<1) +(eta5->position(2)<<2) +(eta5->position(3)<<3) +(eta5->position(4)<<4)+(eta5->position(5)<<5)+(eta5->position(6)<<6);
450  os<< etaPos<<" ";
451  }
452  else {
453  os<< " 0 ";
454  }
455  const L1MuDTChambThDigi* eta6 = etaContainer->chThetaSegm(wheel,3,sector,0);
456  if (eta6) {
457  int etaPos=eta6->position(0)+(eta6->position(1)<<1) +(eta6->position(2)<<2) +(eta6->position(3)<<3) +(eta6->position(4)<<4)+(eta6->position(5)<<5)+(eta6->position(6)<<6);
458  os<< etaPos<<" ";
459  }
460  else {
461  os<< " 0 ";
462  }
463 
464  const L1MuDTChambPhDigi* seg13 = phiContainer->chPhiSegm2(wheel,1,sector,-1);
465  if (seg13 ) {
466  os<<seg13->phi()<<" "<<seg13->phiB()<<" "<<seg13->code()<<" 1 1 " ;
467  }
468  else {
469  os<<"-2048 0 0 0 15 ";
470  }
471 
472  const L1MuDTChambPhDigi* seg14 = phiContainer->chPhiSegm2(wheel,2,sector,-1);
473  if (seg14 ) {
474  hasStub=true;
475 
476  os<<seg14->phi()<<" "<<seg14->phiB()<<" "<<seg14->code()<<" 1 1 " ;
477  }
478  else {
479  os<<"-2048 0 0 0 15 ";
480  }
481 
482  const L1MuDTChambPhDigi* seg15 = phiContainer->chPhiSegm2(wheel,3,sector,-1);
483  if (seg15 ) {
484  hasStub=true;
485 
486  os<<seg15->phi()<<" "<<seg15->phiB()<<" "<<seg15->code()<<" 1 1 " ;
487  }
488  else {
489  os<<"-2048 0 0 0 15 ";
490  }
491  const L1MuDTChambPhDigi* seg16 = phiContainer->chPhiSegm2(wheel,4,sector,-1);
492  if (seg16 ) {
493  hasStub=true;
494 
495  os<<seg16->phi()<<" "<<seg16->phiB()<<" "<<seg16->code()<<" 1 1 " ;
496  }
497  else {
498  os<<"-2048 0 0 0 15 ";
499  }
500 
501 
502  if (eta4) {
503  int etaPos=eta4->quality(0)+(eta4->quality(1)<<1) +(eta4->quality(2)<<2) +(eta4->quality(3)<<3) +(eta4->quality(4)<<4)+(eta4->quality(5)<<5)+(eta4->quality(6)<<6);
504  os<< etaPos<<" ";
505  }
506  else {
507  os<< " 0 ";
508  }
509 
510  if (eta5) {
511  int etaPos=eta5->quality(0)+(eta5->quality(1)<<1) +(eta5->quality(2)<<2) +(eta5->quality(3)<<3) +(eta5->quality(4)<<4)+(eta5->quality(5)<<5)+(eta5->quality(6)<<6);
512  os<< etaPos<<" ";
513  }
514  else {
515  os<< " 0 ";
516  }
517  if (eta6) {
518  int etaPos=eta6->quality(0)+(eta6->quality(1)<<1) +(eta6->quality(2)<<2) +(eta6->quality(3)<<3) +(eta6->quality(4)<<4)+(eta6->quality(5)<<5)+(eta6->quality(6)<<6);
519  os<< etaPos<<" ";
520  }
521  else {
522  os<< " 0 ";
523  }
525  const L1MuDTChambPhDigi* seg17 = phiContainer->chPhiSegm1(wheel,1,nextSector,0);
526  if (seg17 && seg17->phi()<-112) {
527  os<<seg17->phi()+2144<<" "<<seg17->phiB()<<" "<<seg17->code()<<" 1 2 " ;
528  }
529  else {
530  os<<"-2048 0 0 0 15 ";
531  }
532  const L1MuDTChambPhDigi* seg18 = phiContainer->chPhiSegm1(wheel,2,nextSector,0);
533  if (seg18 && seg18->phi()<-112) {
534  os<<seg18->phi()+2144<<" "<<seg18->phiB()<<" "<<seg18->code()<<" 1 2 " ;
535  }
536  else {
537  os<<"-2048 0 0 0 15 ";
538  }
539  const L1MuDTChambPhDigi* seg19 = phiContainer->chPhiSegm1(wheel,3,nextSector,0);
540  if (seg19 && seg19->phi()<-112) {
541  os<<seg19->phi()+2144<<" "<<seg19->phiB()<<" "<<seg19->code()<<" 1 2 " ;
542  }
543  else {
544  os<<"-2048 0 0 0 15 ";
545  }
546  const L1MuDTChambPhDigi* seg20 = phiContainer->chPhiSegm1(wheel,4,nextSector,0);
547  if (seg20 && seg20->phi()<-112) {
548  os<<seg20->phi()+2144<<" "<<seg20->phiB()<<" "<<seg20->code()<<" 1 2 " ;
549  }
550  else {
551  os<<"-2048 0 0 0 15 ";
552  }
553  const L1MuDTChambThDigi* eta7 = etaContainer->chThetaSegm(wheel,1,nextSector,0);
554  if (eta7) {
555  int etaPos=eta7->position(0)+(eta7->position(1)<<1) +(eta7->position(2)<<2) +(eta7->position(3)<<3) +(eta7->position(4)<<4)+(eta7->position(5)<<5)+(eta7->position(6)<<6);
556  os<< etaPos<<" ";
557  }
558  else {
559  os<< " 0 ";
560  }
561  const L1MuDTChambThDigi* eta8 = etaContainer->chThetaSegm(wheel,2,nextSector,0);
562  if (eta8) {
563  int etaPos=eta8->position(0)+(eta8->position(1)<<1) +(eta8->position(2)<<2) +(eta8->position(3)<<3) +(eta8->position(4)<<4)+(eta8->position(5)<<5)+(eta8->position(6)<<6);
564  os<< etaPos<<" ";
565  }
566  else {
567  os<< " 0 ";
568  }
569  const L1MuDTChambThDigi* eta9 = etaContainer->chThetaSegm(wheel,3,nextSector,0);
570  if (eta9) {
571  int etaPos=eta9->position(0)+(eta9->position(1)<<1) +(eta9->position(2)<<2) +(eta9->position(3)<<3) +(eta9->position(4)<<4)+(eta9->position(5)<<5)+(eta9->position(6)<<6);
572  os<< etaPos<<" ";
573  }
574  else {
575  os<< " 0 ";
576  }
577  const L1MuDTChambPhDigi* seg21 = phiContainer->chPhiSegm2(wheel,1,nextSector,-1);
578  if (seg21 && seg21->phi()<-112) {
579  os<<seg21->phi()+2144<<" "<<seg21->phiB()<<" "<<seg21->code()<<" 1 3 " ;
580  }
581  else {
582  os<<"-2048 0 0 0 15 ";
583  }
584 
585  const L1MuDTChambPhDigi* seg22 = phiContainer->chPhiSegm2(wheel,2,nextSector,-1);
586  if (seg22 && seg22->phi()<-112) {
587  os<<seg22->phi()+2144<<" "<<seg22->phiB()<<" "<<seg22->code()<<" 1 3 " ;
588  }
589  else {
590  os<<"-2048 0 0 0 15 ";
591  }
592  const L1MuDTChambPhDigi* seg23 = phiContainer->chPhiSegm2(wheel,3,nextSector,-1);
593  if (seg23 && seg23->phi()<-112) {
594  os<<seg23->phi()+2144<<" "<<seg23->phiB()<<" "<<seg23->code()<<" 1 2 " ;
595  }
596  else {
597  os<<"-2048 0 0 0 15 ";
598  }
599  const L1MuDTChambPhDigi* seg24 = phiContainer->chPhiSegm2(wheel,4,nextSector,-1);
600  if (seg24 && seg24->phi()<-112) {
601  os<<seg24->phi()+2144<<" "<<seg24->phiB()<<" "<<seg24->code()<<" 1 2 " ;
602  }
603  else {
604  os<<"-2048 0 0 0 15 ";
605  }
606  if (eta7) {
607  int etaPos=eta7->quality(0)+(eta7->quality(1)<<1) +(eta7->quality(2)<<2) +(eta7->quality(3)<<3) +(eta7->quality(4)<<4)+(eta7->quality(5)<<5)+(eta7->quality(6)<<6);
608  os<< etaPos<<" ";
609  }
610  else {
611  os<< " 0 ";
612  }
613  if (eta8) {
614  int etaPos=eta8->quality(0)+(eta8->quality(1)<<1) +(eta8->quality(2)<<2) +(eta8->quality(3)<<3) +(eta8->quality(4)<<4)+(eta8->quality(5)<<5)+(eta8->quality(6)<<6);
615  os<< etaPos<<" ";
616  }
617  else {
618  os<< " 0 ";
619  }
620  if (eta9) {
621  int etaPos=eta9->quality(0)+(eta9->quality(1)<<1) +(eta9->quality(2)<<2) +(eta9->quality(3)<<3) +(eta9->quality(4)<<4)+(eta9->quality(5)<<5)+(eta9->quality(6)<<6);
622  os<< etaPos<<" ";
623  }
624  else {
625  os<< " 0 ";
626  }
627 
628  }
629  if (hasStub) {
630  std::cout <<os.str()<<std::endl;
631  }
632 }
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
int quality(const int i) const
int position(const int i) const
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
L1MuKBMTCombinedStubCollection L1TMuonBarrelKalmanStubProcessor::makeStubs ( const L1MuDTChambPhContainer phiContainer,
const L1MuDTChambThContainer etaContainer,
const L1TMuonBarrelParams params 
)

Definition at line 130 of file L1TMuonBarrelKalmanStubProcessor.cc.

References buildStub(), buildStubNoEta(), L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), L1MuDTChambPhDigi::code(), 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(), L1TMuonBarrelParams::l1mudttfmasks, maxBX_, minBX_, minPhiQuality_, MillePedeFileConverter_cfg::out, relativeConstraints::station, parallelization::uint(), and makeMuonMisalignmentScenario::wheel.

Referenced by L1TMuonBarrelKalmanStubProducer::produce().

130  {
131 
132 
133  //get the masks from th standard BMTF setup!
134  // const L1TMuonBarrelParamsRcd& bmtfParamsRcd = setup.get<L1TMuonBarrelParamsRcd>();
135  // bmtfParamsRcd.get(bmtfParamsHandle);
136  // const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
137  // masks_ = bmtfParams.l1mudttfmasks;
138 
139 
140  //get the masks!
141  L1MuDTTFMasks msks = params.l1mudttfmasks;
142 
143 
145  for (int bx=minBX_;bx<=maxBX_;bx++) {
146  for (int wheel=-2;wheel<=2;wheel++) {
147  for (uint sector=0;sector<12;sector++) {
148  for (uint station=1;station<5;station++) {
149 
150  //Have to cook up something for the fact that KMTF doesnt use 2 SP at whel=0
151  int lwheel1;
152  int lwheel2;
153  if (wheel<0) {
154  lwheel1=wheel-1;
155  lwheel2=wheel-1;
156  }
157  else if (wheel>0) {
158  lwheel1=wheel+1;
159  lwheel2=wheel+1;
160  }
161  else {
162  lwheel1=-1;
163  lwheel2=+1;
164  }
165 
166  bool phiMask=false;
167  bool etaMask=false;
168  if (station==1) {
169  phiMask = msks.get_inrec_chdis_st1(lwheel1, sector) |msks.get_inrec_chdis_st1(lwheel2, sector);
170  etaMask = msks.get_etsoc_chdis_st1(lwheel1, sector) |msks.get_etsoc_chdis_st1(lwheel2, sector);
171  }
172  if (station==2) {
173  phiMask = msks.get_inrec_chdis_st2(lwheel1, sector) |msks.get_inrec_chdis_st2(lwheel2, sector);
174  etaMask = msks.get_etsoc_chdis_st2(lwheel1, sector) |msks.get_etsoc_chdis_st2(lwheel2, sector);
175 
176  }
177  if (station==3) {
178  phiMask = msks.get_inrec_chdis_st3(lwheel1, sector) |msks.get_inrec_chdis_st3(lwheel2, sector);
179  etaMask = msks.get_etsoc_chdis_st3(lwheel1, sector) |msks.get_etsoc_chdis_st3(lwheel2, sector);
180  }
181  if (station==4) {
182  phiMask = msks.get_inrec_chdis_st4(lwheel1, sector) |msks.get_inrec_chdis_st4(lwheel2, sector);
183  }
184 
185 
186  if (disableMasks_)
187  {
188  phiMask=false;
189  etaMask=false;
190  }
191 
192 
193  bool hasEta=false;
194  L1MuDTChambThDigi const* tseta = etaContainer->chThetaSegm(wheel,station,sector,bx);
195  if (tseta && (!etaMask)) {
196  hasEta=true;
197  }
198 
199  // if (abs(wheel)==2 && station==1)
200  // continue;
201 
202 
203  L1MuDTChambPhDigi const* high = phiContainer->chPhiSegm1(wheel,station,sector,bx);
204  if (high && (!phiMask)) {
205  if (high->code()>=minPhiQuality_) {
206  const L1MuDTChambPhDigi& stubPhi = *high;
207  if (hasEta) {
208  out.push_back(buildStub(stubPhi,tseta));
209  }
210  else {
211  out.push_back(buildStubNoEta(stubPhi));
212  }
213  }
214  }
215 
216  L1MuDTChambPhDigi const* low = phiContainer->chPhiSegm2(wheel,station,sector,bx-1);
217  if (low && ! (phiMask)) {
218  if (low->code()>=minPhiQuality_) {
219  const L1MuDTChambPhDigi& stubPhi = *low;
220  if (hasEta) {
221  out.push_back(buildStub(stubPhi,tseta));
222  }
223  else {
224  out.push_back(buildStubNoEta(stubPhi));
225  }
226  }
227  }
228  }
229  }
230  }
231  }
232 
233 
234 
235 
236 
237 
238 
239  return out;
240 }
L1MuKBMTCombinedStub buildStub(const L1MuDTChambPhDigi &, const L1MuDTChambThDigi *)
L1MuKBMTCombinedStub buildStubNoEta(const L1MuDTChambPhDigi &)
bool get_etsoc_chdis_st3(int wh, int sc) const
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
bool get_inrec_chdis_st1(int wh, int sc) const
bool get_inrec_chdis_st3(int wh, int sc) const
L1MuDTTFMasks l1mudttfmasks
bool get_inrec_chdis_st2(int wh, int sc) const
bool get_etsoc_chdis_st2(int wh, int sc) const
bool get_inrec_chdis_st4(int wh, int sc) const
def uint(string)
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
bool get_etsoc_chdis_st1(int wh, int sc) const
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection

Member Data Documentation

bool L1TMuonBarrelKalmanStubProcessor::disableMasks_
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

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

Definition at line 38 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

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

Definition at line 39 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

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

Definition at line 40 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by calculateEta().

int L1TMuonBarrelKalmanStubProcessor::maxBX_
private

Definition at line 37 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

int L1TMuonBarrelKalmanStubProcessor::minBX_
private

Definition at line 36 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

int L1TMuonBarrelKalmanStubProcessor::minPhiQuality_
private

Definition at line 35 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by isGoodPhiStub(), and makeStubs().

int L1TMuonBarrelKalmanStubProcessor::verbose_
private

Definition at line 44 of file L1TMuonBarrelKalmanStubProcessor.h.