CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Phase2L1GMT::PreTrackMatchedMuon Class Reference

#include <PreTrackMatchedMuon.h>

Public Member Functions

void addMuonRef (const l1t::SAMuonRef &ref)
 
void addStub (const l1t::MuonStubRef &stub, uint mask)
 
const uint beta () const
 
const uint charge () const
 
const int d0 () const
 
const int eta () const
 
bool isGlobalMuon () const
 
uint64_t lsb () const
 
const uint matchMask () const
 
uint64_t msb () const
 
const l1t::SAMuonRefVectormuonRef () const
 
const float offline_eta () const
 
const float offline_phi () const
 
const int offline_pt () const
 
const int phi () const
 
 PreTrackMatchedMuon (const uint &charge, const uint &pt, const int &eta, const int &phi, const int &z0, const int &d0, const uint &beta=15)
 
void print () const
 
void printWord () const
 
const uint pt () const
 
const int quality () const
 
void resetGlobal ()
 
void setOfflineQuantities (float pt, float eta, float phi)
 
void setQuality (uint quality)
 
void setTrkPtr (const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > &trkPtr)
 
void setValid (bool v)
 
const uint stubID0 () const
 
const uint stubID1 () const
 
const uint stubID2 () const
 
const uint stubID3 () const
 
const uint stubID4 () const
 
const l1t::MuonStubRefVectorstubs () const
 
const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr () const
 
bool valid () const
 
const int z0 () const
 

Private Attributes

uint beta_
 
uint charge_
 
int d0_
 
int eta_
 
bool isGlobal_
 
uint matchMask_
 
l1t::SAMuonRefVector muRef_
 
float offline_eta_
 
float offline_phi_
 
float offline_pt_
 
int phi_
 
uint pt_
 
uint quality_
 
uint stubID0_
 
uint stubID1_
 
uint stubID2_
 
uint stubID3_
 
uint stubID4_
 
l1t::MuonStubRefVector stubs_
 
edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr_
 
bool valid_
 
int z0_
 

Detailed Description

Definition at line 20 of file PreTrackMatchedMuon.h.

Constructor & Destructor Documentation

◆ PreTrackMatchedMuon()

Phase2L1GMT::PreTrackMatchedMuon::PreTrackMatchedMuon ( const uint &  charge,
const uint &  pt,
const int &  eta,
const int &  phi,
const int &  z0,
const int &  d0,
const uint &  beta = 15 
)
inline

Definition at line 22 of file PreTrackMatchedMuon.h.

29  : charge_(charge),
30  pt_(pt),
31  eta_(eta),
32  phi_(phi),
33  z0_(z0),
34  d0_(d0),
35  beta_(beta),
36  isGlobal_(false),
37  quality_(0),
38  stubID0_(4095),
39  stubID1_(4095),
40  stubID2_(4095),
41  stubID3_(4095),
42  stubID4_(4095),
43  matchMask_(0),
44  valid_(false) {}

Member Function Documentation

◆ addMuonRef()

void Phase2L1GMT::PreTrackMatchedMuon::addMuonRef ( const l1t::SAMuonRef ref)
inline

Definition at line 78 of file PreTrackMatchedMuon.h.

References muRef_.

78 { muRef_.push_back(ref); }

◆ addStub()

void Phase2L1GMT::PreTrackMatchedMuon::addStub ( const l1t::MuonStubRef stub,
uint  mask 
)
inline

Definition at line 83 of file PreTrackMatchedMuon.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, matchMask_, stubID0_, stubID1_, stubID2_, stubID3_, stubID4_, and stubs_.

83  {
84  stubs_.push_back(stub);
85  if (stub->tfLayer() == 0) {
86  stubID0_ = stub->address();
88  } else if (stub->tfLayer() == 1) {
89  stubID1_ = stub->address();
90  matchMask_ = matchMask_ | (mask << 2);
91  } else if (stub->tfLayer() == 2) {
92  stubID2_ = stub->address();
93  matchMask_ = matchMask_ | (mask << 4);
94  } else if (stub->tfLayer() == 3) {
95  stubID3_ = stub->address();
96  matchMask_ = matchMask_ | (mask << 6);
97  } else if (stub->tfLayer() == 4) {
98  stubID4_ = stub->address();
99  matchMask_ = matchMask_ | (mask << 8);
100  }
101  }

◆ beta()

const uint Phase2L1GMT::PreTrackMatchedMuon::beta ( ) const
inline

Definition at line 52 of file PreTrackMatchedMuon.h.

References beta_.

◆ charge()

const uint Phase2L1GMT::PreTrackMatchedMuon::charge ( void  ) const
inline

Definition at line 46 of file PreTrackMatchedMuon.h.

References charge_.

◆ d0()

const int Phase2L1GMT::PreTrackMatchedMuon::d0 ( ) const
inline

Definition at line 51 of file PreTrackMatchedMuon.h.

References d0_.

◆ eta()

const int Phase2L1GMT::PreTrackMatchedMuon::eta ( void  ) const
inline

◆ isGlobalMuon()

bool Phase2L1GMT::PreTrackMatchedMuon::isGlobalMuon ( ) const
inline

Definition at line 54 of file PreTrackMatchedMuon.h.

References isGlobal_.

Referenced by Muon.Muon::muonID().

◆ lsb()

uint64_t Phase2L1GMT::PreTrackMatchedMuon::lsb ( ) const
inline

Definition at line 117 of file PreTrackMatchedMuon.h.

References Phase2L1GMT::BITSD0, Phase2L1GMT::BITSETA, Phase2L1GMT::BITSPHI, Phase2L1GMT::BITSPT, Phase2L1GMT::BITSZ0, charge_, d0_, eta_, phi_, pt_, w(), and z0_.

Referenced by printWord().

117  {
118  wordtype w = 0;
119  int bstart = 0;
120  bstart = wordconcat<wordtype>(w, bstart, charge_ & 0x1, 1);
121  bstart = wordconcat<wordtype>(w, bstart, pt_, BITSPT);
122  bstart = wordconcat<wordtype>(w, bstart, phi_, BITSPHI);
123  bstart = wordconcat<wordtype>(w, bstart, eta_, BITSETA);
124  bstart = wordconcat<wordtype>(w, bstart, z0_, BITSZ0);
125  wordconcat<wordtype>(w, bstart, d0_, BITSD0);
126  return w.to_int();
127  }
T w() const
const int BITSZ0
Definition: Constants.h:27
ap_uint< 64 > wordtype
Definition: Constants.h:101
const int BITSETA
Definition: Constants.h:26
const int BITSPT
Definition: Constants.h:24
const int BITSPHI
Definition: Constants.h:25
const int BITSD0
Definition: Constants.h:28

◆ matchMask()

const uint Phase2L1GMT::PreTrackMatchedMuon::matchMask ( ) const
inline

Definition at line 65 of file PreTrackMatchedMuon.h.

References matchMask_.

◆ msb()

uint64_t Phase2L1GMT::PreTrackMatchedMuon::msb ( ) const
inline

Definition at line 129 of file PreTrackMatchedMuon.h.

References beta_, Phase2L1GMT::BITSMATCHQUALITY, Phase2L1GMT::BITSMUONBETA, Phase2L1GMT::BITSSTUBID, isGlobal_, quality_, stubID0_, stubID1_, stubID2_, stubID3_, stubID4_, valid_, and w2.

Referenced by printWord().

129  {
130  wordtype w2 = 0;
131  int bstart = 0;
132  bstart = wordconcat<wordtype>(w2, bstart, stubID0_, BITSSTUBID);
133  bstart = wordconcat<wordtype>(w2, bstart, stubID1_, BITSSTUBID);
134  bstart = wordconcat<wordtype>(w2, bstart, stubID2_, BITSSTUBID);
135  bstart = wordconcat<wordtype>(w2, bstart, stubID3_, BITSSTUBID);
136  bstart = wordconcat<wordtype>(w2, bstart, stubID4_, BITSSTUBID);
137  bstart = wordconcat<wordtype>(w2, bstart, isGlobal_, 1);
138  bstart = wordconcat<wordtype>(w2, bstart, beta_, BITSMUONBETA);
139  bstart = wordconcat<wordtype>(w2, bstart, quality_, BITSMATCHQUALITY);
140  wordconcat<wordtype>(w2, bstart, valid_, 1);
141 
142  return w2.to_int();
143  }
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
const int BITSMATCHQUALITY
Definition: Constants.h:41
ap_uint< 64 > wordtype
Definition: Constants.h:101
const int BITSSTUBID
Definition: Constants.h:33
const int BITSMUONBETA
Definition: Constants.h:42

◆ muonRef()

const l1t::SAMuonRefVector& Phase2L1GMT::PreTrackMatchedMuon::muonRef ( ) const
inline

Definition at line 82 of file PreTrackMatchedMuon.h.

References muRef_.

82 { return muRef_; }

◆ offline_eta()

const float Phase2L1GMT::PreTrackMatchedMuon::offline_eta ( ) const
inline

Definition at line 57 of file PreTrackMatchedMuon.h.

References offline_eta_.

◆ offline_phi()

const float Phase2L1GMT::PreTrackMatchedMuon::offline_phi ( ) const
inline

Definition at line 58 of file PreTrackMatchedMuon.h.

References offline_phi_.

◆ offline_pt()

const int Phase2L1GMT::PreTrackMatchedMuon::offline_pt ( ) const
inline

Definition at line 56 of file PreTrackMatchedMuon.h.

References offline_pt_.

◆ phi()

const int Phase2L1GMT::PreTrackMatchedMuon::phi ( void  ) const
inline

◆ print()

void Phase2L1GMT::PreTrackMatchedMuon::print ( void  ) const
inline

Definition at line 109 of file PreTrackMatchedMuon.h.

References charge_, d0_, eta_, isGlobal_, LogDebug, offline_eta_, offline_phi_, offline_pt_, phi_, pt_, quality_, stubID0_, stubID1_, stubID2_, stubID3_, stubID4_, valid_, and z0_.

109  {
110  LogDebug("PreTrackMatchedMuon") << "preconstructed muon : charge=" << charge_ << " pt=" << offline_pt_ << ","
111  << pt_ << " eta=" << offline_eta_ << "," << eta_ << " phi=" << offline_phi_ << ","
112  << phi_ << " z0=" << z0_ << " d0=" << d0_ << " quality=" << quality_
113  << " isGlobal=" << isGlobal_ << " valid=" << valid_ << " stubs: " << stubID0_
114  << " " << stubID1_ << " " << stubID2_ << " " << stubID3_ << " " << stubID4_;
115  }
#define LogDebug(id)

◆ printWord()

void Phase2L1GMT::PreTrackMatchedMuon::printWord ( ) const
inline

Definition at line 145 of file PreTrackMatchedMuon.h.

References createfilelist::int, LogDebug, lsb(), and msb().

145  {
146  LogDebug("PreTrackMatchedMuon") << "PreTrackMatchedMuon : word=" << std::setfill('0') << std::setw(16) << std::hex
147  << (long long unsigned int)(msb() >> 2) << std::setfill('0') << std::setw(16)
148  << std::hex
149  << (long long unsigned int)((lsb() | (msb() << 62)) & 0xffffffffffffffff);
150  }
#define LogDebug(id)

◆ pt()

const uint Phase2L1GMT::PreTrackMatchedMuon::pt ( ) const
inline

◆ quality()

const int Phase2L1GMT::PreTrackMatchedMuon::quality ( void  ) const
inline

Definition at line 55 of file PreTrackMatchedMuon.h.

References quality_.

Referenced by setQuality().

◆ resetGlobal()

void Phase2L1GMT::PreTrackMatchedMuon::resetGlobal ( )
inline

Definition at line 80 of file PreTrackMatchedMuon.h.

References isGlobal_.

◆ setOfflineQuantities()

void Phase2L1GMT::PreTrackMatchedMuon::setOfflineQuantities ( float  pt,
float  eta,
float  phi 
)
inline

◆ setQuality()

void Phase2L1GMT::PreTrackMatchedMuon::setQuality ( uint  quality)
inline

Definition at line 69 of file PreTrackMatchedMuon.h.

References quality(), and quality_.

◆ setTrkPtr()

void Phase2L1GMT::PreTrackMatchedMuon::setTrkPtr ( const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > &  trkPtr)
inline

Definition at line 105 of file PreTrackMatchedMuon.h.

References trkPtr(), and trkPtr_.

105 { trkPtr_ = trkPtr; }
edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr_
const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr() const

◆ setValid()

void Phase2L1GMT::PreTrackMatchedMuon::setValid ( bool  v)
inline

◆ stubID0()

const uint Phase2L1GMT::PreTrackMatchedMuon::stubID0 ( ) const
inline

Definition at line 60 of file PreTrackMatchedMuon.h.

References stubID0_.

◆ stubID1()

const uint Phase2L1GMT::PreTrackMatchedMuon::stubID1 ( ) const
inline

Definition at line 61 of file PreTrackMatchedMuon.h.

References stubID1_.

◆ stubID2()

const uint Phase2L1GMT::PreTrackMatchedMuon::stubID2 ( ) const
inline

Definition at line 62 of file PreTrackMatchedMuon.h.

References stubID2_.

◆ stubID3()

const uint Phase2L1GMT::PreTrackMatchedMuon::stubID3 ( ) const
inline

Definition at line 63 of file PreTrackMatchedMuon.h.

References stubID3_.

◆ stubID4()

const uint Phase2L1GMT::PreTrackMatchedMuon::stubID4 ( ) const
inline

Definition at line 64 of file PreTrackMatchedMuon.h.

References stubID4_.

◆ stubs()

const l1t::MuonStubRefVector& Phase2L1GMT::PreTrackMatchedMuon::stubs ( ) const
inline

Definition at line 103 of file PreTrackMatchedMuon.h.

References stubs_.

103 { return stubs_; }

◆ trkPtr()

const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_> > Phase2L1GMT::PreTrackMatchedMuon::trkPtr ( ) const
inline

Definition at line 107 of file PreTrackMatchedMuon.h.

References trkPtr_.

Referenced by setTrkPtr().

107 { return trkPtr_; }
edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > trkPtr_

◆ valid()

bool Phase2L1GMT::PreTrackMatchedMuon::valid ( ) const
inline

Definition at line 67 of file PreTrackMatchedMuon.h.

References valid_.

◆ z0()

const int Phase2L1GMT::PreTrackMatchedMuon::z0 ( ) const
inline

Definition at line 50 of file PreTrackMatchedMuon.h.

References z0_.

Member Data Documentation

◆ beta_

uint Phase2L1GMT::PreTrackMatchedMuon::beta_
private

Definition at line 159 of file PreTrackMatchedMuon.h.

Referenced by beta(), and msb().

◆ charge_

uint Phase2L1GMT::PreTrackMatchedMuon::charge_
private

Definition at line 153 of file PreTrackMatchedMuon.h.

Referenced by charge(), lsb(), and print().

◆ d0_

int Phase2L1GMT::PreTrackMatchedMuon::d0_
private

Definition at line 158 of file PreTrackMatchedMuon.h.

Referenced by d0(), lsb(), and print().

◆ eta_

int Phase2L1GMT::PreTrackMatchedMuon::eta_
private

Definition at line 155 of file PreTrackMatchedMuon.h.

Referenced by eta(), lsb(), and print().

◆ isGlobal_

bool Phase2L1GMT::PreTrackMatchedMuon::isGlobal_
private

Definition at line 160 of file PreTrackMatchedMuon.h.

Referenced by isGlobalMuon(), msb(), print(), and resetGlobal().

◆ matchMask_

uint Phase2L1GMT::PreTrackMatchedMuon::matchMask_
private

Definition at line 170 of file PreTrackMatchedMuon.h.

Referenced by addStub(), and matchMask().

◆ muRef_

l1t::SAMuonRefVector Phase2L1GMT::PreTrackMatchedMuon::muRef_
private

Definition at line 174 of file PreTrackMatchedMuon.h.

Referenced by addMuonRef(), and muonRef().

◆ offline_eta_

float Phase2L1GMT::PreTrackMatchedMuon::offline_eta_
private

Definition at line 163 of file PreTrackMatchedMuon.h.

Referenced by offline_eta(), print(), and setOfflineQuantities().

◆ offline_phi_

float Phase2L1GMT::PreTrackMatchedMuon::offline_phi_
private

Definition at line 164 of file PreTrackMatchedMuon.h.

Referenced by offline_phi(), print(), and setOfflineQuantities().

◆ offline_pt_

float Phase2L1GMT::PreTrackMatchedMuon::offline_pt_
private

Definition at line 162 of file PreTrackMatchedMuon.h.

Referenced by offline_pt(), print(), and setOfflineQuantities().

◆ phi_

int Phase2L1GMT::PreTrackMatchedMuon::phi_
private

Definition at line 156 of file PreTrackMatchedMuon.h.

Referenced by lsb(), phi(), and print().

◆ pt_

uint Phase2L1GMT::PreTrackMatchedMuon::pt_
private

Definition at line 154 of file PreTrackMatchedMuon.h.

Referenced by lsb(), print(), and pt().

◆ quality_

uint Phase2L1GMT::PreTrackMatchedMuon::quality_
private

Definition at line 161 of file PreTrackMatchedMuon.h.

Referenced by msb(), print(), quality(), and setQuality().

◆ stubID0_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID0_
private

Definition at line 165 of file PreTrackMatchedMuon.h.

Referenced by addStub(), msb(), print(), and stubID0().

◆ stubID1_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID1_
private

Definition at line 166 of file PreTrackMatchedMuon.h.

Referenced by addStub(), msb(), print(), and stubID1().

◆ stubID2_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID2_
private

Definition at line 167 of file PreTrackMatchedMuon.h.

Referenced by addStub(), msb(), print(), and stubID2().

◆ stubID3_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID3_
private

Definition at line 168 of file PreTrackMatchedMuon.h.

Referenced by addStub(), msb(), print(), and stubID3().

◆ stubID4_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID4_
private

Definition at line 169 of file PreTrackMatchedMuon.h.

Referenced by addStub(), msb(), print(), and stubID4().

◆ stubs_

l1t::MuonStubRefVector Phase2L1GMT::PreTrackMatchedMuon::stubs_
private

Definition at line 173 of file PreTrackMatchedMuon.h.

Referenced by addStub(), and stubs().

◆ trkPtr_

edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_> > Phase2L1GMT::PreTrackMatchedMuon::trkPtr_
private

Definition at line 175 of file PreTrackMatchedMuon.h.

Referenced by setTrkPtr(), and trkPtr().

◆ valid_

bool Phase2L1GMT::PreTrackMatchedMuon::valid_
private

Definition at line 172 of file PreTrackMatchedMuon.h.

Referenced by msb(), print(), setValid(), and valid().

◆ z0_

int Phase2L1GMT::PreTrackMatchedMuon::z0_
private

Definition at line 157 of file PreTrackMatchedMuon.h.

Referenced by lsb(), print(), and z0().