CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SimpleL1MuGMTCand.h
Go to the documentation of this file.
1 #ifndef SIMPLEL1MU_GMT_CAND_H
2 #define SIMPLEL1MU_GMT_CAND_H
3 
5 
7 
8 class SimTrack;
9 
10 namespace HepMC {
11  class GenParticle;
12 }
13 
25 public:
27 
30 
33 
36 
39 
42  unsigned etaIndex,
43  unsigned phiIndex,
44  unsigned pTIndex,
45  float etaValue,
46  float phiValue,
47  float pTValue);
48 
50  ~SimpleL1MuGMTCand() override;
51 
53  void reset();
54 
56  inline std::string name() const { return m_name; }
57 
59  inline unsigned int phi() const { return m_phi; }
60 
62  inline unsigned int eta() const { return m_eta; }
63 
65  inline unsigned int pt() const { return m_pt; }
66 
68  inline int charge() const { return m_charge; }
69 
71  inline unsigned int rank() const { return m_rank; }
72 
74  inline bool empty() const { return m_empty; }
75 
77  inline void enable() { m_empty = false; }
78 
80  inline void disable() { m_empty = true; }
81 
83  void setPhi(float phi);
84 
86  void setEta(float eta);
87 
89  void setPt(float pt);
90 
92  void setCharge(int charge);
93 
95  inline void setRank(unsigned int rank) { m_rank = rank; }
96 
98  float smearedPt() const { return m_smearedPt; }
99 
101  inline unsigned int linearizedPt(float lsbValue, unsigned maxScale) const { return 0; }
102 
104  inline unsigned int quality() const { return m_quality; }
105 
106  unsigned int etaRegionIndex() const { return eta(); }
107 
108  unsigned int phiRegionIndex() const { return phi(); }
109 
110  // set and get the 4-momentum of the original (generator) particle
111  void setMomentum(const LorentzVector& m) { myMomentum = m; }
112  const LorentzVector getMomentum() const { return myMomentum; }
113 
116 
119 
121  bool operator==(const SimpleL1MuGMTCand&) const;
122 
124  bool operator!=(const SimpleL1MuGMTCand&) const;
125 
127  void print() const;
128 
130  friend std::ostream& operator<<(std::ostream&, const SimpleL1MuGMTCand&);
131 
134  unsigned int rank_f = (first) ? first->rank() : 0;
135  unsigned int rank_s = (second) ? second->rank() : 0;
136  return rank_f > rank_s;
137  }
138 
139  static const float ptScale[32];
140  static const float etaScale[63];
141  static const float phiScale[144];
142 
143 private:
145  bool m_empty;
146 
147  unsigned int m_phi;
148  unsigned int m_eta;
149  unsigned int m_pt;
150  int m_charge;
151  unsigned int m_quality;
152  unsigned int m_rank;
153  float m_smearedPt;
154 
156 };
157 
158 #endif
float etaValue() const
Definition: L1MuGMTCand.cc:102
void setRank(unsigned int rank)
set rank
float phiValue() const
Definition: L1MuGMTCand.cc:92
unsigned int eta() const
get eta-code
unsigned int rank() const
get rank
unsigned int phiRegionIndex() const
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:70
void enable()
enable muon candidate
int charge() const
get charge
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:105
SimpleL1MuGMTCand & operator=(const SimpleL1MuGMTCand &)
assignment operator
unsigned int m_quality
void print() const
print parameters of muon candidate
U second(std::pair< T, U > const &p)
bool operator!=(const SimpleL1MuGMTCand &) const
unequal operator
bool operator==(const SimpleL1MuGMTCand &) const
equal operator
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
unsigned int pt() const
get pt-code
static const float etaScale[63]
math::XYZTLorentzVector LorentzVector
static const float ptScale[32]
void reset()
reset muon candidate
void setCharge(int charge)
set charge and packed code of muon candidate
bool empty() const
is it an empty muon candidate?
~SimpleL1MuGMTCand() override
destructor
friend std::ostream & operator<<(std::ostream &, const SimpleL1MuGMTCand &)
output stream operator
float smearedPt() const
return the smeared L1 Pt value before discretization in 32-bit
std::string name() const
get name of object
void setPt(float pt)
set pt-value and packed code of muon candidate
void disable()
disable muon candidate
void setEta(float eta)
set eta-value and packed code of muon candidate
unsigned int quality() const
get quality (not implemented for FAMOS)
const LorentzVector getMomentum() const
unsigned int etaRegionIndex() const
SimpleL1MuGMTCand()
constructor
void setMomentum(const LorentzVector &m)
unsigned int phi() const
get phi-code
void setPhi(float phi)
set phi-value and packed code of muon candidate
LorentzVector myMomentum
static const float phiScale[144]
bool getRank(const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
define a rank for muon candidates
unsigned int linearizedPt(float lsbValue, unsigned maxScale) const
nevermind this one