CMS 3D CMS Logo

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...
 
const CSCALCTDigigetALCT () const
 
int getBend () const
 return bend More...
 
int getBX () const
 return BX More...
 
uint16_t getBX0 () const
 
const CSCCLCTDigigetCLCT () const
 
int getCLCTPattern () const
 return CLCT pattern number (in use again Feb 2011) More...
 
uint16_t getCSCID () const
 
float getFractionalStrip () const
 return the fractional strip. counts from 0.25 More...
 
const GEMPadDigigetGEM1 () const
 
const GEMPadDigigetGEM2 () const
 
int getKeyWG () const
 return the key wire group. counts from 0. 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...
 
int getType () const
 
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 setALCT (const CSCALCTDigi &alct)
 
void setBend (unsigned int b)
 set bend More...
 
void setBX (unsigned int b)
 set bx More...
 
void setBX0 (unsigned int b)
 set bx0 More...
 
void setCLCT (const CSCCLCTDigi &clct)
 
void setCSCID (unsigned int c)
 set cscID More...
 
void setGEM1 (const GEMPadDigi &gem)
 
void setGEM2 (const GEMPadDigi &gem)
 
void setMPCLink (const uint16_t &link)
 Set mpc link number after MPC sorting. More...
 
void setPattern (unsigned int p)
 set pattern More...
 
void setQuality (unsigned int q)
 set quality code More...
 
void setStrip (unsigned int s)
 set strip More...
 
void setSyncErr (unsigned int s)
 set syncErr More...
 
void setTrknmb (const uint16_t number)
 Set track number (1,2) after sorting LCTs. More...
 
void setType (int type)
 
void setValid (unsigned int v)
 set valid 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)
 

Additional Inherited Members

- Public Types inherited from CSCCorrelatedLCTDigi
enum  Type {
  CLCTALCT, ALCTCLCT, ALCTCLCTGEM, ALCTCLCT2GEM,
  ALCT2GEM, CLCT2GEM, CLCTONLY, ALCTONLY
}
 SIMULATION ONLY ////. More...
 

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.

References PVValHelper::eta.

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:44
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
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned thePhi_
Definition: TrackStub.h:71
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(), operator<(), and operator>().

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

Definition at line 120 of file TrackStub.cc.

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

Referenced by getDetId(), 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:13
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:18
uint32_t theDetId_
Definition: TrackStub.h:70
unsigned TrackStub::cscidSeparateME1a ( ) const

Definition at line 128 of file TrackStub.cc.

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

Referenced by getDetId().

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:13
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:18
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, MuonSubdetId::DT, MillePedeFileConverter_cfg::e, CSCDetId::endcap(), theDetId_, and DTChamberId::wheel().

Referenced by getDetId(), and 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  }
int endcap() const
Definition: CSCDetId.h:93
static const int CSC
Definition: MuonSubdetId.h:13
Definition: DetId.h:18
uint32_t theDetId_
Definition: TrackStub.h:70
static const int DT
Definition: MuonSubdetId.h:12
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
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.

Referenced by L1TCSCTF::analyze().

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 cscid(), cscidSeparateME1a(), endcap(), sector(), station(), subsector(), and theDetId_.

48 {return DetId(theDetId_);}
Definition: DetId.h:18
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 BX(), and 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 BX(), and 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_.

Referenced by L1TCSCTF::analyze().

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.

Referenced by L1TCSCTF::analyze().

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, MuonSubdetId::DT, DTChamberId::sector(), theDetId_, and CSCTriggerNumbering::triggerSectorFromLabels().

Referenced by getDetId(), and 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:13
Definition: DetId.h:18
static int triggerSectorFromLabels(int station, int ring, int chamber)
uint32_t theDetId_
Definition: TrackStub.h:70
int sector() const
Definition: DTChamberId.h:61
static const int DT
Definition: MuonSubdetId.h:12
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_.

Referenced by L1TCSCTF::analyze().

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

Referenced by L1TCSCTF::analyze().

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

Definition at line 59 of file TrackStub.cc.

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

Referenced by cscidSeparateME1a(), getDetId(), 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:13
Definition: DetId.h:18
uint32_t theDetId_
Definition: TrackStub.h:70
int station() const
Definition: CSCDetId.h:86
static const int DT
Definition: MuonSubdetId.h:12
int station() const
Return the station number.
Definition: DTChamberId.h:51
unsigned TrackStub::subsector ( ) const

Definition at line 99 of file TrackStub.cc.

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

Referenced by getDetId().

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:13
Definition: DetId.h:18
uint32_t theDetId_
Definition: TrackStub.h:70
static int triggerSubSectorFromLabels(int station, int chamber)
int sector() const
Definition: DTChamberId.h:61
static const int DT
Definition: MuonSubdetId.h:12

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