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 33 of file L1MuDTTrackCand.h.

Constructor & Destructor Documentation

◆ L1MuDTTrackCand() [1/3]

L1MuDTTrackCand::L1MuDTTrackCand ( )

Definition at line 33 of file L1MuDTTrackCand.cc.

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

33  : L1MuRegionalCand(0, 0) {
34  wheel = 0;
35  sector = 0;
36  TrkTagCode = -1;
37  TrkAdd[0] = 3;
38  TrkAdd[1] = 15;
39  TrkAdd[2] = 15;
40  TrkAdd[3] = 15;
41  TClassCode = 11;
42 }
L1MuRegionalCand(unsigned dataword=0, int bx=0)
constructor from data word

◆ L1MuDTTrackCand() [2/3]

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 44 of file L1MuDTTrackCand.cc.

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

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

◆ L1MuDTTrackCand() [3/3]

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 62 of file L1MuDTTrackCand.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, PVValHelper::eta, phi, DiDispStaMuonMonitor_cfi::pt, L1MuRegionalCand::quality(), sector, L1MuRegionalCand::setChargePacked(), L1MuRegionalCand::setChargeValidPacked(), L1MuRegionalCand::setEtaPacked(), L1MuRegionalCand::setFineHaloPacked(), L1MuRegionalCand::setPhiPacked(), L1MuRegionalCand::setPtPacked(), L1MuRegionalCand::setQualityPacked(), setTC(), L1MuRegionalCand::setType(), TrkAdd, TrkTagCode, L1MuRegionalCand::type_idx(), and wheel.

78  : L1MuRegionalCand(0, bx) {
82  setPtPacked(pt);
84  setChargeValidPacked(ch_valid);
85  setFineHaloPacked(finehalo);
87 
88  wheel = uwh;
89  sector = usc;
90  TrkTagCode = utag;
91  TrkAdd[0] = adr1;
92  TrkAdd[1] = adr2;
93  TrkAdd[2] = adr3;
94  TrkAdd[3] = adr4;
95 
96  setTC();
97 }
unsigned int quality() const
return quality
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.
void setPhiPacked(unsigned phi)
Set Phi: 0..143.
void setQualityPacked(unsigned qual)
Set Quality: 0..7.
void setEtaPacked(unsigned eta)
Set Eta: 6-bit code.
void setFineHaloPacked(unsigned fh)
Set Fine / Halo.
int bx() const
return bunch crossing identifier
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC

◆ ~L1MuDTTrackCand()

L1MuDTTrackCand::~L1MuDTTrackCand ( )
override

Definition at line 102 of file L1MuDTTrackCand.cc.

102 {}

Member Function Documentation

◆ scNum()

int L1MuDTTrackCand::scNum ( ) const

Definition at line 109 of file L1MuDTTrackCand.cc.

References sector.

109 { return sector; }

◆ setAdd()

void L1MuDTTrackCand::setAdd ( int  ust)

Definition at line 164 of file L1MuDTTrackCand.cc.

References stNum(), and TrkAdd.

Referenced by L1MuDTTrackCand().

164  {
165  unsigned int uadd = stNum(ust);
166 
167  switch (uadd) {
168  case 0: {
169  TrkAdd[ust - 1] = 8;
170  break;
171  }
172  case 1: {
173  TrkAdd[ust - 1] = 9;
174  break;
175  }
176  case 2: {
177  TrkAdd[ust - 1] = 0;
178  break;
179  }
180  case 3: {
181  TrkAdd[ust - 1] = 1;
182  break;
183  }
184  case 4: {
185  TrkAdd[ust - 1] = 10;
186  break;
187  }
188  case 5: {
189  TrkAdd[ust - 1] = 11;
190  break;
191  }
192  case 6: {
193  TrkAdd[ust - 1] = 2;
194  break;
195  }
196  case 7: {
197  TrkAdd[ust - 1] = 3;
198  break;
199  }
200  case 8: {
201  TrkAdd[ust - 1] = 12;
202  break;
203  }
204  case 9: {
205  TrkAdd[ust - 1] = 13;
206  break;
207  }
208  case 10: {
209  TrkAdd[ust - 1] = 4;
210  break;
211  }
212  case 11: {
213  TrkAdd[ust - 1] = 5;
214  break;
215  }
216  case 15: {
217  TrkAdd[ust - 1] = 15;
218  break;
219  }
220  default: {
221  TrkAdd[ust - 1] = 15;
222  break;
223  }
224  }
225 
226  if (ust != 1)
227  return;
228 
229  switch (uadd) {
230  case 0: {
231  TrkAdd[0] = 2;
232  break;
233  }
234  case 1: {
235  TrkAdd[0] = 1;
236  break;
237  }
238  case 15: {
239  TrkAdd[0] = 3;
240  break;
241  }
242  default: {
243  TrkAdd[0] = 3;
244  break;
245  }
246  }
247 }
int stNum(int ust) const

◆ setTC()

void L1MuDTTrackCand::setTC ( )

Definition at line 117 of file L1MuDTTrackCand.cc.

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

Referenced by L1MuDTTrackCand().

117  {
118  unsigned int uqua = quality_packed();
119 
120  switch (uqua) {
121  case 7: {
122  TClassCode = 0;
123  break;
124  }
125  case 6: {
126  TClassCode = 1;
127  if (TrkAdd[3] != 15)
128  TClassCode = 2;
129  break;
130  }
131  case 5: {
132  TClassCode = 3;
133  break;
134  }
135  case 4: {
136  TClassCode = 4;
137  break;
138  }
139  case 3: {
140  TClassCode = 5;
141  if (TrkAdd[3] != 15)
142  TClassCode = 6;
143  if (TrkAdd[2] != 15)
144  TClassCode = 7;
145  break;
146  }
147  case 2: {
148  TClassCode = 8;
149  if (TrkAdd[2] != 15)
150  TClassCode = 9;
151  break;
152  }
153  case 1: {
154  TClassCode = 10;
155  break;
156  }
157  default: {
158  TClassCode = 11;
159  break;
160  }
161  }
162 }
unsigned int quality_packed() const
return quality packed as in hardware

◆ stNum()

int L1MuDTTrackCand::stNum ( int  ust) const

Definition at line 111 of file L1MuDTTrackCand.cc.

References TrkAdd.

Referenced by setAdd().

111 { return TrkAdd[ust - 1]; }

◆ TCNum()

int L1MuDTTrackCand::TCNum ( ) const

Definition at line 113 of file L1MuDTTrackCand.cc.

References TClassCode.

113 { return TClassCode; }

◆ TrkTag()

int L1MuDTTrackCand::TrkTag ( ) const

Definition at line 115 of file L1MuDTTrackCand.cc.

References TrkTagCode.

115 { return TrkTagCode; }

◆ whNum()

int L1MuDTTrackCand::whNum ( ) const

Definition at line 107 of file L1MuDTTrackCand.cc.

References wheel.

107 { return wheel; }

Member Data Documentation

◆ sector

int L1MuDTTrackCand::sector
private

◆ TClassCode

int L1MuDTTrackCand::TClassCode
private

Definition at line 75 of file L1MuDTTrackCand.h.

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

◆ TrkAdd

int L1MuDTTrackCand::TrkAdd[4]
private

Definition at line 76 of file L1MuDTTrackCand.h.

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

◆ TrkTagCode

int L1MuDTTrackCand::TrkTagCode
private

Definition at line 74 of file L1MuDTTrackCand.h.

Referenced by L1MuDTTrackCand(), and TrkTag().

◆ wheel

int L1MuDTTrackCand::wheel
private

Definition at line 72 of file L1MuDTTrackCand.h.

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