CMS 3D CMS Logo

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