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 
42 
43 // ---------------------
44 // -- Class Interface --
45 // ---------------------
46 
48 
49 typedef std::vector<L1MuBMTrack> L1MuBMTrackCollection;
50 
52 public:
54  L1MuBMTrack();
55 
58 
60  L1MuBMTrack(const L1MuBMTrack&);
61 
63  ~L1MuBMTrack() override;
64 
66  void reset();
67 
69  inline std::string name() const { return m_name; }
70 
72  inline unsigned int pt() const { return hwPt(); }
73 
75  inline unsigned int phi() const { return hwPhi(); }
76 
78  inline int eta() const { return hwEta(); }
79 
81  inline bool fineEtaBit() const { return hwHF(); }
82 
84  inline int charge() const { return hwSign(); }
85 
87  inline unsigned int quality() const { return hwQual(); }
88 
90  inline TrackClass tc() const { return m_tc; }
91 
93  inline bool empty() const { return m_empty; }
94 
96  inline const L1MuBMSecProcId& spid() const { return m_spid; }
97 
99  inline L1MuBMAddressArray address() const { return m_addArray; }
100 
102  inline int address(int stat) const { return m_addArray.station(stat); }
103 
105  inline int bx() const { return m_bx; }
106 
108  inline int numberOfTSphi() const { return m_tsphiList.size(); }
109 
111  inline int numberOfTSeta() const { return m_tsetaList.size(); }
112 
114  const std::vector<L1MuBMTrackSegPhi>& getTSphi() const { return m_tsphiList; }
115 
117  const L1MuBMTrackSegPhi& getStartTSphi() const;
118 
120  const L1MuBMTrackSegPhi& getEndTSphi() const;
121 
123  const std::vector<L1MuBMTrackSegEta>& getTSeta() const { return m_tsetaList; }
124 
126  const L1MuBMTrackSegEta& getStartTSeta() const;
127 
129  const L1MuBMTrackSegEta& getEndTSeta() const;
130 
132  inline void enable() {
133  m_empty = false;
134  setTFIdentifiers(this->spid().sector(), l1t::tftype::bmtf);
135  };
136 
138  inline void disable() { m_empty = true; }
139 
141  inline void setName(std::string name) { m_name = name; }
142 
144  inline void setTC(TrackClass tc) { m_tc = tc; }
145 
147  inline void setPhi(int phi) { setHwPhi(phi); }
148 
150  void setEta(int eta);
151 
153  inline void setFineEtaBit() { setHwHF(true); }
154 
156  inline void setPt(int pt) { setHwPt(pt); }
157 
159  inline void setCharge(int charge) { setHwSign(charge); }
160 
162  inline void setBx(int bx) { m_bx = bx; }
163 
165  inline void setQuality(unsigned int quality) { setHwQual(quality); }
166 
169 
171  void setTSphi(const std::vector<const L1MuBMTrackSegPhi*>& tsList);
172 
174  void setTSeta(const std::vector<const L1MuBMTrackSegEta*>& tsList);
175 
177  unsigned int triggerScale(float value, const edm::EventSetup& c) const;
178 
181 
183  bool operator==(const L1MuBMTrack&) const;
184 
186  bool operator!=(const L1MuBMTrack&) const;
187 
189  void print() const;
190 
192  friend std::ostream& operator<<(std::ostream&, const L1MuBMTrack&);
193 
195  static bool rank(const L1MuBMTrack* first, const L1MuBMTrack* second) {
196  unsigned short int rank_f = 0; // rank of first
197  unsigned short int rank_s = 0; // rank of second
198  if (first)
199  rank_f = first->pt() + 512 * first->quality();
200  if (second)
201  rank_s = second->pt() + 512 * second->quality();
202  return rank_f > rank_s;
203  }
204 
205 private:
206  L1MuBMSecProcId m_spid; // which SP found the track
208  bool m_empty;
210  int m_bx;
211 
213  std::vector<L1MuBMTrackSegPhi> m_tsphiList;
214  std::vector<L1MuBMTrackSegEta> m_tsetaList;
215 };
216 
217 #endif
L1MuBMTrack::empty
bool empty() const
is it an empty muon candidate?
Definition: L1MuBMTrack.h:93
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:78
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:114
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
ESHandle.h
L1MuBMTrack::setTC
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuBMTrack.h:144
L1MuBMTrack::setPt
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuBMTrack.h:156
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:72
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:168
L1MuBMAddressArray
Definition: L1MuBMAddressArray.h:50
L1MuBMTrack::fineEtaBit
bool fineEtaBit() const
get fine eta bit
Definition: L1MuBMTrack.h:81
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:210
L1MuBMTrack::tc
TrackClass tc() const
get track-class
Definition: L1MuBMTrack.h:90
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
L1MuBMTrack::numberOfTSphi
int numberOfTSphi() const
return number of phi track segments used to form the muon candidate
Definition: L1MuBMTrack.h:108
L1MuBMTrack::m_spid
L1MuBMSecProcId m_spid
Definition: L1MuBMTrack.h:206
L1MuBMTrack::setPhi
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuBMTrack.h:147
L1MuBMTrack::setName
void setName(std::string name)
set name of object
Definition: L1MuBMTrack.h:141
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1MuBMTrack::enable
void enable()
enable muon candidate
Definition: L1MuBMTrack.h:132
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:208
L1MuBMTrack::operator==
bool operator==(const L1MuBMTrack &) const
equal operator
Definition: L1MuBMTrack.cc:205
L1MuBMTrack::setQuality
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuBMTrack.h:165
L1MuBMTrack::print
void print() const
print parameters of muon candidate
Definition: L1MuBMTrack.cc:263
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:214
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
L1MuBMTrack::spid
const L1MuBMSecProcId & spid() const
return Sector Processor in which the muon candidate was found
Definition: L1MuBMTrack.h:96
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:84
L1MuBMTrack::quality
unsigned int quality() const
get quality
Definition: L1MuBMTrack.h:87
L1MuBMTrack::setCharge
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuBMTrack.h:159
L1MuBMTrack::disable
void disable()
disable muon candidate
Definition: L1MuBMTrack.h:138
L1MuBMTrack::numberOfTSeta
int numberOfTSeta() const
return number of eta track segments used to form the muon candidate
Definition: L1MuBMTrack.h:111
L1MuBMTrack::bx
int bx() const
get the bunch crossing for this muon candidate
Definition: L1MuBMTrack.h:105
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:47
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:69
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:102
L1MuBMTrack
Definition: L1MuBMTrack.h:51
L1MuBMSecProcId.h
L1MuBMTrack::rank
static bool rank(const L1MuBMTrack *first, const L1MuBMTrack *second)
define a rank for muon candidates
Definition: L1MuBMTrack.h:195
value
Definition: value.py:1
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
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
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:123
L1MuBMTrack::setBx
void setBx(int bx)
set charge of muon candidate
Definition: L1MuBMTrack.h:162
L1MuBMTrack::setFineEtaBit
void setFineEtaBit()
set fine eta bit
Definition: L1MuBMTrack.h:153
L1MuBMTrack::m_tsphiList
std::vector< L1MuBMTrackSegPhi > m_tsphiList
Definition: L1MuBMTrack.h:213
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:99
L1MuBMTrack::m_tc
TrackClass m_tc
Definition: L1MuBMTrack.h:209
L1MuBMTrack::triggerScale
unsigned int triggerScale(float value, const edm::EventSetup &c) const
convert pt value in GeV to pt code
Definition: L1MuBMTrack.cc:173
L1MuBMTrack::phi
unsigned int phi() const
get phi-code (8 bits)
Definition: L1MuBMTrack.h:75
EventSetup.h
RegionalMuonCand.h
L1MuBMTrackSegEta.h
L1MuBMTrack::m_name
std::string m_name
Definition: L1MuBMTrack.h:207
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:234
L1MuBMTrack::m_addArray
L1MuBMAddressArray m_addArray
Definition: L1MuBMTrack.h:212
L1MuBMTrack::operator=
L1MuBMTrack & operator=(const L1MuBMTrack &)
assignment operator
Definition: L1MuBMTrack.cc:187
l1t::RegionalMuonCand
Definition: RegionalMuonCand.h:8
L1MuBMTrack::~L1MuBMTrack
~L1MuBMTrack() override
destructor
Definition: L1MuBMTrack.cc:97