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.

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 }

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

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

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 }

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

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

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

109 { return sector; }

References sector.

◆ setAdd()

void L1MuDTTrackCand::setAdd ( int  ust)

Definition at line 164 of file L1MuDTTrackCand.cc.

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 }

References stNum(), and TrkAdd.

Referenced by L1MuDTTrackCand().

◆ setTC()

void L1MuDTTrackCand::setTC ( )

Definition at line 117 of file L1MuDTTrackCand.cc.

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 }

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

Referenced by L1MuDTTrackCand().

◆ stNum()

int L1MuDTTrackCand::stNum ( int  ust) const

Definition at line 111 of file L1MuDTTrackCand.cc.

111 { return TrkAdd[ust - 1]; }

References TrkAdd.

Referenced by setAdd().

◆ TCNum()

int L1MuDTTrackCand::TCNum ( ) const

Definition at line 113 of file L1MuDTTrackCand.cc.

113 { return TClassCode; }

References TClassCode.

◆ TrkTag()

int L1MuDTTrackCand::TrkTag ( ) const

Definition at line 115 of file L1MuDTTrackCand.cc.

115 { return TrkTagCode; }

References TrkTagCode.

◆ whNum()

int L1MuDTTrackCand::whNum ( ) const

Definition at line 107 of file L1MuDTTrackCand.cc.

107 { return wheel; }

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

L1MuRegionalCand::bx
int bx() const
return bunch crossing identifier
Definition: L1MuRegionalCand.h:79
L1MuRegionalCand::setPhiPacked
void setPhiPacked(unsigned phi)
Set Phi: 0..143.
Definition: L1MuRegionalCand.h:120
L1MuRegionalCand::setEtaPacked
void setEtaPacked(unsigned eta)
Set Eta: 6-bit code.
Definition: L1MuRegionalCand.h:135
L1MuDTTrackCand::sector
int sector
Definition: L1MuDTTrackCand.h:73
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuDTTrackCand::TrkAdd
int TrkAdd[4]
Definition: L1MuDTTrackCand.h:76
L1MuDTTrackCand::TrkTagCode
int TrkTagCode
Definition: L1MuDTTrackCand.h:74
L1MuRegionalCand::L1MuRegionalCand
L1MuRegionalCand(unsigned dataword=0, int bx=0)
constructor from data word
Definition: L1MuRegionalCand.cc:42
L1MuRegionalCand::setType
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
Definition: L1MuRegionalCand.h:114
L1MuRegionalCand::quality_packed
unsigned int quality_packed() const
return quality packed as in hardware
Definition: L1MuRegionalCand.h:92
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuDTTrackCand::setAdd
void setAdd(int ust)
Definition: L1MuDTTrackCand.cc:164
L1MuRegionalCand::setChargeValidPacked
void setChargeValidPacked(unsigned valid)
Set Charge Valid.
Definition: L1MuRegionalCand.h:132
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuRegionalCand::setPtPacked
void setPtPacked(unsigned pt)
Set Pt: 0..31.
Definition: L1MuRegionalCand.h:123
L1MuDTTrackCand::wheel
int wheel
Definition: L1MuDTTrackCand.h:72
L1MuDTTrackCand::setTC
void setTC()
Definition: L1MuDTTrackCand.cc:117
L1MuDTTrackCand::stNum
int stNum(int ust) const
Definition: L1MuDTTrackCand.cc:111
DDAxes::phi
L1MuDTTrackCand::TClassCode
int TClassCode
Definition: L1MuDTTrackCand.h:75
L1MuRegionalCand::setChargePacked
void setChargePacked(unsigned ch)
Set Charge (0=pos, 1=neg)
Definition: L1MuRegionalCand.h:129
L1MuRegionalCand::type_idx
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
Definition: L1MuRegionalCand.h:76
L1MuRegionalCand::setQualityPacked
void setQualityPacked(unsigned qual)
Set Quality: 0..7.
Definition: L1MuRegionalCand.h:126
L1MuRegionalCand::quality
unsigned int quality() const
return quality
Definition: L1MuRegionalCand.h:73
L1MuRegionalCand::setFineHaloPacked
void setFineHaloPacked(unsigned fh)
Set Fine / Halo.
Definition: L1MuRegionalCand.h:138