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 ()
 default 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 uint16_t hmt=0, const Version version=Version::Legacy)
 Constructors. More...
 
const CSCALCTDigigetALCT () const
 
uint16_t getBend () const
 return left/right bending More...
 
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 getEightStrip () const
 get single eight strip bit More...
 
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
 
uint16_t getQuality () const
 return the Quality More...
 
bool getQuartStrip () const
 get single quart strip bit More...
 
uint16_t getRun3Pattern () const
 return pattern 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 setEightStrip (const bool eightStrip)
 set single eight 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 setQuartStrip (const bool quartStrip)
 set single quart strip bit More...
 
void setRun3 (const bool isRun3)
 
void setRun3Pattern (const uint16_t pattern)
 set 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  LCTKeyStripMasks { kEightStripMask = 0x1, kQuartStripMask = 0x1, kHalfStripMask = 0xff }
 
enum  LCTKeyStripShifts { kEightStripShift = 9, kQuartStripShift = 8, kHalfStripShift = 0 }
 
enum  LCTPatternMasks { kRun3SlopeMask = 0xf, kRun3PatternMask = 0x7, kLegacyPatternMask = 0xf }
 
enum  LCTPatternShifts { kRun3SlopeShift = 7, kRun3PatternShift = 4, kLegacyPatternShift = 0 }
 
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) {}

◆ 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) {}

◆ 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_) {}

Member Function Documentation

◆ BX()

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

Definition at line 56 of file TrackStub.h.

56 { return getBX(); }

References CSCCorrelatedLCTDigi::getBX().

◆ cscid()

unsigned TrackStub::cscid ( ) const

Definition at line 98 of file TrackStub.cc.

98  {
99  if (DetId(theDetId_).subdetId() == MuonSubdetId::CSC)
101 
102  return 0; // DT chambers obviously don't have a csc id :-D
103  }

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

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

◆ cscidSeparateME1a()

unsigned TrackStub::cscidSeparateME1a ( ) const

Definition at line 105 of file TrackStub.cc.

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  }

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

◆ endcap()

unsigned TrackStub::endcap ( ) const

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

Definition at line 26 of file TrackStub.cc.

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  }

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

Referenced by geometryXMLparser.CSCAlignable::index().

◆ etaPacked()

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

Return the binned eta for this stub.

Definition at line 39 of file TrackStub.h.

39 { return theEta_; }

References theEta_.

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

◆ getDetId()

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

Definition at line 46 of file TrackStub.h.

46 { return DetId(theDetId_); }

References theDetId_.

◆ getDigi()

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

Get the digi this stub was made from.

Definition at line 45 of file TrackStub.h.

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

Referenced by operator==().

◆ operator!=()

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

Definition at line 66 of file TrackStub.h.

66 { return !(this->operator==(rhs)); }

References operator==().

◆ operator<()

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

Definition at line 115 of file TrackStub.cc.

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  }

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

Referenced by operator>=().

◆ operator<=()

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

Definition at line 62 of file TrackStub.h.

62 { return !(this->operator>(rhs)); }

References operator>().

◆ operator==()

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

Definition at line 63 of file TrackStub.h.

63  {
64  return ((theDetId_ == rhs.theDetId_) && (*(getDigi()) == *(rhs.getDigi())));
65  }

References getDigi(), and theDetId_.

Referenced by operator!=().

◆ operator>()

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

Comparision Operators, used for MPC sorting.

Definition at line 121 of file TrackStub.cc.

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  }

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

Referenced by operator<=().

◆ operator>=()

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

Definition at line 61 of file TrackStub.h.

61 { return !(this->operator<(rhs)); }

References operator<().

◆ phiPacked()

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

Return the binned phi for this stub.

Definition at line 42 of file TrackStub.h.

42 { return thePhi_; }

References thePhi_.

Referenced by L1TCSCTF::analyze().

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

36 { return (thePhi_ * thePhiBinning); }

References thePhi_, and thePhiBinning.

Referenced by L1TCSCTF::analyze().

◆ sector()

unsigned TrackStub::sector ( ) const

Definition at line 60 of file TrackStub.cc.

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  }

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

Referenced by geometryXMLparser.DTAlignable::index().

◆ setEtaPacked()

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

set Eta and Phi from integer values.

Definition at line 30 of file TrackStub.h.

30 { theEta_ = eta_; }

References theEta_.

Referenced by L1TCSCTF::analyze().

◆ setPhiPacked()

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

Definition at line 31 of file TrackStub.h.

31 { thePhi_ = phi_; }

References thePhi_.

Referenced by L1TCSCTF::analyze().

◆ station()

unsigned TrackStub::station ( ) const

Definition at line 43 of file TrackStub.cc.

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  }

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

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

◆ subsector()

unsigned TrackStub::subsector ( ) const

Definition at line 79 of file TrackStub.cc.

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  }

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

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

CSCTriggerNumbering::triggerSectorFromLabels
static int triggerSectorFromLabels(int station, int ring, int chamber)
Definition: CSCTriggerNumbering.cc:76
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
CSCCorrelatedLCTDigi::getTrknmb
uint16_t getTrknmb() const
return track number
Definition: CSCCorrelatedLCTDigi.h:52
csctf::TrackStub::station
unsigned station() const
Definition: TrackStub.cc:43
csctf::TrackStub::operator<
bool operator<(const TrackStub &) const
Definition: TrackStub.cc:115
CSCTriggerNumbering::triggerSubSectorFromLabels
static int triggerSubSectorFromLabels(int station, int chamber)
Definition: CSCTriggerNumbering.cc:105
CSCTriggerNumbering::triggerCscIdFromLabels
static int triggerCscIdFromLabels(int station, int ring, int chamber)
Definition: CSCTriggerNumbering.cc:137
csctf::TrackStub::operator>
bool operator>(const TrackStub &) const
Comparision Operators, used for MPC sorting.
Definition: TrackStub.cc:121
csctf::TrackStub::operator==
bool operator==(const TrackStub &rhs) const
Definition: TrackStub.h:63
csctf::TrackStub::theEta_
unsigned theEta_
Definition: TrackStub.h:70
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PVValHelper::eta
Definition: PVValidationHelpers.h:69
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
csctf::TrackStub::thePhiBinning
static const double thePhiBinning
Definition: TrackStub.h:71
csctf::TrackStub::theEtaBinning
static const double theEtaBinning
Definition: TrackStub.h:71
csctf::TrackStub::thePhi_
unsigned thePhi_
Definition: TrackStub.h:70
CSCDetId
Definition: CSCDetId.h:26
CSCTFConstants::minEta
const static double minEta
Definition: CSCTFConstants.h:39
DDAxes::phi
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
DTChamberId
Definition: DTChamberId.h:14
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
CSCCorrelatedLCTDigi::getBX
uint16_t getBX() const
return BX
Definition: CSCCorrelatedLCTDigi.h:111
CSCCorrelatedLCTDigi::isValid
bool isValid() const
return valid pattern bit
Definition: CSCCorrelatedLCTDigi.h:55
csctf::TrackStub::getDigi
const CSCCorrelatedLCTDigi * getDigi() const
Get the digi this stub was made from.
Definition: TrackStub.h:45
CSCCorrelatedLCTDigi::getQuality
uint16_t getQuality() const
return the Quality
Definition: CSCCorrelatedLCTDigi.h:58
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
csctf::TrackStub::link_
unsigned link_
Definition: TrackStub.h:70
csctf::TrackStub::theDetId_
uint32_t theDetId_
Definition: TrackStub.h:69
CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi
CSCCorrelatedLCTDigi()
default
Definition: CSCCorrelatedLCTDigi.cc:44
csctf::TrackStub::cscid
unsigned cscid() const
Definition: TrackStub.cc:98
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37