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 | Static Private Attributes
csctf::TrackStub Class Reference

#include <TrackStub.h>

Inheritance diagram for csctf::TrackStub:
CSCCorrelatedLCTDigi

Public Member Functions

int BX () const
 
unsigned cscid () const
 
unsigned cscidSeparateME1a () const
 
unsigned endcap () const
 
unsigned etaPacked () const
 Return the binned eta for this stub. More...
 
double etaValue () const
 return the Eta Value of this stub's position. More...
 
DetId getDetId () const
 
const CSCCorrelatedLCTDigigetDigi () const
 Get the digi this stub was made from. More...
 
bool operator!= (const TrackStub &rhs) const
 
bool operator< (const TrackStub &) const
 
bool operator<= (const TrackStub &rhs) const
 
bool operator== (const TrackStub &rhs) const
 
bool operator> (const TrackStub &) const
 Comparision Operators, used for MPC sorting. More...
 
bool operator>= (const TrackStub &rhs) const
 
unsigned phiPacked () const
 Return the binned phi for this stub. More...
 
double phiValue () const
 return the Phi Value of this stub's position in local coordinates. More...
 
unsigned sector () const
 
void setEtaPacked (const unsigned &eta_)
 set Eta and Phi from integer values. More...
 
void setPhiPacked (const unsigned &phi_)
 
unsigned station () const
 
unsigned subsector () const
 
 TrackStub ()
 
 TrackStub (const CSCCorrelatedLCTDigi &, const DetId &)
 
 TrackStub (const CSCCorrelatedLCTDigi &, const DetId &, const unsigned &phi, const unsigned &eta)
 
 TrackStub (const TrackStub &)
 
- Public Member Functions inherited from CSCCorrelatedLCTDigi
void clear ()
 default More...
 
 CSCCorrelatedLCTDigi (const int trknmb, const int valid, const int quality, const int keywire, const int strip, const int pattern, const int bend, const int bx, const int mpclink=0, const uint16_t bx0=0, const uint16_t syncErr=0, const uint16_t cscID=0)
 Constructors. More...
 
 CSCCorrelatedLCTDigi ()
 Default. More...
 
int getBend () const
 return bend More...
 
int getBX () const
 return BX More...
 
uint16_t getBX0 () const
 
int getCLCTPattern () const
 return CLCT pattern number (in use again Feb 2011) More...
 
uint16_t getCSCID () const
 
int getKeyWG () const
 return the key wire group More...
 
int getMPCLink () const
 return MPC link number, 0 means not sorted, 1-3 give MPC sorting rank More...
 
int getPattern () const
 return pattern More...
 
int getQuality () const
 return the 4 bit Correlated LCT Quality More...
 
int getStrip () const
 return the key halfstrip from 0,159 More...
 
int getStripType () const
 return strip type (obsolete since mid-2008) More...
 
uint16_t getSyncErr () const
 
int getTrknmb () const
 return track number More...
 
bool isValid () const
 return valid pattern bit More...
 
bool operator!= (const CSCCorrelatedLCTDigi &rhs) const
 
bool operator== (const CSCCorrelatedLCTDigi &) const
 Comparison. More...
 
void print () const
 Print content of correlated LCT digi. More...
 
void setMPCLink (const uint16_t &link)
 Set mpc link number after MPC sorting. More...
 
void setQuality (unsigned int q)
 set quality code More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting LCTs. More...
 
void setWireGroup (unsigned int wiregroup)
 set wiregroup number More...
 

Private Attributes

unsigned link_
 
uint32_t theDetId_
 
unsigned theEta_
 
unsigned thePhi_
 

Static Private Attributes

static const double theEtaBinning = (CSCTFConstants::maxEta - CSCTFConstants::minEta)/(CSCTFConstants::etaBins)
 
static const double thePhiBinning = CSCTFConstants::SECTOR_RAD/(1<<CSCBitWidths::kGlobalPhiDataBitWidth)
 

Detailed Description

Definition at line 23 of file TrackStub.h.

Constructor & Destructor Documentation

csctf::TrackStub::TrackStub ( )
inline

Definition at line 26 of file TrackStub.h.

26 {}
TrackStub::TrackStub ( const CSCCorrelatedLCTDigi aDigi,
const DetId aDetId 
)

Definition at line 14 of file TrackStub.cc.

15  : CSCCorrelatedLCTDigi(aDigi),
16  theDetId_(aDetId.rawId()),
17  thePhi_(0),
18  theEta_(0),
19  link_(0)
20  {}
unsigned theEta_
Definition: TrackStub.h:71
unsigned link_
Definition: TrackStub.h:71
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned thePhi_
Definition: TrackStub.h:71
TrackStub::TrackStub ( const CSCCorrelatedLCTDigi aDigi,
const DetId aDetId,
const unsigned &  phi,
const unsigned &  eta 
)

Definition at line 22 of file TrackStub.cc.

24  : CSCCorrelatedLCTDigi(aDigi),
25  theDetId_(aDetId.rawId()),
26  thePhi_(phi),
27  theEta_(eta),
28  link_(0)
29  {}
unsigned theEta_
Definition: TrackStub.h:71
unsigned link_
Definition: TrackStub.h:71
T eta() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned thePhi_
Definition: TrackStub.h:71
Definition: DDAxes.h:10
TrackStub::TrackStub ( const TrackStub aTrackStub)

Definition at line 33 of file TrackStub.cc.

33  : CSCCorrelatedLCTDigi(aTrackStub),
34  theDetId_(aTrackStub.theDetId_),
35  thePhi_(aTrackStub.thePhi_),
36  theEta_(aTrackStub.theEta_),
37  link_(aTrackStub.link_)
38  {}
unsigned theEta_
Definition: TrackStub.h:71
unsigned link_
Definition: TrackStub.h:71
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned thePhi_
Definition: TrackStub.h:71

Member Function Documentation

int csctf::TrackStub::BX ( ) const
inline

Definition at line 58 of file TrackStub.h.

References CSCCorrelatedLCTDigi::getBX().

58 {return getBX();}
int getBX() const
return BX
unsigned TrackStub::cscid ( ) const

Definition at line 120 of file TrackStub.cc.

References MuonSubdetId::CSC, CSCDetId, theDetId_, and CSCTriggerNumbering::triggerCscIdFromLabels().

Referenced by operator<(), and operator>().

121  {
122  if(DetId(theDetId_).subdetId() == MuonSubdetId::CSC)
124 
125  return 0; // DT chambers obviously don't have a csc id :-D
126  }
static const int CSC
Definition: MuonSubdetId.h:15
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned TrackStub::cscidSeparateME1a ( ) const

Definition at line 128 of file TrackStub.cc.

References MuonSubdetId::CSC, errorMatrix2Lands_multiChannel::id, relativeConstraints::ring, station(), theDetId_, and CSCTriggerNumbering::triggerCscIdFromLabels().

129  {
130  if(DetId(theDetId_).subdetId() != MuonSubdetId::CSC) return 0;
132  unsigned normal_cscid = CSCTriggerNumbering::triggerCscIdFromLabels(id);
133  if (id.station()==1 && id.ring()==4) return normal_cscid + 9; // 10,11,12 for ME1a
134  return normal_cscid;
135  }
unsigned station() const
Definition: TrackStub.cc:59
static const int CSC
Definition: MuonSubdetId.h:15
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned TrackStub::endcap ( ) const

Time / Space identifiers See CSCTransientDataType.h for more details.

Definition at line 40 of file TrackStub.cc.

References MuonSubdetId::CSC, CSCDetId, MuonSubdetId::DT, DTChamberId, alignCSCRings::e, and theDetId_.

Referenced by geometryXMLparser.CSCAlignable::index().

41  {
42  int e = 0;
43 
44  switch(DetId(theDetId_).subdetId())
45  {
46  case (MuonSubdetId::DT):
47  e = (DTChamberId(theDetId_).wheel() > 0) ? 1 : 2;
48  break;
49  case (MuonSubdetId::CSC):
50  e = CSCDetId(theDetId_).endcap();
51  break;
52  default:
53  break;
54  }
55 
56  return e;
57  }
static const int CSC
Definition: MuonSubdetId.h:15
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
static const int DT
Definition: MuonSubdetId.h:14
unsigned csctf::TrackStub::etaPacked ( ) const
inline

Return the binned eta for this stub.

Definition at line 41 of file TrackStub.h.

References theEta_.

41 {return theEta_;}
unsigned theEta_
Definition: TrackStub.h:71
double csctf::TrackStub::etaValue ( ) const
inline

return the Eta Value of this stub's position.

Definition at line 36 of file TrackStub.h.

References CSCTFConstants::minEta, theEta_, and theEtaBinning.

unsigned theEta_
Definition: TrackStub.h:71
static const double minEta
static const double theEtaBinning
Definition: TrackStub.h:72
DetId csctf::TrackStub::getDetId ( void  ) const
inline

Definition at line 48 of file TrackStub.h.

References theDetId_.

48 {return DetId(theDetId_);}
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
const CSCCorrelatedLCTDigi* csctf::TrackStub::getDigi ( ) const
inline

Get the digi this stub was made from.

Definition at line 47 of file TrackStub.h.

Referenced by operator==().

47 {return dynamic_cast<const CSCCorrelatedLCTDigi*>(this);}
bool csctf::TrackStub::operator!= ( const TrackStub rhs) const
inline

Definition at line 67 of file TrackStub.h.

References operator==().

67 { return !(this->operator==(rhs)); }
bool operator==(const TrackStub &rhs) const
Definition: TrackStub.h:66
bool TrackStub::operator< ( const TrackStub rhs) const

Definition at line 137 of file TrackStub.cc.

References cscid(), CSCCorrelatedLCTDigi::getQuality(), CSCCorrelatedLCTDigi::getTrknmb(), and CSCCorrelatedLCTDigi::isValid().

Referenced by operator>=().

138  {
139  return ( rhs.isValid() && ( (!(isValid())) || (getQuality() < rhs.getQuality()) ||
140  (getQuality() == rhs.getQuality() && cscid() < rhs.cscid()) ||
141  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() &&
142  (getTrknmb() == 2)) ) );
143  }
int getQuality() const
return the 4 bit Correlated LCT Quality
int getTrknmb() const
return track number
unsigned cscid() const
Definition: TrackStub.cc:120
bool isValid() const
return valid pattern bit
bool csctf::TrackStub::operator<= ( const TrackStub rhs) const
inline

Definition at line 65 of file TrackStub.h.

References operator>().

65 { return !(this->operator>(rhs)); }
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:145
bool csctf::TrackStub::operator== ( const TrackStub rhs) const
inline

Definition at line 66 of file TrackStub.h.

References getDigi(), and theDetId_.

Referenced by operator!=().

66 { return ((theDetId_ == rhs.theDetId_) && ( *(getDigi()) == *(rhs.getDigi()))); }
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:47
uint32_t theDetId_
Definition: TrackStub.h:70
bool TrackStub::operator> ( const TrackStub rhs) const

Comparision Operators, used for MPC sorting.

Definition at line 145 of file TrackStub.cc.

References cscid(), CSCCorrelatedLCTDigi::getQuality(), CSCCorrelatedLCTDigi::getTrknmb(), and CSCCorrelatedLCTDigi::isValid().

Referenced by operator<=().

146  {
147  return ( isValid() && ( (!(rhs.isValid())) || (getQuality() > rhs.getQuality()) ||
148  (getQuality() == rhs.getQuality() && cscid() > rhs.cscid()) ||
149  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() &&
150  (getTrknmb() == 1)) ) );
151  }
int getQuality() const
return the 4 bit Correlated LCT Quality
int getTrknmb() const
return track number
unsigned cscid() const
Definition: TrackStub.cc:120
bool isValid() const
return valid pattern bit
bool csctf::TrackStub::operator>= ( const TrackStub rhs) const
inline

Definition at line 64 of file TrackStub.h.

References operator<().

64 { return !(this->operator<(rhs)); }
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:137
unsigned csctf::TrackStub::phiPacked ( ) const
inline

Return the binned phi for this stub.

Definition at line 44 of file TrackStub.h.

References thePhi_.

44 {return thePhi_;}
unsigned thePhi_
Definition: TrackStub.h:71
double csctf::TrackStub::phiValue ( ) const
inline

return the Phi Value of this stub's position in local coordinates.

Definition at line 38 of file TrackStub.h.

References thePhi_, and thePhiBinning.

38 {return (thePhi_*thePhiBinning);}
static const double thePhiBinning
Definition: TrackStub.h:72
unsigned thePhi_
Definition: TrackStub.h:71
unsigned TrackStub::sector ( ) const

Definition at line 78 of file TrackStub.cc.

References MuonSubdetId::CSC, CSCDetId, MuonSubdetId::DT, DTChamberId, theDetId_, and CSCTriggerNumbering::triggerSectorFromLabels().

Referenced by geometryXMLparser.DTAlignable::index().

79  {
80  int se = 0, temps = 0;
81 
82  switch(DetId(theDetId_).subdetId())
83  {
84  case (MuonSubdetId::DT): {
85  temps = DTChamberId(theDetId_).sector();
86  const unsigned int dt2csc[12] = {6,1,1,2,2,3,3,4,4,5,5,6};
87  se = dt2csc[temps-1]; }
88  break;
89  case (MuonSubdetId::CSC):
91  break;
92  default:
93  break;
94  }
95 
96  return se;
97  }
static const int CSC
Definition: MuonSubdetId.h:15
Definition: DetId.h:20
static int triggerSectorFromLabels(int station, int ring, int chamber)
uint32_t theDetId_
Definition: TrackStub.h:70
static const int DT
Definition: MuonSubdetId.h:14
void csctf::TrackStub::setEtaPacked ( const unsigned &  eta_)
inline

set Eta and Phi from integer values.

Definition at line 32 of file TrackStub.h.

References theEta_.

32 {theEta_ = eta_;}
unsigned theEta_
Definition: TrackStub.h:71
void csctf::TrackStub::setPhiPacked ( const unsigned &  phi_)
inline

Definition at line 33 of file TrackStub.h.

References thePhi_.

33 {thePhi_ = phi_;}
unsigned thePhi_
Definition: TrackStub.h:71
unsigned TrackStub::station ( ) const

Definition at line 59 of file TrackStub.cc.

References MuonSubdetId::CSC, CSCDetId, MuonSubdetId::DT, DTChamberId, alignCSCRings::s, and theDetId_.

Referenced by cscidSeparateME1a(), geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

60  {
61  int s = 0;
62 
63  switch(DetId(theDetId_).subdetId())
64  {
65  case (MuonSubdetId::DT):
66  s = DTChamberId(theDetId_).station() + 4;
67  break;
68  case (MuonSubdetId::CSC):
69  s = CSCDetId(theDetId_).station();
70  break;
71  default:
72  break;
73  }
74 
75  return s;
76  }
static const int CSC
Definition: MuonSubdetId.h:15
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
static const int DT
Definition: MuonSubdetId.h:14
unsigned TrackStub::subsector ( ) const

Definition at line 99 of file TrackStub.cc.

References MuonSubdetId::CSC, CSCDetId, MuonSubdetId::DT, DTChamberId, theDetId_, and CSCTriggerNumbering::triggerSubSectorFromLabels().

100  {
101  int ss = 0;
102 
103  switch(DetId(theDetId_).subdetId())
104  {
105  case (MuonSubdetId::DT): {
106  ss = DTChamberId(theDetId_).sector();
107  const unsigned int dt2csc_[12] = {2,1,2,1,2,1,2,1,2,1,2,1};
108  ss = dt2csc_[ss-1]; }
109  break;
110  case (MuonSubdetId::CSC):
112  break;
113  default:
114  break;
115  }
116 
117  return ss;
118  }
static const int CSC
Definition: MuonSubdetId.h:15
Definition: DetId.h:20
uint32_t theDetId_
Definition: TrackStub.h:70
static int triggerSubSectorFromLabels(int station, int chamber)
static const int DT
Definition: MuonSubdetId.h:14

Member Data Documentation

unsigned csctf::TrackStub::link_
private

Definition at line 71 of file TrackStub.h.

uint32_t csctf::TrackStub::theDetId_
private

Definition at line 70 of file TrackStub.h.

Referenced by cscid(), cscidSeparateME1a(), endcap(), getDetId(), operator==(), sector(), station(), and subsector().

unsigned csctf::TrackStub::theEta_
private

Definition at line 71 of file TrackStub.h.

Referenced by etaPacked(), etaValue(), and setEtaPacked().

const double TrackStub::theEtaBinning = (CSCTFConstants::maxEta - CSCTFConstants::minEta)/(CSCTFConstants::etaBins)
staticprivate

Definition at line 72 of file TrackStub.h.

Referenced by etaValue().

unsigned csctf::TrackStub::thePhi_
private

Definition at line 71 of file TrackStub.h.

Referenced by phiPacked(), phiValue(), and setPhiPacked().

const double TrackStub::thePhiBinning = CSCTFConstants::SECTOR_RAD/(1<<CSCBitWidths::kGlobalPhiDataBitWidth)
staticprivate

Definition at line 72 of file TrackStub.h.

Referenced by phiValue().