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::RegionalMuonCandRef &ref)
 
void addStub (const l1t::MuonStubRef &stub)
 
const uint beta () const
 
const uint charge () const
 
const int d0 () const
 
const int eta () const
 
bool isGlobalMuon () const
 
uint64_t lsb () const
 
uint64_t msb () const
 
const std::vector< l1t::RegionalMuonCandRef > & muonRef () 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_
 
std::vector< l1t::RegionalMuonCandRefmuRef_
 
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_(511),
39  stubID1_(511),
40  stubID2_(511),
41  stubID3_(511),
42  stubID4_(511),
43  valid_(false) {}

Member Function Documentation

◆ addMuonRef()

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

Definition at line 75 of file PreTrackMatchedMuon.h.

References isGlobal_, and muRef_.

75  {
76  muRef_.push_back(ref);
77  isGlobal_ = true;
78  }
std::vector< l1t::RegionalMuonCandRef > muRef_

◆ addStub()

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

Definition at line 83 of file PreTrackMatchedMuon.h.

References edm::Ref< C, T, F >::id(), stubID0_, stubID1_, stubID2_, stubID3_, stubID4_, and stubs_.

83  {
84  stubs_.push_back(stub);
85  if (stub->tfLayer() == 0)
86  stubID0_ = stub->id();
87  else if (stub->tfLayer() == 1)
88  stubID1_ = stub->id();
89  else if (stub->tfLayer() == 2)
90  stubID2_ = stub->id();
91  else if (stub->tfLayer() == 3)
92  stubID3_ = stub->id();
93  else if (stub->tfLayer() == 4)
94  stubID4_ = stub->id();
95  }
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244

◆ beta()

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

Definition at line 51 of file PreTrackMatchedMuon.h.

References beta_.

◆ charge()

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

Definition at line 45 of file PreTrackMatchedMuon.h.

References charge_.

◆ d0()

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

Definition at line 50 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 53 of file PreTrackMatchedMuon.h.

References isGlobal_.

Referenced by Muon.Muon::muonID().

◆ lsb()

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

Definition at line 111 of file PreTrackMatchedMuon.h.

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

Referenced by printWord().

111  {
112  uint64_t w = charge_ & 0x1;
113  w = w | (twos_complement(pt_, BITSPT) << 1);
114  w = w | (twos_complement(phi_, BITSPHI) << (BITSPT + 1));
115  w = w | (twos_complement(eta_, BITSETA) << (BITSPHI + BITSPT + 1));
116  w = w | (twos_complement(z0_, BITSZ0) << (BITSETA + BITSPHI + BITSPT + 1));
117  w = w | (twos_complement(d0_, BITSD0) << (BITSZ0 + BITSETA + BITSPHI + BITSPT + 1));
118  return w;
119  }
T w() const
const int BITSZ0
Definition: Constants.h:27
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
unsigned long long uint64_t
Definition: Time.h:13
uint64_t twos_complement(long long int v, uint bits)
Definition: Constants.h:121

◆ msb()

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

Definition at line 121 of file PreTrackMatchedMuon.h.

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

Referenced by printWord().

121  {
122  uint64_t w2 = 0;
128  w2 = w2 | (twos_complement(isGlobal_, 1) << (5 * BITSSTUBID));
129  w2 = w2 | (twos_complement(beta_, BITSMUONBETA) << (5 * BITSSTUBID + 1));
132  return w2;
133  }
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
const int BITSMATCHQUALITY
Definition: Constants.h:41
const int BITSSTUBID
Definition: Constants.h:33
unsigned long long uint64_t
Definition: Time.h:13
const int BITSMUONBETA
Definition: Constants.h:42
uint64_t twos_complement(long long int v, uint bits)
Definition: Constants.h:121

◆ muonRef()

const std::vector<l1t::RegionalMuonCandRef>& Phase2L1GMT::PreTrackMatchedMuon::muonRef ( ) const
inline

Definition at line 82 of file PreTrackMatchedMuon.h.

References muRef_.

82 { return muRef_; }
std::vector< l1t::RegionalMuonCandRef > muRef_

◆ offline_eta()

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

Definition at line 56 of file PreTrackMatchedMuon.h.

References offline_eta_.

◆ offline_phi()

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

Definition at line 57 of file PreTrackMatchedMuon.h.

References offline_phi_.

◆ offline_pt()

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

Definition at line 55 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 103 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_.

103  {
104  LogDebug("PreTrackMatchedMuon") << "preconstructed muon : charge=" << charge_ << " pt=" << offline_pt_ << ","
105  << pt_ << " eta=" << offline_eta_ << "," << eta_ << " phi=" << offline_phi_ << ","
106  << phi_ << " z0=" << z0_ << " d0=" << d0_ << " quality=" << quality_
107  << " isGlobal=" << isGlobal_ << " valid=" << valid_ << " stubs: " << stubID0_
108  << " " << stubID1_ << " " << stubID2_ << " " << stubID3_ << " " << stubID4_;
109  }
#define LogDebug(id)

◆ printWord()

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

Definition at line 135 of file PreTrackMatchedMuon.h.

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

135  {
136  LogDebug("PreTrackMatchedMuon") << "PreTrackMatchedMuon : word=" << std::setfill('0') << std::setw(16) << std::hex
137  << (long long unsigned int)(msb() >> 2) << std::setfill('0') << std::setw(16)
138  << std::hex
139  << (long long unsigned int)((lsb() | (msb() << 62)) & 0xffffffffffffffff);
140  }
#define LogDebug(id)

◆ pt()

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

◆ quality()

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

Definition at line 54 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 66 of file PreTrackMatchedMuon.h.

References quality(), and quality_.

◆ setTrkPtr()

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

Definition at line 99 of file PreTrackMatchedMuon.h.

References trkPtr(), and trkPtr_.

99 { 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 59 of file PreTrackMatchedMuon.h.

References stubID0_.

◆ stubID1()

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

Definition at line 60 of file PreTrackMatchedMuon.h.

References stubID1_.

◆ stubID2()

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

Definition at line 61 of file PreTrackMatchedMuon.h.

References stubID2_.

◆ stubID3()

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

Definition at line 62 of file PreTrackMatchedMuon.h.

References stubID3_.

◆ stubID4()

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

Definition at line 63 of file PreTrackMatchedMuon.h.

References stubID4_.

◆ stubs()

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

Definition at line 97 of file PreTrackMatchedMuon.h.

References stubs_.

97 { return stubs_; }

◆ trkPtr()

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

Definition at line 101 of file PreTrackMatchedMuon.h.

References trkPtr_.

Referenced by setTrkPtr().

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

◆ valid()

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

Definition at line 64 of file PreTrackMatchedMuon.h.

References valid_.

◆ z0()

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

Definition at line 49 of file PreTrackMatchedMuon.h.

References z0_.

Member Data Documentation

◆ beta_

uint Phase2L1GMT::PreTrackMatchedMuon::beta_
private

Definition at line 149 of file PreTrackMatchedMuon.h.

Referenced by beta(), and msb().

◆ charge_

uint Phase2L1GMT::PreTrackMatchedMuon::charge_
private

Definition at line 143 of file PreTrackMatchedMuon.h.

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

◆ d0_

int Phase2L1GMT::PreTrackMatchedMuon::d0_
private

Definition at line 148 of file PreTrackMatchedMuon.h.

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

◆ eta_

int Phase2L1GMT::PreTrackMatchedMuon::eta_
private

Definition at line 145 of file PreTrackMatchedMuon.h.

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

◆ isGlobal_

bool Phase2L1GMT::PreTrackMatchedMuon::isGlobal_
private

Definition at line 150 of file PreTrackMatchedMuon.h.

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

◆ muRef_

std::vector<l1t::RegionalMuonCandRef> Phase2L1GMT::PreTrackMatchedMuon::muRef_
private

Definition at line 162 of file PreTrackMatchedMuon.h.

Referenced by addMuonRef(), and muonRef().

◆ offline_eta_

float Phase2L1GMT::PreTrackMatchedMuon::offline_eta_
private

Definition at line 153 of file PreTrackMatchedMuon.h.

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

◆ offline_phi_

float Phase2L1GMT::PreTrackMatchedMuon::offline_phi_
private

Definition at line 154 of file PreTrackMatchedMuon.h.

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

◆ offline_pt_

float Phase2L1GMT::PreTrackMatchedMuon::offline_pt_
private

Definition at line 152 of file PreTrackMatchedMuon.h.

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

◆ phi_

int Phase2L1GMT::PreTrackMatchedMuon::phi_
private

Definition at line 146 of file PreTrackMatchedMuon.h.

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

◆ pt_

uint Phase2L1GMT::PreTrackMatchedMuon::pt_
private

Definition at line 144 of file PreTrackMatchedMuon.h.

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

◆ quality_

uint Phase2L1GMT::PreTrackMatchedMuon::quality_
private

Definition at line 151 of file PreTrackMatchedMuon.h.

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

◆ stubID0_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID0_
private

Definition at line 155 of file PreTrackMatchedMuon.h.

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

◆ stubID1_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID1_
private

Definition at line 156 of file PreTrackMatchedMuon.h.

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

◆ stubID2_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID2_
private

Definition at line 157 of file PreTrackMatchedMuon.h.

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

◆ stubID3_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID3_
private

Definition at line 158 of file PreTrackMatchedMuon.h.

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

◆ stubID4_

uint Phase2L1GMT::PreTrackMatchedMuon::stubID4_
private

Definition at line 159 of file PreTrackMatchedMuon.h.

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

◆ stubs_

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

Definition at line 161 of file PreTrackMatchedMuon.h.

Referenced by addStub(), and stubs().

◆ trkPtr_

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

Definition at line 163 of file PreTrackMatchedMuon.h.

Referenced by setTrkPtr(), and trkPtr().

◆ valid_

bool Phase2L1GMT::PreTrackMatchedMuon::valid_
private

Definition at line 160 of file PreTrackMatchedMuon.h.

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

◆ z0_

int Phase2L1GMT::PreTrackMatchedMuon::z0_
private

Definition at line 147 of file PreTrackMatchedMuon.h.

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