CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1t::MuonStub Class Reference

#include <MuonStub.h>

Public Member Functions

int address () const
 return address More...
 
int bxNum () const
 return bunch crossing More...
 
int coord1 () const
 return phi More...
 
int coord2 () const
 return phib More...
 
int depthRegion () const
 return station More...
 
int eta1 () const
 return eta More...
 
int eta2 () const
 
int etaQuality () const
 return first eta quality More...
 
int etaRegion () const
 return wheel More...
 
int id () const
 return tag (second TS tag) More...
 
int index () const
 
bool isBarrel () const
 
bool isEndcap () const
 
int kmtf_address () const
 
 MuonStub ()
 default constructor More...
 
 MuonStub (int etaRegion, int phiRegion, int depthRegion, uint tfLayer, int coord1, int coord2, int id, int bx, int quality, int eta1=0, int eta2=0, int etaQuality=-1, int type=0)
 constructor More...
 
double offline_coord1 () const
 
double offline_coord2 () const
 
double offline_eta1 () const
 
double offline_eta2 () const
 
bool operator!= (const MuonStub &) const
 unequal operator More...
 
bool operator== (const MuonStub &) const
 equal operator More...
 
int phiRegion () const
 return sector More...
 
void print () const
 
int quality () const
 return quality code More...
 
void setEta (int eta1, int eta2, int etaQ)
 
void setID (int id)
 
void setOfflineQuantities (double coord1, double coord2, double eta1, double eta2)
 
uint tfLayer () const
 return track finder layer More...
 
int type () const
 
 ~MuonStub ()
 

Private Attributes

int bxNum_
 
int coord1_
 
int coord2_
 
int depthRegion_
 
int eta1_
 
int eta2_
 
int etaQuality_
 
int etaRegion_
 
int id_
 
double offline_coord1_
 
double offline_coord2_
 
double offline_eta1_
 
double offline_eta2_
 
int phiRegion_
 
int quality_
 
uint tfLayer_
 
int type_
 

Detailed Description

Definition at line 46 of file MuonStub.h.

Constructor & Destructor Documentation

◆ MuonStub() [1/2]

MuonStub::MuonStub ( )

default constructor

Definition at line 9 of file MuonStub.cc.

10  : etaRegion_(0),
11  phiRegion_(0),
12  depthRegion_(0),
13  coord1_(0),
14  coord2_(0),
15  id_(0),
16  quality_(-1),
17  bxNum_(17),
18  eta1_(0),
19  eta2_(0),
20  etaQuality_(-1),
21  type_(0) {}
int depthRegion_
Definition: MuonStub.h:146
int phiRegion_
Definition: MuonStub.h:145
int etaQuality_
Definition: MuonStub.h:155
int etaRegion_
Definition: MuonStub.h:144

◆ MuonStub() [2/2]

MuonStub::MuonStub ( int  etaRegion,
int  phiRegion,
int  depthRegion,
uint  tfLayer,
int  coord1,
int  coord2,
int  id,
int  bx,
int  quality,
int  eta1 = 0,
int  eta2 = 0,
int  etaQuality = -1,
int  type = 0 
)

constructor

Definition at line 23 of file MuonStub.cc.

40  coord1_(coord1),
41  coord2_(coord2),
42  id_(id),
44  bxNum_(bx),
45  eta1_(eta1),
46  eta2_(eta2),
48  type_(type) {}
int depthRegion_
Definition: MuonStub.h:146
int coord1() const
return phi
Definition: MuonStub.h:75
int etaRegion() const
return wheel
Definition: MuonStub.h:67
uint tfLayer_
Definition: MuonStub.h:147
int depthRegion() const
return station
Definition: MuonStub.h:71
int quality() const
return quality code
Definition: MuonStub.h:79
int coord2() const
return phib
Definition: MuonStub.h:77
int phiRegion_
Definition: MuonStub.h:145
int etaQuality_
Definition: MuonStub.h:155
int eta1() const
return eta
Definition: MuonStub.h:108
int etaQuality() const
return first eta quality
Definition: MuonStub.h:111
int eta2() const
Definition: MuonStub.h:109
int phiRegion() const
return sector
Definition: MuonStub.h:69
int etaRegion_
Definition: MuonStub.h:144
uint tfLayer() const
return track finder layer
Definition: MuonStub.h:73

◆ ~MuonStub()

MuonStub::~MuonStub ( )

Definition at line 50 of file MuonStub.cc.

50 {}

Member Function Documentation

◆ address()

int l1t::MuonStub::address ( ) const
inline

return address

Definition at line 84 of file MuonStub.h.

References generateTowerEtThresholdLUT::addr, etaRegion_, id_, and phiRegion_.

84  {
85  int addr = id_ | (phiRegion_ << 2);
86  if (etaRegion_ >= 0) {
87  return addr | (etaRegion_ << 8);
88  } else {
89  int twos_comp = ((-etaRegion_) ^ 0xf) + 1;
90  return addr | (twos_comp << 8);
91  }
92  }
int phiRegion_
Definition: MuonStub.h:145
int etaRegion_
Definition: MuonStub.h:144

◆ bxNum()

int l1t::MuonStub::bxNum ( ) const
inline

return bunch crossing

Definition at line 105 of file MuonStub.h.

References bxNum_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid(), and L1TPhase2GMTEndcapStubProcessor::makeStubs().

105 { return bxNum_; }

◆ coord1()

int l1t::MuonStub::coord1 ( ) const
inline

return phi

Definition at line 75 of file MuonStub.h.

References coord1_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid(), and setOfflineQuantities().

75 { return coord1_; }

◆ coord2()

int l1t::MuonStub::coord2 ( ) const
inline

return phib

Definition at line 77 of file MuonStub.h.

References coord2_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid(), and setOfflineQuantities().

77 { return coord2_; }

◆ depthRegion()

int l1t::MuonStub::depthRegion ( ) const
inline

return station

Definition at line 71 of file MuonStub.h.

References depthRegion_.

Referenced by L1TPhase2GMTEndcapStubProcessor::combineStubs(), and Phase2L1TGMTStubProducer::convertToHybrid().

71 { return depthRegion_; }
int depthRegion_
Definition: MuonStub.h:146

◆ eta1()

int l1t::MuonStub::eta1 ( ) const
inline

return eta

Definition at line 108 of file MuonStub.h.

References eta1_.

Referenced by L1TPhase2GMTEndcapStubProcessor::combineStubs(), Phase2L1TGMTStubProducer::convertToHybrid(), setEta(), and setOfflineQuantities().

108 { return eta1_; }

◆ eta2()

int l1t::MuonStub::eta2 ( ) const
inline

Definition at line 109 of file MuonStub.h.

References eta2_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid(), setEta(), and setOfflineQuantities().

109 { return eta2_; }

◆ etaQuality()

int l1t::MuonStub::etaQuality ( ) const
inline

return first eta quality

Definition at line 111 of file MuonStub.h.

References etaQuality_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid().

111 { return etaQuality_; }
int etaQuality_
Definition: MuonStub.h:155

◆ etaRegion()

int l1t::MuonStub::etaRegion ( ) const
inline

return wheel

Definition at line 67 of file MuonStub.h.

References etaRegion_.

Referenced by L1TPhase2GMTEndcapStubProcessor::combineStubs(), and Phase2L1TGMTStubProducer::convertToHybrid().

67 { return etaRegion_; }
int etaRegion_
Definition: MuonStub.h:144

◆ id()

int l1t::MuonStub::id ( ) const
inline

return tag (second TS tag)

Definition at line 81 of file MuonStub.h.

References id_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid(), and setID().

81 { return id_; }

◆ index()

int l1t::MuonStub::index ( ) const
inline

Definition at line 82 of file MuonStub.h.

References id_.

82 { return id_; }

◆ isBarrel()

bool l1t::MuonStub::isBarrel ( ) const
inline

Definition at line 115 of file MuonStub.h.

References type_.

115 { return (type_ == 1); }

◆ isEndcap()

bool l1t::MuonStub::isEndcap ( ) const
inline

Definition at line 116 of file MuonStub.h.

References type_.

116 { return (type_ == 0); }

◆ kmtf_address()

int l1t::MuonStub::kmtf_address ( ) const
inline

Definition at line 94 of file MuonStub.h.

References generateTowerEtThresholdLUT::addr, etaRegion_, id_, and phiRegion_.

94  {
95  int addr = id_ | (phiRegion_ << 2);
96  if (etaRegion_ >= 0) {
97  return addr | (etaRegion_ << 6);
98  } else {
99  int twos_comp = ((-etaRegion_) ^ 0x7) + 1;
100  return addr | (twos_comp << 6);
101  }
102  }
int phiRegion_
Definition: MuonStub.h:145
int etaRegion_
Definition: MuonStub.h:144

◆ offline_coord1()

double l1t::MuonStub::offline_coord1 ( ) const
inline

◆ offline_coord2()

double l1t::MuonStub::offline_coord2 ( ) const
inline

Definition at line 119 of file MuonStub.h.

References offline_coord2_.

Referenced by L1TPhase2GMTBarrelStubProcessor::buildStub(), and Phase2L1TGMTStubProducer::convertToHybrid().

119 { return offline_coord2_; }
double offline_coord2_
Definition: MuonStub.h:159

◆ offline_eta1()

double l1t::MuonStub::offline_eta1 ( ) const
inline

Definition at line 120 of file MuonStub.h.

References offline_eta1_.

Referenced by L1TPhase2GMTEndcapStubProcessor::combineStubs(), and Phase2L1TGMTStubProducer::convertToHybrid().

120 { return offline_eta1_; }
double offline_eta1_
Definition: MuonStub.h:160

◆ offline_eta2()

double l1t::MuonStub::offline_eta2 ( ) const
inline

Definition at line 121 of file MuonStub.h.

References offline_eta2_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid().

121 { return offline_eta2_; }
double offline_eta2_
Definition: MuonStub.h:161

◆ operator!=()

bool l1t::MuonStub::operator!= ( const MuonStub ) const

unequal operator

◆ operator==()

bool MuonStub::operator== ( const MuonStub id) const

equal operator

Definition at line 52 of file MuonStub.cc.

References bxNum_, coord1_, coord2_, depthRegion_, eta1_, eta2_, etaQuality_, etaRegion_, id_, phiRegion_, quality_, and type_.

52  {
53  if (etaRegion_ != id.etaRegion_)
54  return false;
55  if (phiRegion_ != id.phiRegion_)
56  return false;
57  if (depthRegion_ != id.depthRegion_)
58  return false;
59  if (id_ != id.id_)
60  return false;
61  if (coord1_ != id.coord1_)
62  return false;
63  if (coord2_ != id.coord2_)
64  return false;
65  if (quality_ != id.quality_)
66  return false;
67  if (bxNum_ != id.bxNum_)
68  return false;
69  if (eta1_ != id.eta1_)
70  return false;
71  if (eta2_ != id.eta2_)
72  return false;
73  if (etaQuality_ != id.etaQuality_)
74  return false;
75  if (type_ != id.type_)
76  return false;
77  return true;
78 }
int depthRegion_
Definition: MuonStub.h:146
int phiRegion_
Definition: MuonStub.h:145
int etaQuality_
Definition: MuonStub.h:155
int etaRegion_
Definition: MuonStub.h:144

◆ phiRegion()

int l1t::MuonStub::phiRegion ( ) const
inline

return sector

Definition at line 69 of file MuonStub.h.

References phiRegion_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid().

69 { return phiRegion_; }
int phiRegion_
Definition: MuonStub.h:145

◆ print()

void MuonStub::print ( void  ) const

Definition at line 84 of file MuonStub.cc.

References bxNum_, coord1_, coord2_, depthRegion_, eta1_, eta2_, etaQuality_, etaRegion_, id_, LogDebug, phiRegion_, quality_, and type_.

84  {
85  LogDebug("MuonStub") << " MuonStub : BX=" << bxNum_ << " etaRegion=" << etaRegion_ << " phiRegion=" << phiRegion_
86  << " depth=" << depthRegion_ << " ID=" << id_ << " coord1=" << coord1_ << " coord2=" << coord2_
87  << " quality=" << quality_ << " eta1=" << eta1_ << " eta2=" << eta2_
88  << " etaQuality=" << etaQuality_ << " type=" << type_;
89 }
int depthRegion_
Definition: MuonStub.h:146
int phiRegion_
Definition: MuonStub.h:145
int etaQuality_
Definition: MuonStub.h:155
int etaRegion_
Definition: MuonStub.h:144
#define LogDebug(id)

◆ quality()

int l1t::MuonStub::quality ( ) const
inline

return quality code

Definition at line 79 of file MuonStub.h.

References quality_.

79 { return quality_; }

◆ setEta()

void l1t::MuonStub::setEta ( int  eta1,
int  eta2,
int  etaQ 
)
inline

Definition at line 129 of file MuonStub.h.

References eta1(), eta1_, eta2(), eta2_, and etaQuality_.

Referenced by L1TPhase2GMTBarrelStubProcessor::buildStub(), and L1TPhase2GMTEndcapStubProcessor::combineStubs().

129  {
130  eta1_ = eta1;
131  eta2_ = eta2;
132  etaQuality_ = etaQ;
133  }
int etaQuality_
Definition: MuonStub.h:155
int eta1() const
return eta
Definition: MuonStub.h:108
int eta2() const
Definition: MuonStub.h:109

◆ setID()

void l1t::MuonStub::setID ( int  id)
inline

Definition at line 135 of file MuonStub.h.

References id(), and id_.

135 { id_ = id; }
int id() const
return tag (second TS tag)
Definition: MuonStub.h:81

◆ setOfflineQuantities()

void l1t::MuonStub::setOfflineQuantities ( double  coord1,
double  coord2,
double  eta1,
double  eta2 
)
inline

◆ tfLayer()

uint l1t::MuonStub::tfLayer ( ) const
inline

return track finder layer

Definition at line 73 of file MuonStub.h.

References tfLayer_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid().

73 { return tfLayer_; }
uint tfLayer_
Definition: MuonStub.h:147

◆ type()

int l1t::MuonStub::type ( ) const
inline

Definition at line 113 of file MuonStub.h.

References type_.

Referenced by Phase2L1TGMTStubProducer::convertToHybrid().

113 { return type_; }

Member Data Documentation

◆ bxNum_

int l1t::MuonStub::bxNum_
private

Definition at line 152 of file MuonStub.h.

Referenced by bxNum(), operator==(), and print().

◆ coord1_

int l1t::MuonStub::coord1_
private

Definition at line 148 of file MuonStub.h.

Referenced by coord1(), operator==(), and print().

◆ coord2_

int l1t::MuonStub::coord2_
private

Definition at line 149 of file MuonStub.h.

Referenced by coord2(), operator==(), and print().

◆ depthRegion_

int l1t::MuonStub::depthRegion_
private

Definition at line 146 of file MuonStub.h.

Referenced by depthRegion(), operator==(), and print().

◆ eta1_

int l1t::MuonStub::eta1_
private

Definition at line 153 of file MuonStub.h.

Referenced by eta1(), operator==(), print(), and setEta().

◆ eta2_

int l1t::MuonStub::eta2_
private

Definition at line 154 of file MuonStub.h.

Referenced by eta2(), operator==(), print(), and setEta().

◆ etaQuality_

int l1t::MuonStub::etaQuality_
private

Definition at line 155 of file MuonStub.h.

Referenced by etaQuality(), operator==(), print(), and setEta().

◆ etaRegion_

int l1t::MuonStub::etaRegion_
private

Definition at line 144 of file MuonStub.h.

Referenced by address(), etaRegion(), kmtf_address(), operator==(), and print().

◆ id_

int l1t::MuonStub::id_
private

Definition at line 150 of file MuonStub.h.

Referenced by address(), id(), index(), kmtf_address(), operator==(), print(), and setID().

◆ offline_coord1_

double l1t::MuonStub::offline_coord1_
private

Definition at line 158 of file MuonStub.h.

Referenced by offline_coord1(), and setOfflineQuantities().

◆ offline_coord2_

double l1t::MuonStub::offline_coord2_
private

Definition at line 159 of file MuonStub.h.

Referenced by offline_coord2(), and setOfflineQuantities().

◆ offline_eta1_

double l1t::MuonStub::offline_eta1_
private

Definition at line 160 of file MuonStub.h.

Referenced by offline_eta1(), and setOfflineQuantities().

◆ offline_eta2_

double l1t::MuonStub::offline_eta2_
private

Definition at line 161 of file MuonStub.h.

Referenced by offline_eta2(), and setOfflineQuantities().

◆ phiRegion_

int l1t::MuonStub::phiRegion_
private

Definition at line 145 of file MuonStub.h.

Referenced by address(), kmtf_address(), operator==(), phiRegion(), and print().

◆ quality_

int l1t::MuonStub::quality_
private

Definition at line 151 of file MuonStub.h.

Referenced by operator==(), print(), and quality().

◆ tfLayer_

uint l1t::MuonStub::tfLayer_
private

Definition at line 147 of file MuonStub.h.

Referenced by tfLayer().

◆ type_

int l1t::MuonStub::type_
private