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)
 
- 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/3]

csctf::TrackStub::TrackStub ( )
inline

Definition at line 24 of file TrackStub.h.

24 {}

◆ TrackStub() [2/3]

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:69
unsigned link_
Definition: TrackStub.h:69
CSCCorrelatedLCTDigi()
default (calls clear())
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t theDetId_
Definition: TrackStub.h:68
unsigned thePhi_
Definition: TrackStub.h:69

◆ TrackStub() [3/3]

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:69
unsigned link_
Definition: TrackStub.h:69
CSCCorrelatedLCTDigi()
default (calls clear())
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
uint32_t theDetId_
Definition: TrackStub.h:68
unsigned thePhi_
Definition: TrackStub.h:69

Member Function Documentation

◆ BX()

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

Definition at line 55 of file TrackStub.h.

References CSCCorrelatedLCTDigi::getBX().

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

◆ cscid()

unsigned TrackStub::cscid ( ) const

Definition at line 91 of file TrackStub.cc.

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

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

91  {
92  if (DetId(theDetId_).subdetId() == MuonSubdetId::CSC)
94 
95  return 0; // DT chambers obviously don't have a csc id :-D
96  }
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:68
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ cscidSeparateME1a()

unsigned TrackStub::cscidSeparateME1a ( ) const

Definition at line 98 of file TrackStub.cc.

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

98  {
99  if (DetId(theDetId_).subdetId() != MuonSubdetId::CSC)
100  return 0;
102  unsigned normal_cscid = CSCTriggerNumbering::triggerCscIdFromLabels(id);
103  if (id.station() == 1 && id.ring() == 4)
104  return normal_cscid + 9; // 10,11,12 for ME1a
105  return normal_cscid;
106  }
unsigned station() const
Definition: TrackStub.cc:36
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:68
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 19 of file TrackStub.cc.

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

Referenced by geometryXMLparser.CSCAlignable::index().

19  {
20  int e = 0;
21 
22  switch (DetId(theDetId_).subdetId()) {
23  case (MuonSubdetId::DT):
24  e = (DTChamberId(theDetId_).wheel() > 0) ? 1 : 2;
25  break;
26  case (MuonSubdetId::CSC):
28  break;
29  default:
30  break;
31  }
32 
33  return e;
34  }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:68
int endcap() const
Definition: CSCDetId.h:85
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:42
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 38 of file TrackStub.h.

References theEta_.

38 { return theEta_; }
unsigned theEta_
Definition: TrackStub.h:69

◆ etaValue()

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

return the Eta Value of this stub's position.

Definition at line 33 of file TrackStub.h.

References CSCTFConstants::minEta, theEta_, and theEtaBinning.

Referenced by L1TCSCTF::analyze().

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

◆ getDetId()

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

Definition at line 45 of file TrackStub.h.

References theDetId_.

45 { return DetId(theDetId_); }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:68

◆ getDigi()

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

Get the digi this stub was made from.

Definition at line 44 of file TrackStub.h.

Referenced by operator==().

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

◆ operator!=()

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 &rhs) const
Definition: TrackStub.h:62

◆ operator<()

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

Definition at line 108 of file TrackStub.cc.

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

Referenced by operator>=().

108  {
109  return (rhs.isValid() && ((!(isValid())) || (getQuality() < rhs.getQuality()) ||
110  (getQuality() == rhs.getQuality() && cscid() < rhs.cscid()) ||
111  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() && (getTrknmb() == 2))));
112  }
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:91

◆ 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
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:114

◆ operator==()

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

Definition at line 62 of file TrackStub.h.

References getDigi(), and theDetId_.

Referenced by operator!=().

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

◆ operator>()

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

Comparision Operators, used for MPC sorting.

Definition at line 114 of file TrackStub.cc.

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

Referenced by operator<=().

114  {
115  return (isValid() && ((!(rhs.isValid())) || (getQuality() > rhs.getQuality()) ||
116  (getQuality() == rhs.getQuality() && cscid() > rhs.cscid()) ||
117  (getQuality() == rhs.getQuality() && cscid() == rhs.cscid() && (getTrknmb() == 1))));
118  }
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:91

◆ operator>=()

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

Definition at line 60 of file TrackStub.h.

References operator<().

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

◆ phiPacked()

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

Return the binned phi for this stub.

Definition at line 41 of file TrackStub.h.

References thePhi_.

Referenced by L1TCSCTF::analyze().

41 { return thePhi_; }
unsigned thePhi_
Definition: TrackStub.h:69

◆ phiValue()

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

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

Definition at line 35 of file TrackStub.h.

References thePhi_, and thePhiBinning.

Referenced by L1TCSCTF::analyze().

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

◆ sector()

unsigned TrackStub::sector ( ) const

Definition at line 53 of file TrackStub.cc.

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

Referenced by geometryXMLparser.DTAlignable::index().

53  {
54  int se = 0, temps = 0;
55 
56  switch (DetId(theDetId_).subdetId()) {
57  case (MuonSubdetId::DT): {
58  temps = DTChamberId(theDetId_).sector();
59  const unsigned int dt2csc[12] = {6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6};
60  se = dt2csc[temps - 1];
61  } break;
62  case (MuonSubdetId::CSC):
64  break;
65  default:
66  break;
67  }
68 
69  return se;
70  }
Definition: DetId.h:17
static int triggerSectorFromLabels(int station, int ring, int chamber)
uint32_t theDetId_
Definition: TrackStub.h:68
int sector() const
Definition: DTChamberId.h:52
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 29 of file TrackStub.h.

References theEta_.

Referenced by L1TCSCTF::analyze().

29 { theEta_ = eta_; }
unsigned theEta_
Definition: TrackStub.h:69

◆ setPhiPacked()

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

Definition at line 30 of file TrackStub.h.

References thePhi_.

Referenced by L1TCSCTF::analyze().

30 { thePhi_ = phi_; }
unsigned thePhi_
Definition: TrackStub.h:69

◆ station()

unsigned TrackStub::station ( ) const

Definition at line 36 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().

36  {
37  int s = 0;
38 
39  switch (DetId(theDetId_).subdetId()) {
40  case (MuonSubdetId::DT):
41  s = DTChamberId(theDetId_).station() + 4;
42  break;
43  case (MuonSubdetId::CSC):
45  break;
46  default:
47  break;
48  }
49 
50  return s;
51  }
int station() const
Return the station number.
Definition: DTChamberId.h:45
Definition: DetId.h:17
int station() const
Definition: CSCDetId.h:79
uint32_t theDetId_
Definition: TrackStub.h:68
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ subsector()

unsigned TrackStub::subsector ( ) const

Definition at line 72 of file TrackStub.cc.

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

72  {
73  int ss = 0;
74 
75  switch (DetId(theDetId_).subdetId()) {
76  case (MuonSubdetId::DT): {
78  const unsigned int dt2csc_[12] = {2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1};
79  ss = dt2csc_[ss - 1];
80  } break;
81  case (MuonSubdetId::CSC):
83  break;
84  default:
85  break;
86  }
87 
88  return ss;
89  }
Definition: DetId.h:17
uint32_t theDetId_
Definition: TrackStub.h:68
static int triggerSubSectorFromLabels(int station, int chamber)
int sector() const
Definition: DTChamberId.h:52
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 69 of file TrackStub.h.

◆ theDetId_

uint32_t csctf::TrackStub::theDetId_
private

Definition at line 68 of file TrackStub.h.

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

◆ theEta_

unsigned csctf::TrackStub::theEta_
private

Definition at line 69 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 70 of file TrackStub.h.

Referenced by etaValue().

◆ thePhi_

unsigned csctf::TrackStub::thePhi_
private

Definition at line 69 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 70 of file TrackStub.h.

Referenced by phiValue().