CMS 3D CMS Logo

L1MuBMTrack.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef L1MUBM_TRACK_H
15 #define L1MUBM_TRACK_H
16 
17 //---------------
18 // C++ Headers --
19 //---------------
20 
21 #include <iosfwd>
22 #include <string>
23 #include <vector>
24 
25 //----------------------
26 // Base Class Headers --
27 //----------------------
28 
30 
31 //------------------------------------
32 // Collaborating Class Declarations --
33 //------------------------------------
34 
40 
41 // ---------------------
42 // -- Class Interface --
43 // ---------------------
44 
46 
47 typedef std::vector<L1MuBMTrack> L1MuBMTrackCollection;
48 
50 public:
52  L1MuBMTrack();
53 
56 
58  L1MuBMTrack(const L1MuBMTrack&);
59 
61  ~L1MuBMTrack() override;
62 
64  void reset();
65 
67  inline std::string name() const { return m_name; }
68 
70  inline unsigned int pt() const { return hwPt(); }
71 
73  inline unsigned int phi() const { return hwPhi(); }
74 
76  inline int eta() const { return hwEta(); }
77 
79  inline bool fineEtaBit() const { return hwHF(); }
80 
82  inline int charge() const { return hwSign(); }
83 
85  inline unsigned int quality() const { return hwQual(); }
86 
88  inline TrackClass tc() const { return m_tc; }
89 
91  inline bool empty() const { return m_empty; }
92 
94  inline const L1MuBMSecProcId& spid() const { return m_spid; }
95 
97  inline L1MuBMAddressArray address() const { return m_addArray; }
98 
100  inline int address(int stat) const { return m_addArray.station(stat); }
101 
103  inline int bx() const { return m_bx; }
104 
106  inline int numberOfTSphi() const { return m_tsphiList.size(); }
107 
109  inline int numberOfTSeta() const { return m_tsetaList.size(); }
110 
112  const std::vector<L1MuBMTrackSegPhi>& getTSphi() const { return m_tsphiList; }
113 
115  const L1MuBMTrackSegPhi& getStartTSphi() const;
116 
118  const L1MuBMTrackSegPhi& getEndTSphi() const;
119 
121  const std::vector<L1MuBMTrackSegEta>& getTSeta() const { return m_tsetaList; }
122 
124  const L1MuBMTrackSegEta& getStartTSeta() const;
125 
127  const L1MuBMTrackSegEta& getEndTSeta() const;
128 
130  inline void enable() {
131  m_empty = false;
132  setTFIdentifiers(this->spid().sector(), l1t::tftype::bmtf);
133  };
134 
136  inline void disable() { m_empty = true; }
137 
139  inline void setName(std::string name) { m_name = name; }
140 
142  inline void setTC(TrackClass tc) { m_tc = tc; }
143 
145  inline void setPhi(int phi) { setHwPhi(phi); }
146 
148  void setEta(int eta);
149 
151  inline void setFineEtaBit() { setHwHF(true); }
152 
154  inline void setPt(int pt) { setHwPt(pt); }
155 
157  inline void setCharge(int charge) { setHwSign(charge); }
158 
160  inline void setBx(int bx) { m_bx = bx; }
161 
163  inline void setQuality(unsigned int quality) { setHwQual(quality); }
164 
167 
169  void setTSphi(const std::vector<const L1MuBMTrackSegPhi*>& tsList);
170 
172  void setTSeta(const std::vector<const L1MuBMTrackSegEta*>& tsList);
173 
176 
178  bool operator==(const L1MuBMTrack&) const;
179 
181  bool operator!=(const L1MuBMTrack&) const;
182 
184  void print() const;
185 
187  friend std::ostream& operator<<(std::ostream&, const L1MuBMTrack&);
188 
190  static bool rank(const L1MuBMTrack* first, const L1MuBMTrack* second) {
191  unsigned short int rank_f = 0; // rank of first
192  unsigned short int rank_s = 0; // rank of second
193  if (first)
194  rank_f = first->pt() + 512 * first->quality();
195  if (second)
196  rank_s = second->pt() + 512 * second->quality();
197  return rank_f > rank_s;
198  }
199 
200 private:
201  L1MuBMSecProcId m_spid; // which SP found the track
203  bool m_empty;
205  int m_bx;
206 
208  std::vector<L1MuBMTrackSegPhi> m_tsphiList;
209  std::vector<L1MuBMTrackSegEta> m_tsetaList;
210 };
211 
212 #endif
L1MuBMTrack::empty
bool empty() const
is it an empty muon candidate?
Definition: L1MuBMTrack.h:91
L1MuBMTrack::getEndTSeta
const L1MuBMTrackSegEta & getEndTSeta() const
return end eta track segment of muon candidate
Definition: L1MuBMTrack.cc:142
l1t::bmtf
Definition: RegionalMuonCandFwd.h:8
L1MuBMTrackSegEta
Definition: L1MuBMTrackSegEta.h:41
L1MuBMTrack::eta
int eta() const
get eta-code (6 bits)
Definition: L1MuBMTrack.h:76
L1MuBMTrack::L1MuBMTrack
L1MuBMTrack()
default constructor
Definition: L1MuBMTrack.cc:48
L1MuBMTrack::getTSphi
const std::vector< L1MuBMTrackSegPhi > & getTSphi() const
return all phi track segments of the muon candidate
Definition: L1MuBMTrack.h:112
L1MuBMTrackAssParam.h
l1t::RegionalMuonCand::hwPhi
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
Definition: RegionalMuonCand.h:167
L1MuBMTrackSegPhi
Definition: L1MuBMTrackSegPhi.h:41
L1MuBMTrack::getStartTSphi
const L1MuBMTrackSegPhi & getStartTSphi() const
return start phi track segment of muon candidate
Definition: L1MuBMTrack.cc:127
L1MuBMTrack::setTC
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuBMTrack.h:142
L1MuBMTrack::setPt
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuBMTrack.h:154
l1t::RegionalMuonCand::setHwSign
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
Definition: RegionalMuonCand.h:136
L1MuBMTrack::pt
unsigned int pt() const
get pt-code (5 bits)
Definition: L1MuBMTrack.h:70
L1MuBMSecProcId
Definition: L1MuBMSecProcId.h:40
l1t::RegionalMuonCand::hwHF
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
Definition: RegionalMuonCand.h:183
L1MuBMTrack::setAddresses
void setAddresses(const L1MuBMAddressArray &addr)
set relative addresses of muon candidate
Definition: L1MuBMTrack.h:166
L1MuBMAddressArray
Definition: L1MuBMAddressArray.h:50
L1MuBMTrack::fineEtaBit
bool fineEtaBit() const
get fine eta bit
Definition: L1MuBMTrack.h:79
L1MuBMAddressArray::station
unsigned short station(int stat) const
get address of a given station [1-4]
Definition: L1MuBMAddressArray.h:80
L1MuBMTrackSegPhi.h
L1MuBMTrack::m_bx
int m_bx
Definition: L1MuBMTrack.h:205
L1MuBMTrack::tc
TrackClass tc() const
get track-class
Definition: L1MuBMTrack.h:88
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
L1MuBMTrack::numberOfTSphi
int numberOfTSphi() const
return number of phi track segments used to form the muon candidate
Definition: L1MuBMTrack.h:106
L1MuBMTrack::m_spid
L1MuBMSecProcId m_spid
Definition: L1MuBMTrack.h:201
L1MuBMTrack::setPhi
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuBMTrack.h:145
L1MuBMTrack::setName
void setName(std::string name)
set name of object
Definition: L1MuBMTrack.h:139
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1MuBMTrack::enable
void enable()
enable muon candidate
Definition: L1MuBMTrack.h:130
l1t::RegionalMuonCand::hwQual
const int hwQual() const
Get quality code.
Definition: RegionalMuonCand.h:175
l1t::RegionalMuonCand::hwEta
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
Definition: RegionalMuonCand.h:169
L1MuBMTrack::m_empty
bool m_empty
Definition: L1MuBMTrack.h:203
L1MuBMTrack::operator==
bool operator==(const L1MuBMTrack &) const
equal operator
Definition: L1MuBMTrack.cc:191
L1MuBMTrack::setQuality
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuBMTrack.h:163
L1MuBMTrack::print
void print() const
print parameters of muon candidate
Definition: L1MuBMTrack.cc:249
l1t::RegionalMuonCand::hwPt
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
Definition: RegionalMuonCand.h:161
L1MuBMTrack::m_tsetaList
std::vector< L1MuBMTrackSegEta > m_tsetaList
Definition: L1MuBMTrack.h:209
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
L1MuBMTrack::spid
const L1MuBMSecProcId & spid() const
return Sector Processor in which the muon candidate was found
Definition: L1MuBMTrack.h:94
l1t::RegionalMuonCand::setTFIdentifiers
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
Definition: RegionalMuonCand.cc:5
L1MuBMTrack::charge
int charge() const
get charge (1 bit)
Definition: L1MuBMTrack.h:82
L1MuBMTrack::quality
unsigned int quality() const
get quality
Definition: L1MuBMTrack.h:85
L1MuBMTrack::setCharge
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuBMTrack.h:157
L1MuBMTrack::disable
void disable()
disable muon candidate
Definition: L1MuBMTrack.h:136
L1MuBMTrack::numberOfTSeta
int numberOfTSeta() const
return number of eta track segments used to form the muon candidate
Definition: L1MuBMTrack.h:109
L1MuBMTrack::bx
int bx() const
get the bunch crossing for this muon candidate
Definition: L1MuBMTrack.h:103
l1t::RegionalMuonCand::setHwPt
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
Definition: RegionalMuonCand.h:126
l1t::RegionalMuonCand::setHwHF
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
Definition: RegionalMuonCand.h:142
L1MuBMTrack::getStartTSeta
const L1MuBMTrackSegEta & getStartTSeta() const
return start eta track segment of muon candidate
Definition: L1MuBMTrack.cc:137
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
L1MuBMTrackCollection
std::vector< L1MuBMTrack > L1MuBMTrackCollection
Definition: L1MuBMTrack.h:45
L1MuBMTrack::setTSeta
void setTSeta(const std::vector< const L1MuBMTrackSegEta * > &tsList)
set eta track segments used to form the muon candidate
Definition: L1MuBMTrack.cc:160
L1MuBMTrack::name
std::string name() const
get name of object
Definition: L1MuBMTrack.h:67
L1MuBMTrack::operator<<
friend std::ostream & operator<<(std::ostream &, const L1MuBMTrack &)
output stream operator
L1MuBMTrack::address
int address(int stat) const
get relative address of a given station
Definition: L1MuBMTrack.h:100
L1MuBMTrack
Definition: L1MuBMTrack.h:49
L1MuBMSecProcId.h
L1MuBMTrack::rank
static bool rank(const L1MuBMTrack *first, const L1MuBMTrack *second)
define a rank for muon candidates
Definition: L1MuBMTrack.h:190
L1MuBMTrack::reset
void reset()
reset muon candidate
Definition: L1MuBMTrack.cc:106
L1MuBMTrack::setEta
void setEta(int eta)
set eta-code of muon candidate
Definition: L1MuBMTrack.cc:118
L1MuBMTrack::setTSphi
void setTSphi(const std::vector< const L1MuBMTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
Definition: L1MuBMTrack.cc:147
l1t::RegionalMuonCand::setHwQual
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
Definition: RegionalMuonCand.h:140
L1MuBMTrack::getTSeta
const std::vector< L1MuBMTrackSegEta > & getTSeta() const
return all eta track segments of the muon candidate
Definition: L1MuBMTrack.h:121
L1MuBMTrack::setBx
void setBx(int bx)
set charge of muon candidate
Definition: L1MuBMTrack.h:160
L1MuBMTrack::setFineEtaBit
void setFineEtaBit()
set fine eta bit
Definition: L1MuBMTrack.h:151
L1MuBMTrack::m_tsphiList
std::vector< L1MuBMTrackSegPhi > m_tsphiList
Definition: L1MuBMTrack.h:208
l1t::RegionalMuonCand::hwSign
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
Definition: RegionalMuonCand.h:171
L1MuBMTrack::address
L1MuBMAddressArray address() const
get address-array for this muon candidate
Definition: L1MuBMTrack.h:97
L1MuBMTrack::m_tc
TrackClass m_tc
Definition: L1MuBMTrack.h:204
L1MuBMTrack::phi
unsigned int phi() const
get phi-code (8 bits)
Definition: L1MuBMTrack.h:73
RegionalMuonCand.h
L1MuBMTrackSegEta.h
L1MuBMTrack::m_name
std::string m_name
Definition: L1MuBMTrack.h:202
L1MuBMTrack::getEndTSphi
const L1MuBMTrackSegPhi & getEndTSphi() const
return end phi track segment of muon candidate
Definition: L1MuBMTrack.cc:132
l1t::RegionalMuonCand::setHwPhi
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
Definition: RegionalMuonCand.h:132
L1MuBMAddressArray.h
L1MuBMTrack::operator!=
bool operator!=(const L1MuBMTrack &) const
unequal operator
Definition: L1MuBMTrack.cc:220
L1MuBMTrack::m_addArray
L1MuBMAddressArray m_addArray
Definition: L1MuBMTrack.h:207
L1MuBMTrack::operator=
L1MuBMTrack & operator=(const L1MuBMTrack &)
assignment operator
Definition: L1MuBMTrack.cc:173
l1t::RegionalMuonCand
Definition: RegionalMuonCand.h:8
L1MuBMTrack::~L1MuBMTrack
~L1MuBMTrack() override
destructor
Definition: L1MuBMTrack.cc:97