CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- 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 36 of file L1MuDTTrackCand.cc.

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

36  : L1MuRegionalCand(0,0) {
37 
38  wheel = 0;
39  sector = 0;
40  TrkTagCode = -1;
41  TrkAdd[0] = 3;
42  TrkAdd[1] = 15;
43  TrkAdd[2] = 15;
44  TrkAdd[3] = 15;
45  TClassCode = 11;
46 }
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 48 of file L1MuDTTrackCand.cc.

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

49  :
50  L1MuRegionalCand(dataword, bx) {
51 
52  wheel = uwh;
53  sector = usc;
54  TrkTagCode = utag;
55  TrkAdd[0] = adr1&0x03;
56  TrkAdd[1] = adr2;
57  TrkAdd[2] = adr3;
58  TrkAdd[3] = adr4;
59  TClassCode = utc;
60 
61  setAdd(1);
62  setAdd(2);
63  setAdd(3);
64  setAdd(4);
65 }
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 67 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.

70  :
71  L1MuRegionalCand(0, bx) {
72 
76  setPtPacked(pt);
77  setChargePacked(charge);
78  setChargeValidPacked(ch_valid);
79  setFineHaloPacked(finehalo);
81 
82  wheel = uwh;
83  sector = usc;
84  TrkTagCode = utag;
85  TrkAdd[0] = adr1;
86  TrkAdd[1] = adr2;
87  TrkAdd[2] = adr3;
88  TrkAdd[3] = adr4;
89 
90  setTC();
91 }
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 ( )

Definition at line 96 of file L1MuDTTrackCand.cc.

96  {
97 }

Member Function Documentation

int L1MuDTTrackCand::scNum ( ) const

Definition at line 106 of file L1MuDTTrackCand.cc.

References sector.

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

Definition at line 144 of file L1MuDTTrackCand.cc.

References stNum(), and TrkAdd.

Referenced by L1MuDTTrackCand().

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

Definition at line 122 of file L1MuDTTrackCand.cc.

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

Referenced by L1MuDTTrackCand().

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

Definition at line 110 of file L1MuDTTrackCand.cc.

References TrkAdd.

Referenced by setAdd().

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

Definition at line 114 of file L1MuDTTrackCand.cc.

References TClassCode.

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

Definition at line 118 of file L1MuDTTrackCand.cc.

References TrkTagCode.

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

Definition at line 102 of file L1MuDTTrackCand.cc.

References wheel.

102  {
103  return wheel;
104 }

Member Data Documentation

int L1MuDTTrackCand::sector
private

Definition at line 64 of file L1MuDTTrackCand.h.

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

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