CMS 3D CMS Logo

L1MuDTTrack.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef L1MUDT_TRACK_H
15 #define L1MUDT_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 
47 class L1MuDTTrack : public L1MuRegionalCand {
48 public:
50  L1MuDTTrack();
51 
54 
56  L1MuDTTrack(const L1MuDTTrack&);
57 
59  ~L1MuDTTrack() override;
60 
62  void reset() override;
63 
65  inline std::string name() const { return m_name; }
66 
68  inline unsigned int pt() const { return pt_packed(); }
69 
71  inline unsigned int phi() const { return phi_packed(); }
72 
74  inline unsigned int eta() const { return eta_packed(); }
75 
77  inline bool fineEtaBit() const { return isFineHalo(); }
78 
80  inline int charge() const { return chargeValue(); }
81 
83  inline TrackClass tc() const { return m_tc; }
84 
86  inline bool empty() const override { return m_empty; }
87 
89  inline const L1MuDTSecProcId& spid() const { return m_spid; }
90 
92  inline L1MuDTAddressArray address() const { return m_addArray; }
93 
95  inline int address(int stat) const { return m_addArray.station(stat); }
96 
98  inline int numberOfTSphi() const { return m_tsphiList.size(); }
99 
101  inline int numberOfTSeta() const { return m_tsetaList.size(); }
102 
104  const std::vector<L1MuDTTrackSegPhi>& getTSphi() const { return m_tsphiList; }
105 
107  const L1MuDTTrackSegPhi& getStartTSphi() const;
108 
110  const L1MuDTTrackSegPhi& getEndTSphi() const;
111 
113  const std::vector<L1MuDTTrackSegEta>& getTSeta() const { return m_tsetaList; }
114 
116  const L1MuDTTrackSegEta& getStartTSeta() const;
117 
119  const L1MuDTTrackSegEta& getEndTSeta() const;
120 
122  inline void enable() {
123  m_empty = false;
124  setType(0);
125  }
126 
128  inline void disable() { m_empty = true; }
129 
131  inline void setName(std::string name) { m_name = name; }
132 
134  inline void setTC(TrackClass tc) { m_tc = tc; }
135 
137  inline void setPhi(int phi) { setPhiPacked(phi); }
138 
140  void setEta(int eta);
141 
143  inline void setFineEtaBit() { setFineHalo(true); }
144 
146  inline void setPt(int pt) { setPtPacked(pt); }
147 
149  inline void setCharge(int charge) {
151  setChargeValid(true);
152  }
153 
155  inline void setQuality(unsigned int quality) { setQualityPacked(quality); }
156 
159 
161  void setTSphi(const std::vector<const L1MuDTTrackSegPhi*>& tsList);
162 
164  void setTSeta(const std::vector<const L1MuDTTrackSegEta*>& tsList);
165 
167  unsigned int triggerScale(float value, const edm::EventSetup& c) const;
168 
171 
173  bool operator==(const L1MuDTTrack&) const;
174 
176  bool operator!=(const L1MuDTTrack&) const;
177 
179  void print() const override;
180 
182  friend std::ostream& operator<<(std::ostream&, const L1MuDTTrack&);
183 
185  static bool rank(const L1MuDTTrack* first, const L1MuDTTrack* second) {
186  unsigned short int rank_f = 0; // rank of first
187  unsigned short int rank_s = 0; // rank of second
188  if (first)
189  rank_f = 10 * first->pt() + first->quality();
190  if (second)
191  rank_s = 10 * second->pt() + second->quality();
192  return rank_f > rank_s;
193  }
194 
195 private:
196  L1MuDTSecProcId m_spid; // which SP found the track
198  bool m_empty;
200 
202  std::vector<L1MuDTTrackSegPhi> m_tsphiList;
203  std::vector<L1MuDTTrackSegEta> m_tsetaList;
204 };
205 
206 #endif
L1MuRegionalCand::setPhiPacked
void setPhiPacked(unsigned phi)
Set Phi: 0..143.
Definition: L1MuRegionalCand.h:120
L1MuDTTrack::setPhi
void setPhi(int phi)
set phi-code of muon candidate
Definition: L1MuDTTrack.h:137
L1MuDTTrack::operator==
bool operator==(const L1MuDTTrack &) const
equal operator
Definition: L1MuDTTrack.cc:202
L1MuDTTrack::setName
void setName(std::string name)
set name of object
Definition: L1MuDTTrack.h:131
L1MuDTTrack::m_empty
bool m_empty
Definition: L1MuDTTrack.h:198
L1MuDTTrack::m_spid
L1MuDTSecProcId m_spid
Definition: L1MuDTTrack.h:196
L1MuDTTrack::setPt
void setPt(int pt)
set pt-code of muon candidate
Definition: L1MuDTTrack.h:146
L1MuDTTrack::print
void print() const override
print parameters of muon candidate
Definition: L1MuDTTrack.cc:260
L1MuDTTrack::getEndTSeta
const L1MuDTTrackSegEta & getEndTSeta() const
return end eta track segment of muon candidate
Definition: L1MuDTTrack.cc:140
L1MuDTSecProcId.h
L1MuDTTrack::numberOfTSphi
int numberOfTSphi() const
return number of phi track segments used to form the muon candidate
Definition: L1MuDTTrack.h:98
ESHandle.h
L1MuDTAddressArray
Definition: L1MuDTAddressArray.h:50
L1MuDTTrack::setTC
void setTC(TrackClass tc)
set track-class of muon candidate
Definition: L1MuDTTrack.h:134
L1MuRegionalCand::phi_packed
unsigned phi_packed() const
return phi packed as in hardware
Definition: L1MuRegionalCand.h:86
L1MuRegionalCand::setFineHalo
void setFineHalo(bool fh)
Set Fine / Halo.
Definition: L1MuRegionalCand.h:160
L1MuDTTrack::name
std::string name() const
get name of object
Definition: L1MuDTTrack.h:65
L1MuDTAddressArray::station
unsigned short station(int stat) const
get address of a given station [1-4]
Definition: L1MuDTAddressArray.h:80
L1MuDTAddressArray.h
L1MuDTTrack::setAddresses
void setAddresses(const L1MuDTAddressArray &addr)
set relative addresses of muon candidate
Definition: L1MuDTTrack.h:158
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
L1MuDTTrack::eta
unsigned int eta() const
get eta-code (6 bits)
Definition: L1MuDTTrack.h:74
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1MuDTTrackSegEta
Definition: L1MuDTTrackSegEta.h:36
L1MuDTTrack::getStartTSeta
const L1MuDTTrackSegEta & getStartTSeta() const
return start eta track segment of muon candidate
Definition: L1MuDTTrack.cc:135
L1MuDTTrack::fineEtaBit
bool fineEtaBit() const
get fine eta bit
Definition: L1MuDTTrack.h:77
L1MuDTTrack::rank
static bool rank(const L1MuDTTrack *first, const L1MuDTTrack *second)
define a rank for muon candidates
Definition: L1MuDTTrack.h:185
L1MuRegionalCand::setType
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
Definition: L1MuRegionalCand.h:114
L1MuDTTrack::enable
void enable()
enable muon candidate
Definition: L1MuDTTrack.h:122
L1MuDTTrack::m_name
std::string m_name
Definition: L1MuDTTrack.h:197
L1MuRegionalCand.h
L1MuDTTrack::setEta
void setEta(int eta)
set eta-code of muon candidate
Definition: L1MuDTTrack.cc:114
L1MuDTTrack::reset
void reset() override
reset muon candidate
Definition: L1MuDTTrack.cc:102
L1MuDTTrack::getEndTSphi
const L1MuDTTrackSegPhi & getEndTSphi() const
return end phi track segment of muon candidate
Definition: L1MuDTTrack.cc:130
L1MuDTTrackSegPhi.h
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
L1MuDTTrack::getTSeta
const std::vector< L1MuDTTrackSegEta > & getTSeta() const
return all eta track segments of the muon candidate
Definition: L1MuDTTrack.h:113
L1MuDTTrack::setQuality
void setQuality(unsigned int quality)
set quality of muon candidate
Definition: L1MuDTTrack.h:155
L1MuDTTrack::setTSphi
void setTSphi(const std::vector< const L1MuDTTrackSegPhi * > &tsList)
set phi track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:145
L1MuDTTrack::operator=
L1MuDTTrack & operator=(const L1MuDTTrack &)
assignment operator
Definition: L1MuDTTrack.cc:184
L1MuDTTrack::operator<<
friend std::ostream & operator<<(std::ostream &, const L1MuDTTrack &)
output stream operator
L1MuRegionalCand
Definition: L1MuRegionalCand.h:26
L1MuDTTrack::triggerScale
unsigned int triggerScale(float value, const edm::EventSetup &c) const
convert pt value in GeV to pt code
Definition: L1MuDTTrack.cc:171
L1MuRegionalCand::setChargeValue
void setChargeValue(int charge)
Set Charge Value: -1, 1.
Definition: L1MuRegionalCand.h:154
L1MuDTTrack::setTSeta
void setTSeta(const std::vector< const L1MuDTTrackSegEta * > &tsList)
set eta track segments used to form the muon candidate
Definition: L1MuDTTrack.cc:158
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1MuDTTrack::m_tsphiList
std::vector< L1MuDTTrackSegPhi > m_tsphiList
Definition: L1MuDTTrack.h:202
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrack::phi
unsigned int phi() const
get phi-code (8 bits)
Definition: L1MuDTTrack.h:71
L1MuDTSecProcId
Definition: L1MuDTSecProcId.h:40
L1MuRegionalCand::chargeValue
int chargeValue() const
get charge
Definition: L1MuRegionalCand.h:64
L1MuDTTrackAssParam.h
L1MuRegionalCand::setPtPacked
void setPtPacked(unsigned pt)
Set Pt: 0..31.
Definition: L1MuRegionalCand.h:123
L1MuDTTrack
Definition: L1MuDTTrack.h:47
L1MuDTTrack::empty
bool empty() const override
is it an empty muon candidate?
Definition: L1MuDTTrack.h:86
value
Definition: value.py:1
L1MuDTTrack::L1MuDTTrack
L1MuDTTrack()
default constructor
Definition: L1MuDTTrack.cc:48
L1MuDTTrack::getTSphi
const std::vector< L1MuDTTrackSegPhi > & getTSphi() const
return all phi track segments of the muon candidate
Definition: L1MuDTTrack.h:104
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1MuDTTrack::disable
void disable()
disable muon candidate
Definition: L1MuDTTrack.h:128
L1MuDTTrack::tc
TrackClass tc() const
get track-class
Definition: L1MuDTTrack.h:83
L1MuDTTrack::operator!=
bool operator!=(const L1MuDTTrack &) const
unequal operator
Definition: L1MuDTTrack.cc:231
L1MuDTTrack::getStartTSphi
const L1MuDTTrackSegPhi & getStartTSphi() const
return start phi track segment of muon candidate
Definition: L1MuDTTrack.cc:125
L1MuDTTrack::charge
int charge() const
get charge (1 bit)
Definition: L1MuDTTrack.h:80
L1MuDTTrackSegEta.h
L1MuRegionalCand::eta_packed
unsigned eta_packed() const
return eta packed as in hardware
Definition: L1MuRegionalCand.h:95
L1MuRegionalCand::isFineHalo
bool isFineHalo() const
is it fine (DT) / halo (CSC) ?
Definition: L1MuRegionalCand.h:70
EventSetup.h
L1MuRegionalCand::pt_packed
unsigned pt_packed() const
return pt packed as in hardware
Definition: L1MuRegionalCand.h:89
L1MuDTTrackSegPhi
Definition: L1MuDTTrackSegPhi.h:36
L1MuDTTrack::setFineEtaBit
void setFineEtaBit()
set fine eta bit
Definition: L1MuDTTrack.h:143
L1MuDTTrack::m_tsetaList
std::vector< L1MuDTTrackSegEta > m_tsetaList
Definition: L1MuDTTrack.h:203
L1MuDTTrack::m_addArray
L1MuDTAddressArray m_addArray
Definition: L1MuDTTrack.h:201
L1MuRegionalCand::setChargeValid
void setChargeValid(bool valid)
Set Charge Valid.
Definition: L1MuRegionalCand.h:157
L1MuDTTrack::~L1MuDTTrack
~L1MuDTTrack() override
destructor
Definition: L1MuDTTrack.cc:93
L1MuDTTrack::setCharge
void setCharge(int charge)
set charge of muon candidate
Definition: L1MuDTTrack.h:149
L1MuDTTrack::m_tc
TrackClass m_tc
Definition: L1MuDTTrack.h:199
L1MuDTTrack::pt
unsigned int pt() const
get pt-code (5 bits)
Definition: L1MuDTTrack.h:68
L1MuRegionalCand::setQualityPacked
void setQualityPacked(unsigned qual)
Set Quality: 0..7.
Definition: L1MuRegionalCand.h:126
L1MuDTTrack::numberOfTSeta
int numberOfTSeta() const
return number of eta track segments used to form the muon candidate
Definition: L1MuDTTrack.h:101
L1MuDTTrack::address
int address(int stat) const
get relative address of a given station
Definition: L1MuDTTrack.h:95
L1MuRegionalCand::quality
unsigned int quality() const
return quality
Definition: L1MuRegionalCand.h:73
L1MuDTTrack::address
L1MuDTAddressArray address() const
get address-array for this muon candidate
Definition: L1MuDTTrack.h:92
L1MuDTTrack::spid
const L1MuDTSecProcId & spid() const
return Sector Processor in which the muon candidate was found
Definition: L1MuDTTrack.h:89