CMS 3D CMS Logo

SAMuon.h
Go to the documentation of this file.
1 #ifndef DataFormatsL1TMuonPhase2_SAMuon_h
2 #define DataFormatsL1TMuonPhase2_SAMuon_h
3 
10 
11 namespace l1t {
12 
13  class SAMuon;
14 
15  typedef std::vector<SAMuon> SAMuonCollection;
17  typedef std::vector<edm::Ref<SAMuonCollection> > SAMuonRefVector;
18 
19  class SAMuon : public L1Candidate {
20  public:
21  SAMuon();
22 
23  SAMuon(const l1t::Muon& mu, bool charge, uint pt, int eta, int phi, int z0, int d0, uint quality);
24 
25  ~SAMuon() override;
26 
27  const bool hwCharge() const { return hwCharge_; }
28  const int hwZ0() const { return hwZ0_; }
29  const int hwD0() const { return hwD0_; }
30  const uint hwBeta() const { return hwBeta_; }
31  void setBeta(uint beta) { hwBeta_ = beta; }
32 
33  const uint64_t word() const { return word_; }
35  void print() const;
36 
37  bool operator<(const SAMuon& other) const {
38  if (hwPt() == other.hwPt())
39  return (hwEta() < other.hwEta());
40  else
41  return (hwPt() < other.hwPt());
42  }
43  bool operator>(const SAMuon& other) const {
44  if (hwPt() == other.hwPt())
45  return (hwEta() > other.hwEta());
46  else
47  return (hwPt() > other.hwPt());
48  }
49 
50  private:
51  bool hwCharge_;
52  int hwZ0_;
53  int hwD0_;
56  };
57 } // namespace l1t
58 
59 #endif
bool operator<(const SAMuon &other) const
Definition: SAMuon.h:37
uint hwBeta_
Definition: SAMuon.h:54
const bool hwCharge() const
Definition: SAMuon.h:27
double pt() const final
transverse momentum
bool operator>(const SAMuon &other) const
Definition: SAMuon.h:43
const uint hwBeta() const
Definition: SAMuon.h:30
void setWord(uint64_t word)
Definition: SAMuon.h:34
delete x;
Definition: CaloConfig.h:22
void print() const
Definition: SAMuon.cc:13
const int hwD0() const
Definition: SAMuon.h:29
std::vector< edm::Ref< SAMuonCollection > > SAMuonRefVector
Definition: SAMuon.h:17
int hwZ0_
Definition: SAMuon.h:52
void setBeta(uint beta)
Definition: SAMuon.h:31
uint64_t word
bool hwCharge_
Definition: SAMuon.h:51
uint64_t word_
Definition: SAMuon.h:55
SAMuon()
Definition: SAMuon.cc:6
int hwEta() const
Definition: L1Candidate.h:36
edm::Ref< SAMuonCollection > SAMuonRef
Definition: SAMuon.h:16
int hwD0_
Definition: SAMuon.h:53
const uint64_t word() const
Definition: SAMuon.h:33
Definition: Muon.h:21
static constexpr float d0
std::vector< SAMuon > SAMuonCollection
Definition: SAMuon.h:13
int hwPt() const
Definition: L1Candidate.h:35
unsigned long long uint64_t
Definition: Time.h:13
const int hwZ0() const
Definition: SAMuon.h:28
~SAMuon() override
Definition: SAMuon.cc:11
string quality
double phi() const final
momentum azimuthal angle
int charge() const final
electric charge
double eta() const final
momentum pseudorapidity