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 ()
 clear this LCT More...
 
 CSCCorrelatedLCTDigi (const uint16_t trknmb, const uint16_t valid, const uint16_t quality, const uint16_t keywire, const uint16_t strip, const uint16_t pattern, const uint16_t bend, const uint16_t bx, const uint16_t mpclink=0, const uint16_t bx0=0, const uint16_t syncErr=0, const uint16_t cscID=0, const Version version=Version::Legacy, const bool run3_quart_strip_bit=false, const bool run3_eighth_strip_bit=false, const uint16_t run3_pattern=0, const uint16_t run3_slope=0, const int type=ALCTCLCT)
 Constructors. More...
 
 CSCCorrelatedLCTDigi ()
 default (calls clear()) More...
 
const CSCALCTDigigetALCT () const
 
uint16_t getBend () const
 
uint16_t getBX () const
 return BX More...
 
uint16_t getBX0 () const
 
uint16_t getBXData () const
 return 1-bit BX as in data More...
 
const CSCCLCTDigigetCLCT () const
 
uint16_t getCLCTPattern () const
 
uint16_t getCSCID () const
 
bool getEighthStripBit () const
 get single eighth strip bit More...
 
float getFractionalSlope () const
 
float getFractionalStrip (uint16_t n=2) const
 return the fractional strip More...
 
const GEMPadDigigetGEM1 () const
 
const GEMPadDigigetGEM2 () const
 
uint16_t getHMT () const
 
uint16_t getKeyWG () const
 return the key wire group. counts from 0. More...
 
uint16_t getMPCLink () const
 return MPC link number, 0 means not sorted, 1-3 give MPC sorting rank More...
 
uint16_t getPattern () const
 return the Run-2 pattern ID More...
 
uint16_t getQuality () const
 return the Quality More...
 
bool getQuartStripBit () const
 get single quart strip bit More...
 
uint16_t getRun3Pattern () const
 return the Run-3 pattern ID More...
 
uint16_t getSlope () const
 return the slope More...
 
uint16_t getStrip (uint16_t n=2) const
 return the key halfstrip from 0,159 More...
 
uint16_t getStripType () const
 return strip type (obsolete since mid-2008) More...
 
uint16_t getSyncErr () const
 
uint16_t getTrknmb () const
 return track number More...
 
int getType () const
 
bool isRun3 () const
 Distinguish Run-1/2 from Run-3. 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 setALCT (const CSCALCTDigi &alct)
 
void setBend (const uint16_t b)
 set bend More...
 
void setBX (const uint16_t b)
 set bx More...
 
void setBX0 (const uint16_t b)
 set bx0 More...
 
void setCLCT (const CSCCLCTDigi &clct)
 
void setCSCID (const uint16_t c)
 set cscID More...
 
void setEighthStripBit (const bool eighthStripBit)
 set single eighth strip bit More...
 
void setGEM1 (const GEMPadDigi &gem)
 
void setGEM2 (const GEMPadDigi &gem)
 
void setHMT (const uint16_t h)
 set high-multiplicity bits More...
 
void setMPCLink (const uint16_t &link)
 Set mpc link number after MPC sorting. More...
 
void setPattern (const uint16_t p)
 set pattern More...
 
void setQuality (const uint16_t q)
 set quality code More...
 
void setQuartStripBit (const bool quartStripBit)
 set single quart strip bit More...
 
void setRun3 (const bool isRun3)
 
void setRun3Pattern (const uint16_t pattern)
 set Run-3 pattern More...
 
void setSlope (const uint16_t slope)
 set the slope More...
 
void setStrip (const uint16_t s)
 set strip More...
 
void setSyncErr (const uint16_t 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 (const uint16_t v)
 set valid More...
 
void setWireGroup (const uint16_t 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  LCTBXMask { kBXDataMask = 0x1 }
 
enum  Type {
  CLCTALCT, ALCTCLCT, ALCTCLCTGEM, ALCTCLCT2GEM,
  ALCT2GEM, CLCT2GEM, CLCTONLY, ALCTONLY
}
 SIMULATION ONLY ////. More...
 
enum  Version { Version::Legacy = 0, Version::Run3 }
 

Detailed Description

Definition at line 22 of file TrackStub.h.

Constructor & Destructor Documentation

◆ TrackStub() [1/4]

csctf::TrackStub::TrackStub ( )
inline

Definition at line 24 of file TrackStub.h.

24 {}

◆ TrackStub() [2/4]

TrackStub::TrackStub ( const CSCCorrelatedLCTDigi aDigi,
const DetId aDetId 
)

Definition at line 13 of file TrackStub.cc.

14  : CSCCorrelatedLCTDigi(aDigi), theDetId_(aDetId.rawId()), thePhi_(0), theEta_(0), link_(0) {}
unsigned theEta_
Definition: TrackStub.h:70
unsigned link_
Definition: TrackStub.h:70
CSCCorrelatedLCTDigi()
default (calls clear())
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t theDetId_
Definition: TrackStub.h:69
unsigned thePhi_
Definition: TrackStub.h:70

◆ TrackStub() [3/4]

TrackStub::TrackStub ( const CSCCorrelatedLCTDigi aDigi,
const DetId aDetId,
const unsigned &  phi,
const unsigned &  eta 
)

Definition at line 16 of file TrackStub.cc.

17  : CSCCorrelatedLCTDigi(aDigi), theDetId_(aDetId.rawId()), thePhi_(phi), theEta_(eta), link_(0) {}
unsigned theEta_
Definition: TrackStub.h:70
unsigned link_
Definition: TrackStub.h:70
CSCCorrelatedLCTDigi()
default (calls clear())
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t theDetId_
Definition: TrackStub.h:69
unsigned thePhi_
Definition: TrackStub.h:70

◆ TrackStub() [4/4]

TrackStub::TrackStub ( const TrackStub aTrackStub)

Definition at line 19 of file TrackStub.cc.

20  : CSCCorrelatedLCTDigi(aTrackStub),
21  theDetId_(aTrackStub.theDetId_),
22  thePhi_(aTrackStub.thePhi_),
23  theEta_(aTrackStub.theEta_),
24  link_(aTrackStub.link_) {}
unsigned theEta_
Definition: TrackStub.h:70
unsigned link_
Definition: TrackStub.h:70
CSCCorrelatedLCTDigi()
default (calls clear())
uint32_t theDetId_
Definition: TrackStub.h:69
unsigned thePhi_
Definition: TrackStub.h:70

Member Function Documentation

◆ BX()

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

Definition at line 56 of file TrackStub.h.

References CSCCorrelatedLCTDigi::getBX().

56 { return getBX(); }
uint16_t getBX() const
return BX

◆ cscid()

unsigned TrackStub::cscid ( ) const

Definition at line 98 of file TrackStub.cc.

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

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

98  {
99  if (DetId(theDetId_).subdetId() == MuonSubdetId::CSC)
101 
102  return 0; // DT chambers obviously don't have a csc id :-D
103  }
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:69
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ cscidSeparateME1a()

unsigned TrackStub::cscidSeparateME1a ( ) const

Definition at line 105 of file TrackStub.cc.

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

105  {
106  if (DetId(theDetId_).subdetId() != MuonSubdetId::CSC)
107  return 0;
109  unsigned normal_cscid = CSCTriggerNumbering::triggerCscIdFromLabels(id);
110  if (id.station() == 1 && id.ring() == 4)
111  return normal_cscid + 9; // 10,11,12 for ME1a
112  return normal_cscid;
113  }
unsigned station() const
Definition: TrackStub.cc:43
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:69
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ endcap()

unsigned TrackStub::endcap ( ) const

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

Definition at line 26 of file TrackStub.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, MillePedeFileConverter_cfg::e, CSCDetId::endcap(), theDetId_, and DTChamberId::wheel().

Referenced by geometryXMLparser.CSCAlignable::index().

26  {
27  int e = 0;
28 
29  switch (DetId(theDetId_).subdetId()) {
30  case (MuonSubdetId::DT):
31  e = (DTChamberId(theDetId_).wheel() > 0) ? 1 : 2;
32  break;
33  case (MuonSubdetId::CSC):
35  break;
36  default:
37  break;
38  }
39 
40  return e;
41  }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:69
int endcap() const
Definition: CSCDetId.h:85
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ etaPacked()

unsigned csctf::TrackStub::etaPacked ( ) const
inline

Return the binned eta for this stub.

Definition at line 39 of file TrackStub.h.

References theEta_.

39 { return theEta_; }
unsigned theEta_
Definition: TrackStub.h:70

◆ etaValue()

double csctf::TrackStub::etaValue ( ) const
inline

return the Eta Value of this stub's position.

Definition at line 34 of file TrackStub.h.

References CSCTFConstants::minEta, theEta_, and theEtaBinning.

Referenced by L1TCSCTF::analyze().

unsigned theEta_
Definition: TrackStub.h:70
static const double minEta
static const double theEtaBinning
Definition: TrackStub.h:71

◆ getDetId()

DetId csctf::TrackStub::getDetId ( void  ) const
inline

Definition at line 46 of file TrackStub.h.

References theDetId_.

46 { return DetId(theDetId_); }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:69

◆ getDigi()

const CSCCorrelatedLCTDigi* csctf::TrackStub::getDigi ( ) const
inline

Get the digi this stub was made from.

Definition at line 45 of file TrackStub.h.

Referenced by operator==().

45 { return dynamic_cast<const CSCCorrelatedLCTDigi *>(this); }

◆ operator!=()

bool csctf::TrackStub::operator!= ( const TrackStub rhs) const
inline

Definition at line 66 of file TrackStub.h.

References operator==().

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

◆ operator<()

bool TrackStub::operator< ( const TrackStub rhs) const

Definition at line 115 of file TrackStub.cc.

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

Referenced by operator>=().

115  {
116  return (rhs.isValid() && ((!(isValid())) || (getQuality() < rhs.getQuality()) ||
117  (getQuality() == rhs.getQuality() && cscid() < rhs.cscid()) ||
118  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() && (getTrknmb() == 2))));
119  }
bool isValid() const
return valid pattern bit
uint16_t getTrknmb() const
return track number
uint16_t getQuality() const
return the Quality
unsigned cscid() const
Definition: TrackStub.cc:98

◆ operator<=()

bool csctf::TrackStub::operator<= ( const TrackStub rhs) const
inline

Definition at line 62 of file TrackStub.h.

References operator>().

62 { return !(this->operator>(rhs)); }
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:121

◆ operator==()

bool csctf::TrackStub::operator== ( const TrackStub rhs) const
inline

Definition at line 63 of file TrackStub.h.

References getDigi(), and theDetId_.

Referenced by operator!=().

63  {
64  return ((theDetId_ == rhs.theDetId_) && (*(getDigi()) == *(rhs.getDigi())));
65  }
uint32_t theDetId_
Definition: TrackStub.h:69
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:45

◆ operator>()

bool TrackStub::operator> ( const TrackStub rhs) const

Comparision Operators, used for MPC sorting.

Definition at line 121 of file TrackStub.cc.

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

Referenced by operator<=().

121  {
122  return (isValid() && ((!(rhs.isValid())) || (getQuality() > rhs.getQuality()) ||
123  (getQuality() == rhs.getQuality() && cscid() > rhs.cscid()) ||
124  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() && (getTrknmb() == 1))));
125  }
bool isValid() const
return valid pattern bit
uint16_t getTrknmb() const
return track number
uint16_t getQuality() const
return the Quality
unsigned cscid() const
Definition: TrackStub.cc:98

◆ operator>=()

bool csctf::TrackStub::operator>= ( const TrackStub rhs) const
inline

Definition at line 61 of file TrackStub.h.

References operator<().

61 { return !(this->operator<(rhs)); }
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:115

◆ phiPacked()

unsigned csctf::TrackStub::phiPacked ( ) const
inline

Return the binned phi for this stub.

Definition at line 42 of file TrackStub.h.

References thePhi_.

Referenced by L1TCSCTF::analyze().

42 { return thePhi_; }
unsigned thePhi_
Definition: TrackStub.h:70

◆ phiValue()

double csctf::TrackStub::phiValue ( ) const
inline

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

Definition at line 36 of file TrackStub.h.

References thePhi_, and thePhiBinning.

Referenced by L1TCSCTF::analyze().

36 { return (thePhi_ * thePhiBinning); }
static const double thePhiBinning
Definition: TrackStub.h:71
unsigned thePhi_
Definition: TrackStub.h:70

◆ sector()

unsigned TrackStub::sector ( ) const

Definition at line 60 of file TrackStub.cc.

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

Referenced by geometryXMLparser.DTAlignable::index().

60  {
61  int se = 0, temps = 0;
62 
63  switch (DetId(theDetId_).subdetId()) {
64  case (MuonSubdetId::DT): {
65  temps = DTChamberId(theDetId_).sector();
66  const unsigned int dt2csc[12] = {6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6};
67  se = dt2csc[temps - 1];
68  } break;
69  case (MuonSubdetId::CSC):
71  break;
72  default:
73  break;
74  }
75 
76  return se;
77  }
Definition: DetId.h:17
static int triggerSectorFromLabels(int station, int ring, int chamber)
uint32_t theDetId_
Definition: TrackStub.h:69
int sector() const
Definition: DTChamberId.h:49
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ setEtaPacked()

void csctf::TrackStub::setEtaPacked ( const unsigned &  eta_)
inline

set Eta and Phi from integer values.

Definition at line 30 of file TrackStub.h.

References theEta_.

Referenced by L1TCSCTF::analyze().

30 { theEta_ = eta_; }
unsigned theEta_
Definition: TrackStub.h:70

◆ setPhiPacked()

void csctf::TrackStub::setPhiPacked ( const unsigned &  phi_)
inline

Definition at line 31 of file TrackStub.h.

References thePhi_.

Referenced by L1TCSCTF::analyze().

31 { thePhi_ = phi_; }
unsigned thePhi_
Definition: TrackStub.h:70

◆ station()

unsigned TrackStub::station ( ) const

Definition at line 43 of file TrackStub.cc.

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

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

43  {
44  int s = 0;
45 
46  switch (DetId(theDetId_).subdetId()) {
47  case (MuonSubdetId::DT):
48  s = DTChamberId(theDetId_).station() + 4;
49  break;
50  case (MuonSubdetId::CSC):
52  break;
53  default:
54  break;
55  }
56 
57  return s;
58  }
int station() const
Return the station number.
Definition: DTChamberId.h:42
Definition: DetId.h:17
int station() const
Definition: CSCDetId.h:79
uint32_t theDetId_
Definition: TrackStub.h:69
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ subsector()

unsigned TrackStub::subsector ( ) const

Definition at line 79 of file TrackStub.cc.

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

79  {
80  int ss = 0;
81 
82  switch (DetId(theDetId_).subdetId()) {
83  case (MuonSubdetId::DT): {
85  const unsigned int dt2csc_[12] = {2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1};
86  ss = dt2csc_[ss - 1];
87  } break;
88  case (MuonSubdetId::CSC):
90  break;
91  default:
92  break;
93  }
94 
95  return ss;
96  }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:69
static int triggerSubSectorFromLabels(int station, int chamber)
int sector() const
Definition: DTChamberId.h:49
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

Member Data Documentation

◆ link_

unsigned csctf::TrackStub::link_
private

Definition at line 70 of file TrackStub.h.

◆ theDetId_

uint32_t csctf::TrackStub::theDetId_
private

Definition at line 69 of file TrackStub.h.

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

◆ theEta_

unsigned csctf::TrackStub::theEta_
private

Definition at line 70 of file TrackStub.h.

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

◆ theEtaBinning

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

Definition at line 71 of file TrackStub.h.

Referenced by etaValue().

◆ thePhi_

unsigned csctf::TrackStub::thePhi_
private

Definition at line 70 of file TrackStub.h.

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

◆ thePhiBinning

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

Definition at line 71 of file TrackStub.h.

Referenced by phiValue().