CMS 3D CMS Logo

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

#include <L1MuDTTrackCand.h>

Inheritance diagram for L1MuDTTrackCand:
L1MuRegionalCand

Public Member Functions

 L1MuDTTrackCand ()
 
 L1MuDTTrackCand (unsigned dataword, int bx, int uwh, int usc, int utag, int adr1, int adr2, int adr3, int adr4, int utc)
 
 L1MuDTTrackCand (unsigned type_idx, unsigned phi, unsigned eta, unsigned pt, unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx, int uwh, int usc, int utag, int adr1, int adr2, int adr3, int adr4)
 
int scNum () const
 
void setAdd (int ust)
 
void setTC ()
 
int stNum (int ust) const
 
int TCNum () const
 
int TrkTag () const
 
int whNum () const
 
 ~L1MuDTTrackCand () override
 
- Public Member Functions inherited from L1MuRegionalCand
int bx () const
 return bunch crossing identifier More...
 
unsigned charge_packed () const
 return charge packed as in hardware (0=pos, 1=neg) More...
 
unsigned charge_valid_packed () const
 return charge valid packed as in hardware (1=valid, 0=not valid) More...
 
bool chargeValid () const
 is the charge valid ? More...
 
int chargeValue () const
 get charge More...
 
virtual bool empty () const
 return empty flag More...
 
unsigned eta_packed () const
 return eta packed as in hardware More...
 
float etaValue () const
 get eta-value of muon candidate More...
 
unsigned finehalo_packed () const
 return eta-fine (for DT) / halo (for CSC) bit More...
 
unsigned getDataWord () const
 return data word More...
 
bool isFineHalo () const
 is it fine (DT) / halo (CSC) ? More...
 
 L1MuRegionalCand (unsigned dataword=0, int bx=0)
 constructor from data word More...
 
 L1MuRegionalCand (unsigned type_idx, unsigned phi, unsigned eta, unsigned pt, unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx)
 constructor from packed members More...
 
unsigned phi_packed () const
 return phi packed as in hardware More...
 
float phiValue () const
 get phi-value of muon candidate in radians (low edge of bin) More...
 
virtual void print () const
 print candidate More...
 
unsigned pt_packed () const
 return pt packed as in hardware More...
 
float ptValue () const
 get pt-value of muon candidate in GeV More...
 
unsigned int quality () const
 return quality More...
 
unsigned int quality_packed () const
 return quality packed as in hardware More...
 
virtual void reset ()
 reset More...
 
void setBx (int bx)
 Set Bunch Crossing. More...
 
void setChargePacked (unsigned ch)
 Set Charge (0=pos, 1=neg) More...
 
void setChargeValid (bool valid)
 Set Charge Valid. More...
 
void setChargeValidPacked (unsigned valid)
 Set Charge Valid. More...
 
void setChargeValue (int charge)
 Set Charge Value: -1, 1. More...
 
void setDataWord (unsigned dataword)
 Set data word. More...
 
void setEtaPacked (unsigned eta)
 Set Eta: 6-bit code. More...
 
void setEtaValue (float etaVal)
 Set Eta Value (need to set type, first) More...
 
void setFineHalo (bool fh)
 Set Fine / Halo. More...
 
void setFineHaloPacked (unsigned fh)
 Set Fine / Halo. More...
 
void setPhiPacked (unsigned phi)
 Set Phi: 0..143. More...
 
void setPhiValue (float phiVal)
 Set Phi Value. More...
 
void setPtPacked (unsigned pt)
 Set Pt: 0..31. More...
 
void setPtValue (float ptVal)
 Set Pt Value. More...
 
void setQualityPacked (unsigned qual)
 Set Quality: 0..7. More...
 
void setType (unsigned type)
 Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC. More...
 
unsigned type_idx () const
 return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC More...
 
virtual ~L1MuRegionalCand ()
 destructor More...
 

Private Attributes

int sector
 
int TClassCode
 
int TrkAdd [4]
 
int TrkTagCode
 
int wheel
 

Additional Inherited Members

- Public Types inherited from L1MuRegionalCand
enum  { PHI_START =0 }
 
enum  { PHI_LENGTH = 8 }
 
enum  { PT_START =8 }
 
enum  { PT_LENGTH = 5 }
 
enum  { QUAL_START =13 }
 
enum  { QUAL_LENGTH = 3 }
 
enum  { ETA_START =16 }
 
enum  { ETA_LENGTH = 6 }
 
enum  { FINEHALO_START =22 }
 
enum  { FINEHALO_LENGTH = 1 }
 
enum  { CHARGE_START =23 }
 
enum  { CHARGE_LENGTH = 1 }
 
enum  { CHVALID_START =24 }
 
enum  { CHVALID_LENGTH = 1 }
 
enum  { TYPE_START =30 }
 
enum  { TYPE_LENGTH = 2 }
 

Detailed Description

Definition at line 34 of file L1MuDTTrackCand.h.

Constructor & Destructor Documentation

L1MuDTTrackCand::L1MuDTTrackCand ( )

Definition at line 35 of file L1MuDTTrackCand.cc.

References sector, TClassCode, TrkAdd, TrkTagCode, and wheel.

35  : L1MuRegionalCand(0,0) {
36 
37  wheel = 0;
38  sector = 0;
39  TrkTagCode = -1;
40  TrkAdd[0] = 3;
41  TrkAdd[1] = 15;
42  TrkAdd[2] = 15;
43  TrkAdd[3] = 15;
44  TClassCode = 11;
45 }
L1MuRegionalCand(unsigned dataword=0, int bx=0)
constructor from data word
L1MuDTTrackCand::L1MuDTTrackCand ( unsigned  dataword,
int  bx,
int  uwh,
int  usc,
int  utag,
int  adr1,
int  adr2,
int  adr3,
int  adr4,
int  utc 
)

Definition at line 47 of file L1MuDTTrackCand.cc.

References sector, setAdd(), TClassCode, TrkAdd, TrkTagCode, and wheel.

48  :
49  L1MuRegionalCand(dataword, bx) {
50 
51  wheel = uwh;
52  sector = usc;
53  TrkTagCode = utag;
54  TrkAdd[0] = adr1&0x03;
55  TrkAdd[1] = adr2;
56  TrkAdd[2] = adr3;
57  TrkAdd[3] = adr4;
58  TClassCode = utc;
59 
60  setAdd(1);
61  setAdd(2);
62  setAdd(3);
63  setAdd(4);
64 }
void setAdd(int ust)
L1MuRegionalCand(unsigned dataword=0, int bx=0)
constructor from data word
int bx() const
return bunch crossing identifier
L1MuDTTrackCand::L1MuDTTrackCand ( unsigned  type_idx,
unsigned  phi,
unsigned  eta,
unsigned  pt,
unsigned  charge,
unsigned  ch_valid,
unsigned  finehalo,
unsigned  quality,
int  bx,
int  uwh,
int  usc,
int  utag,
int  adr1,
int  adr2,
int  adr3,
int  adr4 
)

Definition at line 66 of file L1MuDTTrackCand.cc.

References sector, L1MuRegionalCand::setChargePacked(), L1MuRegionalCand::setChargeValidPacked(), L1MuRegionalCand::setEtaPacked(), L1MuRegionalCand::setFineHaloPacked(), L1MuRegionalCand::setPhiPacked(), L1MuRegionalCand::setPtPacked(), L1MuRegionalCand::setQualityPacked(), setTC(), L1MuRegionalCand::setType(), TrkAdd, TrkTagCode, and wheel.

69  :
70  L1MuRegionalCand(0, bx) {
71 
75  setPtPacked(pt);
77  setChargeValidPacked(ch_valid);
78  setFineHaloPacked(finehalo);
80 
81  wheel = uwh;
82  sector = usc;
83  TrkTagCode = utag;
84  TrkAdd[0] = adr1;
85  TrkAdd[1] = adr2;
86  TrkAdd[2] = adr3;
87  TrkAdd[3] = adr4;
88 
89  setTC();
90 }
L1MuRegionalCand(unsigned dataword=0, int bx=0)
constructor from data word
void setChargeValidPacked(unsigned valid)
Set Charge Valid.
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
void setChargePacked(unsigned ch)
Set Charge (0=pos, 1=neg)
void setPtPacked(unsigned pt)
Set Pt: 0..31.
unsigned int quality() const
return quality
void setPhiPacked(unsigned phi)
Set Phi: 0..143.
int bx() const
return bunch crossing identifier
void setQualityPacked(unsigned qual)
Set Quality: 0..7.
void setEtaPacked(unsigned eta)
Set Eta: 6-bit code.
void setFineHaloPacked(unsigned fh)
Set Fine / Halo.
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
L1MuDTTrackCand::~L1MuDTTrackCand ( )
override

Definition at line 95 of file L1MuDTTrackCand.cc.

95  {
96 }

Member Function Documentation

int L1MuDTTrackCand::scNum ( ) const

Definition at line 105 of file L1MuDTTrackCand.cc.

References sector.

105  {
106  return sector;
107 }
void L1MuDTTrackCand::setAdd ( int  ust)

Definition at line 143 of file L1MuDTTrackCand.cc.

References stNum(), and TrkAdd.

Referenced by L1MuDTTrackCand().

143  {
144  unsigned int uadd = stNum(ust);
145 
146  switch (uadd) {
147  case 0: { TrkAdd[ust-1] = 8; break; }
148  case 1: { TrkAdd[ust-1] = 9; break; }
149  case 2: { TrkAdd[ust-1] = 0; break; }
150  case 3: { TrkAdd[ust-1] = 1; break; }
151  case 4: { TrkAdd[ust-1] = 10; break; }
152  case 5: { TrkAdd[ust-1] = 11; break; }
153  case 6: { TrkAdd[ust-1] = 2; break; }
154  case 7: { TrkAdd[ust-1] = 3; break; }
155  case 8: { TrkAdd[ust-1] = 12; break; }
156  case 9: { TrkAdd[ust-1] = 13; break; }
157  case 10: { TrkAdd[ust-1] = 4; break; }
158  case 11: { TrkAdd[ust-1] = 5; break; }
159  case 15: { TrkAdd[ust-1] = 15; break; }
160  default: { TrkAdd[ust-1] = 15; break; }
161  }
162 
163  if (ust!=1) return;
164 
165  switch (uadd) {
166  case 0: { TrkAdd[0] = 2; break; }
167  case 1: { TrkAdd[0] = 1; break; }
168  case 15: { TrkAdd[0] = 3; break; }
169  default: { TrkAdd[0] = 3; break; }
170  }
171 }
int stNum(int ust) const
void L1MuDTTrackCand::setTC ( )

Definition at line 121 of file L1MuDTTrackCand.cc.

References L1MuRegionalCand::quality_packed(), TClassCode, and TrkAdd.

Referenced by L1MuDTTrackCand().

121  {
122  unsigned int uqua = quality_packed();
123 
124  switch (uqua) {
125  case 7: { TClassCode = 0; break; }
126  case 6: { TClassCode = 1;
127  if ( TrkAdd[3] != 15 ) TClassCode = 2;
128  break; }
129  case 5: { TClassCode = 3; break; }
130  case 4: { TClassCode = 4; break; }
131  case 3: { TClassCode = 5;
132  if ( TrkAdd[3] != 15 ) TClassCode = 6;
133  if ( TrkAdd[2] != 15 ) TClassCode = 7;
134  break; }
135  case 2: { TClassCode = 8;
136  if ( TrkAdd[2] != 15 ) TClassCode = 9;
137  break; }
138  case 1: { TClassCode = 10; break; }
139  default: { TClassCode = 11; break; }
140  }
141 }
unsigned int quality_packed() const
return quality packed as in hardware
int L1MuDTTrackCand::stNum ( int  ust) const

Definition at line 109 of file L1MuDTTrackCand.cc.

References TrkAdd.

Referenced by setAdd().

109  {
110  return TrkAdd[ust-1];
111 }
int L1MuDTTrackCand::TCNum ( ) const

Definition at line 113 of file L1MuDTTrackCand.cc.

References TClassCode.

113  {
114  return TClassCode;
115 }
int L1MuDTTrackCand::TrkTag ( ) const

Definition at line 117 of file L1MuDTTrackCand.cc.

References TrkTagCode.

117  {
118  return TrkTagCode;
119 }
int L1MuDTTrackCand::whNum ( ) const

Definition at line 101 of file L1MuDTTrackCand.cc.

References wheel.

101  {
102  return wheel;
103 }

Member Data Documentation

int L1MuDTTrackCand::sector
private
int L1MuDTTrackCand::TClassCode
private

Definition at line 66 of file L1MuDTTrackCand.h.

Referenced by L1MuDTTrackCand(), setTC(), and TCNum().

int L1MuDTTrackCand::TrkAdd[4]
private

Definition at line 67 of file L1MuDTTrackCand.h.

Referenced by L1MuDTTrackCand(), setAdd(), setTC(), and stNum().

int L1MuDTTrackCand::TrkTagCode
private

Definition at line 65 of file L1MuDTTrackCand.h.

Referenced by L1MuDTTrackCand(), and TrkTag().

int L1MuDTTrackCand::wheel
private

Definition at line 63 of file L1MuDTTrackCand.h.

Referenced by geometryXMLparser.DTAlignable::index(), L1MuDTTrackCand(), and whNum().